From 1b2e101b39cf15b073655a19b7f17031c9f9f96a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 6 Apr 2026 05:01:49 +0000 Subject: [PATCH 1/2] feat: added support for detecting key-value pairs in client provided metadata PiperOrigin-RevId: 895098649 Source-Link: https://github.com/googleapis/googleapis/commit/544bab0c27830b8e4d4a2c1dfc87a3b2c0cdc118 Source-Link: https://github.com/googleapis/googleapis-gen/commit/676f5fc590d577b8993aa5fa6b50f227bf35fe5a Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRscC12Mi8uT3dsQm90LnlhbWwiLCJoIjoiNjc2ZjVmYzU5MGQ1NzdiODk5M2FhNWZhNmI1MGYyMjdiZjM1ZmU1YSJ9 --- .../google-cloud-dlp-v2/.gitignore | 22 + .../google-cloud-dlp-v2/.repo-metadata.json | 18 + .../google-cloud-dlp-v2/.rubocop.yml | 33 + owl-bot-staging/google-cloud-dlp-v2/.toys.rb | 28 + owl-bot-staging/google-cloud-dlp-v2/.yardopts | 12 + .../google-cloud-dlp-v2/AUTHENTICATION.md | 122 + .../google-cloud-dlp-v2/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-dlp-v2/Gemfile | 14 + .../google-cloud-dlp-v2/LICENSE.md | 201 + owl-bot-staging/google-cloud-dlp-v2/README.md | 154 + owl-bot-staging/google-cloud-dlp-v2/Rakefile | 169 + .../google-cloud-dlp-v2/gapic_metadata.json | 293 + .../google-cloud-dlp-v2.gemspec | 29 + .../lib/google-cloud-dlp-v2.rb | 21 + .../lib/google/cloud/dlp/v2.rb | 45 + .../lib/google/cloud/dlp/v2/dlp_service.rb | 59 + .../google/cloud/dlp/v2/dlp_service/client.rb | 6826 +++++++++++++ .../cloud/dlp/v2/dlp_service/credentials.rb | 51 + .../google/cloud/dlp/v2/dlp_service/paths.rb | 618 ++ .../google/cloud/dlp/v2/dlp_service/rest.rb | 56 + .../cloud/dlp/v2/dlp_service/rest/client.rb | 6406 ++++++++++++ .../dlp/v2/dlp_service/rest/service_stub.rb | 4119 ++++++++ .../lib/google/cloud/dlp/v2/rest.rb | 37 + .../lib/google/cloud/dlp/v2/version.rb | 28 + .../lib/google/privacy/dlp/v2/dlp_pb.rb | 438 + .../google/privacy/dlp/v2/dlp_services_pb.rb | 298 + .../lib/google/privacy/dlp/v2/storage_pb.rb | 65 + .../google-cloud-dlp-v2/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/privacy/dlp/v2/dlp.rb | 8998 +++++++++++++++++ .../google/privacy/dlp/v2/storage.rb | 1047 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 56 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/timeofday.rb | 49 + .../google-cloud-dlp-v2/snippets/Gemfile | 32 + .../dlp_service/activate_job_trigger.rb | 47 + .../snippets/dlp_service/cancel_dlp_job.rb | 47 + .../snippets/dlp_service/create_connection.rb | 47 + .../dlp_service/create_deidentify_template.rb | 47 + .../dlp_service/create_discovery_config.rb | 47 + .../snippets/dlp_service/create_dlp_job.rb | 47 + .../dlp_service/create_inspect_template.rb | 47 + .../dlp_service/create_job_trigger.rb | 47 + .../dlp_service/create_stored_info_type.rb | 47 + .../dlp_service/deidentify_content.rb | 47 + .../snippets/dlp_service/delete_connection.rb | 47 + .../dlp_service/delete_deidentify_template.rb | 47 + .../dlp_service/delete_discovery_config.rb | 47 + .../snippets/dlp_service/delete_dlp_job.rb | 47 + .../delete_file_store_data_profile.rb | 47 + .../dlp_service/delete_inspect_template.rb | 47 + .../dlp_service/delete_job_trigger.rb | 47 + .../dlp_service/delete_stored_info_type.rb | 47 + .../dlp_service/delete_table_data_profile.rb | 47 + .../snippets/dlp_service/finish_dlp_job.rb | 47 + .../dlp_service/get_column_data_profile.rb | 47 + .../snippets/dlp_service/get_connection.rb | 47 + .../dlp_service/get_deidentify_template.rb | 47 + .../dlp_service/get_discovery_config.rb | 47 + .../snippets/dlp_service/get_dlp_job.rb | 47 + .../get_file_store_data_profile.rb | 47 + .../dlp_service/get_inspect_template.rb | 47 + .../snippets/dlp_service/get_job_trigger.rb | 47 + .../dlp_service/get_project_data_profile.rb | 47 + .../dlp_service/get_stored_info_type.rb | 47 + .../dlp_service/get_table_data_profile.rb | 47 + .../dlp_service/hybrid_inspect_dlp_job.rb | 47 + .../dlp_service/hybrid_inspect_job_trigger.rb | 47 + .../snippets/dlp_service/inspect_content.rb | 47 + .../dlp_service/list_column_data_profiles.rb | 51 + .../snippets/dlp_service/list_connections.rb | 51 + .../dlp_service/list_deidentify_templates.rb | 51 + .../dlp_service/list_discovery_configs.rb | 51 + .../snippets/dlp_service/list_dlp_jobs.rb | 51 + .../list_file_store_data_profiles.rb | 51 + .../snippets/dlp_service/list_info_types.rb | 47 + .../dlp_service/list_inspect_templates.rb | 51 + .../snippets/dlp_service/list_job_triggers.rb | 51 + .../dlp_service/list_project_data_profiles.rb | 51 + .../dlp_service/list_stored_info_types.rb | 51 + .../dlp_service/list_table_data_profiles.rb | 51 + .../snippets/dlp_service/redact_image.rb | 47 + .../dlp_service/reidentify_content.rb | 47 + .../dlp_service/search_connections.rb | 51 + .../snippets/dlp_service/update_connection.rb | 47 + .../dlp_service/update_deidentify_template.rb | 47 + .../dlp_service/update_discovery_config.rb | 47 + .../dlp_service/update_inspect_template.rb | 47 + .../dlp_service/update_job_trigger.rb | 47 + .../dlp_service/update_stored_info_type.rb | 47 + ...nippet_metadata_google.privacy.dlp.v2.json | 2215 ++++ .../cloud/dlp/v2/dlp_service_paths_test.rb | 271 + .../cloud/dlp/v2/dlp_service_rest_test.rb | 3176 ++++++ .../google/cloud/dlp/v2/dlp_service_test.rb | 3569 +++++++ .../google-cloud-dlp-v2/test/helper.rb | 26 + 104 files changed, 43946 insertions(+) create mode 100644 owl-bot-staging/google-cloud-dlp-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-dlp-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-dlp-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-dlp-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-dlp-v2/README.md create mode 100644 owl-bot-staging/google-cloud-dlp-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json create mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/helper.rb diff --git a/owl-bot-staging/google-cloud-dlp-v2/.gitignore b/owl-bot-staging/google-cloud-dlp-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json new file mode 100644 index 000000000000..62037e73a293 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "dlp.googleapis.com", + "api_shortname": "dlp", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest", + "distribution_name": "google-cloud-dlp-v2", + "is_cloud": true, + "language": "ruby", + "name": "dlp", + "name_pretty": "Cloud Data Loss Prevention (DLP) V2 API", + "product_documentation": "https://cloud.google.com/dlp", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. Note that google-cloud-dlp-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dlp instead. See the readme for more details.", + "ruby-cloud-env-prefix": "DLP", + "ruby-cloud-product-url": "https://cloud.google.com/dlp", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml b/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml new file mode 100644 index 000000000000..a29f692b0af2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-dlp-v2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-dlp-v2.rb" diff --git a/owl-bot-staging/google-cloud-dlp-v2/.toys.rb b/owl-bot-staging/google-cloud-dlp-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/.yardopts b/owl-bot-staging/google-cloud-dlp-v2/.yardopts new file mode 100644 index 000000000000..b70bc23263e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Data Loss Prevention (DLP) V2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..3a45b665dc2a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-dlp-v2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-dlp-v2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/dlp/v2" + +client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/dlp/v2" + +::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Dlp::V2::DlpService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-dlp-v2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/dlp/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Dlp::V2::DlpService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-dlp-v2/Gemfile b/owl-bot-staging/google-cloud-dlp-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md b/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-dlp-v2/README.md b/owl-bot-staging/google-cloud-dlp-v2/README.md new file mode 100644 index 000000000000..2c0634d76a43 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Data Loss Prevention (DLP) V2 API + +Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease. + +Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Data Loss Prevention (DLP) V2 API. Most users should consider using +the main client gem, +[google-cloud-dlp](https://rubygems.org/gems/google-cloud-dlp). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-dlp-v2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/dlp/v2" + +client = ::Google::Cloud::Dlp::V2::DlpService::Client.new +request = ::Google::Cloud::Dlp::V2::InspectContentRequest.new # (request fields as keyword arguments...) +response = client.inspect_content request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/dlp) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/dlp/v2" +require "logger" + +client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-dlp`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-dlp-v2`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-dlp`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-dlp-v2`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dlp-v2/Rakefile b/owl-bot-staging/google-cloud-dlp-v2/Rakefile new file mode 100644 index 000000000000..4b3dae5465af --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-dlp-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["DLP_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["DLP_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["DLP_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or DLP_TEST_PROJECT=test123 DLP_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/dlp/v2/dlp_service/credentials" + ::Google::Cloud::Dlp::V2::DlpService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["DLP_PROJECT"] = project + ENV["DLP_TEST_PROJECT"] = project + ENV["DLP_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-dlp-v2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dlp-v2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dlp-v2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-dlp-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-dlp-v2" + header "google-cloud-dlp-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-dlp-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-dlp-v2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-dlp-v2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-dlp-v2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json new file mode 100644 index 000000000000..2d460b34261e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json @@ -0,0 +1,293 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.privacy.dlp.v2", + "libraryPackage": "::Google::Cloud::Dlp::V2", + "services": { + "DlpService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dlp::V2::DlpService::Client", + "rpcs": { + "InspectContent": { + "methods": [ + "inspect_content" + ] + }, + "RedactImage": { + "methods": [ + "redact_image" + ] + }, + "DeidentifyContent": { + "methods": [ + "deidentify_content" + ] + }, + "ReidentifyContent": { + "methods": [ + "reidentify_content" + ] + }, + "ListInfoTypes": { + "methods": [ + "list_info_types" + ] + }, + "CreateInspectTemplate": { + "methods": [ + "create_inspect_template" + ] + }, + "UpdateInspectTemplate": { + "methods": [ + "update_inspect_template" + ] + }, + "GetInspectTemplate": { + "methods": [ + "get_inspect_template" + ] + }, + "ListInspectTemplates": { + "methods": [ + "list_inspect_templates" + ] + }, + "DeleteInspectTemplate": { + "methods": [ + "delete_inspect_template" + ] + }, + "CreateDeidentifyTemplate": { + "methods": [ + "create_deidentify_template" + ] + }, + "UpdateDeidentifyTemplate": { + "methods": [ + "update_deidentify_template" + ] + }, + "GetDeidentifyTemplate": { + "methods": [ + "get_deidentify_template" + ] + }, + "ListDeidentifyTemplates": { + "methods": [ + "list_deidentify_templates" + ] + }, + "DeleteDeidentifyTemplate": { + "methods": [ + "delete_deidentify_template" + ] + }, + "CreateJobTrigger": { + "methods": [ + "create_job_trigger" + ] + }, + "UpdateJobTrigger": { + "methods": [ + "update_job_trigger" + ] + }, + "HybridInspectJobTrigger": { + "methods": [ + "hybrid_inspect_job_trigger" + ] + }, + "GetJobTrigger": { + "methods": [ + "get_job_trigger" + ] + }, + "ListJobTriggers": { + "methods": [ + "list_job_triggers" + ] + }, + "DeleteJobTrigger": { + "methods": [ + "delete_job_trigger" + ] + }, + "ActivateJobTrigger": { + "methods": [ + "activate_job_trigger" + ] + }, + "CreateDiscoveryConfig": { + "methods": [ + "create_discovery_config" + ] + }, + "UpdateDiscoveryConfig": { + "methods": [ + "update_discovery_config" + ] + }, + "GetDiscoveryConfig": { + "methods": [ + "get_discovery_config" + ] + }, + "ListDiscoveryConfigs": { + "methods": [ + "list_discovery_configs" + ] + }, + "DeleteDiscoveryConfig": { + "methods": [ + "delete_discovery_config" + ] + }, + "CreateDlpJob": { + "methods": [ + "create_dlp_job" + ] + }, + "ListDlpJobs": { + "methods": [ + "list_dlp_jobs" + ] + }, + "GetDlpJob": { + "methods": [ + "get_dlp_job" + ] + }, + "DeleteDlpJob": { + "methods": [ + "delete_dlp_job" + ] + }, + "CancelDlpJob": { + "methods": [ + "cancel_dlp_job" + ] + }, + "CreateStoredInfoType": { + "methods": [ + "create_stored_info_type" + ] + }, + "UpdateStoredInfoType": { + "methods": [ + "update_stored_info_type" + ] + }, + "GetStoredInfoType": { + "methods": [ + "get_stored_info_type" + ] + }, + "ListStoredInfoTypes": { + "methods": [ + "list_stored_info_types" + ] + }, + "DeleteStoredInfoType": { + "methods": [ + "delete_stored_info_type" + ] + }, + "ListProjectDataProfiles": { + "methods": [ + "list_project_data_profiles" + ] + }, + "ListTableDataProfiles": { + "methods": [ + "list_table_data_profiles" + ] + }, + "ListColumnDataProfiles": { + "methods": [ + "list_column_data_profiles" + ] + }, + "GetProjectDataProfile": { + "methods": [ + "get_project_data_profile" + ] + }, + "ListFileStoreDataProfiles": { + "methods": [ + "list_file_store_data_profiles" + ] + }, + "GetFileStoreDataProfile": { + "methods": [ + "get_file_store_data_profile" + ] + }, + "DeleteFileStoreDataProfile": { + "methods": [ + "delete_file_store_data_profile" + ] + }, + "GetTableDataProfile": { + "methods": [ + "get_table_data_profile" + ] + }, + "GetColumnDataProfile": { + "methods": [ + "get_column_data_profile" + ] + }, + "DeleteTableDataProfile": { + "methods": [ + "delete_table_data_profile" + ] + }, + "HybridInspectDlpJob": { + "methods": [ + "hybrid_inspect_dlp_job" + ] + }, + "FinishDlpJob": { + "methods": [ + "finish_dlp_job" + ] + }, + "CreateConnection": { + "methods": [ + "create_connection" + ] + }, + "GetConnection": { + "methods": [ + "get_connection" + ] + }, + "ListConnections": { + "methods": [ + "list_connections" + ] + }, + "SearchConnections": { + "methods": [ + "search_connections" + ] + }, + "DeleteConnection": { + "methods": [ + "delete_connection" + ] + }, + "UpdateConnection": { + "methods": [ + "update_connection" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec b/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec new file mode 100644 index 000000000000..055e491d135e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/dlp/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-dlp-v2" + gem.version = Google::Cloud::Dlp::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. Note that google-cloud-dlp-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dlp instead. See the readme for more details." + gem.summary = "Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb new file mode 100644 index 000000000000..3d5140ab8826 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/dlp/v2" diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb new file mode 100644 index 000000000000..56f661164443 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dlp/v2/dlp_service" +require "google/cloud/dlp/v2/version" + +module Google + module Cloud + module Dlp + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/dlp/v2" + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/dlp/v2" + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/dlp/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb new file mode 100644 index 000000000000..ccaa5a19eba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dlp/v2/version" + +require "google/cloud/dlp/v2/dlp_service/credentials" +require "google/cloud/dlp/v2/dlp_service/paths" +require "google/cloud/dlp/v2/dlp_service/client" +require "google/cloud/dlp/v2/dlp_service/rest" + +module Google + module Cloud + module Dlp + module V2 + ## + # Sensitive Data Protection provides access to a powerful sensitive data + # inspection, classification, and de-identification platform that works + # on text, images, and Google Cloud storage repositories. + # To learn more about concepts and find how-to guides see + # https://cloud.google.com/sensitive-data-protection/docs/. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dlp/v2/dlp_service" + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dlp/v2/dlp_service/rest" + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + module DlpService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dlp_service", "helpers.rb" +require "google/cloud/dlp/v2/dlp_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb new file mode 100644 index 000000000000..b0937c8d57ec --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb @@ -0,0 +1,6826 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/privacy/dlp/v2/dlp_pb" +require "google/cloud/location" + +module Google + module Cloud + module Dlp + module V2 + module DlpService + ## + # Client for the DlpService service. + # + # Sensitive Data Protection provides access to a powerful sensitive data + # inspection, classification, and de-identification platform that works + # on text, images, and Google Cloud storage repositories. + # To learn more about concepts and find how-to guides see + # https://cloud.google.com/sensitive-data-protection/docs/. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dlp_service_stub + + ## + # Configure the DlpService Client class. + # + # See {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DlpService clients + # ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dlp", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.inspect_content.timeout = 300.0 + default_config.rpcs.inspect_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.redact_image.timeout = 300.0 + default_config.rpcs.redact_image.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deidentify_content.timeout = 300.0 + default_config.rpcs.deidentify_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.reidentify_content.timeout = 300.0 + default_config.rpcs.reidentify_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_info_types.timeout = 300.0 + default_config.rpcs.list_info_types.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_inspect_template.timeout = 300.0 + + default_config.rpcs.update_inspect_template.timeout = 300.0 + + default_config.rpcs.get_inspect_template.timeout = 300.0 + default_config.rpcs.get_inspect_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_inspect_templates.timeout = 300.0 + default_config.rpcs.list_inspect_templates.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_inspect_template.timeout = 300.0 + default_config.rpcs.delete_inspect_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_deidentify_template.timeout = 300.0 + + default_config.rpcs.update_deidentify_template.timeout = 300.0 + + default_config.rpcs.get_deidentify_template.timeout = 300.0 + default_config.rpcs.get_deidentify_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_deidentify_templates.timeout = 300.0 + default_config.rpcs.list_deidentify_templates.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_deidentify_template.timeout = 300.0 + default_config.rpcs.delete_deidentify_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_job_trigger.timeout = 300.0 + + default_config.rpcs.update_job_trigger.timeout = 300.0 + + default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0 + + default_config.rpcs.get_job_trigger.timeout = 300.0 + default_config.rpcs.get_job_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_job_triggers.timeout = 300.0 + default_config.rpcs.list_job_triggers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_job_trigger.timeout = 300.0 + default_config.rpcs.delete_job_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.activate_job_trigger.timeout = 300.0 + + default_config.rpcs.create_discovery_config.timeout = 300.0 + + default_config.rpcs.update_discovery_config.timeout = 300.0 + + default_config.rpcs.get_discovery_config.timeout = 300.0 + default_config.rpcs.get_discovery_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_discovery_configs.timeout = 300.0 + default_config.rpcs.list_discovery_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_discovery_config.timeout = 300.0 + default_config.rpcs.delete_discovery_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_dlp_job.timeout = 300.0 + + default_config.rpcs.list_dlp_jobs.timeout = 300.0 + default_config.rpcs.list_dlp_jobs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_dlp_job.timeout = 300.0 + default_config.rpcs.get_dlp_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_dlp_job.timeout = 300.0 + default_config.rpcs.delete_dlp_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.cancel_dlp_job.timeout = 300.0 + + default_config.rpcs.create_stored_info_type.timeout = 300.0 + + default_config.rpcs.update_stored_info_type.timeout = 300.0 + + default_config.rpcs.get_stored_info_type.timeout = 300.0 + default_config.rpcs.get_stored_info_type.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_stored_info_types.timeout = 300.0 + default_config.rpcs.list_stored_info_types.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_stored_info_type.timeout = 300.0 + default_config.rpcs.delete_stored_info_type.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_project_data_profiles.timeout = 300.0 + default_config.rpcs.list_project_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_data_profiles.timeout = 300.0 + default_config.rpcs.list_table_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_data_profiles.timeout = 300.0 + default_config.rpcs.list_column_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_project_data_profile.timeout = 300.0 + default_config.rpcs.get_project_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_file_store_data_profiles.timeout = 300.0 + default_config.rpcs.list_file_store_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_file_store_data_profile.timeout = 300.0 + default_config.rpcs.get_file_store_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_file_store_data_profile.timeout = 300.0 + default_config.rpcs.delete_file_store_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_data_profile.timeout = 300.0 + default_config.rpcs.get_table_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_column_data_profile.timeout = 300.0 + default_config.rpcs.get_column_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0 + + default_config.rpcs.finish_dlp_job.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DlpService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dlp_service_stub.universe_domain + end + + ## + # Create a new DlpService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DlpService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/privacy/dlp/v2/dlp_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @dlp_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dlp::V2::DlpService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @dlp_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dlp_service_stub.endpoint + config.universe_domain = @dlp_service_stub.universe_domain + config.logger = @dlp_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dlp_service_stub.logger + end + + # Service calls + + ## + # Finds potentially sensitive info in content. + # This method has limits on input size, processing time, and output size. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # For how to guides, see + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images + # and + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, + # + # @overload inspect_content(request, options = nil) + # Pass arguments to `inspect_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::InspectContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) + # Pass arguments to `inspect_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. What specified here will override + # the template referenced by the inspect_template_name argument. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to inspect. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::InspectContentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::InspectContentRequest.new + # + # # Call the inspect_content method. + # result = client.inspect_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. + # p result + # + def inspect_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::InspectContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.inspect_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.inspect_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.inspect_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :inspect_content, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Redacts potentially sensitive info from an image. + # This method has limits on input size, processing time, and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # Only the first frame of each multiframe image is redacted. Metadata and + # other frames are omitted in the response. + # + # @overload redact_image(request, options = nil) + # Pass arguments to `redact_image` via a request object, either of type + # {::Google::Cloud::Dlp::V2::RedactImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::RedactImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, inspect_template: nil, deidentify_template: nil) + # Pass arguments to `redact_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param location_id [::String] + # Deprecated. This field has no effect. + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # @param image_redaction_configs [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, ::Hash>] + # The configuration for specifying what content to redact from images. + # @param include_findings [::Boolean] + # Whether the response should include findings along with the redacted + # image. + # @param byte_item [::Google::Cloud::Dlp::V2::ByteContentItem, ::Hash] + # The content must be PNG, JPEG, SVG or BMP. + # @param inspect_template [::String] + # The full resource name of the inspection template to use. Settings in the + # main `inspect_config` field override the corresponding settings in this + # inspection template. + # + # The merge behavior is as follows: + # + # - Singular field: The main field's value replaces the value of the + # corresponding field in the template. + # - Repeated fields: The field values are appended to the list defined in + # the template. + # - Sub-messages and groups: The fields are recursively merged. + # @param deidentify_template [::String] + # The full resource name of the de-identification template to use. Settings + # in the main `image_redaction_configs` field override the corresponding + # settings in this de-identification template. The request fails if the + # type of the template's deidentify_config is not image_transformations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::RedactImageResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::RedactImageRequest.new + # + # # Call the redact_image method. + # result = client.redact_image request + # + # # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. + # p result + # + def redact_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::RedactImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.redact_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.redact_image.timeout, + metadata: metadata, + retry_policy: @config.rpcs.redact_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :redact_image, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # De-identifies potentially sensitive info from a ContentItem. + # This method has limits on input size and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # @overload deidentify_content(request, options = nil) + # Pass arguments to `deidentify_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) + # Pass arguments to `deidentify_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param deidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] + # Configuration for the de-identification of the content item. + # Items specified here will override the template referenced by the + # deidentify_template_name argument. + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # Items specified here will override the template referenced by the + # inspect_template_name argument. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to de-identify. Will be treated as text. + # + # This value must be of type + # {::Google::Cloud::Dlp::V2::Table Table} if your + # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} + # is a + # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} + # object. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param deidentify_template_name [::String] + # Template to use. Any configuration directly specified in + # deidentify_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new + # + # # Call the deidentify_content method. + # result = client.deidentify_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. + # p result + # + def deidentify_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeidentifyContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deidentify_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deidentify_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :deidentify_content, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-identifies content that has been de-identified. + # See + # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example + # to learn more. + # + # @overload reidentify_content(request, options = nil) + # Pass arguments to `reidentify_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ReidentifyContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil) + # Pass arguments to `reidentify_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param reidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] + # Configuration for the re-identification of the content item. + # This field shares the same proto message type that is used for + # de-identification, however its usage here is for the reversal of the + # previous de-identification. Re-identification is performed by examining + # the transformations used to de-identify the items and executing the + # reverse. This requires that only reversible transformations + # be provided here. The reversible transformations are: + # + # - `CryptoDeterministicConfig` + # - `CryptoReplaceFfxFpeConfig` + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to re-identify. Will be treated as text. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # `inspect_config` will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param reidentify_template_name [::String] + # Template to use. References an instance of `DeidentifyTemplate`. + # Any configuration directly specified in `reidentify_config` or + # `inspect_config` will override those set in the template. The + # `DeidentifyTemplate` used must include only reversible transformations. + # Singular fields that are set in this request will replace their + # corresponding fields in the template. Repeated fields are appended. + # Singular sub-messages and groups are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new + # + # # Call the reidentify_content method. + # result = client.reidentify_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. + # p result + # + def reidentify_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ReidentifyContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reidentify_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reidentify_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :reidentify_content, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of the sensitive information types that the DLP API + # supports. See + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # to learn more. + # + # @overload list_info_types(request, options = nil) + # Pass arguments to `list_info_types` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListInfoTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) + # Pass arguments to `list_info_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The parent resource name. + # + # The format of this value is as follows: + # + # `locations/{location_id}` + # @param language_code [::String] + # BCP-47 language code for localized infoType friendly + # names. If omitted, or if localized strings are not available, + # en-US strings will be returned. + # @param filter [::String] + # filter to only return infoTypes supported by certain parts of the + # API. Defaults to supported_by=INSPECT. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new + # + # # Call the list_info_types method. + # result = client.list_info_types request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. + # p result + # + def list_info_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInfoTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_info_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_info_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_info_types, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an InspectTemplate for reusing frequently used configuration + # for inspecting content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload create_inspect_template(request, options = nil) + # Pass arguments to `create_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) + # Pass arguments to `create_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] + # Required. The InspectTemplate to create. + # @param template_id [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new + # + # # Call the create_inspect_template method. + # result = client.create_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def create_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_inspect_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload update_inspect_template(request, options = nil) + # Pass arguments to `update_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) + # Pass arguments to `update_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and inspectTemplate to be updated, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] + # New InspectTemplate value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new + # + # # Call the update_inspect_template method. + # result = client.update_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def update_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_inspect_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload get_inspect_template(request, options = nil) + # Pass arguments to `get_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_inspect_template(name: nil) + # Pass arguments to `get_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and inspectTemplate to be read, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new + # + # # Call the get_inspect_template method. + # result = client.get_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def get_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_inspect_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists InspectTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload list_inspect_templates(request, options = nil) + # Pass arguments to `list_inspect_templates` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_inspect_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListInspectTemplates`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new + # + # # Call the list_inspect_templates method. + # result = client.list_inspect_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. + # p item + # end + # + def list_inspect_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_inspect_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_inspect_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_inspect_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload delete_inspect_template(request, options = nil) + # Pass arguments to `delete_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_inspect_template(name: nil) + # Pass arguments to `delete_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and inspectTemplate to be + # deleted, for example `organizations/433245324/inspectTemplates/432452342` + # or projects/project-id/inspectTemplates/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new + # + # # Call the delete_inspect_template method. + # result = client.delete_inspect_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_inspect_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a DeidentifyTemplate for reusing frequently used configuration + # for de-identifying content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload create_deidentify_template(request, options = nil) + # Pass arguments to `create_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) + # Pass arguments to `create_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] + # Required. The DeidentifyTemplate to create. + # @param template_id [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new + # + # # Call the create_deidentify_template method. + # result = client.create_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def create_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_deidentify_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload update_deidentify_template(request, options = nil) + # Pass arguments to `update_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) + # Pass arguments to `update_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and deidentify template to be + # updated, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] + # New DeidentifyTemplate value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new + # + # # Call the update_deidentify_template method. + # result = client.update_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def update_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_deidentify_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload get_deidentify_template(request, options = nil) + # Pass arguments to `get_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_deidentify_template(name: nil) + # Pass arguments to `get_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and deidentify template to be + # read, for example `organizations/433245324/deidentifyTemplates/432452342` + # or projects/project-id/deidentifyTemplates/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new + # + # # Call the get_deidentify_template method. + # result = client.get_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def get_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_deidentify_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DeidentifyTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload list_deidentify_templates(request, options = nil) + # Pass arguments to `list_deidentify_templates` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_deidentify_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListDeidentifyTemplates`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new + # + # # Call the list_deidentify_templates method. + # result = client.list_deidentify_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p item + # end + # + def list_deidentify_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_deidentify_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deidentify_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_deidentify_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload delete_deidentify_template(request, options = nil) + # Pass arguments to `delete_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_deidentify_template(name: nil) + # Pass arguments to `delete_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and deidentify template to be + # deleted, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new + # + # # Call the delete_deidentify_template method. + # result = client.delete_deidentify_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_deidentify_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a job trigger to run DLP actions such as scanning storage for + # sensitive information on a set schedule. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload create_job_trigger(request, options = nil) + # Pass arguments to `create_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) + # Pass arguments to `create_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] + # Required. The JobTrigger to create. + # @param trigger_id [::String] + # The trigger id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new + # + # # Call the create_job_trigger method. + # result = client.create_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def create_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload update_job_trigger(request, options = nil) + # Pass arguments to `update_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) + # Pass arguments to `update_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] + # New JobTrigger value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new + # + # # Call the update_job_trigger method. + # result = client.update_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def update_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inspect hybrid content and store findings to a trigger. The inspection + # will be processed asynchronously. To review the findings monitor the + # jobs within the trigger. + # + # @overload hybrid_inspect_job_trigger(request, options = nil) + # Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) + # Pass arguments to `hybrid_inspect_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the trigger to execute a hybrid inspect on, for + # example `projects/dlp-test-project/jobTriggers/53234423`. + # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] + # The item to inspect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new + # + # # Call the hybrid_inspect_job_trigger method. + # result = client.hybrid_inspect_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + # p result + # + def hybrid_inspect_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :hybrid_inspect_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload get_job_trigger(request, options = nil) + # Pass arguments to `get_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job_trigger(name: nil) + # Pass arguments to `get_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new + # + # # Call the get_job_trigger method. + # result = client.get_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def get_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists job triggers. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload list_job_triggers(request, options = nil) + # Pass arguments to `list_job_triggers` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListJobTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil) + # Pass arguments to `list_job_triggers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListJobTriggers. `order_by` field must not + # change for subsequent calls. + # @param page_size [::Integer] + # Size of the page. This value can be limited by a server. + # @param order_by [::String] + # Comma-separated list of triggeredJob fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the JobTrigger was created. + # - `update_time`: corresponds to the time the JobTrigger was last updated. + # - `last_run_time`: corresponds to the last time the JobTrigger ran. + # - `name`: corresponds to the JobTrigger's name. + # - `display_name`: corresponds to the JobTrigger's display name. + # - `status`: corresponds to JobTrigger's status. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect triggers: + # - `status` - HEALTHY|PAUSED|CANCELLED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + # quotation marks. Nanoseconds are ignored. + # - 'error_count' - Number of errors that have occurred while running. + # * The operator must be `=` or `!=` for status and inspected_storage. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND status = HEALTHY + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + # * last_run_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @param type [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of jobs. Will use `DlpJobType.INSPECT` if not set. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new + # + # # Call the list_job_triggers method. + # result = client.list_job_triggers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. + # p item + # end + # + def list_job_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListJobTriggersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_job_triggers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_job_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_job_triggers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload delete_job_trigger(request, options = nil) + # Pass arguments to `delete_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_job_trigger(name: nil) + # Pass arguments to `delete_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new + # + # # Call the delete_job_trigger method. + # result = client.delete_job_trigger request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a job trigger. Causes the immediate execute of a trigger + # instead of waiting on the trigger event to occur. + # + # @overload activate_job_trigger(request, options = nil) + # Pass arguments to `activate_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload activate_job_trigger(name: nil) + # Pass arguments to `activate_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the trigger to activate, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new + # + # # Call the activate_job_trigger method. + # result = client.activate_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def activate_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.activate_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.activate_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :activate_job_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a config for discovery to scan and profile storage. + # + # @overload create_discovery_config(request, options = nil) + # Pass arguments to `create_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) + # Pass arguments to `create_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] + # Required. The DiscoveryConfig to create. + # @param config_id [::String] + # The config ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new + # + # # Call the create_discovery_config method. + # result = client.create_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def create_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_discovery_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a discovery configuration. + # + # @overload update_discovery_config(request, options = nil) + # Pass arguments to `update_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) + # Pass arguments to `update_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] + # Required. New DiscoveryConfig value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new + # + # # Call the update_discovery_config method. + # result = client.update_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def update_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_discovery_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a discovery configuration. + # + # @overload get_discovery_config(request, options = nil) + # Pass arguments to `get_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_discovery_config(name: nil) + # Pass arguments to `get_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new + # + # # Call the get_discovery_config method. + # result = client.get_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def get_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_discovery_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists discovery configurations. + # + # @overload list_discovery_configs(request, options = nil) + # Pass arguments to `list_discovery_configs` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_discovery_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value is as follows: + # `projects/{project_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListDiscoveryConfigs. `order_by` field must not + # change for subsequent calls. + # @param page_size [::Integer] + # Size of the page. This value can be limited by a server. + # @param order_by [::String] + # Comma-separated list of config fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + # - `name`: corresponds to the DiscoveryConfig's name. + # - `status`: corresponds to DiscoveryConfig's status. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new + # + # # Call the list_discovery_configs method. + # result = client.list_discovery_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. + # p item + # end + # + def list_discovery_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_discovery_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_discovery_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_discovery_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a discovery configuration. + # + # @overload delete_discovery_config(request, options = nil) + # Pass arguments to `delete_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_discovery_config(name: nil) + # Pass arguments to `delete_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the config, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new + # + # # Call the delete_discovery_config method. + # result = client.delete_discovery_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_discovery_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new job to inspect storage or calculate risk metrics. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # @overload create_dlp_job(request, options = nil) + # Pass arguments to `create_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) + # Pass arguments to `create_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] + # An inspection job scans a storage repository for InfoTypes. + # + # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] + # A risk analysis job calculates re-identification risk metrics for a + # BigQuery table. + # + # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param job_id [::String] + # The job id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new + # + # # Call the create_dlp_job method. + # result = client.create_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def create_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DlpJobs that match the specified filter in the request. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload list_dlp_jobs(request, options = nil) + # Pass arguments to `list_dlp_jobs` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDlpJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_dlp_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect jobs: + # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - `trigger_name` - The name of the trigger that created the job. + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * Supported fields for risk analysis jobs: + # - `state` - RUNNING|CANCELED|FINISHED|FAILED + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * The operator must be `=` or `!=`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND state = done + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = done OR state = canceled) + # * end_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param type [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of job. Defaults to `DlpJobType.INSPECT` + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, end_time asc, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the job was created. + # - `end_time`: corresponds to the time the job ended. + # - `name`: corresponds to the job's name. + # - `state`: corresponds to `state` + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new + # + # # Call the list_dlp_jobs method. + # result = client.list_dlp_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. + # p item + # end + # + def list_dlp_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDlpJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_dlp_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_dlp_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_dlp_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running DlpJob. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload get_dlp_job(request, options = nil) + # Pass arguments to `get_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dlp_job(name: nil) + # Pass arguments to `get_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new + # + # # Call the get_dlp_job method. + # result = client.get_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def get_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running DlpJob. This method indicates that the client is + # no longer interested in the DlpJob result. The job will be canceled if + # possible. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload delete_dlp_job(request, options = nil) + # Pass arguments to `delete_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dlp_job(name: nil) + # Pass arguments to `delete_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new + # + # # Call the delete_dlp_job method. + # result = client.delete_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running DlpJob. The server + # makes a best effort to cancel the DlpJob, but success is not + # guaranteed. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload cancel_dlp_job(request, options = nil) + # Pass arguments to `cancel_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CancelDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_dlp_job(name: nil) + # Pass arguments to `cancel_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new + # + # # Call the cancel_dlp_job method. + # result = client.cancel_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CancelDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :cancel_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pre-built stored infoType to be used for inspection. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload create_stored_info_type(request, options = nil) + # Pass arguments to `create_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) + # Pass arguments to `create_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] + # Required. Configuration of the storedInfoType to create. + # @param stored_info_type_id [::String] + # The storedInfoType ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new + # + # # Call the create_stored_info_type method. + # result = client.create_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def create_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_stored_info_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the stored infoType by creating a new version. The existing version + # will continue to be used until the new version is ready. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload update_stored_info_type(request, options = nil) + # Pass arguments to `update_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_stored_info_type(name: nil, config: nil, update_mask: nil) + # Pass arguments to `update_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and storedInfoType to be updated, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] + # Updated configuration for the storedInfoType. If not provided, a new + # version of the storedInfoType will be created with the existing + # configuration. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new + # + # # Call the update_stored_info_type method. + # result = client.update_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def update_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_stored_info_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload get_stored_info_type(request, options = nil) + # Pass arguments to `get_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_stored_info_type(name: nil) + # Pass arguments to `get_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and storedInfoType to be read, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new + # + # # Call the get_stored_info_type method. + # result = client.get_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def get_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_stored_info_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists stored infoTypes. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload list_stored_info_types(request, options = nil) + # Pass arguments to `list_stored_info_types` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_stored_info_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListStoredInfoTypes`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, display_name, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the most recent version of the + # resource was created. + # - `state`: corresponds to the state of the resource. + # - `name`: corresponds to resource name. + # - `display_name`: corresponds to info type's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new + # + # # Call the list_stored_info_types method. + # result = client.list_stored_info_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. + # p item + # end + # + def list_stored_info_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_stored_info_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_stored_info_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_stored_info_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload delete_stored_info_type(request, options = nil) + # Pass arguments to `delete_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_stored_info_type(name: nil) + # Pass arguments to `delete_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and storedInfoType to be + # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new + # + # # Call the delete_stored_info_type method. + # result = client.delete_stored_info_type request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_stored_info_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists project data profiles for an organization. + # + # @overload list_project_data_profiles(request, options = nil) + # Pass arguments to `list_project_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_project_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_project_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. organizations/\\{org_id}/locations/\\{loc_id} + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id` + # * `sensitivity_level desc` + # + # Supported fields: + # + # - `project_id`: Google Cloud project ID + # - `sensitivity_level`: How sensitive the data in a project is, at most + # - `data_risk_level`: How much risk is associated with this data + # - `profile_last_generated`: Date and time (in epoch seconds) the profile + # was last generated + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: the Google Cloud project ID + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new + # + # # Call the list_project_data_profiles method. + # result = client.list_project_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. + # p item + # end + # + def list_project_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_project_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_project_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_project_data_profiles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists table data profiles for an organization. + # + # @overload list_table_data_profiles(request, options = nil) + # Pass arguments to `list_table_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_table_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_table_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `row_count`: Number of rows in this resource. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `dataset_id`: The BigQuery dataset ID + # - `table_id`: The ID of the BigQuery table + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new + # + # # Call the list_table_data_profiles method. + # result = client.list_table_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. + # p item + # end + # + def list_table_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_table_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_table_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_table_data_profiles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists column data profiles for an organization. + # + # @overload list_column_data_profiles(request, options = nil) + # Pass arguments to `list_column_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_column_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a column is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `table_data_profile_name`: The name of the related table data + # profile + # - `project_id`: The Google Cloud project ID (REQUIRED) + # - `dataset_id`: The BigQuery dataset ID (REQUIRED) + # - `table_id`: The BigQuery table ID (REQUIRED) + # - `field_id`: The ID of the BigQuery field + # - `info_type`: The infotype detected in the resource + # - `sensitivity_level`: HIGH|MEDIUM|LOW + # - `data_risk_level`: How much risk is associated with this data + # - `status_code`: An RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` for project_id, dataset_id, and table_id. Other + # filters also support `!=`. The `profile_last_generated` filter also + # supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * project_id = 12345 AND status_code = 1 + # * project_id = 12345 AND sensitivity_level = HIGH + # * project_id = 12345 AND info_type = STREET_ADDRESS + # * profile_last_generated < "2025-01-01T00:00:00.000Z" + # + # The length of this field should be no more than 500 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new + # + # # Call the list_column_data_profiles method. + # result = client.list_column_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. + # p item + # end + # + def list_column_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_column_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_column_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_column_data_profiles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a project data profile. + # + # @overload get_project_data_profile(request, options = nil) + # Pass arguments to `get_project_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_project_data_profile(name: nil) + # Pass arguments to `get_project_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/projectDataProfiles/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new + # + # # Call the get_project_data_profile method. + # result = client.get_project_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. + # p result + # + def get_project_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_project_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_project_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists file store data profiles for an organization. + # + # @overload list_file_store_data_profiles(request, options = nil) + # Pass arguments to `list_file_store_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_file_store_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_file_store_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Optional. Page token to continue retrieval. + # @param page_size [::Integer] + # Optional. Size of the page. This value can be limited by the server. If + # zero, server returns a page of max size 100. + # @param order_by [::String] + # Optional. Comma-separated list of fields to order by, followed by `asc` or + # `desc` postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `name` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `name`: The name of the profile. + # - `create_time`: The time the file store was first created. + # @param filter [::String] + # Optional. Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `account_id`: The AWS account ID + # - `file_store_path`: The path like "gs://bucket" + # - `data_source_type`: The profile's data source type, like + # "google/storage/bucket" + # - `data_storage_location`: The location where the file store's data is + # stored, like "us-central1" + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `file_store_path = "gs://mybucket"` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new + # + # # Call the list_file_store_data_profiles method. + # result = client.list_file_store_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. + # p item + # end + # + def list_file_store_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_file_store_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_file_store_data_profiles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_file_store_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_file_store_data_profiles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_file_store_data_profiles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file store data profile. + # + # @overload get_file_store_data_profile(request, options = nil) + # Pass arguments to `get_file_store_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_file_store_data_profile(name: nil) + # Pass arguments to `get_file_store_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new + # + # # Call the get_file_store_data_profile method. + # result = client.get_file_store_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. + # p result + # + def get_file_store_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_file_store_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_file_store_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_file_store_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_file_store_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a FileStoreDataProfile. Will not prevent the profile from being + # regenerated if the resource is still included in a discovery configuration. + # + # @overload delete_file_store_data_profile(request, options = nil) + # Pass arguments to `delete_file_store_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_file_store_data_profile(name: nil) + # Pass arguments to `delete_file_store_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the file store data profile. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new + # + # # Call the delete_file_store_data_profile method. + # result = client.delete_file_store_data_profile request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_file_store_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_file_store_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_file_store_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_file_store_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_file_store_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a table data profile. + # + # @overload get_table_data_profile(request, options = nil) + # Pass arguments to `get_table_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetTableDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_table_data_profile(name: nil) + # Pass arguments to `get_table_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/tableDataProfiles/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::TableDataProfile] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::TableDataProfile] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new + # + # # Call the get_table_data_profile method. + # result = client.get_table_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. + # p result + # + def get_table_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_table_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_table_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_table_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a column data profile. + # + # @overload get_column_data_profile(request, options = nil) + # Pass arguments to `get_column_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_column_data_profile(name: nil) + # Pass arguments to `get_column_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/columnDataProfiles/53234423`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new + # + # # Call the get_column_data_profile method. + # result = client.get_column_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. + # p result + # + def get_column_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_column_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_column_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_column_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a TableDataProfile. Will not prevent the profile from being + # regenerated if the table is still included in a discovery configuration. + # + # @overload delete_table_data_profile(request, options = nil) + # Pass arguments to `delete_table_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_table_data_profile(name: nil) + # Pass arguments to `delete_table_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the table data profile. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new + # + # # Call the delete_table_data_profile method. + # result = client.delete_table_data_profile request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_table_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_table_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_table_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_table_data_profile, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inspect hybrid content and store findings to a job. + # To review the findings, inspect the job. Inspection will occur + # asynchronously. + # + # @overload hybrid_inspect_dlp_job(request, options = nil) + # Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) + # Pass arguments to `hybrid_inspect_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the job to execute a hybrid inspect on, for + # example `projects/dlp-test-project/dlpJob/53234423`. + # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] + # The item to inspect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new + # + # # Call the hybrid_inspect_dlp_job method. + # result = client.hybrid_inspect_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + # p result + # + def hybrid_inspect_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :hybrid_inspect_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finish a running hybrid DlpJob. Triggers the finalization steps and running + # of any enabled actions that have not yet run. + # + # @overload finish_dlp_job(request, options = nil) + # Pass arguments to `finish_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::FinishDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload finish_dlp_job(name: nil) + # Pass arguments to `finish_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be finished. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new + # + # # Call the finish_dlp_job method. + # result = client.finish_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def finish_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::FinishDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.finish_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.finish_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :finish_dlp_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a Connection to an external data source. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_connection(parent: nil, connection: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] + # Required. The connection resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :create_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a Connection by name. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :get_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Connections in a parent. Use SearchConnections to see all connections + # within an organization. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example, `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_size [::Integer] + # Optional. Number of results per page, max 1000. + # @param page_token [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @param filter [::String] + # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :list_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for Connections in a parent. + # + # @overload search_connections(request, options = nil) + # Pass arguments to `search_connections` via a request object, either of type + # {::Google::Cloud::Dlp::V2::SearchConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `search_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project with a wildcard + # location, for example, `organizations/433245324/locations/-` or + # `projects/project-id/locations/-`. + # @param page_size [::Integer] + # Optional. Number of results per page, max 1000. + # @param page_token [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @param filter [::String] + # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new + # + # # Call the search_connections method. + # result = client.search_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + # p item + # end + # + def search_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :search_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :search_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a Connection. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_connection(name: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Connection to be deleted, in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :delete_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a Connection. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_connection(name: nil, connection: nil, update_mask: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] + # Required. The connection with new values for the relevant fields. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask to control which fields get updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.call_rpc :update_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DlpService API. + # + # This class represents the configuration for DlpService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # inspect_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.inspect_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.inspect_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dlp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DlpService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `inspect_content` + # @return [::Gapic::Config::Method] + # + attr_reader :inspect_content + ## + # RPC-specific configuration for `redact_image` + # @return [::Gapic::Config::Method] + # + attr_reader :redact_image + ## + # RPC-specific configuration for `deidentify_content` + # @return [::Gapic::Config::Method] + # + attr_reader :deidentify_content + ## + # RPC-specific configuration for `reidentify_content` + # @return [::Gapic::Config::Method] + # + attr_reader :reidentify_content + ## + # RPC-specific configuration for `list_info_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_info_types + ## + # RPC-specific configuration for `create_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_inspect_template + ## + # RPC-specific configuration for `update_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_inspect_template + ## + # RPC-specific configuration for `get_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_inspect_template + ## + # RPC-specific configuration for `list_inspect_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_inspect_templates + ## + # RPC-specific configuration for `delete_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_inspect_template + ## + # RPC-specific configuration for `create_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deidentify_template + ## + # RPC-specific configuration for `update_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deidentify_template + ## + # RPC-specific configuration for `get_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deidentify_template + ## + # RPC-specific configuration for `list_deidentify_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deidentify_templates + ## + # RPC-specific configuration for `delete_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_deidentify_template + ## + # RPC-specific configuration for `create_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job_trigger + ## + # RPC-specific configuration for `update_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_job_trigger + ## + # RPC-specific configuration for `hybrid_inspect_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :hybrid_inspect_job_trigger + ## + # RPC-specific configuration for `get_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job_trigger + ## + # RPC-specific configuration for `list_job_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_job_triggers + ## + # RPC-specific configuration for `delete_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job_trigger + ## + # RPC-specific configuration for `activate_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_job_trigger + ## + # RPC-specific configuration for `create_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_discovery_config + ## + # RPC-specific configuration for `update_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_discovery_config + ## + # RPC-specific configuration for `get_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovery_config + ## + # RPC-specific configuration for `list_discovery_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovery_configs + ## + # RPC-specific configuration for `delete_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_discovery_config + ## + # RPC-specific configuration for `create_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dlp_job + ## + # RPC-specific configuration for `list_dlp_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dlp_jobs + ## + # RPC-specific configuration for `get_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dlp_job + ## + # RPC-specific configuration for `delete_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dlp_job + ## + # RPC-specific configuration for `cancel_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_dlp_job + ## + # RPC-specific configuration for `create_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_stored_info_type + ## + # RPC-specific configuration for `update_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_stored_info_type + ## + # RPC-specific configuration for `get_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_stored_info_type + ## + # RPC-specific configuration for `list_stored_info_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_stored_info_types + ## + # RPC-specific configuration for `delete_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_stored_info_type + ## + # RPC-specific configuration for `list_project_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_project_data_profiles + ## + # RPC-specific configuration for `list_table_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_data_profiles + ## + # RPC-specific configuration for `list_column_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_data_profiles + ## + # RPC-specific configuration for `get_project_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_data_profile + ## + # RPC-specific configuration for `list_file_store_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_file_store_data_profiles + ## + # RPC-specific configuration for `get_file_store_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_store_data_profile + ## + # RPC-specific configuration for `delete_file_store_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file_store_data_profile + ## + # RPC-specific configuration for `get_table_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_data_profile + ## + # RPC-specific configuration for `get_column_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_data_profile + ## + # RPC-specific configuration for `delete_table_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_table_data_profile + ## + # RPC-specific configuration for `hybrid_inspect_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :hybrid_inspect_dlp_job + ## + # RPC-specific configuration for `finish_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_dlp_job + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `search_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :search_connections + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + + # @private + def initialize parent_rpcs = nil + inspect_content_config = parent_rpcs.inspect_content if parent_rpcs.respond_to? :inspect_content + @inspect_content = ::Gapic::Config::Method.new inspect_content_config + redact_image_config = parent_rpcs.redact_image if parent_rpcs.respond_to? :redact_image + @redact_image = ::Gapic::Config::Method.new redact_image_config + deidentify_content_config = parent_rpcs.deidentify_content if parent_rpcs.respond_to? :deidentify_content + @deidentify_content = ::Gapic::Config::Method.new deidentify_content_config + reidentify_content_config = parent_rpcs.reidentify_content if parent_rpcs.respond_to? :reidentify_content + @reidentify_content = ::Gapic::Config::Method.new reidentify_content_config + list_info_types_config = parent_rpcs.list_info_types if parent_rpcs.respond_to? :list_info_types + @list_info_types = ::Gapic::Config::Method.new list_info_types_config + create_inspect_template_config = parent_rpcs.create_inspect_template if parent_rpcs.respond_to? :create_inspect_template + @create_inspect_template = ::Gapic::Config::Method.new create_inspect_template_config + update_inspect_template_config = parent_rpcs.update_inspect_template if parent_rpcs.respond_to? :update_inspect_template + @update_inspect_template = ::Gapic::Config::Method.new update_inspect_template_config + get_inspect_template_config = parent_rpcs.get_inspect_template if parent_rpcs.respond_to? :get_inspect_template + @get_inspect_template = ::Gapic::Config::Method.new get_inspect_template_config + list_inspect_templates_config = parent_rpcs.list_inspect_templates if parent_rpcs.respond_to? :list_inspect_templates + @list_inspect_templates = ::Gapic::Config::Method.new list_inspect_templates_config + delete_inspect_template_config = parent_rpcs.delete_inspect_template if parent_rpcs.respond_to? :delete_inspect_template + @delete_inspect_template = ::Gapic::Config::Method.new delete_inspect_template_config + create_deidentify_template_config = parent_rpcs.create_deidentify_template if parent_rpcs.respond_to? :create_deidentify_template + @create_deidentify_template = ::Gapic::Config::Method.new create_deidentify_template_config + update_deidentify_template_config = parent_rpcs.update_deidentify_template if parent_rpcs.respond_to? :update_deidentify_template + @update_deidentify_template = ::Gapic::Config::Method.new update_deidentify_template_config + get_deidentify_template_config = parent_rpcs.get_deidentify_template if parent_rpcs.respond_to? :get_deidentify_template + @get_deidentify_template = ::Gapic::Config::Method.new get_deidentify_template_config + list_deidentify_templates_config = parent_rpcs.list_deidentify_templates if parent_rpcs.respond_to? :list_deidentify_templates + @list_deidentify_templates = ::Gapic::Config::Method.new list_deidentify_templates_config + delete_deidentify_template_config = parent_rpcs.delete_deidentify_template if parent_rpcs.respond_to? :delete_deidentify_template + @delete_deidentify_template = ::Gapic::Config::Method.new delete_deidentify_template_config + create_job_trigger_config = parent_rpcs.create_job_trigger if parent_rpcs.respond_to? :create_job_trigger + @create_job_trigger = ::Gapic::Config::Method.new create_job_trigger_config + update_job_trigger_config = parent_rpcs.update_job_trigger if parent_rpcs.respond_to? :update_job_trigger + @update_job_trigger = ::Gapic::Config::Method.new update_job_trigger_config + hybrid_inspect_job_trigger_config = parent_rpcs.hybrid_inspect_job_trigger if parent_rpcs.respond_to? :hybrid_inspect_job_trigger + @hybrid_inspect_job_trigger = ::Gapic::Config::Method.new hybrid_inspect_job_trigger_config + get_job_trigger_config = parent_rpcs.get_job_trigger if parent_rpcs.respond_to? :get_job_trigger + @get_job_trigger = ::Gapic::Config::Method.new get_job_trigger_config + list_job_triggers_config = parent_rpcs.list_job_triggers if parent_rpcs.respond_to? :list_job_triggers + @list_job_triggers = ::Gapic::Config::Method.new list_job_triggers_config + delete_job_trigger_config = parent_rpcs.delete_job_trigger if parent_rpcs.respond_to? :delete_job_trigger + @delete_job_trigger = ::Gapic::Config::Method.new delete_job_trigger_config + activate_job_trigger_config = parent_rpcs.activate_job_trigger if parent_rpcs.respond_to? :activate_job_trigger + @activate_job_trigger = ::Gapic::Config::Method.new activate_job_trigger_config + create_discovery_config_config = parent_rpcs.create_discovery_config if parent_rpcs.respond_to? :create_discovery_config + @create_discovery_config = ::Gapic::Config::Method.new create_discovery_config_config + update_discovery_config_config = parent_rpcs.update_discovery_config if parent_rpcs.respond_to? :update_discovery_config + @update_discovery_config = ::Gapic::Config::Method.new update_discovery_config_config + get_discovery_config_config = parent_rpcs.get_discovery_config if parent_rpcs.respond_to? :get_discovery_config + @get_discovery_config = ::Gapic::Config::Method.new get_discovery_config_config + list_discovery_configs_config = parent_rpcs.list_discovery_configs if parent_rpcs.respond_to? :list_discovery_configs + @list_discovery_configs = ::Gapic::Config::Method.new list_discovery_configs_config + delete_discovery_config_config = parent_rpcs.delete_discovery_config if parent_rpcs.respond_to? :delete_discovery_config + @delete_discovery_config = ::Gapic::Config::Method.new delete_discovery_config_config + create_dlp_job_config = parent_rpcs.create_dlp_job if parent_rpcs.respond_to? :create_dlp_job + @create_dlp_job = ::Gapic::Config::Method.new create_dlp_job_config + list_dlp_jobs_config = parent_rpcs.list_dlp_jobs if parent_rpcs.respond_to? :list_dlp_jobs + @list_dlp_jobs = ::Gapic::Config::Method.new list_dlp_jobs_config + get_dlp_job_config = parent_rpcs.get_dlp_job if parent_rpcs.respond_to? :get_dlp_job + @get_dlp_job = ::Gapic::Config::Method.new get_dlp_job_config + delete_dlp_job_config = parent_rpcs.delete_dlp_job if parent_rpcs.respond_to? :delete_dlp_job + @delete_dlp_job = ::Gapic::Config::Method.new delete_dlp_job_config + cancel_dlp_job_config = parent_rpcs.cancel_dlp_job if parent_rpcs.respond_to? :cancel_dlp_job + @cancel_dlp_job = ::Gapic::Config::Method.new cancel_dlp_job_config + create_stored_info_type_config = parent_rpcs.create_stored_info_type if parent_rpcs.respond_to? :create_stored_info_type + @create_stored_info_type = ::Gapic::Config::Method.new create_stored_info_type_config + update_stored_info_type_config = parent_rpcs.update_stored_info_type if parent_rpcs.respond_to? :update_stored_info_type + @update_stored_info_type = ::Gapic::Config::Method.new update_stored_info_type_config + get_stored_info_type_config = parent_rpcs.get_stored_info_type if parent_rpcs.respond_to? :get_stored_info_type + @get_stored_info_type = ::Gapic::Config::Method.new get_stored_info_type_config + list_stored_info_types_config = parent_rpcs.list_stored_info_types if parent_rpcs.respond_to? :list_stored_info_types + @list_stored_info_types = ::Gapic::Config::Method.new list_stored_info_types_config + delete_stored_info_type_config = parent_rpcs.delete_stored_info_type if parent_rpcs.respond_to? :delete_stored_info_type + @delete_stored_info_type = ::Gapic::Config::Method.new delete_stored_info_type_config + list_project_data_profiles_config = parent_rpcs.list_project_data_profiles if parent_rpcs.respond_to? :list_project_data_profiles + @list_project_data_profiles = ::Gapic::Config::Method.new list_project_data_profiles_config + list_table_data_profiles_config = parent_rpcs.list_table_data_profiles if parent_rpcs.respond_to? :list_table_data_profiles + @list_table_data_profiles = ::Gapic::Config::Method.new list_table_data_profiles_config + list_column_data_profiles_config = parent_rpcs.list_column_data_profiles if parent_rpcs.respond_to? :list_column_data_profiles + @list_column_data_profiles = ::Gapic::Config::Method.new list_column_data_profiles_config + get_project_data_profile_config = parent_rpcs.get_project_data_profile if parent_rpcs.respond_to? :get_project_data_profile + @get_project_data_profile = ::Gapic::Config::Method.new get_project_data_profile_config + list_file_store_data_profiles_config = parent_rpcs.list_file_store_data_profiles if parent_rpcs.respond_to? :list_file_store_data_profiles + @list_file_store_data_profiles = ::Gapic::Config::Method.new list_file_store_data_profiles_config + get_file_store_data_profile_config = parent_rpcs.get_file_store_data_profile if parent_rpcs.respond_to? :get_file_store_data_profile + @get_file_store_data_profile = ::Gapic::Config::Method.new get_file_store_data_profile_config + delete_file_store_data_profile_config = parent_rpcs.delete_file_store_data_profile if parent_rpcs.respond_to? :delete_file_store_data_profile + @delete_file_store_data_profile = ::Gapic::Config::Method.new delete_file_store_data_profile_config + get_table_data_profile_config = parent_rpcs.get_table_data_profile if parent_rpcs.respond_to? :get_table_data_profile + @get_table_data_profile = ::Gapic::Config::Method.new get_table_data_profile_config + get_column_data_profile_config = parent_rpcs.get_column_data_profile if parent_rpcs.respond_to? :get_column_data_profile + @get_column_data_profile = ::Gapic::Config::Method.new get_column_data_profile_config + delete_table_data_profile_config = parent_rpcs.delete_table_data_profile if parent_rpcs.respond_to? :delete_table_data_profile + @delete_table_data_profile = ::Gapic::Config::Method.new delete_table_data_profile_config + hybrid_inspect_dlp_job_config = parent_rpcs.hybrid_inspect_dlp_job if parent_rpcs.respond_to? :hybrid_inspect_dlp_job + @hybrid_inspect_dlp_job = ::Gapic::Config::Method.new hybrid_inspect_dlp_job_config + finish_dlp_job_config = parent_rpcs.finish_dlp_job if parent_rpcs.respond_to? :finish_dlp_job + @finish_dlp_job = ::Gapic::Config::Method.new finish_dlp_job_config + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + search_connections_config = parent_rpcs.search_connections if parent_rpcs.respond_to? :search_connections + @search_connections = ::Gapic::Config::Method.new search_connections_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb new file mode 100644 index 000000000000..38405b75a14a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dlp + module V2 + module DlpService + # Credentials for the DlpService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "DLP_CREDENTIALS", + "DLP_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "DLP_CREDENTIALS_JSON", + "DLP_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb new file mode 100644 index 000000000000..4c148d8109b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb @@ -0,0 +1,618 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dlp + module V2 + module DlpService + # Path helper methods for the DlpService API. + module Paths + ## + # Create a fully-qualified ColumnDataProfile resource string. + # + # @overload column_data_profile_path(organization:, location:, column_data_profile:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}` + # + # @param organization [String] + # @param location [String] + # @param column_data_profile [String] + # + # @overload column_data_profile_path(project:, location:, column_data_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}` + # + # @param project [String] + # @param location [String] + # @param column_data_profile [String] + # + # @return [::String] + def column_data_profile_path **args + resources = { + "column_data_profile:location:organization" => (proc do |organization:, location:, column_data_profile:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/columnDataProfiles/#{column_data_profile}" + end), + "column_data_profile:location:project" => (proc do |project:, location:, column_data_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/columnDataProfiles/#{column_data_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Connection resource string. + # + # @overload connection_path(project:, location:, connection:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # + # @overload connection_path(organization:, location:, connection:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/connections/{connection}` + # + # @param organization [String] + # @param location [String] + # @param connection [String] + # + # @return [::String] + def connection_path **args + resources = { + "connection:location:project" => (proc do |project:, location:, connection:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}" + end), + "connection:location:organization" => (proc do |organization:, location:, connection:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/connections/#{connection}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DeidentifyTemplate resource string. + # + # @overload deidentify_template_path(organization:, deidentify_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/deidentifyTemplates/{deidentify_template}` + # + # @param organization [String] + # @param deidentify_template [String] + # + # @overload deidentify_template_path(project:, deidentify_template:) + # The resource will be in the following format: + # + # `projects/{project}/deidentifyTemplates/{deidentify_template}` + # + # @param project [String] + # @param deidentify_template [String] + # + # @overload deidentify_template_path(organization:, location:, deidentify_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}` + # + # @param organization [String] + # @param location [String] + # @param deidentify_template [String] + # + # @overload deidentify_template_path(project:, location:, deidentify_template:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` + # + # @param project [String] + # @param location [String] + # @param deidentify_template [String] + # + # @return [::String] + def deidentify_template_path **args + resources = { + "deidentify_template:organization" => (proc do |organization:, deidentify_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/deidentifyTemplates/#{deidentify_template}" + end), + "deidentify_template:project" => (proc do |project:, deidentify_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/deidentifyTemplates/#{deidentify_template}" + end), + "deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" + end), + "deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DiscoveryConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}` + # + # @param project [String] + # @param location [String] + # @param discovery_config [String] + # + # @return [::String] + def discovery_config_path project:, location:, discovery_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/discoveryConfigs/#{discovery_config}" + end + + ## + # Create a fully-qualified DlpJob resource string. + # + # @overload dlp_job_path(project:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param dlp_job [String] + # + # @overload dlp_job_path(project:, location:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param location [String] + # @param dlp_job [String] + # + # @return [::String] + def dlp_job_path **args + resources = { + "dlp_job:project" => (proc do |project:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dlpJobs/#{dlp_job}" + end), + "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified FileStoreDataProfile resource string. + # + # @overload file_store_data_profile_path(organization:, location:, file_store_data_profile:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}` + # + # @param organization [String] + # @param location [String] + # @param file_store_data_profile [String] + # + # @overload file_store_data_profile_path(project:, location:, file_store_data_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}` + # + # @param project [String] + # @param location [String] + # @param file_store_data_profile [String] + # + # @return [::String] + def file_store_data_profile_path **args + resources = { + "file_store_data_profile:location:organization" => (proc do |organization:, location:, file_store_data_profile:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/fileStoreDataProfiles/#{file_store_data_profile}" + end), + "file_store_data_profile:location:project" => (proc do |project:, location:, file_store_data_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/fileStoreDataProfiles/#{file_store_data_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified InspectTemplate resource string. + # + # @overload inspect_template_path(organization:, inspect_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/inspectTemplates/{inspect_template}` + # + # @param organization [String] + # @param inspect_template [String] + # + # @overload inspect_template_path(project:, inspect_template:) + # The resource will be in the following format: + # + # `projects/{project}/inspectTemplates/{inspect_template}` + # + # @param project [String] + # @param inspect_template [String] + # + # @overload inspect_template_path(organization:, location:, inspect_template:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}` + # + # @param organization [String] + # @param location [String] + # @param inspect_template [String] + # + # @overload inspect_template_path(project:, location:, inspect_template:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` + # + # @param project [String] + # @param location [String] + # @param inspect_template [String] + # + # @return [::String] + def inspect_template_path **args + resources = { + "inspect_template:organization" => (proc do |organization:, inspect_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/inspectTemplates/#{inspect_template}" + end), + "inspect_template:project" => (proc do |project:, inspect_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/inspectTemplates/#{inspect_template}" + end), + "inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}" + end), + "inspect_template:location:project" => (proc do |project:, location:, inspect_template:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified JobTrigger resource string. + # + # @overload job_trigger_path(project:, job_trigger:) + # The resource will be in the following format: + # + # `projects/{project}/jobTriggers/{job_trigger}` + # + # @param project [String] + # @param job_trigger [String] + # + # @overload job_trigger_path(project:, location:, job_trigger:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/jobTriggers/{job_trigger}` + # + # @param project [String] + # @param location [String] + # @param job_trigger [String] + # + # @return [::String] + def job_trigger_path **args + resources = { + "job_trigger:project" => (proc do |project:, job_trigger:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/jobTriggers/#{job_trigger}" + end), + "job_trigger:location:project" => (proc do |project:, location:, job_trigger:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/jobTriggers/#{job_trigger}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ProjectDataProfile resource string. + # + # @overload project_data_profile_path(organization:, location:, project_data_profile:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}` + # + # @param organization [String] + # @param location [String] + # @param project_data_profile [String] + # + # @overload project_data_profile_path(project:, location:, project_data_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}` + # + # @param project [String] + # @param location [String] + # @param project_data_profile [String] + # + # @return [::String] + def project_data_profile_path **args + resources = { + "location:organization:project_data_profile" => (proc do |organization:, location:, project_data_profile:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/projectDataProfiles/#{project_data_profile}" + end), + "location:project:project_data_profile" => (proc do |project:, location:, project_data_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/projectDataProfiles/#{project_data_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified StoredInfoType resource string. + # + # @overload stored_info_type_path(organization:, stored_info_type:) + # The resource will be in the following format: + # + # `organizations/{organization}/storedInfoTypes/{stored_info_type}` + # + # @param organization [String] + # @param stored_info_type [String] + # + # @overload stored_info_type_path(project:, stored_info_type:) + # The resource will be in the following format: + # + # `projects/{project}/storedInfoTypes/{stored_info_type}` + # + # @param project [String] + # @param stored_info_type [String] + # + # @overload stored_info_type_path(organization:, location:, stored_info_type:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}` + # + # @param organization [String] + # @param location [String] + # @param stored_info_type [String] + # + # @overload stored_info_type_path(project:, location:, stored_info_type:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}` + # + # @param project [String] + # @param location [String] + # @param stored_info_type [String] + # + # @return [::String] + def stored_info_type_path **args + resources = { + "organization:stored_info_type" => (proc do |organization:, stored_info_type:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/storedInfoTypes/#{stored_info_type}" + end), + "project:stored_info_type" => (proc do |project:, stored_info_type:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/storedInfoTypes/#{stored_info_type}" + end), + "location:organization:stored_info_type" => (proc do |organization:, location:, stored_info_type:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/storedInfoTypes/#{stored_info_type}" + end), + "location:project:stored_info_type" => (proc do |project:, location:, stored_info_type:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/storedInfoTypes/#{stored_info_type}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified TableDataProfile resource string. + # + # @overload table_data_profile_path(organization:, location:, table_data_profile:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}` + # + # @param organization [String] + # @param location [String] + # @param table_data_profile [String] + # + # @overload table_data_profile_path(project:, location:, table_data_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}` + # + # @param project [String] + # @param location [String] + # @param table_data_profile [String] + # + # @return [::String] + def table_data_profile_path **args + resources = { + "location:organization:table_data_profile" => (proc do |organization:, location:, table_data_profile:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/tableDataProfiles/#{table_data_profile}" + end), + "location:project:table_data_profile" => (proc do |project:, location:, table_data_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tableDataProfiles/#{table_data_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb new file mode 100644 index 000000000000..df7b88e14adc --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dlp/v2/version" + +require "google/cloud/dlp/v2/dlp_service/credentials" +require "google/cloud/dlp/v2/dlp_service/paths" +require "google/cloud/dlp/v2/dlp_service/rest/client" + +module Google + module Cloud + module Dlp + module V2 + ## + # Sensitive Data Protection provides access to a powerful sensitive data + # inspection, classification, and de-identification platform that works + # on text, images, and Google Cloud storage repositories. + # To learn more about concepts and find how-to guides see + # https://cloud.google.com/sensitive-data-protection/docs/. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dlp/v2/dlp_service/rest" + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + module DlpService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dlp/v2/dlp_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb new file mode 100644 index 000000000000..2974c4c7d908 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb @@ -0,0 +1,6406 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/privacy/dlp/v2/dlp_pb" +require "google/cloud/dlp/v2/dlp_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Dlp + module V2 + module DlpService + module Rest + ## + # REST client for the DlpService service. + # + # Sensitive Data Protection provides access to a powerful sensitive data + # inspection, classification, and de-identification platform that works + # on text, images, and Google Cloud storage repositories. + # To learn more about concepts and find how-to guides see + # https://cloud.google.com/sensitive-data-protection/docs/. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dlp_service_stub + + ## + # Configure the DlpService Client class. + # + # See {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DlpService clients + # ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dlp", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.inspect_content.timeout = 300.0 + default_config.rpcs.inspect_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.redact_image.timeout = 300.0 + default_config.rpcs.redact_image.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.deidentify_content.timeout = 300.0 + default_config.rpcs.deidentify_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.reidentify_content.timeout = 300.0 + default_config.rpcs.reidentify_content.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_info_types.timeout = 300.0 + default_config.rpcs.list_info_types.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_inspect_template.timeout = 300.0 + + default_config.rpcs.update_inspect_template.timeout = 300.0 + + default_config.rpcs.get_inspect_template.timeout = 300.0 + default_config.rpcs.get_inspect_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_inspect_templates.timeout = 300.0 + default_config.rpcs.list_inspect_templates.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_inspect_template.timeout = 300.0 + default_config.rpcs.delete_inspect_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_deidentify_template.timeout = 300.0 + + default_config.rpcs.update_deidentify_template.timeout = 300.0 + + default_config.rpcs.get_deidentify_template.timeout = 300.0 + default_config.rpcs.get_deidentify_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_deidentify_templates.timeout = 300.0 + default_config.rpcs.list_deidentify_templates.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_deidentify_template.timeout = 300.0 + default_config.rpcs.delete_deidentify_template.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_job_trigger.timeout = 300.0 + + default_config.rpcs.update_job_trigger.timeout = 300.0 + + default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0 + + default_config.rpcs.get_job_trigger.timeout = 300.0 + default_config.rpcs.get_job_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_job_triggers.timeout = 300.0 + default_config.rpcs.list_job_triggers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_job_trigger.timeout = 300.0 + default_config.rpcs.delete_job_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.activate_job_trigger.timeout = 300.0 + + default_config.rpcs.create_discovery_config.timeout = 300.0 + + default_config.rpcs.update_discovery_config.timeout = 300.0 + + default_config.rpcs.get_discovery_config.timeout = 300.0 + default_config.rpcs.get_discovery_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_discovery_configs.timeout = 300.0 + default_config.rpcs.list_discovery_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_discovery_config.timeout = 300.0 + default_config.rpcs.delete_discovery_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_dlp_job.timeout = 300.0 + + default_config.rpcs.list_dlp_jobs.timeout = 300.0 + default_config.rpcs.list_dlp_jobs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_dlp_job.timeout = 300.0 + default_config.rpcs.get_dlp_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_dlp_job.timeout = 300.0 + default_config.rpcs.delete_dlp_job.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.cancel_dlp_job.timeout = 300.0 + + default_config.rpcs.create_stored_info_type.timeout = 300.0 + + default_config.rpcs.update_stored_info_type.timeout = 300.0 + + default_config.rpcs.get_stored_info_type.timeout = 300.0 + default_config.rpcs.get_stored_info_type.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_stored_info_types.timeout = 300.0 + default_config.rpcs.list_stored_info_types.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_stored_info_type.timeout = 300.0 + default_config.rpcs.delete_stored_info_type.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_project_data_profiles.timeout = 300.0 + default_config.rpcs.list_project_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_table_data_profiles.timeout = 300.0 + default_config.rpcs.list_table_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_column_data_profiles.timeout = 300.0 + default_config.rpcs.list_column_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_project_data_profile.timeout = 300.0 + default_config.rpcs.get_project_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_file_store_data_profiles.timeout = 300.0 + default_config.rpcs.list_file_store_data_profiles.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_file_store_data_profile.timeout = 300.0 + default_config.rpcs.get_file_store_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_file_store_data_profile.timeout = 300.0 + default_config.rpcs.delete_file_store_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_table_data_profile.timeout = 300.0 + default_config.rpcs.get_table_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_column_data_profile.timeout = 300.0 + default_config.rpcs.get_column_data_profile.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0 + + default_config.rpcs.finish_dlp_job.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DlpService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dlp_service_stub.universe_domain + end + + ## + # Create a new DlpService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DlpService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @dlp_service_stub = ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dlp_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dlp_service_stub.endpoint + config.universe_domain = @dlp_service_stub.universe_domain + config.logger = @dlp_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dlp_service_stub.logger + end + + # Service calls + + ## + # Finds potentially sensitive info in content. + # This method has limits on input size, processing time, and output size. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # For how to guides, see + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images + # and + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, + # + # @overload inspect_content(request, options = nil) + # Pass arguments to `inspect_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::InspectContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) + # Pass arguments to `inspect_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. What specified here will override + # the template referenced by the inspect_template_name argument. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to inspect. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::InspectContentRequest.new + # + # # Call the inspect_content method. + # result = client.inspect_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. + # p result + # + def inspect_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::InspectContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.inspect_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.inspect_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.inspect_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.inspect_content request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Redacts potentially sensitive info from an image. + # This method has limits on input size, processing time, and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # Only the first frame of each multiframe image is redacted. Metadata and + # other frames are omitted in the response. + # + # @overload redact_image(request, options = nil) + # Pass arguments to `redact_image` via a request object, either of type + # {::Google::Cloud::Dlp::V2::RedactImageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::RedactImageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, inspect_template: nil, deidentify_template: nil) + # Pass arguments to `redact_image` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param location_id [::String] + # Deprecated. This field has no effect. + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # @param image_redaction_configs [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, ::Hash>] + # The configuration for specifying what content to redact from images. + # @param include_findings [::Boolean] + # Whether the response should include findings along with the redacted + # image. + # @param byte_item [::Google::Cloud::Dlp::V2::ByteContentItem, ::Hash] + # The content must be PNG, JPEG, SVG or BMP. + # @param inspect_template [::String] + # The full resource name of the inspection template to use. Settings in the + # main `inspect_config` field override the corresponding settings in this + # inspection template. + # + # The merge behavior is as follows: + # + # - Singular field: The main field's value replaces the value of the + # corresponding field in the template. + # - Repeated fields: The field values are appended to the list defined in + # the template. + # - Sub-messages and groups: The fields are recursively merged. + # @param deidentify_template [::String] + # The full resource name of the de-identification template to use. Settings + # in the main `image_redaction_configs` field override the corresponding + # settings in this de-identification template. The request fails if the + # type of the template's deidentify_config is not image_transformations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::RedactImageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::RedactImageRequest.new + # + # # Call the redact_image method. + # result = client.redact_image request + # + # # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. + # p result + # + def redact_image request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::RedactImageRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.redact_image.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.redact_image.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.redact_image.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.redact_image request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # De-identifies potentially sensitive info from a ContentItem. + # This method has limits on input size and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # @overload deidentify_content(request, options = nil) + # Pass arguments to `deidentify_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) + # Pass arguments to `deidentify_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param deidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] + # Configuration for the de-identification of the content item. + # Items specified here will override the template referenced by the + # deidentify_template_name argument. + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # Items specified here will override the template referenced by the + # inspect_template_name argument. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to de-identify. Will be treated as text. + # + # This value must be of type + # {::Google::Cloud::Dlp::V2::Table Table} if your + # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} + # is a + # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} + # object. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param deidentify_template_name [::String] + # Template to use. Any configuration directly specified in + # deidentify_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new + # + # # Call the deidentify_content method. + # result = client.deidentify_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. + # p result + # + def deidentify_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeidentifyContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deidentify_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deidentify_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.deidentify_content request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Re-identifies content that has been de-identified. + # See + # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example + # to learn more. + # + # @overload reidentify_content(request, options = nil) + # Pass arguments to `reidentify_content` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ReidentifyContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil) + # Pass arguments to `reidentify_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param reidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] + # Configuration for the re-identification of the content item. + # This field shares the same proto message type that is used for + # de-identification, however its usage here is for the reversal of the + # previous de-identification. Re-identification is performed by examining + # the transformations used to de-identify the items and executing the + # reverse. This requires that only reversible transformations + # be provided here. The reversible transformations are: + # + # - `CryptoDeterministicConfig` + # - `CryptoReplaceFfxFpeConfig` + # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] + # Configuration for the inspector. + # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] + # The item to re-identify. Will be treated as text. + # @param inspect_template_name [::String] + # Template to use. Any configuration directly specified in + # `inspect_config` will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @param reidentify_template_name [::String] + # Template to use. References an instance of `DeidentifyTemplate`. + # Any configuration directly specified in `reidentify_config` or + # `inspect_config` will override those set in the template. The + # `DeidentifyTemplate` used must include only reversible transformations. + # Singular fields that are set in this request will replace their + # corresponding fields in the template. Repeated fields are appended. + # Singular sub-messages and groups are recursively merged. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new + # + # # Call the reidentify_content method. + # result = client.reidentify_content request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. + # p result + # + def reidentify_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ReidentifyContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.reidentify_content.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reidentify_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.reidentify_content request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of the sensitive information types that the DLP API + # supports. See + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # to learn more. + # + # @overload list_info_types(request, options = nil) + # Pass arguments to `list_info_types` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListInfoTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) + # Pass arguments to `list_info_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The parent resource name. + # + # The format of this value is as follows: + # + # `locations/{location_id}` + # @param language_code [::String] + # BCP-47 language code for localized infoType friendly + # names. If omitted, or if localized strings are not available, + # en-US strings will be returned. + # @param filter [::String] + # filter to only return infoTypes supported by certain parts of the + # API. Defaults to supported_by=INSPECT. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new + # + # # Call the list_info_types method. + # result = client.list_info_types request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. + # p result + # + def list_info_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInfoTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_info_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_info_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_info_types request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an InspectTemplate for reusing frequently used configuration + # for inspecting content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload create_inspect_template(request, options = nil) + # Pass arguments to `create_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) + # Pass arguments to `create_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] + # Required. The InspectTemplate to create. + # @param template_id [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new + # + # # Call the create_inspect_template method. + # result = client.create_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def create_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_inspect_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload update_inspect_template(request, options = nil) + # Pass arguments to `update_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) + # Pass arguments to `update_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and inspectTemplate to be updated, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] + # New InspectTemplate value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new + # + # # Call the update_inspect_template method. + # result = client.update_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def update_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_inspect_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload get_inspect_template(request, options = nil) + # Pass arguments to `get_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_inspect_template(name: nil) + # Pass arguments to `get_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and inspectTemplate to be read, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new + # + # # Call the get_inspect_template method. + # result = client.get_inspect_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + # p result + # + def get_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_inspect_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists InspectTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload list_inspect_templates(request, options = nil) + # Pass arguments to `list_inspect_templates` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_inspect_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListInspectTemplates`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new + # + # # Call the list_inspect_templates method. + # result = client.list_inspect_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. + # p item + # end + # + def list_inspect_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_inspect_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_inspect_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_inspect_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, "inspect_templates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + # + # @overload delete_inspect_template(request, options = nil) + # Pass arguments to `delete_inspect_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_inspect_template(name: nil) + # Pass arguments to `delete_inspect_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and inspectTemplate to be + # deleted, for example `organizations/433245324/inspectTemplates/432452342` + # or projects/project-id/inspectTemplates/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new + # + # # Call the delete_inspect_template method. + # result = client.delete_inspect_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_inspect_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_inspect_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_inspect_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_inspect_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a DeidentifyTemplate for reusing frequently used configuration + # for de-identifying content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload create_deidentify_template(request, options = nil) + # Pass arguments to `create_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) + # Pass arguments to `create_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] + # Required. The DeidentifyTemplate to create. + # @param template_id [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new + # + # # Call the create_deidentify_template method. + # result = client.create_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def create_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_deidentify_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload update_deidentify_template(request, options = nil) + # Pass arguments to `update_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) + # Pass arguments to `update_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and deidentify template to be + # updated, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] + # New DeidentifyTemplate value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new + # + # # Call the update_deidentify_template method. + # result = client.update_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def update_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_deidentify_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload get_deidentify_template(request, options = nil) + # Pass arguments to `get_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_deidentify_template(name: nil) + # Pass arguments to `get_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and deidentify template to be + # read, for example `organizations/433245324/deidentifyTemplates/432452342` + # or projects/project-id/deidentifyTemplates/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new + # + # # Call the get_deidentify_template method. + # result = client.get_deidentify_template request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p result + # + def get_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_deidentify_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DeidentifyTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload list_deidentify_templates(request, options = nil) + # Pass arguments to `list_deidentify_templates` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_deidentify_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListDeidentifyTemplates`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new + # + # # Call the list_deidentify_templates method. + # result = client.list_deidentify_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. + # p item + # end + # + def list_deidentify_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_deidentify_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deidentify_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_deidentify_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, "deidentify_templates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + # + # @overload delete_deidentify_template(request, options = nil) + # Pass arguments to `delete_deidentify_template` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_deidentify_template(name: nil) + # Pass arguments to `delete_deidentify_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and deidentify template to be + # deleted, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new + # + # # Call the delete_deidentify_template method. + # result = client.delete_deidentify_template request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_deidentify_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_deidentify_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_deidentify_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_deidentify_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a job trigger to run DLP actions such as scanning storage for + # sensitive information on a set schedule. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload create_job_trigger(request, options = nil) + # Pass arguments to `create_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) + # Pass arguments to `create_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] + # Required. The JobTrigger to create. + # @param trigger_id [::String] + # The trigger id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new + # + # # Call the create_job_trigger method. + # result = client.create_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def create_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload update_job_trigger(request, options = nil) + # Pass arguments to `update_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) + # Pass arguments to `update_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] + # New JobTrigger value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new + # + # # Call the update_job_trigger method. + # result = client.update_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def update_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inspect hybrid content and store findings to a trigger. The inspection + # will be processed asynchronously. To review the findings monitor the + # jobs within the trigger. + # + # @overload hybrid_inspect_job_trigger(request, options = nil) + # Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) + # Pass arguments to `hybrid_inspect_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the trigger to execute a hybrid inspect on, for + # example `projects/dlp-test-project/jobTriggers/53234423`. + # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] + # The item to inspect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new + # + # # Call the hybrid_inspect_job_trigger method. + # result = client.hybrid_inspect_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + # p result + # + def hybrid_inspect_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.hybrid_inspect_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload get_job_trigger(request, options = nil) + # Pass arguments to `get_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job_trigger(name: nil) + # Pass arguments to `get_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new + # + # # Call the get_job_trigger method. + # result = client.get_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + # p result + # + def get_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists job triggers. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload list_job_triggers(request, options = nil) + # Pass arguments to `list_job_triggers` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListJobTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil) + # Pass arguments to `list_job_triggers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListJobTriggers. `order_by` field must not + # change for subsequent calls. + # @param page_size [::Integer] + # Size of the page. This value can be limited by a server. + # @param order_by [::String] + # Comma-separated list of triggeredJob fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the JobTrigger was created. + # - `update_time`: corresponds to the time the JobTrigger was last updated. + # - `last_run_time`: corresponds to the last time the JobTrigger ran. + # - `name`: corresponds to the JobTrigger's name. + # - `display_name`: corresponds to the JobTrigger's display name. + # - `status`: corresponds to JobTrigger's status. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect triggers: + # - `status` - HEALTHY|PAUSED|CANCELLED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + # quotation marks. Nanoseconds are ignored. + # - 'error_count' - Number of errors that have occurred while running. + # * The operator must be `=` or `!=` for status and inspected_storage. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND status = HEALTHY + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + # * last_run_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @param type [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of jobs. Will use `DlpJobType.INSPECT` if not set. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new + # + # # Call the list_job_triggers method. + # result = client.list_job_triggers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. + # p item + # end + # + def list_job_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListJobTriggersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_job_triggers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_job_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_job_triggers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, "job_triggers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + # + # @overload delete_job_trigger(request, options = nil) + # Pass arguments to `delete_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_job_trigger(name: nil) + # Pass arguments to `delete_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new + # + # # Call the delete_job_trigger method. + # result = client.delete_job_trigger request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a job trigger. Causes the immediate execute of a trigger + # instead of waiting on the trigger event to occur. + # + # @overload activate_job_trigger(request, options = nil) + # Pass arguments to `activate_job_trigger` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload activate_job_trigger(name: nil) + # Pass arguments to `activate_job_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the trigger to activate, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new + # + # # Call the activate_job_trigger method. + # result = client.activate_job_trigger request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def activate_job_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.activate_job_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.activate_job_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.activate_job_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a config for discovery to scan and profile storage. + # + # @overload create_discovery_config(request, options = nil) + # Pass arguments to `create_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) + # Pass arguments to `create_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] + # Required. The DiscoveryConfig to create. + # @param config_id [::String] + # The config ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new + # + # # Call the create_discovery_config method. + # result = client.create_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def create_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_discovery_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a discovery configuration. + # + # @overload update_discovery_config(request, options = nil) + # Pass arguments to `update_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) + # Pass arguments to `update_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] + # Required. New DiscoveryConfig value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new + # + # # Call the update_discovery_config method. + # result = client.update_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def update_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_discovery_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a discovery configuration. + # + # @overload get_discovery_config(request, options = nil) + # Pass arguments to `get_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_discovery_config(name: nil) + # Pass arguments to `get_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new + # + # # Call the get_discovery_config method. + # result = client.get_discovery_config request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + # p result + # + def get_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_discovery_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists discovery configurations. + # + # @overload list_discovery_configs(request, options = nil) + # Pass arguments to `list_discovery_configs` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_discovery_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value is as follows: + # `projects/{project_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListDiscoveryConfigs. `order_by` field must not + # change for subsequent calls. + # @param page_size [::Integer] + # Size of the page. This value can be limited by a server. + # @param order_by [::String] + # Comma-separated list of config fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + # - `name`: corresponds to the DiscoveryConfig's name. + # - `status`: corresponds to DiscoveryConfig's status. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new + # + # # Call the list_discovery_configs method. + # result = client.list_discovery_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. + # p item + # end + # + def list_discovery_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_discovery_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_discovery_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_discovery_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, "discovery_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a discovery configuration. + # + # @overload delete_discovery_config(request, options = nil) + # Pass arguments to `delete_discovery_config` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_discovery_config(name: nil) + # Pass arguments to `delete_discovery_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the project and the config, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new + # + # # Call the delete_discovery_config method. + # result = client.delete_discovery_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_discovery_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_discovery_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_discovery_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_discovery_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new job to inspect storage or calculate risk metrics. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # @overload create_dlp_job(request, options = nil) + # Pass arguments to `create_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) + # Pass arguments to `create_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] + # An inspection job scans a storage repository for InfoTypes. + # + # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] + # A risk analysis job calculates re-identification risk metrics for a + # BigQuery table. + # + # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param job_id [::String] + # The job id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new + # + # # Call the create_dlp_job method. + # result = client.create_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def create_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DlpJobs that match the specified filter in the request. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload list_dlp_jobs(request, options = nil) + # Pass arguments to `list_dlp_jobs` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListDlpJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_dlp_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect jobs: + # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - `trigger_name` - The name of the trigger that created the job. + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * Supported fields for risk analysis jobs: + # - `state` - RUNNING|CANCELED|FINISHED|FAILED + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * The operator must be `=` or `!=`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND state = done + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = done OR state = canceled) + # * end_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param type [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of job. Defaults to `DlpJobType.INSPECT` + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, end_time asc, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the job was created. + # - `end_time`: corresponds to the time the job ended. + # - `name`: corresponds to the job's name. + # - `state`: corresponds to `state` + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new + # + # # Call the list_dlp_jobs method. + # result = client.list_dlp_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. + # p item + # end + # + def list_dlp_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDlpJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_dlp_jobs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_dlp_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_dlp_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running DlpJob. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload get_dlp_job(request, options = nil) + # Pass arguments to `get_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dlp_job(name: nil) + # Pass arguments to `get_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new + # + # # Call the get_dlp_job method. + # result = client.get_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + # p result + # + def get_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running DlpJob. This method indicates that the client is + # no longer interested in the DlpJob result. The job will be canceled if + # possible. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload delete_dlp_job(request, options = nil) + # Pass arguments to `delete_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dlp_job(name: nil) + # Pass arguments to `delete_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new + # + # # Call the delete_dlp_job method. + # result = client.delete_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running DlpJob. The server + # makes a best effort to cancel the DlpJob, but success is not + # guaranteed. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # @overload cancel_dlp_job(request, options = nil) + # Pass arguments to `cancel_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CancelDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_dlp_job(name: nil) + # Pass arguments to `cancel_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new + # + # # Call the cancel_dlp_job method. + # result = client.cancel_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CancelDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.cancel_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pre-built stored infoType to be used for inspection. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload create_stored_info_type(request, options = nil) + # Pass arguments to `create_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) + # Pass arguments to `create_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] + # Required. Configuration of the storedInfoType to create. + # @param stored_info_type_id [::String] + # The storedInfoType ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new + # + # # Call the create_stored_info_type method. + # result = client.create_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def create_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_stored_info_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the stored infoType by creating a new version. The existing version + # will continue to be used until the new version is ready. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload update_stored_info_type(request, options = nil) + # Pass arguments to `update_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_stored_info_type(name: nil, config: nil, update_mask: nil) + # Pass arguments to `update_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of organization and storedInfoType to be updated, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] + # Updated configuration for the storedInfoType. If not provided, a new + # version of the storedInfoType will be created with the existing + # configuration. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new + # + # # Call the update_stored_info_type method. + # result = client.update_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def update_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_stored_info_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload get_stored_info_type(request, options = nil) + # Pass arguments to `get_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_stored_info_type(name: nil) + # Pass arguments to `get_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and storedInfoType to be read, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new + # + # # Call the get_stored_info_type method. + # result = client.get_stored_info_type request + # + # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + # p result + # + def get_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_stored_info_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists stored infoTypes. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload list_stored_info_types(request, options = nil) + # Pass arguments to `list_stored_info_types` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) + # Pass arguments to `list_stored_info_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @param page_token [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListStoredInfoTypes`. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, display_name, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the most recent version of the + # resource was created. + # - `state`: corresponds to the state of the resource. + # - `name`: corresponds to resource name. + # - `display_name`: corresponds to info type's display name. + # @param location_id [::String] + # Deprecated. This field has no effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new + # + # # Call the list_stored_info_types method. + # result = client.list_stored_info_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. + # p item + # end + # + def list_stored_info_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_stored_info_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_stored_info_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_stored_info_types request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, "stored_info_types", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + # + # @overload delete_stored_info_type(request, options = nil) + # Pass arguments to `delete_stored_info_type` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_stored_info_type(name: nil) + # Pass arguments to `delete_stored_info_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the organization and storedInfoType to be + # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new + # + # # Call the delete_stored_info_type method. + # result = client.delete_stored_info_type request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_stored_info_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_stored_info_type.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_stored_info_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_stored_info_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists project data profiles for an organization. + # + # @overload list_project_data_profiles(request, options = nil) + # Pass arguments to `list_project_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_project_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_project_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. organizations/\\{org_id}/locations/\\{loc_id} + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id` + # * `sensitivity_level desc` + # + # Supported fields: + # + # - `project_id`: Google Cloud project ID + # - `sensitivity_level`: How sensitive the data in a project is, at most + # - `data_risk_level`: How much risk is associated with this data + # - `profile_last_generated`: Date and time (in epoch seconds) the profile + # was last generated + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: the Google Cloud project ID + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new + # + # # Call the list_project_data_profiles method. + # result = client.list_project_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. + # p item + # end + # + def list_project_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_project_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_project_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_project_data_profiles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, "project_data_profiles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists table data profiles for an organization. + # + # @overload list_table_data_profiles(request, options = nil) + # Pass arguments to `list_table_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_table_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_table_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `row_count`: Number of rows in this resource. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `dataset_id`: The BigQuery dataset ID + # - `table_id`: The ID of the BigQuery table + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new + # + # # Call the list_table_data_profiles method. + # result = client.list_table_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. + # p item + # end + # + def list_table_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_table_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_table_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_table_data_profiles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, "table_data_profiles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists column data profiles for an organization. + # + # @overload list_column_data_profiles(request, options = nil) + # Pass arguments to `list_column_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_column_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Page token to continue retrieval. + # @param page_size [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @param order_by [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a column is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # @param filter [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `table_data_profile_name`: The name of the related table data + # profile + # - `project_id`: The Google Cloud project ID (REQUIRED) + # - `dataset_id`: The BigQuery dataset ID (REQUIRED) + # - `table_id`: The BigQuery table ID (REQUIRED) + # - `field_id`: The ID of the BigQuery field + # - `info_type`: The infotype detected in the resource + # - `sensitivity_level`: HIGH|MEDIUM|LOW + # - `data_risk_level`: How much risk is associated with this data + # - `status_code`: An RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` for project_id, dataset_id, and table_id. Other + # filters also support `!=`. The `profile_last_generated` filter also + # supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * project_id = 12345 AND status_code = 1 + # * project_id = 12345 AND sensitivity_level = HIGH + # * project_id = 12345 AND info_type = STREET_ADDRESS + # * profile_last_generated < "2025-01-01T00:00:00.000Z" + # + # The length of this field should be no more than 500 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new + # + # # Call the list_column_data_profiles method. + # result = client.list_column_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. + # p item + # end + # + def list_column_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_column_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_column_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_column_data_profiles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, "column_data_profiles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a project data profile. + # + # @overload get_project_data_profile(request, options = nil) + # Pass arguments to `get_project_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_project_data_profile(name: nil) + # Pass arguments to `get_project_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/projectDataProfiles/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new + # + # # Call the get_project_data_profile method. + # result = client.get_project_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. + # p result + # + def get_project_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_project_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_project_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists file store data profiles for an organization. + # + # @overload list_file_store_data_profiles(request, options = nil) + # Pass arguments to `list_file_store_data_profiles` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_file_store_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) + # Pass arguments to `list_file_store_data_profiles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_token [::String] + # Optional. Page token to continue retrieval. + # @param page_size [::Integer] + # Optional. Size of the page. This value can be limited by the server. If + # zero, server returns a page of max size 100. + # @param order_by [::String] + # Optional. Comma-separated list of fields to order by, followed by `asc` or + # `desc` postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `name` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `name`: The name of the profile. + # - `create_time`: The time the file store was first created. + # @param filter [::String] + # Optional. Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `account_id`: The AWS account ID + # - `file_store_path`: The path like "gs://bucket" + # - `data_source_type`: The profile's data source type, like + # "google/storage/bucket" + # - `data_storage_location`: The location where the file store's data is + # stored, like "us-central1" + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `file_store_path = "gs://mybucket"` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new + # + # # Call the list_file_store_data_profiles method. + # result = client.list_file_store_data_profiles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. + # p item + # end + # + def list_file_store_data_profiles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_file_store_data_profiles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_file_store_data_profiles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_file_store_data_profiles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_file_store_data_profiles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_file_store_data_profiles, "file_store_data_profiles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a file store data profile. + # + # @overload get_file_store_data_profile(request, options = nil) + # Pass arguments to `get_file_store_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_file_store_data_profile(name: nil) + # Pass arguments to `get_file_store_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new + # + # # Call the get_file_store_data_profile method. + # result = client.get_file_store_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. + # p result + # + def get_file_store_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_file_store_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_file_store_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_file_store_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_file_store_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a FileStoreDataProfile. Will not prevent the profile from being + # regenerated if the resource is still included in a discovery configuration. + # + # @overload delete_file_store_data_profile(request, options = nil) + # Pass arguments to `delete_file_store_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_file_store_data_profile(name: nil) + # Pass arguments to `delete_file_store_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the file store data profile. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new + # + # # Call the delete_file_store_data_profile method. + # result = client.delete_file_store_data_profile request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_file_store_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_file_store_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_file_store_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_file_store_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_file_store_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a table data profile. + # + # @overload get_table_data_profile(request, options = nil) + # Pass arguments to `get_table_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetTableDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_table_data_profile(name: nil) + # Pass arguments to `get_table_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/tableDataProfiles/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::TableDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::TableDataProfile] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new + # + # # Call the get_table_data_profile method. + # result = client.get_table_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. + # p result + # + def get_table_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_table_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_table_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_table_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a column data profile. + # + # @overload get_column_data_profile(request, options = nil) + # Pass arguments to `get_column_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_column_data_profile(name: nil) + # Pass arguments to `get_column_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/columnDataProfiles/53234423`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new + # + # # Call the get_column_data_profile method. + # result = client.get_column_data_profile request + # + # # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. + # p result + # + def get_column_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_column_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_column_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_column_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a TableDataProfile. Will not prevent the profile from being + # regenerated if the table is still included in a discovery configuration. + # + # @overload delete_table_data_profile(request, options = nil) + # Pass arguments to `delete_table_data_profile` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_table_data_profile(name: nil) + # Pass arguments to `delete_table_data_profile` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the table data profile. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new + # + # # Call the delete_table_data_profile method. + # result = client.delete_table_data_profile request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_table_data_profile request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_table_data_profile.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_table_data_profile.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_table_data_profile request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Inspect hybrid content and store findings to a job. + # To review the findings, inspect the job. Inspection will occur + # asynchronously. + # + # @overload hybrid_inspect_dlp_job(request, options = nil) + # Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) + # Pass arguments to `hybrid_inspect_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the job to execute a hybrid inspect on, for + # example `projects/dlp-test-project/dlpJob/53234423`. + # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] + # The item to inspect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new + # + # # Call the hybrid_inspect_dlp_job method. + # result = client.hybrid_inspect_dlp_job request + # + # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + # p result + # + def hybrid_inspect_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.hybrid_inspect_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finish a running hybrid DlpJob. Triggers the finalization steps and running + # of any enabled actions that have not yet run. + # + # @overload finish_dlp_job(request, options = nil) + # Pass arguments to `finish_dlp_job` via a request object, either of type + # {::Google::Cloud::Dlp::V2::FinishDlpJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload finish_dlp_job(name: nil) + # Pass arguments to `finish_dlp_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the DlpJob resource to be finished. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new + # + # # Call the finish_dlp_job method. + # result = client.finish_dlp_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def finish_dlp_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::FinishDlpJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.finish_dlp_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.finish_dlp_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.finish_dlp_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a Connection to an external data source. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_connection(parent: nil, connection: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] + # Required. The connection resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.create_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a Connection by name. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.get_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Connections in a parent. Use SearchConnections to see all connections + # within an organization. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::Dlp::V2::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project, for + # example, `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @param page_size [::Integer] + # Optional. Number of results per page, max 1000. + # @param page_token [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @param filter [::String] + # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.list_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_connections, "connections", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for Connections in a parent. + # + # @overload search_connections(request, options = nil) + # Pass arguments to `search_connections` via a request object, either of type + # {::Google::Cloud::Dlp::V2::SearchConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `search_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the organization or project with a wildcard + # location, for example, `organizations/433245324/locations/-` or + # `projects/project-id/locations/-`. + # @param page_size [::Integer] + # Optional. Number of results per page, max 1000. + # @param page_token [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @param filter [::String] + # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new + # + # # Call the search_connections method. + # result = client.search_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + # p item + # end + # + def search_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.search_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :search_connections, "connections", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a Connection. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_connection(name: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the Connection to be deleted, in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.delete_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a Connection. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::Dlp::V2::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_connection(name: nil, connection: nil, update_mask: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] + # Required. The connection with new values for the relevant fields. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask to control which fields get updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dlp/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Google::Cloud::Dlp::V2::Connection. + # p result + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dlp::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dlp_service_stub.update_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DlpService REST API. + # + # This class represents the configuration for DlpService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # inspect_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.inspect_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.inspect_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dlp.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DlpService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `inspect_content` + # @return [::Gapic::Config::Method] + # + attr_reader :inspect_content + ## + # RPC-specific configuration for `redact_image` + # @return [::Gapic::Config::Method] + # + attr_reader :redact_image + ## + # RPC-specific configuration for `deidentify_content` + # @return [::Gapic::Config::Method] + # + attr_reader :deidentify_content + ## + # RPC-specific configuration for `reidentify_content` + # @return [::Gapic::Config::Method] + # + attr_reader :reidentify_content + ## + # RPC-specific configuration for `list_info_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_info_types + ## + # RPC-specific configuration for `create_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_inspect_template + ## + # RPC-specific configuration for `update_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_inspect_template + ## + # RPC-specific configuration for `get_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_inspect_template + ## + # RPC-specific configuration for `list_inspect_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_inspect_templates + ## + # RPC-specific configuration for `delete_inspect_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_inspect_template + ## + # RPC-specific configuration for `create_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_deidentify_template + ## + # RPC-specific configuration for `update_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_deidentify_template + ## + # RPC-specific configuration for `get_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deidentify_template + ## + # RPC-specific configuration for `list_deidentify_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deidentify_templates + ## + # RPC-specific configuration for `delete_deidentify_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_deidentify_template + ## + # RPC-specific configuration for `create_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_job_trigger + ## + # RPC-specific configuration for `update_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_job_trigger + ## + # RPC-specific configuration for `hybrid_inspect_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :hybrid_inspect_job_trigger + ## + # RPC-specific configuration for `get_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job_trigger + ## + # RPC-specific configuration for `list_job_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_job_triggers + ## + # RPC-specific configuration for `delete_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_job_trigger + ## + # RPC-specific configuration for `activate_job_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_job_trigger + ## + # RPC-specific configuration for `create_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_discovery_config + ## + # RPC-specific configuration for `update_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_discovery_config + ## + # RPC-specific configuration for `get_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_discovery_config + ## + # RPC-specific configuration for `list_discovery_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_discovery_configs + ## + # RPC-specific configuration for `delete_discovery_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_discovery_config + ## + # RPC-specific configuration for `create_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dlp_job + ## + # RPC-specific configuration for `list_dlp_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dlp_jobs + ## + # RPC-specific configuration for `get_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dlp_job + ## + # RPC-specific configuration for `delete_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dlp_job + ## + # RPC-specific configuration for `cancel_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_dlp_job + ## + # RPC-specific configuration for `create_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_stored_info_type + ## + # RPC-specific configuration for `update_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_stored_info_type + ## + # RPC-specific configuration for `get_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_stored_info_type + ## + # RPC-specific configuration for `list_stored_info_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_stored_info_types + ## + # RPC-specific configuration for `delete_stored_info_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_stored_info_type + ## + # RPC-specific configuration for `list_project_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_project_data_profiles + ## + # RPC-specific configuration for `list_table_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_table_data_profiles + ## + # RPC-specific configuration for `list_column_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_column_data_profiles + ## + # RPC-specific configuration for `get_project_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_data_profile + ## + # RPC-specific configuration for `list_file_store_data_profiles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_file_store_data_profiles + ## + # RPC-specific configuration for `get_file_store_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_file_store_data_profile + ## + # RPC-specific configuration for `delete_file_store_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_file_store_data_profile + ## + # RPC-specific configuration for `get_table_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_table_data_profile + ## + # RPC-specific configuration for `get_column_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :get_column_data_profile + ## + # RPC-specific configuration for `delete_table_data_profile` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_table_data_profile + ## + # RPC-specific configuration for `hybrid_inspect_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :hybrid_inspect_dlp_job + ## + # RPC-specific configuration for `finish_dlp_job` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_dlp_job + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `search_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :search_connections + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + + # @private + def initialize parent_rpcs = nil + inspect_content_config = parent_rpcs.inspect_content if parent_rpcs.respond_to? :inspect_content + @inspect_content = ::Gapic::Config::Method.new inspect_content_config + redact_image_config = parent_rpcs.redact_image if parent_rpcs.respond_to? :redact_image + @redact_image = ::Gapic::Config::Method.new redact_image_config + deidentify_content_config = parent_rpcs.deidentify_content if parent_rpcs.respond_to? :deidentify_content + @deidentify_content = ::Gapic::Config::Method.new deidentify_content_config + reidentify_content_config = parent_rpcs.reidentify_content if parent_rpcs.respond_to? :reidentify_content + @reidentify_content = ::Gapic::Config::Method.new reidentify_content_config + list_info_types_config = parent_rpcs.list_info_types if parent_rpcs.respond_to? :list_info_types + @list_info_types = ::Gapic::Config::Method.new list_info_types_config + create_inspect_template_config = parent_rpcs.create_inspect_template if parent_rpcs.respond_to? :create_inspect_template + @create_inspect_template = ::Gapic::Config::Method.new create_inspect_template_config + update_inspect_template_config = parent_rpcs.update_inspect_template if parent_rpcs.respond_to? :update_inspect_template + @update_inspect_template = ::Gapic::Config::Method.new update_inspect_template_config + get_inspect_template_config = parent_rpcs.get_inspect_template if parent_rpcs.respond_to? :get_inspect_template + @get_inspect_template = ::Gapic::Config::Method.new get_inspect_template_config + list_inspect_templates_config = parent_rpcs.list_inspect_templates if parent_rpcs.respond_to? :list_inspect_templates + @list_inspect_templates = ::Gapic::Config::Method.new list_inspect_templates_config + delete_inspect_template_config = parent_rpcs.delete_inspect_template if parent_rpcs.respond_to? :delete_inspect_template + @delete_inspect_template = ::Gapic::Config::Method.new delete_inspect_template_config + create_deidentify_template_config = parent_rpcs.create_deidentify_template if parent_rpcs.respond_to? :create_deidentify_template + @create_deidentify_template = ::Gapic::Config::Method.new create_deidentify_template_config + update_deidentify_template_config = parent_rpcs.update_deidentify_template if parent_rpcs.respond_to? :update_deidentify_template + @update_deidentify_template = ::Gapic::Config::Method.new update_deidentify_template_config + get_deidentify_template_config = parent_rpcs.get_deidentify_template if parent_rpcs.respond_to? :get_deidentify_template + @get_deidentify_template = ::Gapic::Config::Method.new get_deidentify_template_config + list_deidentify_templates_config = parent_rpcs.list_deidentify_templates if parent_rpcs.respond_to? :list_deidentify_templates + @list_deidentify_templates = ::Gapic::Config::Method.new list_deidentify_templates_config + delete_deidentify_template_config = parent_rpcs.delete_deidentify_template if parent_rpcs.respond_to? :delete_deidentify_template + @delete_deidentify_template = ::Gapic::Config::Method.new delete_deidentify_template_config + create_job_trigger_config = parent_rpcs.create_job_trigger if parent_rpcs.respond_to? :create_job_trigger + @create_job_trigger = ::Gapic::Config::Method.new create_job_trigger_config + update_job_trigger_config = parent_rpcs.update_job_trigger if parent_rpcs.respond_to? :update_job_trigger + @update_job_trigger = ::Gapic::Config::Method.new update_job_trigger_config + hybrid_inspect_job_trigger_config = parent_rpcs.hybrid_inspect_job_trigger if parent_rpcs.respond_to? :hybrid_inspect_job_trigger + @hybrid_inspect_job_trigger = ::Gapic::Config::Method.new hybrid_inspect_job_trigger_config + get_job_trigger_config = parent_rpcs.get_job_trigger if parent_rpcs.respond_to? :get_job_trigger + @get_job_trigger = ::Gapic::Config::Method.new get_job_trigger_config + list_job_triggers_config = parent_rpcs.list_job_triggers if parent_rpcs.respond_to? :list_job_triggers + @list_job_triggers = ::Gapic::Config::Method.new list_job_triggers_config + delete_job_trigger_config = parent_rpcs.delete_job_trigger if parent_rpcs.respond_to? :delete_job_trigger + @delete_job_trigger = ::Gapic::Config::Method.new delete_job_trigger_config + activate_job_trigger_config = parent_rpcs.activate_job_trigger if parent_rpcs.respond_to? :activate_job_trigger + @activate_job_trigger = ::Gapic::Config::Method.new activate_job_trigger_config + create_discovery_config_config = parent_rpcs.create_discovery_config if parent_rpcs.respond_to? :create_discovery_config + @create_discovery_config = ::Gapic::Config::Method.new create_discovery_config_config + update_discovery_config_config = parent_rpcs.update_discovery_config if parent_rpcs.respond_to? :update_discovery_config + @update_discovery_config = ::Gapic::Config::Method.new update_discovery_config_config + get_discovery_config_config = parent_rpcs.get_discovery_config if parent_rpcs.respond_to? :get_discovery_config + @get_discovery_config = ::Gapic::Config::Method.new get_discovery_config_config + list_discovery_configs_config = parent_rpcs.list_discovery_configs if parent_rpcs.respond_to? :list_discovery_configs + @list_discovery_configs = ::Gapic::Config::Method.new list_discovery_configs_config + delete_discovery_config_config = parent_rpcs.delete_discovery_config if parent_rpcs.respond_to? :delete_discovery_config + @delete_discovery_config = ::Gapic::Config::Method.new delete_discovery_config_config + create_dlp_job_config = parent_rpcs.create_dlp_job if parent_rpcs.respond_to? :create_dlp_job + @create_dlp_job = ::Gapic::Config::Method.new create_dlp_job_config + list_dlp_jobs_config = parent_rpcs.list_dlp_jobs if parent_rpcs.respond_to? :list_dlp_jobs + @list_dlp_jobs = ::Gapic::Config::Method.new list_dlp_jobs_config + get_dlp_job_config = parent_rpcs.get_dlp_job if parent_rpcs.respond_to? :get_dlp_job + @get_dlp_job = ::Gapic::Config::Method.new get_dlp_job_config + delete_dlp_job_config = parent_rpcs.delete_dlp_job if parent_rpcs.respond_to? :delete_dlp_job + @delete_dlp_job = ::Gapic::Config::Method.new delete_dlp_job_config + cancel_dlp_job_config = parent_rpcs.cancel_dlp_job if parent_rpcs.respond_to? :cancel_dlp_job + @cancel_dlp_job = ::Gapic::Config::Method.new cancel_dlp_job_config + create_stored_info_type_config = parent_rpcs.create_stored_info_type if parent_rpcs.respond_to? :create_stored_info_type + @create_stored_info_type = ::Gapic::Config::Method.new create_stored_info_type_config + update_stored_info_type_config = parent_rpcs.update_stored_info_type if parent_rpcs.respond_to? :update_stored_info_type + @update_stored_info_type = ::Gapic::Config::Method.new update_stored_info_type_config + get_stored_info_type_config = parent_rpcs.get_stored_info_type if parent_rpcs.respond_to? :get_stored_info_type + @get_stored_info_type = ::Gapic::Config::Method.new get_stored_info_type_config + list_stored_info_types_config = parent_rpcs.list_stored_info_types if parent_rpcs.respond_to? :list_stored_info_types + @list_stored_info_types = ::Gapic::Config::Method.new list_stored_info_types_config + delete_stored_info_type_config = parent_rpcs.delete_stored_info_type if parent_rpcs.respond_to? :delete_stored_info_type + @delete_stored_info_type = ::Gapic::Config::Method.new delete_stored_info_type_config + list_project_data_profiles_config = parent_rpcs.list_project_data_profiles if parent_rpcs.respond_to? :list_project_data_profiles + @list_project_data_profiles = ::Gapic::Config::Method.new list_project_data_profiles_config + list_table_data_profiles_config = parent_rpcs.list_table_data_profiles if parent_rpcs.respond_to? :list_table_data_profiles + @list_table_data_profiles = ::Gapic::Config::Method.new list_table_data_profiles_config + list_column_data_profiles_config = parent_rpcs.list_column_data_profiles if parent_rpcs.respond_to? :list_column_data_profiles + @list_column_data_profiles = ::Gapic::Config::Method.new list_column_data_profiles_config + get_project_data_profile_config = parent_rpcs.get_project_data_profile if parent_rpcs.respond_to? :get_project_data_profile + @get_project_data_profile = ::Gapic::Config::Method.new get_project_data_profile_config + list_file_store_data_profiles_config = parent_rpcs.list_file_store_data_profiles if parent_rpcs.respond_to? :list_file_store_data_profiles + @list_file_store_data_profiles = ::Gapic::Config::Method.new list_file_store_data_profiles_config + get_file_store_data_profile_config = parent_rpcs.get_file_store_data_profile if parent_rpcs.respond_to? :get_file_store_data_profile + @get_file_store_data_profile = ::Gapic::Config::Method.new get_file_store_data_profile_config + delete_file_store_data_profile_config = parent_rpcs.delete_file_store_data_profile if parent_rpcs.respond_to? :delete_file_store_data_profile + @delete_file_store_data_profile = ::Gapic::Config::Method.new delete_file_store_data_profile_config + get_table_data_profile_config = parent_rpcs.get_table_data_profile if parent_rpcs.respond_to? :get_table_data_profile + @get_table_data_profile = ::Gapic::Config::Method.new get_table_data_profile_config + get_column_data_profile_config = parent_rpcs.get_column_data_profile if parent_rpcs.respond_to? :get_column_data_profile + @get_column_data_profile = ::Gapic::Config::Method.new get_column_data_profile_config + delete_table_data_profile_config = parent_rpcs.delete_table_data_profile if parent_rpcs.respond_to? :delete_table_data_profile + @delete_table_data_profile = ::Gapic::Config::Method.new delete_table_data_profile_config + hybrid_inspect_dlp_job_config = parent_rpcs.hybrid_inspect_dlp_job if parent_rpcs.respond_to? :hybrid_inspect_dlp_job + @hybrid_inspect_dlp_job = ::Gapic::Config::Method.new hybrid_inspect_dlp_job_config + finish_dlp_job_config = parent_rpcs.finish_dlp_job if parent_rpcs.respond_to? :finish_dlp_job + @finish_dlp_job = ::Gapic::Config::Method.new finish_dlp_job_config + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + search_connections_config = parent_rpcs.search_connections if parent_rpcs.respond_to? :search_connections + @search_connections = ::Gapic::Config::Method.new search_connections_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb new file mode 100644 index 000000000000..4e03e7d64795 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb @@ -0,0 +1,4119 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/privacy/dlp/v2/dlp_pb" + +module Google + module Cloud + module Dlp + module V2 + module DlpService + module Rest + ## + # REST service stub for the DlpService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the inspect_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::InspectContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] + # A result object deserialized from the server's reply + def inspect_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_inspect_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "inspect_content", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::InspectContentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the redact_image REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::RedactImageRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::RedactImageResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] + # A result object deserialized from the server's reply + def redact_image request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_redact_image_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "redact_image", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::RedactImageResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the deidentify_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeidentifyContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] + # A result object deserialized from the server's reply + def deidentify_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deidentify_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "deidentify_content", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reidentify_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ReidentifyContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] + # A result object deserialized from the server's reply + def reidentify_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reidentify_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "reidentify_content", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_info_types REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListInfoTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] + # A result object deserialized from the server's reply + def list_info_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_info_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_info_types", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # A result object deserialized from the server's reply + def create_inspect_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_inspect_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_inspect_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # A result object deserialized from the server's reply + def update_inspect_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_inspect_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_inspect_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # A result object deserialized from the server's reply + def get_inspect_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_inspect_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_inspect_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_inspect_templates REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse] + # A result object deserialized from the server's reply + def list_inspect_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_inspect_templates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_inspect_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_inspect_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_inspect_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_inspect_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # A result object deserialized from the server's reply + def create_deidentify_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_deidentify_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_deidentify_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # A result object deserialized from the server's reply + def update_deidentify_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_deidentify_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_deidentify_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # A result object deserialized from the server's reply + def get_deidentify_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_deidentify_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_deidentify_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_deidentify_templates REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse] + # A result object deserialized from the server's reply + def list_deidentify_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deidentify_templates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_deidentify_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_deidentify_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_deidentify_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_deidentify_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # A result object deserialized from the server's reply + def create_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # A result object deserialized from the server's reply + def update_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the hybrid_inspect_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # A result object deserialized from the server's reply + def hybrid_inspect_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_hybrid_inspect_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "hybrid_inspect_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # A result object deserialized from the server's reply + def get_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_job_triggers REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListJobTriggersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListJobTriggersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListJobTriggersResponse] + # A result object deserialized from the server's reply + def list_job_triggers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_job_triggers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_job_triggers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the activate_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # A result object deserialized from the server's reply + def activate_job_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_activate_job_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "activate_job_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # A result object deserialized from the server's reply + def create_discovery_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_discovery_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_discovery_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # A result object deserialized from the server's reply + def update_discovery_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_discovery_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_discovery_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # A result object deserialized from the server's reply + def get_discovery_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_discovery_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_discovery_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_discovery_configs REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse] + # A result object deserialized from the server's reply + def list_discovery_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_discovery_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_discovery_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_discovery_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_discovery_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_discovery_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # A result object deserialized from the server's reply + def create_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_dlp_jobs REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDlpJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListDlpJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListDlpJobsResponse] + # A result object deserialized from the server's reply + def list_dlp_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_dlp_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_dlp_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::DlpJob] + # A result object deserialized from the server's reply + def get_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CancelDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # A result object deserialized from the server's reply + def create_stored_info_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_stored_info_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_stored_info_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # A result object deserialized from the server's reply + def update_stored_info_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_stored_info_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_stored_info_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::StoredInfoType] + # A result object deserialized from the server's reply + def get_stored_info_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_stored_info_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_stored_info_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_stored_info_types REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse] + # A result object deserialized from the server's reply + def list_stored_info_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_stored_info_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_stored_info_types", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_stored_info_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_stored_info_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_stored_info_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_project_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse] + # A result object deserialized from the server's reply + def list_project_data_profiles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_project_data_profiles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_project_data_profiles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_table_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse] + # A result object deserialized from the server's reply + def list_table_data_profiles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_table_data_profiles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_table_data_profiles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_column_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse] + # A result object deserialized from the server's reply + def list_column_data_profiles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_column_data_profiles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_column_data_profiles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_project_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] + # A result object deserialized from the server's reply + def get_project_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_project_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ProjectDataProfile.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_file_store_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse] + # A result object deserialized from the server's reply + def list_file_store_data_profiles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_file_store_data_profiles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_file_store_data_profiles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_file_store_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # A result object deserialized from the server's reply + def get_file_store_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_file_store_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_file_store_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_file_store_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_file_store_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_store_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_file_store_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_table_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::TableDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::TableDataProfile] + # A result object deserialized from the server's reply + def get_table_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_table_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_table_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::TableDataProfile.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_column_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # A result object deserialized from the server's reply + def get_column_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_column_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_column_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ColumnDataProfile.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_table_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_table_data_profile request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_table_data_profile_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_table_data_profile", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the hybrid_inspect_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] + # A result object deserialized from the server's reply + def hybrid_inspect_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_hybrid_inspect_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "hybrid_inspect_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the finish_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::FinishDlpJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def finish_dlp_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_finish_dlp_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "finish_dlp_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # A result object deserialized from the server's reply + def create_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # A result object deserialized from the server's reply + def get_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_connections REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::ListConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::ListConnectionsResponse] + # A result object deserialized from the server's reply + def list_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_connections REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::SearchConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::SearchConnectionsResponse] + # A result object deserialized from the server's reply + def search_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dlp::V2::Connection] + # A result object deserialized from the server's reply + def update_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the inspect_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::InspectContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_inspect_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:inspect", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:inspect", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the redact_image REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::RedactImageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_redact_image_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/image:redact", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/image:redact", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deidentify_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeidentifyContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deidentify_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:deidentify", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:deidentify", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reidentify_content REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ReidentifyContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reidentify_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:reidentify", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/content:reidentify", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_info_types REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListInfoTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_info_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/infoTypes", + matches: [] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/infoTypes", + matches: [ + ["parent", %r{^locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/infoTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/infoTypes", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_inspect_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/inspectTemplates", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/inspectTemplates", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/inspectTemplates", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/inspectTemplates", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_inspect_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_inspect_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_inspect_templates REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_inspect_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/inspectTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/inspectTemplates", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/inspectTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/inspectTemplates", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_inspect_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_inspect_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_deidentify_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/deidentifyTemplates", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/deidentifyTemplates", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/deidentifyTemplates", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/deidentifyTemplates", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_deidentify_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_deidentify_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deidentify_templates REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_deidentify_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/deidentifyTemplates", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/deidentifyTemplates", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/deidentifyTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/deidentifyTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_deidentify_template REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_deidentify_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/jobTriggers", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/jobTriggers", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/jobTriggers", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the hybrid_inspect_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_hybrid_inspect_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:hybridInspect", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_job_triggers REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListJobTriggersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_job_triggers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/jobTriggers", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/jobTriggers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/jobTriggers", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the activate_job_trigger REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_activate_job_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:activate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:activate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_discovery_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/discoveryConfigs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/discoveryConfigs", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_discovery_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_discovery_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_discovery_configs REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_discovery_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/discoveryConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/discoveryConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_discovery_config REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_discovery_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/dlpJobs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/dlpJobs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_dlp_jobs REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListDlpJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_dlp_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/dlpJobs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/dlpJobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/dlpJobs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CancelDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_stored_info_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/storedInfoTypes", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/storedInfoTypes", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/storedInfoTypes", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/storedInfoTypes", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_stored_info_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_stored_info_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_stored_info_types REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_stored_info_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/storedInfoTypes", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/storedInfoTypes", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/storedInfoTypes", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/storedInfoTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_stored_info_type REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_stored_info_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_project_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_project_data_profiles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/projectDataProfiles", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/projectDataProfiles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_table_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_table_data_profiles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/tableDataProfiles", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/tableDataProfiles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_column_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_column_data_profiles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/columnDataProfiles", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/columnDataProfiles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_project_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_file_store_data_profiles REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_file_store_data_profiles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/fileStoreDataProfiles", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/fileStoreDataProfiles", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_file_store_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_file_store_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_file_store_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_file_store_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_table_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_table_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_column_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_column_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_table_data_profile REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_table_data_profile_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the hybrid_inspect_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_hybrid_inspect_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:hybridInspect", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the finish_dlp_job REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::FinishDlpJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_finish_dlp_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:finish", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/connections", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/connections", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_connections REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/connections", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/connections", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_connections REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/connections:search", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/connections:search", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_connection REST call + # + # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{name}", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb new file mode 100644 index 000000000000..e40a840c77f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dlp/v2/dlp_service/rest" +require "google/cloud/dlp/v2/version" + +module Google + module Cloud + module Dlp + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/dlp/v2/rest" + # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb new file mode 100644 index 000000000000..1ba616120eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dlp + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb new file mode 100644 index 000000000000..5d649695bb8b --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb @@ -0,0 +1,438 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/privacy/dlp/v2/dlp.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/privacy/dlp/v2/storage_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/type/date_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\x9a\x01\n\x16\x45xcludeByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12K\n\x16image_containment_type\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xbb\x03\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12R\n\x19\x65xclude_by_image_findings\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.ExcludeByImageFindingsH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xc7\x01\n\x19\x41\x64justByMatchingInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12:\n\rmatching_type\x18\x03 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingType\"\xd4\x01\n\x15\x41\x64justByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12K\n\x16image_containment_type\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xb4\x02\n\x0e\x41\x64justmentRule\x12Y\n\x1d\x61\x64just_by_matching_info_types\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AdjustByMatchingInfoTypesH\x00\x12P\n\x18\x61\x64just_by_image_findings\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.AdjustByImageFindingsH\x00\x12g\n\x15likelihood_adjustment\x18\x02 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x0c\n\nconditions\"\xf3\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x12@\n\x0f\x61\x64justment_rule\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.AdjustmentRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\xd9\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x12@\n\x10\x63ontent_metadata\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.ContentMetadataB\x0b\n\tdata_item\"V\n\x0f\x43ontentMetadata\x12\x43\n\nproperties\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.KeyValueMetadataProperty\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"6\n\x18KeyValueMetadataProperty\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\xe6\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x12P\n\x18key_value_metadata_label\x18\x04 \x01(\x0b\x32,.google.privacy.dlp.v2.KeyValueMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"$\n\x15KeyValueMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xb3\x04\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x12\x18\n\x10inspect_template\x18\t \x01(\t\x12\x1b\n\x13\x64\x65identify_template\x18\n \x01(\t\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xf8\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12?\n\x0cstorage_path\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xdf\x01\n\x0fLocationSupport\x12Z\n\x15regionalization_scope\x18\x01 \x01(\x0e\x32;.google.privacy.dlp.v2.LocationSupport.RegionalizationScope\x12\x11\n\tlocations\x18\x02 \x03(\t\"]\n\x14RegionalizationScope\x12%\n!REGIONALIZATION_SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REGIONAL\x10\x01\x12\x10\n\x0c\x41NY_LOCATION\x10\x02\"\x9b\x05\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12@\n\x10location_support\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.LocationSupport\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\x12V\n\rlaunch_status\x18\r \x01(\x0e\x32?.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus\"\x82\x01\n\x14InfoTypeLaunchStatus\x12\'\n#INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14GENERAL_AVAILABILITY\x10\x01\x12\x12\n\x0ePUBLIC_PREVIEW\x10\x02\x12\x13\n\x0fPRIVATE_PREVIEW\x10\x03\"\x90\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xef\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0b\n\x07\x41USTRIA\x10\x35\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\x82\n\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12u\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogB\x02\x18\x01H\x00\x12n\n$publish_findings_to_dataplex_catalog\x18\n \x01(\x0b\x32>.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\"\n PublishFindingsToDataplexCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"\xa7\x01\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x12<\n\x0cinclude_tags\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.TagFiltersB\x03\xe0\x41\x01\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xc3\x01\n\x14ImageContainmentType\x12\x33\n\x08\x65ncloses\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EnclosesH\x00\x12:\n\x0c\x66ully_inside\x18\x02 \x01(\x0b\x32\".google.privacy.dlp.v2.FullyInsideH\x00\x12\x32\n\x08overlaps\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.OverlapH\x00\x42\x06\n\x04type\"\t\n\x07Overlap\"\n\n\x08\x45ncloses\"\r\n\x0b\x46ullyInside\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x93\x0e\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18/ \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xe8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18\x1b \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"H\n\nTagFilters\x12:\n\x0btag_filters\x18\x01 \x03(\x0b\x32 .google.privacy.dlp.v2.TagFilterB\x03\xe0\x41\x02\"S\n\tTagFilter\x12\x1e\n\x14namespaced_tag_value\x18\x01 \x01(\tH\x00\x12\x1c\n\x12namespaced_tag_key\x18\x02 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"%\n\x0e\x44\x61taSourceType\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xb6\x05\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x12\x66\n\x1a\x64ocument_fallback_location\x18\x02 \x01(\x0b\x32\x42.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\x1a\xd4\x01\n\x18\x44ocumentFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\"K\n\x17SaveToGcsFindingsOutput\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\"\xc6\x02\n\x06\x44omain\x12\x38\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32&.google.privacy.dlp.v2.Domain.Category\x12\x35\n\x07signals\x18\x02 \x03(\x0e\x32$.google.privacy.dlp.v2.Domain.Signal\"6\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41I\x10\x01\x12\x08\n\x04\x43ODE\x10\x02\"\x92\x01\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\t\n\x05MODEL\x10\x01\x12\x12\n\x0eTEXT_EMBEDDING\x10\x02\x12\r\n\tEMBEDDING\x10\x07\x12\x11\n\rVERTEX_PLUGIN\x10\x03\x12\x11\n\rVECTOR_PLUGIN\x10\x04\x12\x0f\n\x0bSOURCE_CODE\x10\x05\x12\x0b\n\x07SERVICE\x10\x06*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\xae\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03\x12\x1f\n\x1bMATCHING_TYPE_RULE_SPECIFIC\x10\x04*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*v\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02\x12\x14\n\x10\x43ONTENT_METADATA\x10\x03\x12\x1c\n\x18\x43LIENT_PROVIDED_METADATA\x10\x04*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dlp + module V2 + ExcludeInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeInfoTypes").msgclass + ExcludeByHotword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeByHotword").msgclass + ExcludeByImageFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeByImageFindings").msgclass + ExclusionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExclusionRule").msgclass + AdjustByMatchingInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustByMatchingInfoTypes").msgclass + AdjustByImageFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustByImageFindings").msgclass + AdjustmentRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustmentRule").msgclass + InspectionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectionRule").msgclass + InspectionRuleSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectionRuleSet").msgclass + InspectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig").msgclass + InspectConfig::InfoTypeLikelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood").msgclass + InspectConfig::FindingLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.FindingLimits").msgclass + InspectConfig::FindingLimits::InfoTypeLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit").msgclass + ByteContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem").msgclass + ByteContentItem::BytesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem.BytesType").enummodule + ContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentItem").msgclass + ContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentMetadata").msgclass + Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table").msgclass + Table::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table.Row").msgclass + KeyValueMetadataProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KeyValueMetadataProperty").msgclass + InspectResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectResult").msgclass + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Finding").msgclass + Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Location").msgclass + ContentLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentLocation").msgclass + MetadataLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MetadataLocation").msgclass + StorageMetadataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageMetadataLabel").msgclass + KeyValueMetadataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KeyValueMetadataLabel").msgclass + DocumentLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DocumentLocation").msgclass + RecordLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordLocation").msgclass + TableLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableLocation").msgclass + Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Container").msgclass + Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Range").msgclass + ImageLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageLocation").msgclass + BoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BoundingBox").msgclass + RedactImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageRequest").msgclass + RedactImageRequest::ImageRedactionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig").msgclass + Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Color").msgclass + RedactImageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageResponse").msgclass + DeidentifyContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyContentRequest").msgclass + DeidentifyContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyContentResponse").msgclass + ReidentifyContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReidentifyContentRequest").msgclass + ReidentifyContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReidentifyContentResponse").msgclass + InspectContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectContentRequest").msgclass + InspectContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectContentResponse").msgclass + OutputStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OutputStorageConfig").msgclass + OutputStorageConfig::OutputSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OutputStorageConfig.OutputSchema").enummodule + InfoTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeStats").msgclass + InspectDataSourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails").msgclass + InspectDataSourceDetails::RequestedOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions").msgclass + InspectDataSourceDetails::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails.Result").msgclass + DataProfileBigQueryRowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileBigQueryRowSchema").msgclass + HybridInspectStatistics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectStatistics").msgclass + ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ActionDetails").msgclass + DeidentifyDataSourceStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceStats").msgclass + DeidentifyDataSourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceDetails").msgclass + DeidentifyDataSourceDetails::RequestedDeidentifyOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions").msgclass + LocationSupport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LocationSupport").msgclass + LocationSupport::RegionalizationScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LocationSupport.RegionalizationScope").enummodule + InfoTypeDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeDescription").msgclass + InfoTypeDescription::InfoTypeLaunchStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus").enummodule + InfoTypeCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory").msgclass + InfoTypeCategory::LocationCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.LocationCategory").enummodule + InfoTypeCategory::IndustryCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory").enummodule + InfoTypeCategory::TypeCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.TypeCategory").enummodule + VersionDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VersionDescription").msgclass + ListInfoTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesRequest").msgclass + ListInfoTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesResponse").msgclass + RiskAnalysisJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RiskAnalysisJobConfig").msgclass + QuasiId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuasiId").msgclass + StatisticalTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable").msgclass + StatisticalTable::QuasiIdentifierField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField").msgclass + PrivacyMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric").msgclass + PrivacyMetric::NumericalStatsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig").msgclass + PrivacyMetric::CategoricalStatsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig").msgclass + PrivacyMetric::KAnonymityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig").msgclass + PrivacyMetric::LDiversityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig").msgclass + PrivacyMetric::KMapEstimationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig").msgclass + PrivacyMetric::KMapEstimationConfig::TaggedField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField").msgclass + PrivacyMetric::KMapEstimationConfig::AuxiliaryTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable").msgclass + PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField").msgclass + PrivacyMetric::DeltaPresenceEstimationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig").msgclass + AnalyzeDataSourceRiskDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails").msgclass + AnalyzeDataSourceRiskDetails::NumericalStatsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult").msgclass + AnalyzeDataSourceRiskDetails::CategoricalStatsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult").msgclass + AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket").msgclass + AnalyzeDataSourceRiskDetails::KAnonymityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult").msgclass + AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass").msgclass + AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket").msgclass + AnalyzeDataSourceRiskDetails::LDiversityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult").msgclass + AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass").msgclass + AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket").msgclass + AnalyzeDataSourceRiskDetails::KMapEstimationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult").msgclass + AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues").msgclass + AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket").msgclass + AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult").msgclass + AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues").msgclass + AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket").msgclass + AnalyzeDataSourceRiskDetails::RequestedRiskAnalysisOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions").msgclass + ValueFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ValueFrequency").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Value").msgclass + QuoteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuoteInfo").msgclass + DateTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateTime").msgclass + DateTime::TimeZone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateTime.TimeZone").msgclass + DeidentifyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyConfig").msgclass + ImageTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations").msgclass + ImageTransformations::ImageTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation").msgclass + ImageTransformations::ImageTransformation::SelectedInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes").msgclass + ImageTransformations::ImageTransformation::AllInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes").msgclass + ImageTransformations::ImageTransformation::AllText = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText").msgclass + TransformationErrorHandling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling").msgclass + TransformationErrorHandling::ThrowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling.ThrowError").msgclass + TransformationErrorHandling::LeaveUntransformed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed").msgclass + PrimitiveTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrimitiveTransformation").msgclass + TimePartConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TimePartConfig").msgclass + TimePartConfig::TimePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TimePartConfig.TimePart").enummodule + CryptoHashConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoHashConfig").msgclass + CryptoDeterministicConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoDeterministicConfig").msgclass + ReplaceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceValueConfig").msgclass + ReplaceDictionaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceDictionaryConfig").msgclass + ReplaceWithInfoTypeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceWithInfoTypeConfig").msgclass + RedactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactConfig").msgclass + CharsToIgnore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharsToIgnore").msgclass + CharsToIgnore::CommonCharsToIgnore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore").enummodule + CharacterMaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharacterMaskConfig").msgclass + FixedSizeBucketingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FixedSizeBucketingConfig").msgclass + BucketingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BucketingConfig").msgclass + BucketingConfig::Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BucketingConfig.Bucket").msgclass + CryptoReplaceFfxFpeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig").msgclass + CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet").enummodule + CryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoKey").msgclass + TransientCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransientCryptoKey").msgclass + UnwrappedCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UnwrappedCryptoKey").msgclass + KmsWrappedCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KmsWrappedCryptoKey").msgclass + DateShiftConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateShiftConfig").msgclass + InfoTypeTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeTransformations").msgclass + InfoTypeTransformations::InfoTypeTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation").msgclass + FieldTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FieldTransformation").msgclass + RecordTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordTransformations").msgclass + RecordSuppression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordSuppression").msgclass + RecordCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition").msgclass + RecordCondition::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Condition").msgclass + RecordCondition::Conditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Conditions").msgclass + RecordCondition::Expressions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Expressions").msgclass + RecordCondition::Expressions::LogicalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator").enummodule + TransformationOverview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationOverview").msgclass + TransformationSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary").msgclass + TransformationSummary::SummaryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary.SummaryResult").msgclass + TransformationSummary::TransformationResultCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary.TransformationResultCode").enummodule + TransformationDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDescription").msgclass + TransformationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDetails").msgclass + TransformationLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationLocation").msgclass + RecordTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordTransformation").msgclass + TransformationResultStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationResultStatus").msgclass + TransformationDetailsStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDetailsStorageConfig").msgclass + Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Schedule").msgclass + Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Manual").msgclass + InspectTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectTemplate").msgclass + DeidentifyTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyTemplate").msgclass + Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Error").msgclass + Error::ErrorExtraInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Error.ErrorExtraInfo").enummodule + JobTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger").msgclass + JobTrigger::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger.Trigger").msgclass + JobTrigger::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger.Status").enummodule + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action").msgclass + Action::SaveFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.SaveFindings").msgclass + Action::PublishToPubSub = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishToPubSub").msgclass + Action::PublishSummaryToCscc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishSummaryToCscc").msgclass + Action::PublishFindingsToCloudDataCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog").msgclass + Action::PublishFindingsToDataplexCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog").msgclass + Action::Deidentify = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.Deidentify").msgclass + Action::JobNotificationEmails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.JobNotificationEmails").msgclass + Action::PublishToStackdriver = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishToStackdriver").msgclass + TransformationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationConfig").msgclass + CreateInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateInspectTemplateRequest").msgclass + UpdateInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateInspectTemplateRequest").msgclass + GetInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetInspectTemplateRequest").msgclass + ListInspectTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInspectTemplatesRequest").msgclass + ListInspectTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInspectTemplatesResponse").msgclass + DeleteInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteInspectTemplateRequest").msgclass + CreateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateJobTriggerRequest").msgclass + ActivateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ActivateJobTriggerRequest").msgclass + UpdateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateJobTriggerRequest").msgclass + GetJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetJobTriggerRequest").msgclass + CreateDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDiscoveryConfigRequest").msgclass + UpdateDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateDiscoveryConfigRequest").msgclass + GetDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDiscoveryConfigRequest").msgclass + ListDiscoveryConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDiscoveryConfigsRequest").msgclass + ListDiscoveryConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDiscoveryConfigsResponse").msgclass + DeleteDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDiscoveryConfigRequest").msgclass + CreateDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDlpJobRequest").msgclass + ListJobTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListJobTriggersRequest").msgclass + ListJobTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListJobTriggersResponse").msgclass + DeleteJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteJobTriggerRequest").msgclass + InspectJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectJobConfig").msgclass + DataProfileAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction").msgclass + DataProfileAction::Export = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.Export").msgclass + DataProfileAction::PubSubNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PubSubNotification").msgclass + DataProfileAction::PubSubNotification::DetailLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel").enummodule + DataProfileAction::PublishToChronicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToChronicle").msgclass + DataProfileAction::PublishToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter").msgclass + DataProfileAction::PublishToDataplexCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog").msgclass + DataProfileAction::TagResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources").msgclass + DataProfileAction::TagResources::TagCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition").msgclass + DataProfileAction::TagResources::TagValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue").msgclass + DataProfileAction::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.EventType").enummodule + DataProfileFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFinding").msgclass + DataProfileFindingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFindingLocation").msgclass + DataProfileFindingRecordLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFindingRecordLocation").msgclass + DataProfileJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileJobConfig").msgclass + BigQueryRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryRegex").msgclass + BigQueryRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryRegexes").msgclass + BigQueryTableTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableTypes").msgclass + Disabled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Disabled").msgclass + DataProfileLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileLocation").msgclass + DiscoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig").msgclass + DiscoveryConfig::OrgConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig.OrgConfig").msgclass + DiscoveryConfig::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig.Status").enummodule + DiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryTarget").msgclass + BigQueryDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryDiscoveryTarget").msgclass + DiscoveryBigQueryFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryFilter").msgclass + DiscoveryBigQueryFilter::AllOtherBigQueryTables = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables").msgclass + BigQueryTableCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableCollection").msgclass + DiscoveryBigQueryConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryConditions").msgclass + DiscoveryBigQueryConditions::OrConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions").msgclass + DiscoveryGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryGenerationCadence").msgclass + DiscoveryTableModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryTableModifiedCadence").msgclass + DiscoverySchemaModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoverySchemaModifiedCadence").msgclass + DiscoveryInspectTemplateModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence").msgclass + CloudSqlDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlDiscoveryTarget").msgclass + DiscoveryCloudSqlFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlFilter").msgclass + DatabaseResourceCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceCollection").msgclass + DatabaseResourceRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceRegexes").msgclass + DatabaseResourceRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceRegex").msgclass + AllOtherDatabaseResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AllOtherDatabaseResources").msgclass + DatabaseResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceReference").msgclass + DiscoveryCloudSqlConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions").msgclass + DiscoveryCloudSqlConditions::DatabaseEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine").enummodule + DiscoveryCloudSqlConditions::DatabaseResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType").enummodule + DiscoveryCloudSqlGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence").msgclass + DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence").msgclass + DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence::CloudSqlSchemaModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification").enummodule + SecretsDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SecretsDiscoveryTarget").msgclass + CloudStorageDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageDiscoveryTarget").msgclass + DiscoveryCloudStorageFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageFilter").msgclass + FileStoreCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreCollection").msgclass + FileStoreRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreRegexes").msgclass + FileStoreRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreRegex").msgclass + CloudStorageRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageRegex").msgclass + CloudStorageResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageResourceReference").msgclass + DiscoveryCloudStorageGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence").msgclass + DiscoveryCloudStorageConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions").msgclass + DiscoveryCloudStorageConditions::CloudStorageObjectAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute").enummodule + DiscoveryCloudStorageConditions::CloudStorageBucketAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute").enummodule + DiscoveryFileStoreConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryFileStoreConditions").msgclass + OtherCloudDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryTarget").msgclass + DiscoveryOtherCloudFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudFilter").msgclass + OtherCloudResourceCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceCollection").msgclass + OtherCloudResourceRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceRegexes").msgclass + OtherCloudResourceRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceRegex").msgclass + AwsAccountRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AwsAccountRegex").msgclass + AmazonS3BucketRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketRegex").msgclass + OtherCloudSingleResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudSingleResourceReference").msgclass + AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AwsAccount").msgclass + AmazonS3Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3Bucket").msgclass + DiscoveryOtherCloudConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudConditions").msgclass + AmazonS3BucketConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions").msgclass + AmazonS3BucketConditions::BucketType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType").enummodule + AmazonS3BucketConditions::ObjectStorageClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass").enummodule + DiscoveryOtherCloudGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence").msgclass + DiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryStartingLocation").msgclass + OtherCloudDiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation").msgclass + OtherCloudDiscoveryStartingLocation::AwsDiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation").msgclass + AllOtherResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AllOtherResources").msgclass + VertexDatasetDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetDiscoveryTarget").msgclass + DiscoveryVertexDatasetFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetFilter").msgclass + VertexDatasetCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetCollection").msgclass + VertexDatasetRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetRegexes").msgclass + VertexDatasetRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetRegex").msgclass + VertexDatasetResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetResourceReference").msgclass + DiscoveryVertexDatasetConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetConditions").msgclass + DiscoveryVertexDatasetGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence").msgclass + DlpJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJob").msgclass + DlpJob::JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJob.JobState").enummodule + GetDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDlpJobRequest").msgclass + ListDlpJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDlpJobsRequest").msgclass + ListDlpJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDlpJobsResponse").msgclass + CancelDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CancelDlpJobRequest").msgclass + FinishDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FinishDlpJobRequest").msgclass + DeleteDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDlpJobRequest").msgclass + CreateDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDeidentifyTemplateRequest").msgclass + UpdateDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest").msgclass + GetDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDeidentifyTemplateRequest").msgclass + ListDeidentifyTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesRequest").msgclass + ListDeidentifyTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesResponse").msgclass + DeleteDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest").msgclass + LargeCustomDictionaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LargeCustomDictionaryConfig").msgclass + LargeCustomDictionaryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LargeCustomDictionaryStats").msgclass + StoredInfoTypeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeConfig").msgclass + StoredInfoTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeStats").msgclass + StoredInfoTypeVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeVersion").msgclass + StoredInfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoType").msgclass + CreateStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateStoredInfoTypeRequest").msgclass + UpdateStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateStoredInfoTypeRequest").msgclass + GetStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetStoredInfoTypeRequest").msgclass + ListStoredInfoTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesRequest").msgclass + ListStoredInfoTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesResponse").msgclass + DeleteStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteStoredInfoTypeRequest").msgclass + HybridInspectJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectJobTriggerRequest").msgclass + HybridInspectDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectDlpJobRequest").msgclass + HybridContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridContentItem").msgclass + HybridFindingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridFindingDetails").msgclass + HybridInspectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectResponse").msgclass + ImageContainmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageContainmentType").msgclass + Overlap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Overlap").msgclass + Encloses = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Encloses").msgclass + FullyInside = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FullyInside").msgclass + ListProjectDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListProjectDataProfilesRequest").msgclass + ListProjectDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListProjectDataProfilesResponse").msgclass + ListTableDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListTableDataProfilesRequest").msgclass + ListTableDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListTableDataProfilesResponse").msgclass + ListColumnDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListColumnDataProfilesRequest").msgclass + ListColumnDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListColumnDataProfilesResponse").msgclass + DataRiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataRiskLevel").msgclass + DataRiskLevel::DataRiskLevelScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore").enummodule + ProjectDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProjectDataProfile").msgclass + DataProfileConfigSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileConfigSnapshot").msgclass + TableDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableDataProfile").msgclass + TableDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableDataProfile.State").enummodule + ProfileStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProfileStatus").msgclass + InfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeSummary").msgclass + OtherInfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherInfoTypeSummary").msgclass + ColumnDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile").msgclass + ColumnDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.State").enummodule + ColumnDataProfile::ColumnDataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType").enummodule + ColumnDataProfile::ColumnPolicyState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState").enummodule + FileStoreDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreDataProfile").msgclass + FileStoreDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreDataProfile.State").enummodule + Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Tag").msgclass + TagFilters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TagFilters").msgclass + TagFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TagFilter").msgclass + RelatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RelatedResource").msgclass + FileStoreInfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreInfoTypeSummary").msgclass + FileExtensionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileExtensionInfo").msgclass + FileClusterSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterSummary").msgclass + GetProjectDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetProjectDataProfileRequest").msgclass + GetFileStoreDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetFileStoreDataProfileRequest").msgclass + ListFileStoreDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListFileStoreDataProfilesRequest").msgclass + ListFileStoreDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListFileStoreDataProfilesResponse").msgclass + DeleteFileStoreDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest").msgclass + GetTableDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetTableDataProfileRequest").msgclass + GetColumnDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetColumnDataProfileRequest").msgclass + DataProfilePubSubCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition").msgclass + DataProfilePubSubCondition::PubSubCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition").msgclass + DataProfilePubSubCondition::PubSubExpressions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions").msgclass + DataProfilePubSubCondition::PubSubExpressions::PubSubLogicalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator").enummodule + DataProfilePubSubCondition::ProfileScoreBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket").enummodule + DataProfilePubSubMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubMessage").msgclass + CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateConnectionRequest").msgclass + GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetConnectionRequest").msgclass + ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListConnectionsRequest").msgclass + SearchConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SearchConnectionsRequest").msgclass + ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListConnectionsResponse").msgclass + SearchConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SearchConnectionsResponse").msgclass + UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateConnectionRequest").msgclass + DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteConnectionRequest").msgclass + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Connection").msgclass + SecretManagerCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SecretManagerCredential").msgclass + CloudSqlIamCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlIamCredential").msgclass + CloudSqlProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlProperties").msgclass + CloudSqlProperties::DatabaseEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine").enummodule + DeleteTableDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteTableDataProfileRequest").msgclass + DataSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataSourceType").msgclass + FileClusterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterType").msgclass + FileClusterType::Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterType.Cluster").enummodule + ProcessingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation").msgclass + ProcessingLocation::MultiRegionProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing").msgclass + ProcessingLocation::GlobalProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing").msgclass + ProcessingLocation::ImageFallbackLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation").msgclass + ProcessingLocation::DocumentFallbackLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation").msgclass + SaveToGcsFindingsOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SaveToGcsFindingsOutput").msgclass + Domain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain").msgclass + Domain::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain.Category").enummodule + Domain::Signal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain.Signal").enummodule + TransformationResultStatusType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationResultStatusType").enummodule + TransformationContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationContainerType").enummodule + TransformationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationType").enummodule + ProfileGeneration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProfileGeneration").enummodule + BigQueryTableTypeCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableTypeCollection").enummodule + BigQueryTableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableType").enummodule + DataProfileUpdateFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileUpdateFrequency").enummodule + BigQueryTableModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableModification").enummodule + BigQuerySchemaModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQuerySchemaModification").enummodule + RelationalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RelationalOperator").enummodule + MatchingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MatchingType").enummodule + ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentOption").enummodule + MetadataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MetadataType").enummodule + InfoTypeSupportedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeSupportedBy").enummodule + DlpJobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJobType").enummodule + StoredInfoTypeState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeState").enummodule + ResourceVisibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ResourceVisibility").enummodule + EncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.EncryptionStatus").enummodule + NullPercentageLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.NullPercentageLevel").enummodule + UniquenessScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UniquenessScoreLevel").enummodule + ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ConnectionState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb new file mode 100644 index 000000000000..4d81407a5dee --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb @@ -0,0 +1,298 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/privacy/dlp/v2/dlp.proto for package 'Google.Cloud.Dlp.V2' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/privacy/dlp/v2/dlp_pb' + +module Google + module Cloud + module Dlp + module V2 + module DlpService + # Sensitive Data Protection provides access to a powerful sensitive data + # inspection, classification, and de-identification platform that works + # on text, images, and Google Cloud storage repositories. + # To learn more about concepts and find how-to guides see + # https://cloud.google.com/sensitive-data-protection/docs/. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.privacy.dlp.v2.DlpService' + + # Finds potentially sensitive info in content. + # This method has limits on input size, processing time, and output size. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # For how to guides, see + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images + # and + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, + rpc :InspectContent, ::Google::Cloud::Dlp::V2::InspectContentRequest, ::Google::Cloud::Dlp::V2::InspectContentResponse + # Redacts potentially sensitive info from an image. + # This method has limits on input size, processing time, and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + # + # Only the first frame of each multiframe image is redacted. Metadata and + # other frames are omitted in the response. + rpc :RedactImage, ::Google::Cloud::Dlp::V2::RedactImageRequest, ::Google::Cloud::Dlp::V2::RedactImageResponse + # De-identifies potentially sensitive info from a ContentItem. + # This method has limits on input size and output size. + # See + # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in this request, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + rpc :DeidentifyContent, ::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Google::Cloud::Dlp::V2::DeidentifyContentResponse + # Re-identifies content that has been de-identified. + # See + # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example + # to learn more. + rpc :ReidentifyContent, ::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Google::Cloud::Dlp::V2::ReidentifyContentResponse + # Returns a list of the sensitive information types that the DLP API + # supports. See + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # to learn more. + rpc :ListInfoTypes, ::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Google::Cloud::Dlp::V2::ListInfoTypesResponse + # Creates an InspectTemplate for reusing frequently used configuration + # for inspecting content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + rpc :CreateInspectTemplate, ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate + # Updates the InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + rpc :UpdateInspectTemplate, ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate + # Gets an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + rpc :GetInspectTemplate, ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate + # Lists InspectTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + rpc :ListInspectTemplates, ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse + # Deletes an InspectTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates + # to learn more. + rpc :DeleteInspectTemplate, ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Google::Protobuf::Empty + # Creates a DeidentifyTemplate for reusing frequently used configuration + # for de-identifying content, images, and storage. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + rpc :CreateDeidentifyTemplate, ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate + # Updates the DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + rpc :UpdateDeidentifyTemplate, ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate + # Gets a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + rpc :GetDeidentifyTemplate, ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate + # Lists DeidentifyTemplates. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + rpc :ListDeidentifyTemplates, ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse + # Deletes a DeidentifyTemplate. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + # to learn more. + rpc :DeleteDeidentifyTemplate, ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Google::Protobuf::Empty + # Creates a job trigger to run DLP actions such as scanning storage for + # sensitive information on a set schedule. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + rpc :CreateJobTrigger, ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger + # Updates a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + rpc :UpdateJobTrigger, ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger + # Inspect hybrid content and store findings to a trigger. The inspection + # will be processed asynchronously. To review the findings monitor the + # jobs within the trigger. + rpc :HybridInspectJobTrigger, ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Google::Cloud::Dlp::V2::HybridInspectResponse + # Gets a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + rpc :GetJobTrigger, ::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger + # Lists job triggers. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + rpc :ListJobTriggers, ::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Google::Cloud::Dlp::V2::ListJobTriggersResponse + # Deletes a job trigger. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + # to learn more. + rpc :DeleteJobTrigger, ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Google::Protobuf::Empty + # Activate a job trigger. Causes the immediate execute of a trigger + # instead of waiting on the trigger event to occur. + rpc :ActivateJobTrigger, ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Google::Cloud::Dlp::V2::DlpJob + # Creates a config for discovery to scan and profile storage. + rpc :CreateDiscoveryConfig, ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig + # Updates a discovery configuration. + rpc :UpdateDiscoveryConfig, ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig + # Gets a discovery configuration. + rpc :GetDiscoveryConfig, ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig + # Lists discovery configurations. + rpc :ListDiscoveryConfigs, ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse + # Deletes a discovery configuration. + rpc :DeleteDiscoveryConfig, ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Google::Protobuf::Empty + # Creates a new job to inspect storage or calculate risk metrics. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + # + # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + # system will automatically choose what detectors to run. By default this may + # be all types, but may change over time as detectors are updated. + rpc :CreateDlpJob, ::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Google::Cloud::Dlp::V2::DlpJob + # Lists DlpJobs that match the specified filter in the request. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + rpc :ListDlpJobs, ::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Google::Cloud::Dlp::V2::ListDlpJobsResponse + # Gets the latest state of a long-running DlpJob. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + rpc :GetDlpJob, ::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Google::Cloud::Dlp::V2::DlpJob + # Deletes a long-running DlpJob. This method indicates that the client is + # no longer interested in the DlpJob result. The job will be canceled if + # possible. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + rpc :DeleteDlpJob, ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Google::Protobuf::Empty + # Starts asynchronous cancellation on a long-running DlpJob. The server + # makes a best effort to cancel the DlpJob, but success is not + # guaranteed. + # See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + # and + # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + # to learn more. + rpc :CancelDlpJob, ::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Google::Protobuf::Empty + # Creates a pre-built stored infoType to be used for inspection. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + rpc :CreateStoredInfoType, ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType + # Updates the stored infoType by creating a new version. The existing version + # will continue to be used until the new version is ready. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + rpc :UpdateStoredInfoType, ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType + # Gets a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + rpc :GetStoredInfoType, ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType + # Lists stored infoTypes. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + rpc :ListStoredInfoTypes, ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse + # Deletes a stored infoType. + # See + # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + # to learn more. + rpc :DeleteStoredInfoType, ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Google::Protobuf::Empty + # Lists project data profiles for an organization. + rpc :ListProjectDataProfiles, ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse + # Lists table data profiles for an organization. + rpc :ListTableDataProfiles, ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse + # Lists column data profiles for an organization. + rpc :ListColumnDataProfiles, ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse + # Gets a project data profile. + rpc :GetProjectDataProfile, ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Google::Cloud::Dlp::V2::ProjectDataProfile + # Lists file store data profiles for an organization. + rpc :ListFileStoreDataProfiles, ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse + # Gets a file store data profile. + rpc :GetFileStoreDataProfile, ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Google::Cloud::Dlp::V2::FileStoreDataProfile + # Delete a FileStoreDataProfile. Will not prevent the profile from being + # regenerated if the resource is still included in a discovery configuration. + rpc :DeleteFileStoreDataProfile, ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Google::Protobuf::Empty + # Gets a table data profile. + rpc :GetTableDataProfile, ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Google::Cloud::Dlp::V2::TableDataProfile + # Gets a column data profile. + rpc :GetColumnDataProfile, ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Google::Cloud::Dlp::V2::ColumnDataProfile + # Delete a TableDataProfile. Will not prevent the profile from being + # regenerated if the table is still included in a discovery configuration. + rpc :DeleteTableDataProfile, ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Google::Protobuf::Empty + # Inspect hybrid content and store findings to a job. + # To review the findings, inspect the job. Inspection will occur + # asynchronously. + rpc :HybridInspectDlpJob, ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Google::Cloud::Dlp::V2::HybridInspectResponse + # Finish a running hybrid DlpJob. Triggers the finalization steps and running + # of any enabled actions that have not yet run. + rpc :FinishDlpJob, ::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Google::Protobuf::Empty + # Create a Connection to an external data source. + rpc :CreateConnection, ::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Google::Cloud::Dlp::V2::Connection + # Get a Connection by name. + rpc :GetConnection, ::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Google::Cloud::Dlp::V2::Connection + # Lists Connections in a parent. Use SearchConnections to see all connections + # within an organization. + rpc :ListConnections, ::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Google::Cloud::Dlp::V2::ListConnectionsResponse + # Searches for Connections in a parent. + rpc :SearchConnections, ::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Google::Cloud::Dlp::V2::SearchConnectionsResponse + # Delete a Connection. + rpc :DeleteConnection, ::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Google::Protobuf::Empty + # Update a Connection. + rpc :UpdateConnection, ::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Google::Cloud::Dlp::V2::Connection + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb new file mode 100644 index 000000000000..963b76bbd524 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/privacy/dlp/v2/storage.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/privacy/dlp/v2/storage.proto\x12\x15google.privacy.dlp.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\"\xfb\x01\n\x10SensitivityScore\x12L\n\x05score\x18\x01 \x01(\x0e\x32=.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel\"\x98\x01\n\x15SensitivityScoreLevel\x12!\n\x1dSENSITIVITY_SCORE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\"K\n\nStoredType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbd\r\n\x0e\x43ustomInfoType\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x46\n\ndictionary\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12M\n\x0esurrogate_type\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeH\x00\x12\x38\n\x0bstored_type\x18\x05 \x01(\x0b\x32!.google.privacy.dlp.v2.StoredTypeH\x00\x12i\n\x1dmetadata_key_value_expression\x18\n \x01(\x0b\x32@.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpressionH\x00\x12L\n\x0f\x64\x65tection_rules\x18\x07 \x03(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.DetectionRule\x12K\n\x0e\x65xclusion_type\x18\x08 \x01(\x0e\x32\x33.google.privacy.dlp.v2.CustomInfoType.ExclusionType\x12\x42\n\x11sensitivity_score\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x1a\xc8\x01\n\nDictionary\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x12\x45\n\x12\x63loud_storage_path\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x1a\x19\n\x08WordList\x12\r\n\x05words\x18\x01 \x03(\tB\x08\n\x06source\x1a/\n\x05Regex\x12\x0f\n\x07pattern\x18\x01 \x01(\t\x12\x15\n\rgroup_indexes\x18\x02 \x03(\x05\x1a\x0f\n\rSurrogateType\x1a\x44\n\x1aMetadataKeyValueExpression\x12\x11\n\tkey_regex\x18\x01 \x01(\t\x12\x13\n\x0bvalue_regex\x18\x02 \x01(\t\x1a\xbe\x04\n\rDetectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x1a\x38\n\tProximity\x12\x15\n\rwindow_before\x18\x01 \x01(\x05\x12\x14\n\x0cwindow_after\x18\x02 \x01(\x05\x1a\x82\x01\n\x14LikelihoodAdjustment\x12=\n\x10\x66ixed_likelihood\x18\x01 \x01(\x0e\x32!.google.privacy.dlp.v2.LikelihoodH\x00\x12\x1d\n\x13relative_likelihood\x18\x02 \x01(\x05H\x00\x42\x0c\n\nadjustment\x1a\x8c\x02\n\x0bHotwordRule\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\x12g\n\x15likelihood_adjustment\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x06\n\x04type\"K\n\rExclusionType\x12\x1e\n\x1a\x45XCLUSION_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45XCLUSION_TYPE_EXCLUDE\x10\x01\x42\x06\n\x04type\"\x17\n\x07\x46ieldId\x12\x0c\n\x04name\x18\x01 \x01(\t\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x01\n\x10\x44\x61tastoreOptions\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x33\n\x04kind\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.KindExpression\"]\n\x18\x43loudStorageRegexFileSet\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rinclude_regex\x18\x02 \x03(\t\x12\x15\n\rexclude_regex\x18\x03 \x03(\t\"\xec\x03\n\x13\x43loudStorageOptions\x12\x44\n\x08\x66ile_set\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageOptions.FileSet\x12\x1c\n\x14\x62ytes_limit_per_file\x18\x04 \x01(\x03\x12$\n\x1c\x62ytes_limit_per_file_percent\x18\x08 \x01(\x05\x12\x33\n\nfile_types\x18\x05 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileType\x12N\n\rsample_method\x18\x06 \x01(\x0e\x32\x37.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod\x12\x1b\n\x13\x66iles_limit_percent\x18\x07 \x01(\x05\x1a_\n\x07\x46ileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\x12G\n\x0eregex_file_set\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.CloudStorageRegexFileSet\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\"\n\x13\x43loudStorageFileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\" \n\x10\x43loudStoragePath\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xc4\x03\n\x0f\x42igQueryOptions\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12:\n\x12identifying_fields\x18\x02 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\nrows_limit\x18\x03 \x01(\x03\x12\x1a\n\x12rows_limit_percent\x18\x06 \x01(\x05\x12J\n\rsample_method\x18\x04 \x01(\x0e\x32\x33.google.privacy.dlp.v2.BigQueryOptions.SampleMethod\x12\x37\n\x0f\x65xcluded_fields\x18\x05 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x0fincluded_fields\x18\x07 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\xda\x04\n\rStorageConfig\x12\x44\n\x11\x64\x61tastore_options\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DatastoreOptionsH\x00\x12K\n\x15\x63loud_storage_options\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageOptionsH\x00\x12\x43\n\x11\x62ig_query_options\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryOptionsH\x00\x12>\n\x0ehybrid_options\x18\t \x01(\x0b\x32$.google.privacy.dlp.v2.HybridOptionsH\x00\x12L\n\x0ftimespan_config\x18\x06 \x01(\x0b\x32\x33.google.privacy.dlp.v2.StorageConfig.TimespanConfig\x1a\xda\x01\n\x0eTimespanConfig\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0ftimestamp_field\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x31\n)enable_auto_population_of_timespan_config\x18\x04 \x01(\x08\x42\x06\n\x04type\"\xf6\x01\n\rHybridOptions\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12#\n\x1brequired_finding_label_keys\x18\x02 \x03(\t\x12@\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.HybridOptions.LabelsEntry\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0b\x42igQueryKey\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x12\n\nrow_number\x18\x02 \x01(\x03\">\n\x0c\x44\x61tastoreKey\x12.\n\nentity_key\x18\x01 \x01(\x0b\x32\x1a.google.privacy.dlp.v2.Key\"\xbb\x01\n\x03Key\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x34\n\x04path\x18\x02 \x03(\x0b\x32&.google.privacy.dlp.v2.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"\xa1\x01\n\tRecordKey\x12<\n\rdatastore_key\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.DatastoreKeyH\x00\x12;\n\rbig_query_key\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.BigQueryKeyH\x00\x12\x11\n\tid_values\x18\x05 \x03(\tB\x06\n\x04type\"I\n\rBigQueryTable\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"J\n\x0eTableReference\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x12\x10\n\x08table_id\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x03 \x01(\t\"s\n\rBigQueryField\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"9\n\x08\x45ntityId\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"J\n\x0cTableOptions\x12:\n\x12identifying_fields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\x9a\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x42INARY_FILE\x10\x01\x12\r\n\tTEXT_FILE\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x08\n\x04WORD\x10\x05\x12\x07\n\x03PDF\x10\x06\x12\x08\n\x04\x41VRO\x10\x07\x12\x07\n\x03\x43SV\x10\x08\x12\x07\n\x03TSV\x10\t\x12\x0e\n\nPOWERPOINT\x10\x0b\x12\t\n\x05\x45XCEL\x10\x0c\x42\x99\x01\n\x19\x63om.google.privacy.dlp.v2B\nDlpStorageP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dlp + module V2 + InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoType").msgclass + SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SensitivityScore").msgclass + SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel").enummodule + StoredType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredType").msgclass + CustomInfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType").msgclass + CustomInfoType::Dictionary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary").msgclass + CustomInfoType::Dictionary::WordList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList").msgclass + CustomInfoType::Regex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Regex").msgclass + CustomInfoType::SurrogateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.SurrogateType").msgclass + CustomInfoType::MetadataKeyValueExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression").msgclass + CustomInfoType::DetectionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule").msgclass + CustomInfoType::DetectionRule::Proximity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity").msgclass + CustomInfoType::DetectionRule::LikelihoodAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment").msgclass + CustomInfoType::DetectionRule::HotwordRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule").msgclass + CustomInfoType::ExclusionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.ExclusionType").enummodule + FieldId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FieldId").msgclass + PartitionId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PartitionId").msgclass + KindExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KindExpression").msgclass + DatastoreOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreOptions").msgclass + CloudStorageRegexFileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageRegexFileSet").msgclass + CloudStorageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass + CloudStorageOptions::FileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass + CloudStorageOptions::SampleMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.SampleMethod").enummodule + CloudStorageFileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageFileSet").msgclass + CloudStoragePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStoragePath").msgclass + BigQueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions").msgclass + BigQueryOptions::SampleMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions.SampleMethod").enummodule + StorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig").msgclass + StorageConfig::TimespanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig.TimespanConfig").msgclass + HybridOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridOptions").msgclass + BigQueryKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryKey").msgclass + DatastoreKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreKey").msgclass + Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key").msgclass + Key::PathElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key.PathElement").msgclass + RecordKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordKey").msgclass + BigQueryTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTable").msgclass + TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableReference").msgclass + BigQueryField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryField").msgclass + EntityId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.EntityId").msgclass + TableOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableOptions").msgclass + Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Likelihood").enummodule + FileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md new file mode 100644 index 000000000000..b25c60898c30 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Data Loss Prevention (DLP) V2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb new file mode 100644 index 000000000000..87de3faa8676 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb @@ -0,0 +1,8998 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dlp + module V2 + # List of excluded infoTypes. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # InfoType list in ExclusionRule rule drops a finding when it overlaps or + # contained within with a finding of an infoType from this list. For + # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and + # `exclusion_rule` containing `exclude_info_types.info_types` with + # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap + # with EMAIL_ADDRESS finding. + # That leads to "555-222-2222@example.org" to generate only a single + # finding, namely email address. + class ExcludeInfoTypes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rule to exclude findings based on a hotword. For record inspection of + # tables, column names are considered hotwords. An example of this is to + # exclude a finding if it belongs to a BigQuery column that matches a specific + # pattern. + # @!attribute [rw] hotword_regex + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] + # Regular expression pattern defining what qualifies as a hotword. + # @!attribute [rw] proximity + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity] + # Range of characters within which the entire hotword must reside. + # The total length of the window cannot exceed 1000 characters. + # The windowBefore property in proximity should be set to 1 if the hotword + # needs to be included in a column header. + class ExcludeByHotword + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rule to exclude image findings based on spatial relationships with + # other image findings. For example, exclude an image finding if it overlaps + # with another image finding. + # This rule is silently ignored if the content being inspected is not an image. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # A list of image-supported infoTypes—excluding [document + # infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to + # be used as context for the exclusion rule. A finding is excluded if + # its bounding box has the specified spatial relationship (defined by + # `image_containment_type`) with a finding of an infoType in this list. + # + # For example, if `InspectionRuleSet.info_types` includes + # `OBJECT_TYPE/PERSON` and this `exclusion_rule` specifies `info_types` as + # `OBJECT_TYPE/PERSON/PASSPORT` with `image_containment_type` set to + # `encloses`, then `OBJECT_TYPE/PERSON` findings will be excluded if they + # are fully contained within the bounding box of an + # `OBJECT_TYPE/PERSON/PASSPORT` finding. + # @!attribute [rw] image_containment_type + # @return [::Google::Cloud::Dlp::V2::ImageContainmentType] + # Specifies the required spatial relationship between the bounding boxes + # of the target finding and the context infoType findings. + class ExcludeByImageFindings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rule that specifies conditions when findings of infoTypes specified in + # `InspectionRuleSet` are removed from results. + # @!attribute [rw] dictionary + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] + # Dictionary which defines the rule. + # + # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `exclude_info_types`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] + # Regular expression which defines the rule. + # + # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `exclude_info_types`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclude_info_types + # @return [::Google::Cloud::Dlp::V2::ExcludeInfoTypes] + # Set of infoTypes for which findings would affect this rule. + # + # Note: The following fields are mutually exclusive: `exclude_info_types`, `dictionary`, `regex`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclude_by_hotword + # @return [::Google::Cloud::Dlp::V2::ExcludeByHotword] + # Drop if the hotword rule is contained in the proximate context. For + # tabular data, the context includes the column name. + # + # Note: The following fields are mutually exclusive: `exclude_by_hotword`, `dictionary`, `regex`, `exclude_info_types`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclude_by_image_findings + # @return [::Google::Cloud::Dlp::V2::ExcludeByImageFindings] + # Exclude findings based on image containment rules. For example, exclude + # an image finding if it overlaps with another image finding. + # + # Note: The following fields are mutually exclusive: `exclude_by_image_findings`, `dictionary`, `regex`, `exclude_info_types`, `exclude_by_hotword`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] matching_type + # @return [::Google::Cloud::Dlp::V2::MatchingType] + # How the rule is applied, see MatchingType documentation for details. + class ExclusionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AdjustmentRule condition for matching infoTypes. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # Sensitive Data Protection adjusts the likelihood of a finding if that + # finding also matches one of these infoTypes. + # + # For example, you can create a rule to adjust the likelihood of a + # `PHONE_NUMBER` finding if the string is found within a document that is + # classified as `DOCUMENT_TYPE/HR/RESUME`. To configure this, set + # `PHONE_NUMBER` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` + # with an `adjust_by_matching_info_types.info_types` that contains + # `DOCUMENT_TYPE/HR/RESUME`. In this case, the likelihood of the + # `PHONE_NUMBER` finding is adjusted, but the likelihood of the + # `DOCUMENT_TYPE/HR/RESUME` finding is not. + # @!attribute [rw] min_likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Required. Minimum likelihood of the + # `adjust_by_matching_info_types.info_types` finding. If the likelihood is + # lower than this value, Sensitive Data Protection doesn't adjust the + # likelihood of the `InspectionRuleSet.info_types` finding. + # @!attribute [rw] matching_type + # @return [::Google::Cloud::Dlp::V2::MatchingType] + # How the adjustment rule is applied. + # + # Only `MATCHING_TYPE_PARTIAL_MATCH` is supported: + # + # - Partial match: adjusts the findings of infoTypes specified in the + # inspection rule when they have a nonempty intersection with a finding of an + # infoType specified in this adjustment rule. + class AdjustByMatchingInfoTypes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AdjustmentRule condition for image findings. + # This rule is silently ignored if the content being inspected is not an image. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # A list of image-supported infoTypes—excluding [document + # infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to + # be used as context for the adjustment rule. Sensitive Data Protection + # adjusts the likelihood of an image finding if its bounding box has the + # specified spatial relationship (defined by `image_containment_type`) with a + # finding of an infoType in this list. + # + # For example, you can create a rule to adjust the likelihood of a + # `US_PASSPORT` finding if it is enclosed by a finding of + # `OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in + # `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an + # `adjust_by_image_findings.info_types` that contains + # `OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set + # to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is + # adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT` + # finding is not. + # @!attribute [rw] min_likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Required. Minimum likelihood of the + # `adjust_by_image_findings.info_types` finding. If the likelihood is + # lower than this value, Sensitive Data Protection doesn't adjust the + # likelihood of the `InspectionRuleSet.info_types` finding. + # @!attribute [rw] image_containment_type + # @return [::Google::Cloud::Dlp::V2::ImageContainmentType] + # Specifies the required spatial relationship between the bounding boxes + # of the target finding and the context infoType findings. + class AdjustByImageFindings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rule that specifies conditions when a certain infoType's finding details + # should be adjusted. + # @!attribute [rw] adjust_by_matching_info_types + # @return [::Google::Cloud::Dlp::V2::AdjustByMatchingInfoTypes] + # Set of infoTypes for which findings would affect this rule. + # + # Note: The following fields are mutually exclusive: `adjust_by_matching_info_types`, `adjust_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] adjust_by_image_findings + # @return [::Google::Cloud::Dlp::V2::AdjustByImageFindings] + # AdjustmentRule condition for image findings. + # + # Note: The following fields are mutually exclusive: `adjust_by_image_findings`, `adjust_by_matching_info_types`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] likelihood_adjustment + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment] + # Likelihood adjustment to apply to the infoType. + class AdjustmentRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single inspection rule to be applied to infoTypes, specified in + # `InspectionRuleSet`. + # @!attribute [rw] hotword_rule + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule] + # Hotword-based detection rule. + # + # Note: The following fields are mutually exclusive: `hotword_rule`, `exclusion_rule`, `adjustment_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclusion_rule + # @return [::Google::Cloud::Dlp::V2::ExclusionRule] + # Exclusion rule. + # + # Note: The following fields are mutually exclusive: `exclusion_rule`, `hotword_rule`, `adjustment_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] adjustment_rule + # @return [::Google::Cloud::Dlp::V2::AdjustmentRule] + # Adjustment rule. + # + # Note: The following fields are mutually exclusive: `adjustment_rule`, `hotword_rule`, `exclusion_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class InspectionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rule set for modifying a set of infoTypes to alter behavior under certain + # circumstances, depending on the specific details of the rules within the set. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # List of infoTypes this rule set is applied to. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dlp::V2::InspectionRule>] + # Set of rules to be applied to infoTypes. The rules are applied in order. + class InspectionRuleSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration description of the scanning process. + # When used with redactContent only info_types and min_likelihood are currently + # used. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # Restricts what info_types to look for. The values must correspond to + # InfoType values returned by ListInfoTypes or listed at + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. + # + # When no InfoTypes or CustomInfoTypes are specified in a request, the + # system may automatically choose a default list of detectors to run, which + # may change over time. + # + # If you need precise control and predictability as to what detectors are + # run you should specify specific InfoTypes listed in the reference, + # otherwise a default list will be used, which may change over time. + # @!attribute [rw] min_likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Only returns findings equal to or above this threshold. The default is + # POSSIBLE. + # + # In general, the highest likelihood setting yields the fewest findings in + # results and the lowest chance of a false positive. For more information, + # see [Match + # likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). + # @!attribute [rw] min_likelihood_per_info_type + # @return [::Array<::Google::Cloud::Dlp::V2::InspectConfig::InfoTypeLikelihood>] + # Minimum likelihood per infotype. For each infotype, a user can specify a + # minimum likelihood. The system only returns a finding if its likelihood is + # above this threshold. If this field is not set, the system uses the + # InspectConfig min_likelihood. + # @!attribute [rw] limits + # @return [::Google::Cloud::Dlp::V2::InspectConfig::FindingLimits] + # Configuration to control the number of findings returned. + # This is not used for data profiling. + # + # When redacting sensitive data from images, finding limits don't apply. They + # can cause unexpected or inconsistent results, where only some data is + # redacted. Don't include finding limits in + # {::Google::Cloud::Dlp::V2::DlpService::Client#redact_image RedactImage} + # requests. Otherwise, Cloud DLP returns an error. + # + # When set within an + # {::Google::Cloud::Dlp::V2::InspectJobConfig InspectJobConfig}, the specified + # maximum values aren't hard limits. If an inspection job reaches these + # limits, the job ends gradually, not abruptly. Therefore, the actual number + # of findings that Cloud DLP returns can be multiple times higher than these + # maximum values. + # @!attribute [rw] include_quote + # @return [::Boolean] + # When true, a contextual quote from the data that triggered a finding is + # included in the response; see + # {::Google::Cloud::Dlp::V2::Finding#quote Finding.quote}. This is not used for + # data profiling. + # @!attribute [rw] exclude_info_types + # @return [::Boolean] + # When true, excludes type information of the findings. + # This is not used for data profiling. + # @!attribute [rw] custom_info_types + # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType>] + # CustomInfoTypes provided by the user. See + # https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes + # to learn more. + # @!attribute [rw] content_options + # @return [::Array<::Google::Cloud::Dlp::V2::ContentOption>] + # Deprecated and unused. + # @!attribute [rw] rule_set + # @return [::Array<::Google::Cloud::Dlp::V2::InspectionRuleSet>] + # Set of rules to apply to the findings for this InspectConfig. + # Exclusion rules, contained in the set are executed in the end, other + # rules are executed in the order they are specified for each info type. Not + # supported for the `metadata_key_value_expression` CustomInfoType. + class InspectConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for setting a minimum likelihood per infotype. Used to + # customize the minimum likelihood level for specific infotypes in the + # request. For example, use this if you want to lower the precision for + # PERSON_NAME without lowering the precision for the other infotypes in the + # request. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # Type of information the likelihood threshold applies to. Only one + # likelihood per info_type should be provided. If InfoTypeLikelihood does + # not have an info_type, the configuration fails. + # @!attribute [rw] min_likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Only returns findings equal to or above this threshold. This field is + # required or else the configuration fails. + class InfoTypeLikelihood + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration to control the number of findings returned for inspection. + # This is not used for de-identification or data profiling. + # + # When redacting sensitive data from images, finding limits don't apply. They + # can cause unexpected or inconsistent results, where only some data is + # redacted. Don't include finding limits in + # {::Google::Cloud::Dlp::V2::DlpService::Client#redact_image RedactImage} + # requests. Otherwise, Cloud DLP returns an error. + # @!attribute [rw] max_findings_per_item + # @return [::Integer] + # Max number of findings that are returned for each item scanned. + # + # When set within an + # {::Google::Cloud::Dlp::V2::InspectContentRequest InspectContentRequest}, + # this field is ignored. + # + # This value isn't a hard limit. If the number of findings for an item + # reaches this limit, the inspection of that item ends gradually, not + # abruptly. Therefore, the actual number of findings that Cloud DLP returns + # for the item can be multiple times higher than this value. + # @!attribute [rw] max_findings_per_request + # @return [::Integer] + # Max number of findings that are returned per request or job. + # + # If you set this field in an + # {::Google::Cloud::Dlp::V2::InspectContentRequest InspectContentRequest}, the + # resulting maximum value is the value that you set or 3,000, whichever is + # lower. + # + # This value isn't a hard limit. If an inspection reaches this limit, the + # inspection ends gradually, not abruptly. Therefore, the actual number of + # findings that Cloud DLP returns can be multiple times higher than this + # value. + # @!attribute [rw] max_findings_per_info_type + # @return [::Array<::Google::Cloud::Dlp::V2::InspectConfig::FindingLimits::InfoTypeLimit>] + # Configuration of findings limit given for specified infoTypes. + class FindingLimits + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Max findings configuration per infoType, per content item or long + # running DlpJob. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # Type of information the findings limit applies to. Only one limit per + # info_type should be provided. If InfoTypeLimit does not have an + # info_type, the DLP API applies the limit against all info_types that + # are found but not specified in another InfoTypeLimit. + # @!attribute [rw] max_findings + # @return [::Integer] + # Max findings limit for the given infoType. + class InfoTypeLimit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Container for bytes to inspect or redact. + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::ByteContentItem::BytesType] + # The type of data stored in the bytes string. Default will be TEXT_UTF8. + # @!attribute [rw] data + # @return [::String] + # Content data to inspect or redact. + class ByteContentItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of data being sent for inspection. To learn more, see + # [Supported file + # types](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types). + # + # Only the first frame of each multiframe image is inspected. Metadata and + # other frames aren't inspected. + module BytesType + # Unused + BYTES_TYPE_UNSPECIFIED = 0 + + # Any image type. + IMAGE = 6 + + # jpeg + IMAGE_JPEG = 1 + + # bmp + IMAGE_BMP = 2 + + # png + IMAGE_PNG = 3 + + # svg + IMAGE_SVG = 4 + + # plain text + TEXT_UTF8 = 5 + + # docx, docm, dotx, dotm + WORD_DOCUMENT = 7 + + # pdf + PDF = 8 + + # pptx, pptm, potx, potm, pot + POWERPOINT_DOCUMENT = 9 + + # xlsx, xlsm, xltx, xltm + EXCEL_DOCUMENT = 10 + + # avro + AVRO = 11 + + # csv + CSV = 12 + + # tsv + TSV = 13 + + # Audio file types. Only used for profiling. + AUDIO = 15 + + # Video file types. Only used for profiling. + VIDEO = 16 + + # Executable file types. Only used for profiling. + EXECUTABLE = 17 + + # AI model file types. Only used for profiling. + AI_MODEL = 18 + end + end + + # Type of content to inspect. + # @!attribute [rw] value + # @return [::String] + # String data to inspect or redact. + # + # Note: The following fields are mutually exclusive: `value`, `table`, `byte_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::Table] + # Structured content for inspection. See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table + # to learn more. + # + # Note: The following fields are mutually exclusive: `table`, `value`, `byte_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] byte_item + # @return [::Google::Cloud::Dlp::V2::ByteContentItem] + # Content data to inspect or redact. Replaces `type` and `data`. + # + # Note: The following fields are mutually exclusive: `byte_item`, `value`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] content_metadata + # @return [::Google::Cloud::Dlp::V2::ContentMetadata] + # User provided metadata for the content. + class ContentItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata on content to be scanned. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::Dlp::V2::KeyValueMetadataProperty>] + # User provided key-value pairs of content metadata. + class ContentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured content to inspect. Up to 50,000 `Value`s per request allowed. See + # https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table + # to learn more. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Headers of the table. + # @!attribute [rw] rows + # @return [::Array<::Google::Cloud::Dlp::V2::Table::Row>] + # Rows of the table. + class Table + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Values of the row. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # Individual cells. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A key-value pair in the Metadata. + # @!attribute [rw] key + # @return [::String] + # The key of the property. + # @!attribute [rw] value + # @return [::String] + # The value of the property. + class KeyValueMetadataProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # All the findings for a single scanned item. + # @!attribute [rw] findings + # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] + # List of findings for an item. + # @!attribute [rw] findings_truncated + # @return [::Boolean] + # If true, then this item might have more findings than were returned, + # and the findings returned are an arbitrary subset of all findings. + # The findings list might be truncated because the input items were too + # large, or because the server reached the maximum amount of resources + # allowed for a single API call. For best results, divide the input into + # smaller batches. + class InspectResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a piece of potentially sensitive content. + # @!attribute [rw] name + # @return [::String] + # Resource name in format + # projects/\\{project}/locations/\\{location}/findings/\\{finding} Populated only + # when viewing persisted findings. + # @!attribute [rw] quote + # @return [::String] + # The content that was found. Even if the content is not textual, it + # may be converted to a textual representation here. + # Provided if `include_quote` is true and the finding is + # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes + # in length, the quote may be omitted. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The type of content that might have been found. + # Provided if `excluded_types` is false. + # @!attribute [rw] likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Confidence of how likely it is that the `info_type` is correct. + # @!attribute [rw] location + # @return [::Google::Cloud::Dlp::V2::Location] + # Where the content was found. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp when finding was detected. + # @!attribute [rw] quote_info + # @return [::Google::Cloud::Dlp::V2::QuoteInfo] + # Contains data parsed from quotes. Only populated if include_quote was set + # to true and a supported infoType was requested. Currently supported + # infoTypes: DATE, DATE_OF_BIRTH and TIME. + # @!attribute [rw] resource_name + # @return [::String] + # The job that stored the finding. + # @!attribute [rw] trigger_name + # @return [::String] + # Job trigger name, if applicable, for this finding. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels associated with this `Finding`. + # + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + # + # No more than 10 labels can be associated with a given finding. + # + # Examples: + # + # * `"environment" : "production"` + # * `"pipeline" : "etl"` + # @!attribute [rw] job_create_time + # @return [::Google::Protobuf::Timestamp] + # Time the job started that produced this finding. + # @!attribute [rw] job_name + # @return [::String] + # The job that stored the finding. + # @!attribute [rw] finding_id + # @return [::String] + # The unique finding id. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies the location of the finding. + # @!attribute [rw] byte_range + # @return [::Google::Cloud::Dlp::V2::Range] + # Zero-based byte offsets delimiting the finding. + # These are relative to the finding's containing element. + # Note that when the content is not textual, this references + # the UTF-8 encoded textual representation of the content. + # Omitted if content is an image. + # @!attribute [rw] codepoint_range + # @return [::Google::Cloud::Dlp::V2::Range] + # Unicode character offsets delimiting the finding. + # These are relative to the finding's containing element. + # Provided when the content is text. + # @!attribute [rw] content_locations + # @return [::Array<::Google::Cloud::Dlp::V2::ContentLocation>] + # List of nested objects pointing to the precise location of the finding + # within the file or record. + # @!attribute [rw] container + # @return [::Google::Cloud::Dlp::V2::Container] + # Information about the container where this finding occurred, if available. + class Location + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Precise location of the finding within a document, record, image, or metadata + # container. + # @!attribute [rw] container_name + # @return [::String] + # Name of the container where the finding is located. + # The top level name is the source file name or table name. Names of some + # common storage containers are formatted as follows: + # + # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + # * Cloud Storage files: `gs://{bucket}/{path}` + # * Datastore namespace: \\{namespace} + # + # Nested names could be absent if the embedded object has no string + # identifier (for example, an image contained within a document). + # @!attribute [rw] record_location + # @return [::Google::Cloud::Dlp::V2::RecordLocation] + # Location within a row or record of a database table. + # + # Note: The following fields are mutually exclusive: `record_location`, `image_location`, `document_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_location + # @return [::Google::Cloud::Dlp::V2::ImageLocation] + # Location within an image's pixels. + # + # Note: The following fields are mutually exclusive: `image_location`, `record_location`, `document_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document_location + # @return [::Google::Cloud::Dlp::V2::DocumentLocation] + # Location data for document files. + # + # Note: The following fields are mutually exclusive: `document_location`, `record_location`, `image_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metadata_location + # @return [::Google::Cloud::Dlp::V2::MetadataLocation] + # Location within the metadata for inspected content. + # + # Note: The following fields are mutually exclusive: `metadata_location`, `record_location`, `image_location`, `document_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] container_timestamp + # @return [::Google::Protobuf::Timestamp] + # Finding container modification timestamp, if applicable. For Cloud Storage, + # this field contains the last file modification timestamp. For a BigQuery + # table, this field contains the last_modified_time property. For Datastore, + # this field isn't populated. + # @!attribute [rw] container_version + # @return [::String] + # Finding container version, if available + # ("generation" for Cloud Storage). + class ContentLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata Location + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::MetadataType] + # Type of metadata containing the finding. + # @!attribute [rw] storage_label + # @return [::Google::Cloud::Dlp::V2::StorageMetadataLabel] + # Storage metadata. + # + # Note: The following fields are mutually exclusive: `storage_label`, `key_value_metadata_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] key_value_metadata_label + # @return [::Google::Cloud::Dlp::V2::KeyValueMetadataLabel] + # Metadata key that contains the finding. + # + # Note: The following fields are mutually exclusive: `key_value_metadata_label`, `storage_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MetadataLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Storage metadata label to indicate which metadata entry contains findings. + # @!attribute [rw] key + # @return [::String] + # Label name. + class StorageMetadataLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata key that contains a finding. + # @!attribute [rw] key + # @return [::String] + # The metadata key. The format depends on the source of the metadata. + # + # Example: + # + # - `MSIP_Label_122709e3-8f6b-4860-985f-7f722a94f61e_Enabled` (a Microsoft + # Purview Information Protection key example) + class KeyValueMetadataLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of a finding within a document. + # @!attribute [rw] file_offset + # @return [::Integer] + # Offset of the line, from the beginning of the file, where the finding + # is located. + class DocumentLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of a finding within a row or record. + # @!attribute [rw] record_key + # @return [::Google::Cloud::Dlp::V2::RecordKey] + # Key of the finding. + # @!attribute [rw] field_id + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Field id of the field containing the finding. + # @!attribute [rw] table_location + # @return [::Google::Cloud::Dlp::V2::TableLocation] + # Location within a `ContentItem.Table`. + class RecordLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of a finding within a table. + # @!attribute [rw] row_index + # @return [::Integer] + # The zero-based index of the row where the finding is located. Only + # populated for resources that have a natural ordering, not BigQuery. In + # BigQuery, to identify the row a finding came from, populate + # BigQueryOptions.identifying_fields with your primary key column names and + # when you store the findings the value of those columns will be stored + # inside of Finding. + class TableLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a container that may contain DLP findings. + # Examples of a container include a file, table, or database record. + # @!attribute [rw] type + # @return [::String] + # Container type, for example BigQuery or Cloud Storage. + # @!attribute [rw] project_id + # @return [::String] + # Project where the finding was found. + # Can be different from the project that owns the finding. + # @!attribute [rw] full_path + # @return [::String] + # A string representation of the full container name. + # Examples: + # - BigQuery: 'Project:DataSetId.TableId' + # - Cloud Storage: 'gs://Bucket/folders/filename.txt' + # @!attribute [rw] root_path + # @return [::String] + # The root of the container. + # Examples: + # + # - For BigQuery table `project_id:dataset_id.table_id`, the root is + # `dataset_id` + # - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root + # is `gs://bucket` + # @!attribute [rw] relative_path + # @return [::String] + # The rest of the path after the root. + # Examples: + # + # - For BigQuery table `project_id:dataset_id.table_id`, the relative path is + # `table_id` + # - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + # path is `folder/filename.txt` + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Findings container modification timestamp, if applicable. For Cloud + # Storage, this field contains the last file modification timestamp. For a + # BigQuery table, this field contains the last_modified_time property. For + # Datastore, this field isn't populated. + # @!attribute [rw] version + # @return [::String] + # Findings container version, if available + # ("generation" for Cloud Storage). + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generic half-open interval [start, end) + # @!attribute [rw] start + # @return [::Integer] + # Index of the first character of the range (inclusive). + # @!attribute [rw] end + # @return [::Integer] + # Index of the last character of the range (exclusive). + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the finding within an image. + # @!attribute [rw] bounding_boxes + # @return [::Array<::Google::Cloud::Dlp::V2::BoundingBox>] + # Bounding boxes locating the pixels within the image containing the finding. + class ImageLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bounding box encompassing detected text within an image. + # @!attribute [rw] top + # @return [::Integer] + # Top coordinate of the bounding box. (0,0) is upper left. + # @!attribute [rw] left + # @return [::Integer] + # Left coordinate of the bounding box. (0,0) is upper left. + # @!attribute [rw] width + # @return [::Integer] + # Width of the bounding box in pixels. + # @!attribute [rw] height + # @return [::Integer] + # Height of the bounding box in pixels. + class BoundingBox + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to search for potentially sensitive info in an image and redact it + # by covering it with a colored rectangle. + # @!attribute [rw] parent + # @return [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # Configuration for the inspector. + # @!attribute [rw] image_redaction_configs + # @return [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig>] + # The configuration for specifying what content to redact from images. + # @!attribute [rw] include_findings + # @return [::Boolean] + # Whether the response should include findings along with the redacted + # image. + # @!attribute [rw] byte_item + # @return [::Google::Cloud::Dlp::V2::ByteContentItem] + # The content must be PNG, JPEG, SVG or BMP. + # @!attribute [rw] inspect_template + # @return [::String] + # The full resource name of the inspection template to use. Settings in the + # main `inspect_config` field override the corresponding settings in this + # inspection template. + # + # The merge behavior is as follows: + # + # - Singular field: The main field's value replaces the value of the + # corresponding field in the template. + # - Repeated fields: The field values are appended to the list defined in + # the template. + # - Sub-messages and groups: The fields are recursively merged. + # @!attribute [rw] deidentify_template + # @return [::String] + # The full resource name of the de-identification template to use. Settings + # in the main `image_redaction_configs` field override the corresponding + # settings in this de-identification template. The request fails if the + # type of the template's deidentify_config is not image_transformations. + class RedactImageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for determining how redaction of images should occur. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # Only one per info_type should be provided per request. If not + # specified, and redact_all_text is false, the DLP API will redact all + # text that it matches against all info_types that are found, but not + # specified in another ImageRedactionConfig. + # + # Note: The following fields are mutually exclusive: `info_type`, `redact_all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redact_all_text + # @return [::Boolean] + # If true, all text found in the image, regardless whether it matches an + # info_type, is redacted. Only one should be provided. + # + # Note: The following fields are mutually exclusive: `redact_all_text`, `info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redaction_color + # @return [::Google::Cloud::Dlp::V2::Color] + # The color to use when redacting content from an image. If not specified, + # the default is black. + class ImageRedactionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a color in the RGB color space. + # @!attribute [rw] red + # @return [::Float] + # The amount of red in the color as a value in the interval [0, 1]. + # @!attribute [rw] green + # @return [::Float] + # The amount of green in the color as a value in the interval [0, 1]. + # @!attribute [rw] blue + # @return [::Float] + # The amount of blue in the color as a value in the interval [0, 1]. + class Color + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results of redacting an image. + # @!attribute [rw] redacted_image + # @return [::String] + # The redacted image. The type will be the same as the original image. + # @!attribute [rw] extracted_text + # @return [::String] + # If an image was being inspected and the InspectConfig's include_quote was + # set to true, then this field will include all text, if any, that was found + # in the image. + # @!attribute [rw] inspect_result + # @return [::Google::Cloud::Dlp::V2::InspectResult] + # The findings. Populated when include_findings in the request is true. + class RedactImageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to de-identify a ContentItem. + # @!attribute [rw] parent + # @return [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] deidentify_config + # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] + # Configuration for the de-identification of the content item. + # Items specified here will override the template referenced by the + # deidentify_template_name argument. + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # Configuration for the inspector. + # Items specified here will override the template referenced by the + # inspect_template_name argument. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The item to de-identify. Will be treated as text. + # + # This value must be of type + # {::Google::Cloud::Dlp::V2::Table Table} if your + # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} + # is a + # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} + # object. + # @!attribute [rw] inspect_template_name + # @return [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @!attribute [rw] deidentify_template_name + # @return [::String] + # Template to use. Any configuration directly specified in + # deidentify_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class DeidentifyContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results of de-identifying a ContentItem. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The de-identified item. + # @!attribute [rw] overview + # @return [::Google::Cloud::Dlp::V2::TransformationOverview] + # An overview of the changes that were made on the `item`. + class DeidentifyContentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to re-identify an item. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] reidentify_config + # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] + # Configuration for the re-identification of the content item. + # This field shares the same proto message type that is used for + # de-identification, however its usage here is for the reversal of the + # previous de-identification. Re-identification is performed by examining + # the transformations used to de-identify the items and executing the + # reverse. This requires that only reversible transformations + # be provided here. The reversible transformations are: + # + # - `CryptoDeterministicConfig` + # - `CryptoReplaceFfxFpeConfig` + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # Configuration for the inspector. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The item to re-identify. Will be treated as text. + # @!attribute [rw] inspect_template_name + # @return [::String] + # Template to use. Any configuration directly specified in + # `inspect_config` will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @!attribute [rw] reidentify_template_name + # @return [::String] + # Template to use. References an instance of `DeidentifyTemplate`. + # Any configuration directly specified in `reidentify_config` or + # `inspect_config` will override those set in the template. The + # `DeidentifyTemplate` used must include only reversible transformations. + # Singular fields that are set in this request will replace their + # corresponding fields in the template. Repeated fields are appended. + # Singular sub-messages and groups are recursively merged. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ReidentifyContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results of re-identifying an item. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The re-identified item. + # @!attribute [rw] overview + # @return [::Google::Cloud::Dlp::V2::TransformationOverview] + # An overview of the changes that were made to the `item`. + class ReidentifyContentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to search for potentially sensitive info in a ContentItem. + # @!attribute [rw] parent + # @return [::String] + # Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # Configuration for the inspector. What specified here will override + # the template referenced by the inspect_template_name argument. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The item to inspect. + # @!attribute [rw] inspect_template_name + # @return [::String] + # Template to use. Any configuration directly specified in + # inspect_config will override those set in the template. Singular fields + # that are set in this request will replace their corresponding fields in the + # template. Repeated fields are appended. Singular sub-messages and groups + # are recursively merged. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class InspectContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results of inspecting an item. + # @!attribute [rw] result + # @return [::Google::Cloud::Dlp::V2::InspectResult] + # The findings. + class InspectContentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud repository for storing output. + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Store findings in an existing table or a new table in an existing + # dataset. If table_id is not set a new one will be generated + # for you with the following format: + # dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + # for generating the date details. + # + # For Inspect, each column in an existing output table must have the same + # name, type, and mode of a field in the `Finding` object. + # + # For Risk, an existing output table should be the output of a previous + # Risk analysis job run on the same source table, with the same privacy + # metric and quasi-identifiers. Risk jobs that analyze the same table but + # compute a different privacy metric, or use different sets of + # quasi-identifiers, cannot store their results in the same table. + # + # Note: The following fields are mutually exclusive: `table`, `storage_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] storage_path + # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] + # Store findings in an existing Cloud Storage bucket. Files will be + # generated with the job ID and file part number as the filename and will + # contain findings in textproto format as + # {::Google::Cloud::Dlp::V2::SaveToGcsFindingsOutput SaveToGcsFindingsOutput}. + # The filename will follow the naming convention `-`. + # Example: `my-job-id-2`. + # + # Supported for {::Google::Cloud::Dlp::V2::InspectJobConfig Inspect jobs}. The + # bucket must not be the same as the bucket being inspected. If storing + # findings to Cloud Storage, the output schema field should not be set. If + # set, it will be ignored. + # + # Note: The following fields are mutually exclusive: `storage_path`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] output_schema + # @return [::Google::Cloud::Dlp::V2::OutputStorageConfig::OutputSchema] + # Schema used for writing the findings for Inspect jobs. This field is only + # used for Inspect and must be unspecified for Risk jobs. Columns are derived + # from the `Finding` object. If appending to an existing table, any columns + # from the predefined schema that are missing will be added. No columns in + # the existing table will be deleted. + # + # If unspecified, then all available columns will be used for a new table or + # an (existing) table with no schema, and no changes will be made to an + # existing table that has a schema. + # Only for use with external storage. + class OutputStorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predefined schemas for storing findings. + # Only for use with external storage. + module OutputSchema + # Unused. + OUTPUT_SCHEMA_UNSPECIFIED = 0 + + # Basic schema including only `info_type`, `quote`, `certainty`, and + # `timestamp`. + BASIC_COLUMNS = 1 + + # Schema tailored to findings from scanning Cloud Storage. + GCS_COLUMNS = 2 + + # Schema tailored to findings from scanning Google Datastore. + DATASTORE_COLUMNS = 3 + + # Schema tailored to findings from scanning Google BigQuery. + BIG_QUERY_COLUMNS = 4 + + # Schema containing all columns. + ALL_COLUMNS = 5 + end + end + + # Statistics regarding a specific InfoType. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The type of finding this stat is for. + # @!attribute [rw] count + # @return [::Integer] + # Number of findings for this infoType. + class InfoTypeStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The results of an inspect DataSource job. + # @!attribute [rw] requested_options + # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails::RequestedOptions] + # The configuration used for this job. + # @!attribute [rw] result + # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails::Result] + # A summary of the outcome of this inspection job. + class InspectDataSourceDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Snapshot of the inspection configuration. + # @!attribute [rw] snapshot_inspect_template + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # If run with an InspectTemplate, a snapshot of its state at the time of + # this run. + # @!attribute [rw] job_config + # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] + # Inspect config. + class RequestedOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # All Result fields are updated while the job is processing. + # @!attribute [rw] processed_bytes + # @return [::Integer] + # Total size in bytes that were processed. + # @!attribute [rw] total_estimated_bytes + # @return [::Integer] + # Estimate of the number of bytes to process. + # @!attribute [rw] info_type_stats + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeStats>] + # Statistics of how many instances of each info type were found during + # inspect job. + # @!attribute [rw] num_rows_processed + # @return [::Integer] + # Number of rows scanned after sampling and time filtering (applicable for + # row based stores such as BigQuery). + # @!attribute [rw] hybrid_stats + # @return [::Google::Cloud::Dlp::V2::HybridInspectStatistics] + # Statistics related to the processing of hybrid inspect. + class Result + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The schema of data to be saved to the BigQuery table when the + # `DataProfileAction` is enabled. + # @!attribute [rw] table_profile + # @return [::Google::Cloud::Dlp::V2::TableDataProfile] + # Table data profile column + # + # Note: The following fields are mutually exclusive: `table_profile`, `column_profile`, `file_store_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_profile + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] + # Column data profile column + # + # Note: The following fields are mutually exclusive: `column_profile`, `table_profile`, `file_store_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] file_store_profile + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # File store data profile column. + # + # Note: The following fields are mutually exclusive: `file_store_profile`, `table_profile`, `column_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataProfileBigQueryRowSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Statistics related to processing hybrid inspect requests. + # @!attribute [rw] processed_count + # @return [::Integer] + # The number of hybrid inspection requests processed within this job. + # @!attribute [rw] aborted_count + # @return [::Integer] + # The number of hybrid inspection requests aborted because the job ran + # out of quota or was ended before they could be processed. + # @!attribute [rw] pending_count + # @return [::Integer] + # The number of hybrid requests currently being processed. Only populated + # when called via method `getDlpJob`. + # A burst of traffic may cause hybrid inspect requests to be enqueued. + # Processing will take place as quickly as possible, but resource limitations + # may impact how long a request is enqueued for. + class HybridInspectStatistics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The results of an {::Google::Cloud::Dlp::V2::Action Action}. + # @!attribute [rw] deidentify_details + # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceDetails] + # Outcome of a de-identification action. + class ActionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Summary of what was modified during a transformation. + # @!attribute [rw] transformed_bytes + # @return [::Integer] + # Total size in bytes that were transformed in some way. + # @!attribute [rw] transformation_count + # @return [::Integer] + # Number of successfully applied transformations. + # @!attribute [rw] transformation_error_count + # @return [::Integer] + # Number of errors encountered while trying to apply transformations. + class DeidentifyDataSourceStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The results of a {::Google::Cloud::Dlp::V2::Action::Deidentify Deidentify} action + # from an inspect job. + # @!attribute [rw] requested_options + # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceDetails::RequestedDeidentifyOptions] + # De-identification config used for the request. + # @!attribute [rw] deidentify_stats + # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceStats] + # Stats about the de-identification operation. + class DeidentifyDataSourceDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # De-identification options. + # @!attribute [rw] snapshot_deidentify_template + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # Snapshot of the state of the `DeidentifyTemplate` from the + # {::Google::Cloud::Dlp::V2::Action::Deidentify Deidentify} action at the time + # this job was run. + # @!attribute [rw] snapshot_structured_deidentify_template + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # Snapshot of the state of the structured `DeidentifyTemplate` from the + # `Deidentify` action at the time this job was run. + # @!attribute [rw] snapshot_image_redact_template + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # Snapshot of the state of the image transformation `DeidentifyTemplate` + # from the `Deidentify` action at the time this job was run. + class RequestedDeidentifyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Locations at which a feature can be used. + # @!attribute [rw] regionalization_scope + # @return [::Google::Cloud::Dlp::V2::LocationSupport::RegionalizationScope] + # The current scope for location on this feature. This may expand over time. + # @!attribute [rw] locations + # @return [::Array<::String>] + # Specific locations where the feature may be used. + # Examples: us-central1, us, asia, global + # If scope is ANY_LOCATION, no regions will be listed. + class LocationSupport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The location scope for a feature. + module RegionalizationScope + # Invalid. + REGIONALIZATION_SCOPE_UNSPECIFIED = 0 + + # Feature may be used with one or more regions. See locations for details. + REGIONAL = 1 + + # Feature may be used anywhere. Default value. + ANY_LOCATION = 2 + end + end + + # InfoType description. + # @!attribute [rw] name + # @return [::String] + # Internal name of the infoType. + # @!attribute [rw] display_name + # @return [::String] + # Human readable form of the infoType name. + # @!attribute [rw] supported_by + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeSupportedBy>] + # Which parts of the API supports this InfoType. + # @!attribute [rw] description + # @return [::String] + # Description of the infotype. Translated when language is provided in the + # request. + # @!attribute [rw] location_support + # @return [::Google::Cloud::Dlp::V2::LocationSupport] + # Locations at which this feature can be used. May change over time. + # @!attribute [rw] example + # @return [::String] + # A sample that is a true positive for this infoType. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::Dlp::V2::VersionDescription>] + # A list of available versions for the infotype. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeCategory>] + # The category of the infoType. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The default sensitivity of the infoType. + # @!attribute [rw] specific_info_types + # @return [::Array<::String>] + # If this field is set, this infoType is a general infoType and these + # specific infoTypes are contained within it. + # General infoTypes are infoTypes that encompass multiple specific infoTypes. + # For example, the "GEOGRAPHIC_DATA" general infoType would have set for this + # field "LOCATION", "LOCATION_COORDINATES", and "STREET_ADDRESS". + # @!attribute [rw] launch_status + # @return [::Google::Cloud::Dlp::V2::InfoTypeDescription::InfoTypeLaunchStatus] + # The launch status of the infoType. + class InfoTypeDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The launch status of an infoType. + module InfoTypeLaunchStatus + # Unspecified. + INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0 + + # InfoType is generally available. + GENERAL_AVAILABILITY = 1 + + # InfoType is in public preview. + PUBLIC_PREVIEW = 2 + + # InfoType is in private preview. + PRIVATE_PREVIEW = 3 + end + end + + # Classification of infoTypes to organize them according to geographic + # location, industry, and data type. + # @!attribute [rw] location_category + # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::LocationCategory] + # The region or country that issued the ID or document represented by the + # infoType. + # + # Note: The following fields are mutually exclusive: `location_category`, `industry_category`, `type_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] industry_category + # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::IndustryCategory] + # The group of relevant businesses where this infoType is commonly used + # + # Note: The following fields are mutually exclusive: `industry_category`, `location_category`, `type_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type_category + # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::TypeCategory] + # The class of identifiers where this infoType belongs + # + # Note: The following fields are mutually exclusive: `type_category`, `location_category`, `industry_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class InfoTypeCategory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum of the current locations. + # We might add more locations in the future. + module LocationCategory + # Unused location + LOCATION_UNSPECIFIED = 0 + + # The infoType is not issued by or tied to a specific region, but is used + # almost everywhere. + GLOBAL = 1 + + # The infoType is typically used in Argentina. + ARGENTINA = 2 + + # The infoType is typically used in Armenia. + ARMENIA = 51 + + # The infoType is typically used in Australia. + AUSTRALIA = 3 + + # The infoType is typically used in Austria. + AUSTRIA = 53 + + # The infoType is typically used in Azerbaijan. + AZERBAIJAN = 48 + + # The infoType is typically used in Belarus. + BELARUS = 50 + + # The infoType is typically used in Belgium. + BELGIUM = 4 + + # The infoType is typically used in Brazil. + BRAZIL = 5 + + # The infoType is typically used in Canada. + CANADA = 6 + + # The infoType is typically used in Chile. + CHILE = 7 + + # The infoType is typically used in China. + CHINA = 8 + + # The infoType is typically used in Colombia. + COLOMBIA = 9 + + # The infoType is typically used in Croatia. + CROATIA = 42 + + # The infoType is typically used in Czechia. + CZECHIA = 52 + + # The infoType is typically used in Denmark. + DENMARK = 10 + + # The infoType is typically used in France. + FRANCE = 11 + + # The infoType is typically used in Finland. + FINLAND = 12 + + # The infoType is typically used in Germany. + GERMANY = 13 + + # The infoType is typically used in Hong Kong. + HONG_KONG = 14 + + # The infoType is typically used in India. + INDIA = 15 + + # The infoType is typically used in Indonesia. + INDONESIA = 16 + + # The infoType is typically used in Ireland. + IRELAND = 17 + + # The infoType is typically used in Israel. + ISRAEL = 18 + + # The infoType is typically used in Italy. + ITALY = 19 + + # The infoType is typically used in Japan. + JAPAN = 20 + + # The infoType is typically used in Kazakhstan. + KAZAKHSTAN = 47 + + # The infoType is typically used in Korea. + KOREA = 21 + + # The infoType is typically used in Mexico. + MEXICO = 22 + + # The infoType is typically used in the Netherlands. + THE_NETHERLANDS = 23 + + # The infoType is typically used in New Zealand. + NEW_ZEALAND = 41 + + # The infoType is typically used in Norway. + NORWAY = 24 + + # The infoType is typically used in Paraguay. + PARAGUAY = 25 + + # The infoType is typically used in Peru. + PERU = 26 + + # The infoType is typically used in Poland. + POLAND = 27 + + # The infoType is typically used in Portugal. + PORTUGAL = 28 + + # The infoType is typically used in Russia. + RUSSIA = 44 + + # The infoType is typically used in Singapore. + SINGAPORE = 29 + + # The infoType is typically used in South Africa. + SOUTH_AFRICA = 30 + + # The infoType is typically used in Spain. + SPAIN = 31 + + # The infoType is typically used in Sweden. + SWEDEN = 32 + + # The infoType is typically used in Switzerland. + SWITZERLAND = 43 + + # The infoType is typically used in Taiwan. + TAIWAN = 33 + + # The infoType is typically used in Thailand. + THAILAND = 34 + + # The infoType is typically used in Turkey. + TURKEY = 35 + + # The infoType is typically used in Ukraine. + UKRAINE = 45 + + # The infoType is typically used in the United Kingdom. + UNITED_KINGDOM = 36 + + # The infoType is typically used in the United States. + UNITED_STATES = 37 + + # The infoType is typically used in Uruguay. + URUGUAY = 38 + + # The infoType is typically used in Uzbekistan. + UZBEKISTAN = 46 + + # The infoType is typically used in Venezuela. + VENEZUELA = 39 + + # The infoType is typically used in Google internally. + INTERNAL = 40 + end + + # Enum of the current industries in the category. + # We might add more industries in the future. + module IndustryCategory + # Unused industry + INDUSTRY_UNSPECIFIED = 0 + + # The infoType is typically used in the finance industry. + FINANCE = 1 + + # The infoType is typically used in the health industry. + HEALTH = 2 + + # The infoType is typically used in the telecommunications industry. + TELECOMMUNICATIONS = 3 + end + + # Enum of the current types in the category. + # We might add more types in the future. + module TypeCategory + # Unused type + TYPE_UNSPECIFIED = 0 + + # Personally identifiable information, for example, a + # name or phone number + PII = 1 + + # Personally identifiable information that is especially sensitive, for + # example, a passport number. + SPII = 2 + + # Attributes that can partially identify someone, especially in + # combination with other attributes, like age, height, and gender. + DEMOGRAPHIC = 3 + + # Confidential or secret information, for example, a password. + CREDENTIAL = 4 + + # An identification document issued by a government. + GOVERNMENT_ID = 5 + + # A document, for example, a resume or source code. + DOCUMENT = 6 + + # Information that is not sensitive on its own, but provides details about + # the circumstances surrounding an entity or an event. + CONTEXTUAL_INFORMATION = 7 + + # Category for `CustomInfoType` types. + CUSTOM = 8 + end + end + + # Details about each available version for an infotype. + # @!attribute [rw] version + # @return [::String] + # Name of the version + # @!attribute [rw] description + # @return [::String] + # Description of the version. + class VersionDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the list of infoTypes. + # @!attribute [rw] parent + # @return [::String] + # The parent resource name. + # + # The format of this value is as follows: + # + # `locations/{location_id}` + # @!attribute [rw] language_code + # @return [::String] + # BCP-47 language code for localized infoType friendly + # names. If omitted, or if localized strings are not available, + # en-US strings will be returned. + # @!attribute [rw] filter + # @return [::String] + # filter to only return infoTypes supported by certain parts of the + # API. Defaults to supported_by=INSPECT. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListInfoTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to the ListInfoTypes request. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeDescription>] + # Set of sensitive infoTypes. + class ListInfoTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a risk analysis job. See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-risk-analysis + # to learn more. + # @!attribute [rw] privacy_metric + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric] + # Privacy metric to compute. + # @!attribute [rw] source_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Input dataset to compute metrics over. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dlp::V2::Action>] + # Actions to execute at the completion of the job. Are executed in the order + # provided. + class RiskAnalysisJobConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A column with a semantic tag attached. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Required. Identifies the column. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # A column can be tagged with a InfoType to use the relevant public + # dataset as a statistical model of population, if available. We + # currently support US ZIP codes, region codes, ages and genders. + # To programmatically obtain the list of supported InfoTypes, use + # ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + # + # Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_tag + # @return [::String] + # A column can be tagged with a custom tag. In this case, the user must + # indicate an auxiliary table that contains statistical information on + # the possible values of this column. + # + # Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] inferred + # @return [::Google::Protobuf::Empty] + # If no semantic tag is indicated, we infer the statistical model from + # the distribution of values in the input data + # + # Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class QuasiId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An auxiliary table containing statistical information on the relative + # frequency of different quasi-identifiers values. It has one or several + # quasi-identifiers columns, and one column that indicates the relative + # frequency of each quasi-identifier tuple. + # If a tuple is present in the data but not in the auxiliary table, the + # corresponding relative frequency is assumed to be zero (and thus, the + # tuple is highly reidentifiable). + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Required. Auxiliary table location. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::StatisticalTable::QuasiIdentifierField>] + # Required. Quasi-identifier columns. + # @!attribute [rw] relative_frequency + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Required. The relative frequency column must contain a floating-point + # number between 0 and 1 (inclusive). Null values are assumed to be zero. + class StatisticalTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A quasi-identifier column has a custom_tag, used to know which column + # in the data corresponds to which column in the statistical model. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Identifies the column. + # @!attribute [rw] custom_tag + # @return [::String] + # A column can be tagged with a custom tag. In this case, the user must + # indicate an auxiliary table that contains statistical information on + # the possible values of this column. + class QuasiIdentifierField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Privacy metric to compute for reidentification risk analysis. + # @!attribute [rw] numerical_stats_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::NumericalStatsConfig] + # Numerical stats + # + # Note: The following fields are mutually exclusive: `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] categorical_stats_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::CategoricalStatsConfig] + # Categorical stats + # + # Note: The following fields are mutually exclusive: `categorical_stats_config`, `numerical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] k_anonymity_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::KAnonymityConfig] + # K-anonymity + # + # Note: The following fields are mutually exclusive: `k_anonymity_config`, `numerical_stats_config`, `categorical_stats_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] l_diversity_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::LDiversityConfig] + # l-diversity + # + # Note: The following fields are mutually exclusive: `l_diversity_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] k_map_estimation_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig] + # k-map + # + # Note: The following fields are mutually exclusive: `k_map_estimation_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delta_presence_estimation_config + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig] + # delta-presence + # + # Note: The following fields are mutually exclusive: `delta_presence_estimation_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PrivacyMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compute numerical stats over an individual column, including + # min, max, and quantiles. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Field to compute numerical stats on. Supported types are + # integer, float, date, datetime, timestamp, time. + class NumericalStatsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Compute numerical stats over an individual column, including + # number of distinct values and value count distribution. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Field to compute categorical stats on. All column types are + # supported except for arrays and structs. However, it may be more + # informative to use NumericalStats when the field type is supported, + # depending on the data. + class CategoricalStatsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # k-anonymity metric, used for analysis of reidentification risk. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Set of fields to compute k-anonymity over. When multiple fields are + # specified, they are considered a single composite key. Structs and + # repeated data types are not supported; however, nested fields are + # supported so long as they are not structs themselves or nested within + # a repeated field. + # @!attribute [rw] entity_id + # @return [::Google::Cloud::Dlp::V2::EntityId] + # Message indicating that multiple rows might be associated to a + # single individual. If the same entity_id is associated to multiple + # quasi-identifier tuples over distinct rows, we consider the entire + # collection of tuples as the composite quasi-identifier. This collection + # is a multiset: the order in which the different tuples appear in the + # dataset is ignored, but their frequency is taken into account. + # + # Important note: a maximum of 1000 rows can be associated to a single + # entity ID. If more rows are associated with the same entity ID, some + # might be ignored. + class KAnonymityConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # l-diversity metric, used for analysis of reidentification risk. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Set of quasi-identifiers indicating how equivalence classes are + # defined for the l-diversity computation. When multiple fields are + # specified, they are considered a single composite key. + # @!attribute [rw] sensitive_attribute + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Sensitive field for computing the l-value. + class LDiversityConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reidentifiability metric. This corresponds to a risk model similar to what + # is called "journalist risk" in the literature, except the attack dataset is + # statistically modeled instead of being perfectly known. This can be done + # using publicly available data (like the US Census), or using a custom + # statistical model (indicated as one or several BigQuery tables), or by + # extrapolating from the distribution of values in the input dataset. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>] + # Required. Fields considered to be quasi-identifiers. No two columns can + # have the same tag. + # @!attribute [rw] region_code + # @return [::String] + # ISO 3166-1 alpha-2 region code to use in the statistical modeling. + # Set if no column is tagged with a region-specific InfoType (like + # US_ZIP_5) or a region code. + # @!attribute [rw] auxiliary_tables + # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>] + # Several auxiliary tables can be used in the analysis. Each custom_tag + # used to tag a quasi-identifiers column must appear in exactly one column + # of one auxiliary table. + class KMapEstimationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A column with a semantic tag attached. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Required. Identifies the column. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # A column can be tagged with a InfoType to use the relevant public + # dataset as a statistical model of population, if available. We + # currently support US ZIP codes, region codes, ages and genders. + # To programmatically obtain the list of supported InfoTypes, use + # ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + # + # Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_tag + # @return [::String] + # A column can be tagged with a custom tag. In this case, the user must + # indicate an auxiliary table that contains statistical information on + # the possible values of this column. + # + # Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] inferred + # @return [::Google::Protobuf::Empty] + # If no semantic tag is indicated, we infer the statistical model from + # the distribution of values in the input data + # + # Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TaggedField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An auxiliary table contains statistical information on the relative + # frequency of different quasi-identifiers values. It has one or several + # quasi-identifiers columns, and one column that indicates the relative + # frequency of each quasi-identifier tuple. + # If a tuple is present in the data but not in the auxiliary table, the + # corresponding relative frequency is assumed to be zero (and thus, the + # tuple is highly reidentifiable). + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Required. Auxiliary table location. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>] + # Required. Quasi-identifier columns. + # @!attribute [rw] relative_frequency + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Required. The relative frequency column must contain a floating-point + # number between 0 and 1 (inclusive). Null values are assumed to be zero. + class AuxiliaryTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A quasi-identifier column has a custom_tag, used to know which column + # in the data corresponds to which column in the statistical model. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Identifies the column. + # @!attribute [rw] custom_tag + # @return [::String] + # A auxiliary field. + class QuasiIdField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # δ-presence metric, used to estimate how likely it is for an attacker to + # figure out that one given individual appears in a de-identified dataset. + # Similarly to the k-map metric, we cannot compute δ-presence exactly without + # knowing the attack dataset, so we use a statistical model instead. + # @!attribute [rw] quasi_ids + # @return [::Array<::Google::Cloud::Dlp::V2::QuasiId>] + # Required. Fields considered to be quasi-identifiers. No two fields can + # have the same tag. + # @!attribute [rw] region_code + # @return [::String] + # ISO 3166-1 alpha-2 region code to use in the statistical modeling. + # Set if no column is tagged with a region-specific InfoType (like + # US_ZIP_5) or a region code. + # @!attribute [rw] auxiliary_tables + # @return [::Array<::Google::Cloud::Dlp::V2::StatisticalTable>] + # Several auxiliary tables can be used in the analysis. Each custom_tag + # used to tag a quasi-identifiers field must appear in exactly one + # field of one auxiliary table. + class DeltaPresenceEstimationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of a risk analysis operation request. + # @!attribute [rw] requested_privacy_metric + # @return [::Google::Cloud::Dlp::V2::PrivacyMetric] + # Privacy metric to compute. + # @!attribute [rw] requested_source_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Input dataset to compute metrics over. + # @!attribute [rw] numerical_stats_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::NumericalStatsResult] + # Numerical stats result + # + # Note: The following fields are mutually exclusive: `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] categorical_stats_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult] + # Categorical stats result + # + # Note: The following fields are mutually exclusive: `categorical_stats_result`, `numerical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] k_anonymity_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult] + # K-anonymity result + # + # Note: The following fields are mutually exclusive: `k_anonymity_result`, `numerical_stats_result`, `categorical_stats_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] l_diversity_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult] + # L-divesity result + # + # Note: The following fields are mutually exclusive: `l_diversity_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] k_map_estimation_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult] + # K-map result + # + # Note: The following fields are mutually exclusive: `k_map_estimation_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delta_presence_estimation_result + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult] + # Delta-presence result + # + # Note: The following fields are mutually exclusive: `delta_presence_estimation_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] requested_options + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::RequestedRiskAnalysisOptions] + # The configuration used for this job. + class AnalyzeDataSourceRiskDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result of the numerical stats computation. + # @!attribute [rw] min_value + # @return [::Google::Cloud::Dlp::V2::Value] + # Minimum value appearing in the column. + # @!attribute [rw] max_value + # @return [::Google::Cloud::Dlp::V2::Value] + # Maximum value appearing in the column. + # @!attribute [rw] quantile_values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # List of 99 values that partition the set of field values into 100 equal + # sized buckets. + class NumericalStatsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result of the categorical stats computation. + # @!attribute [rw] value_frequency_histogram_buckets + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket>] + # Histogram of value frequencies in the column. + class CategoricalStatsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Histogram of value frequencies in the column. + # @!attribute [rw] value_frequency_lower_bound + # @return [::Integer] + # Lower bound on the value frequency of the values in this bucket. + # @!attribute [rw] value_frequency_upper_bound + # @return [::Integer] + # Upper bound on the value frequency of the values in this bucket. + # @!attribute [rw] bucket_size + # @return [::Integer] + # Total number of values in this bucket. + # @!attribute [rw] bucket_values + # @return [::Array<::Google::Cloud::Dlp::V2::ValueFrequency>] + # Sample of value frequencies in this bucket. The total number of + # values returned per bucket is capped at 20. + # @!attribute [rw] bucket_value_count + # @return [::Integer] + # Total number of distinct values in this bucket. + class CategoricalStatsHistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the k-anonymity computation. + # @!attribute [rw] equivalence_class_histogram_buckets + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket>] + # Histogram of k-anonymity equivalence classes. + class KAnonymityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The set of columns' values that share the same ldiversity value + # @!attribute [rw] quasi_ids_values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # Set of values defining the equivalence class. One value per + # quasi-identifier column in the original KAnonymity metric message. + # The order is always the same as the original request. + # @!attribute [rw] equivalence_class_size + # @return [::Integer] + # Size of the equivalence class, for example number of rows with the + # above set of values. + class KAnonymityEquivalenceClass + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Histogram of k-anonymity equivalence classes. + # @!attribute [rw] equivalence_class_size_lower_bound + # @return [::Integer] + # Lower bound on the size of the equivalence classes in this bucket. + # @!attribute [rw] equivalence_class_size_upper_bound + # @return [::Integer] + # Upper bound on the size of the equivalence classes in this bucket. + # @!attribute [rw] bucket_size + # @return [::Integer] + # Total number of equivalence classes in this bucket. + # @!attribute [rw] bucket_values + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass>] + # Sample of equivalence classes in this bucket. The total number of + # classes returned per bucket is capped at 20. + # @!attribute [rw] bucket_value_count + # @return [::Integer] + # Total number of distinct equivalence classes in this bucket. + class KAnonymityHistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the l-diversity computation. + # @!attribute [rw] sensitive_value_frequency_histogram_buckets + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket>] + # Histogram of l-diversity equivalence class sensitive value frequencies. + class LDiversityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The set of columns' values that share the same ldiversity value. + # @!attribute [rw] quasi_ids_values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # Quasi-identifier values defining the k-anonymity equivalence + # class. The order is always the same as the original request. + # @!attribute [rw] equivalence_class_size + # @return [::Integer] + # Size of the k-anonymity equivalence class. + # @!attribute [rw] num_distinct_sensitive_values + # @return [::Integer] + # Number of distinct sensitive values in this equivalence class. + # @!attribute [rw] top_sensitive_values + # @return [::Array<::Google::Cloud::Dlp::V2::ValueFrequency>] + # Estimated frequencies of top sensitive values. + class LDiversityEquivalenceClass + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Histogram of l-diversity equivalence class sensitive value frequencies. + # @!attribute [rw] sensitive_value_frequency_lower_bound + # @return [::Integer] + # Lower bound on the sensitive value frequencies of the equivalence + # classes in this bucket. + # @!attribute [rw] sensitive_value_frequency_upper_bound + # @return [::Integer] + # Upper bound on the sensitive value frequencies of the equivalence + # classes in this bucket. + # @!attribute [rw] bucket_size + # @return [::Integer] + # Total number of equivalence classes in this bucket. + # @!attribute [rw] bucket_values + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass>] + # Sample of equivalence classes in this bucket. The total number of + # classes returned per bucket is capped at 20. + # @!attribute [rw] bucket_value_count + # @return [::Integer] + # Total number of distinct equivalence classes in this bucket. + class LDiversityHistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the reidentifiability analysis. Note that these results are an + # estimation, not exact values. + # @!attribute [rw] k_map_estimation_histogram + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket>] + # The intervals [min_anonymity, max_anonymity] do not overlap. If a value + # doesn't correspond to any such interval, the associated frequency is + # zero. For example, the following records: + # \\{min_anonymity: 1, max_anonymity: 1, frequency: 17} + # \\{min_anonymity: 2, max_anonymity: 3, frequency: 42} + # \\{min_anonymity: 5, max_anonymity: 10, frequency: 99} + # mean that there are no record with an estimated anonymity of 4, 5, or + # larger than 10. + class KMapEstimationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A tuple of values for the quasi-identifier columns. + # @!attribute [rw] quasi_ids_values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # The quasi-identifier values. + # @!attribute [rw] estimated_anonymity + # @return [::Integer] + # The estimated anonymity for these quasi-identifier values. + class KMapEstimationQuasiIdValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A KMapEstimationHistogramBucket message with the following values: + # min_anonymity: 3 + # max_anonymity: 5 + # frequency: 42 + # means that there are 42 records whose quasi-identifier values correspond + # to 3, 4 or 5 people in the overlying population. An important particular + # case is when min_anonymity = max_anonymity = 1: the frequency field then + # corresponds to the number of uniquely identifiable records. + # @!attribute [rw] min_anonymity + # @return [::Integer] + # Always positive. + # @!attribute [rw] max_anonymity + # @return [::Integer] + # Always greater than or equal to min_anonymity. + # @!attribute [rw] bucket_size + # @return [::Integer] + # Number of records within these anonymity bounds. + # @!attribute [rw] bucket_values + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues>] + # Sample of quasi-identifier tuple values in this bucket. The total + # number of classes returned per bucket is capped at 20. + # @!attribute [rw] bucket_value_count + # @return [::Integer] + # Total number of distinct quasi-identifier tuple values in this bucket. + class KMapEstimationHistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Result of the δ-presence computation. Note that these results are an + # estimation, not exact values. + # @!attribute [rw] delta_presence_estimation_histogram + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket>] + # The intervals [min_probability, max_probability) do not overlap. If a + # value doesn't correspond to any such interval, the associated frequency + # is zero. For example, the following records: + # \\{min_probability: 0, max_probability: 0.1, frequency: 17} + # \\{min_probability: 0.2, max_probability: 0.3, frequency: 42} + # \\{min_probability: 0.3, max_probability: 0.4, frequency: 99} + # mean that there are no record with an estimated probability in [0.1, 0.2) + # nor larger or equal to 0.4. + class DeltaPresenceEstimationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A tuple of values for the quasi-identifier columns. + # @!attribute [rw] quasi_ids_values + # @return [::Array<::Google::Cloud::Dlp::V2::Value>] + # The quasi-identifier values. + # @!attribute [rw] estimated_probability + # @return [::Float] + # The estimated probability that a given individual sharing these + # quasi-identifier values is in the dataset. This value, typically + # called δ, is the ratio between the number of records in the dataset + # with these quasi-identifier values, and the total number of individuals + # (inside *and* outside the dataset) with these quasi-identifier values. + # For example, if there are 15 individuals in the dataset who share the + # same quasi-identifier values, and an estimated 100 people in the entire + # population with these values, then δ is 0.15. + class DeltaPresenceEstimationQuasiIdValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DeltaPresenceEstimationHistogramBucket message with the following + # values: + # min_probability: 0.1 + # max_probability: 0.2 + # frequency: 42 + # means that there are 42 records for which δ is in [0.1, 0.2). An + # important particular case is when min_probability = max_probability = 1: + # then, every individual who shares this quasi-identifier combination is in + # the dataset. + # @!attribute [rw] min_probability + # @return [::Float] + # Between 0 and 1. + # @!attribute [rw] max_probability + # @return [::Float] + # Always greater than or equal to min_probability. + # @!attribute [rw] bucket_size + # @return [::Integer] + # Number of records within these probability bounds. + # @!attribute [rw] bucket_values + # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues>] + # Sample of quasi-identifier tuple values in this bucket. The total + # number of classes returned per bucket is capped at 20. + # @!attribute [rw] bucket_value_count + # @return [::Integer] + # Total number of distinct quasi-identifier tuple values in this bucket. + class DeltaPresenceEstimationHistogramBucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Risk analysis options. + # @!attribute [rw] job_config + # @return [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig] + # The job config for the risk job. + class RequestedRiskAnalysisOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A value of a field, including its frequency. + # @!attribute [rw] value + # @return [::Google::Cloud::Dlp::V2::Value] + # A value contained in the field in question. + # @!attribute [rw] count + # @return [::Integer] + # How many times the value is contained in the field. + class ValueFrequency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of primitive values supported by the system. + # Note that for the purposes of inspection or transformation, the number + # of bytes considered to comprise a 'Value' is based on its representation + # as a UTF-8 encoded string. For example, if 'integer_value' is set to + # 123456789, the number of bytes would be counted as 9, even though an + # int64 only holds up to 8 bytes of data. + # @!attribute [rw] integer_value + # @return [::Integer] + # integer + # + # Note: The following fields are mutually exclusive: `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] float_value + # @return [::Float] + # float + # + # Note: The following fields are mutually exclusive: `float_value`, `integer_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # string + # + # Note: The following fields are mutually exclusive: `string_value`, `integer_value`, `float_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] boolean_value + # @return [::Boolean] + # boolean + # + # Note: The following fields are mutually exclusive: `boolean_value`, `integer_value`, `float_value`, `string_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_value + # @return [::Google::Protobuf::Timestamp] + # timestamp + # + # Note: The following fields are mutually exclusive: `timestamp_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_value + # @return [::Google::Type::TimeOfDay] + # time of day + # + # Note: The following fields are mutually exclusive: `time_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_value + # @return [::Google::Type::Date] + # date + # + # Note: The following fields are mutually exclusive: `date_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] day_of_week_value + # @return [::Google::Type::DayOfWeek] + # day of week + # + # Note: The following fields are mutually exclusive: `day_of_week_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for infoType-dependent details parsed from quote. + # @!attribute [rw] date_time + # @return [::Google::Cloud::Dlp::V2::DateTime] + # The date time indicated by the quote. + class QuoteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for a date time object. + # e.g. 2018-01-01, 5th August. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # One or more of the following must be set. + # Must be a valid date or time value. + # @!attribute [rw] day_of_week + # @return [::Google::Type::DayOfWeek] + # Day of week + # @!attribute [rw] time + # @return [::Google::Type::TimeOfDay] + # Time of day + # @!attribute [rw] time_zone + # @return [::Google::Cloud::Dlp::V2::DateTime::TimeZone] + # Time zone + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Time zone of the date time object. + # @!attribute [rw] offset_minutes + # @return [::Integer] + # Set only if the offset can be determined. Positive for time ahead of UTC. + # E.g. For "UTC-9", this value is -540. + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The configuration that controls how the data will change. + # @!attribute [rw] info_type_transformations + # @return [::Google::Cloud::Dlp::V2::InfoTypeTransformations] + # Treat the dataset as free-form text and apply the same free text + # transformation everywhere. + # + # Note: The following fields are mutually exclusive: `info_type_transformations`, `record_transformations`, `image_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] record_transformations + # @return [::Google::Cloud::Dlp::V2::RecordTransformations] + # Treat the dataset as structured. Transformations can be applied to + # specific locations within structured datasets, such as transforming + # a column within a table. + # + # Note: The following fields are mutually exclusive: `record_transformations`, `info_type_transformations`, `image_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image_transformations + # @return [::Google::Cloud::Dlp::V2::ImageTransformations] + # Treat the dataset as an image and redact. + # + # Note: The following fields are mutually exclusive: `image_transformations`, `info_type_transformations`, `record_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] transformation_error_handling + # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling] + # Mode for handling transformation errors. If left unspecified, the default + # mode is `TransformationErrorHandling.ThrowError`. + class DeidentifyConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A type of transformation that is applied over images. + # @!attribute [rw] transforms + # @return [::Array<::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation>] + # List of transforms to make. + class ImageTransformations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for determining how redaction of images should occur. + # @!attribute [rw] selected_info_types + # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::SelectedInfoTypes] + # Apply transformation to the selected info_types. + # + # Note: The following fields are mutually exclusive: `selected_info_types`, `all_info_types`, `all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] all_info_types + # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::AllInfoTypes] + # Apply transformation to all findings not specified in other + # ImageTransformation's selected_info_types. Only one instance is allowed + # within the ImageTransformations message. + # + # Note: The following fields are mutually exclusive: `all_info_types`, `selected_info_types`, `all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] all_text + # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::AllText] + # Apply transformation to all text that doesn't match an infoType. Only + # one instance is allowed within the ImageTransformations message. + # + # Note: The following fields are mutually exclusive: `all_text`, `selected_info_types`, `all_info_types`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redaction_color + # @return [::Google::Cloud::Dlp::V2::Color] + # The color to use when redacting content from an image. If not + # specified, the default is black. + class ImageTransformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Apply transformation to the selected info_types. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # Required. InfoTypes to apply the transformation to. Required. Provided + # InfoType must be unique within the ImageTransformations message. + class SelectedInfoTypes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Apply transformation to all findings. + class AllInfoTypes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Apply to all text. + class AllText + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # How to handle transformation errors during de-identification. A + # transformation error occurs when the requested transformation is incompatible + # with the data. For example, trying to de-identify an IP address using a + # `DateShift` transformation would result in a transformation error, since date + # info cannot be extracted from an IP address. + # Information about any incompatible transformations, and how they were + # handled, is returned in the response as part of the + # `TransformationOverviews`. + # @!attribute [rw] throw_error + # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling::ThrowError] + # Throw an error + # + # Note: The following fields are mutually exclusive: `throw_error`, `leave_untransformed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] leave_untransformed + # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling::LeaveUntransformed] + # Ignore errors + # + # Note: The following fields are mutually exclusive: `leave_untransformed`, `throw_error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TransformationErrorHandling + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Throw an error and fail the request when a transformation error occurs. + class ThrowError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Skips the data without modifying it if the requested transformation would + # cause an error. For example, if a `DateShift` transformation were applied + # an an IP address, this mode would leave the IP address unchanged in the + # response. + class LeaveUntransformed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A rule for transforming a value. + # @!attribute [rw] replace_config + # @return [::Google::Cloud::Dlp::V2::ReplaceValueConfig] + # Replace with a specified value. + # + # Note: The following fields are mutually exclusive: `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redact_config + # @return [::Google::Cloud::Dlp::V2::RedactConfig] + # Redact + # + # Note: The following fields are mutually exclusive: `redact_config`, `replace_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] character_mask_config + # @return [::Google::Cloud::Dlp::V2::CharacterMaskConfig] + # Mask + # + # Note: The following fields are mutually exclusive: `character_mask_config`, `replace_config`, `redact_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] crypto_replace_ffx_fpe_config + # @return [::Google::Cloud::Dlp::V2::CryptoReplaceFfxFpeConfig] + # Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig + # instead. Fpe is computationally expensive incurring latency costs. + # + # Note: The following fields are mutually exclusive: `crypto_replace_ffx_fpe_config`, `replace_config`, `redact_config`, `character_mask_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fixed_size_bucketing_config + # @return [::Google::Cloud::Dlp::V2::FixedSizeBucketingConfig] + # Fixed size bucketing + # + # Note: The following fields are mutually exclusive: `fixed_size_bucketing_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bucketing_config + # @return [::Google::Cloud::Dlp::V2::BucketingConfig] + # Bucketing + # + # Note: The following fields are mutually exclusive: `bucketing_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] replace_with_info_type_config + # @return [::Google::Cloud::Dlp::V2::ReplaceWithInfoTypeConfig] + # Replace with infotype + # + # Note: The following fields are mutually exclusive: `replace_with_info_type_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_part_config + # @return [::Google::Cloud::Dlp::V2::TimePartConfig] + # Time extraction + # + # Note: The following fields are mutually exclusive: `time_part_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] crypto_hash_config + # @return [::Google::Cloud::Dlp::V2::CryptoHashConfig] + # Crypto + # + # Note: The following fields are mutually exclusive: `crypto_hash_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_shift_config + # @return [::Google::Cloud::Dlp::V2::DateShiftConfig] + # Date Shift + # + # Note: The following fields are mutually exclusive: `date_shift_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] crypto_deterministic_config + # @return [::Google::Cloud::Dlp::V2::CryptoDeterministicConfig] + # Deterministic Crypto + # + # Note: The following fields are mutually exclusive: `crypto_deterministic_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] replace_dictionary_config + # @return [::Google::Cloud::Dlp::V2::ReplaceDictionaryConfig] + # Replace with a value randomly drawn (with replacement) from a dictionary. + # + # Note: The following fields are mutually exclusive: `replace_dictionary_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PrimitiveTransformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a + # portion of the value. + # @!attribute [rw] part_to_extract + # @return [::Google::Cloud::Dlp::V2::TimePartConfig::TimePart] + # The part of the time to keep. + class TimePartConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Components that make up time. + module TimePart + # Unused + TIME_PART_UNSPECIFIED = 0 + + # [0-9999] + YEAR = 1 + + # [1-12] + MONTH = 2 + + # [1-31] + DAY_OF_MONTH = 3 + + # [1-7] + DAY_OF_WEEK = 4 + + # [1-53] + WEEK_OF_YEAR = 5 + + # [0-23] + HOUR_OF_DAY = 6 + end + end + + # Pseudonymization method that generates surrogates via cryptographic hashing. + # Uses SHA-256. + # The key size must be either 32 or 64 bytes. + # Outputs a base64 encoded representation of the hashed output + # (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). + # Currently, only string and integer values can be hashed. + # See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization + # to learn more. + # @!attribute [rw] crypto_key + # @return [::Google::Cloud::Dlp::V2::CryptoKey] + # The key used by the hash function. + class CryptoHashConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pseudonymization method that generates deterministic encryption for the given + # input. Outputs a base64 encoded representation of the encrypted output. + # Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. + # @!attribute [rw] crypto_key + # @return [::Google::Cloud::Dlp::V2::CryptoKey] + # The key used by the encryption function. For deterministic encryption + # using AES-SIV, the provided key is internally expanded to 64 bytes prior to + # use. + # @!attribute [rw] surrogate_info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The custom info type to annotate the surrogate with. + # This annotation will be applied to the surrogate by prefixing it with + # the name of the custom info type followed by the number of + # characters comprising the surrogate. The following scheme defines the + # format: \\{info type name}(\\{surrogate character count}):\\{surrogate} + # + # For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and + # the surrogate is 'abc', the full replacement value + # will be: 'MY_TOKEN_INFO_TYPE(3):abc' + # + # This annotation identifies the surrogate when inspecting content using the + # custom info type 'Surrogate'. This facilitates reversal of the + # surrogate when it occurs in free text. + # + # Note: For record transformations where the entire cell in a table is being + # transformed, surrogates are not mandatory. Surrogates are used to denote + # the location of the token and are necessary for re-identification in free + # form text. + # + # In order for inspection to work properly, the name of this info type must + # not occur naturally anywhere in your data; otherwise, inspection may either + # + # - reverse a surrogate that does not correspond to an actual identifier + # - be unable to parse the surrogate and result in an error + # + # Therefore, choose your custom info type name carefully after considering + # what your data looks like. One way to select a name that has a high chance + # of yielding reliable detection is to include one or more unicode characters + # that are highly improbable to exist in your data. + # For example, assuming your data is entered from a regular ASCII keyboard, + # the symbol with the hex code point 29DD might be used like so: + # ⧝MY_TOKEN_TYPE. + # @!attribute [rw] context + # @return [::Google::Cloud::Dlp::V2::FieldId] + # A context may be used for higher security and maintaining + # referential integrity such that the same identifier in two different + # contexts will be given a distinct surrogate. The context is appended to + # plaintext value being encrypted. On decryption the provided context is + # validated against the value used during encryption. If a context was + # provided during encryption, same context must be provided during decryption + # as well. + # + # If the context is not set, plaintext would be used as is for encryption. + # If the context is set but: + # + # 1. there is no record present when transforming a given value or + # 2. the field is not present when transforming a given value, + # + # plaintext would be used as is for encryption. + # + # Note that case (1) is expected when an `InfoTypeTransformation` is + # applied to both structured and unstructured `ContentItem`s. + class CryptoDeterministicConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Replace each input value with a given `Value`. + # @!attribute [rw] new_value + # @return [::Google::Cloud::Dlp::V2::Value] + # Value to replace it with. + class ReplaceValueConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Replace each input value with a value randomly selected from the dictionary. + # @!attribute [rw] word_list + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList] + # A list of words to select from for random replacement. The + # [limits](https://cloud.google.com/sensitive-data-protection/limits) page + # contains details about the size limits of dictionaries. + class ReplaceDictionaryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Replace each matching finding with the name of the info_type. + class ReplaceWithInfoTypeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Redact a given value. For example, if used with an `InfoTypeTransformation` + # transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the + # output would be 'My phone number is '. + class RedactConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Characters to skip when doing deidentification of a value. These will be left + # alone and skipped. + # @!attribute [rw] characters_to_skip + # @return [::String] + # Characters to not transform when masking. + # + # Note: The following fields are mutually exclusive: `characters_to_skip`, `common_characters_to_ignore`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] common_characters_to_ignore + # @return [::Google::Cloud::Dlp::V2::CharsToIgnore::CommonCharsToIgnore] + # Common characters to not transform when masking. Useful to avoid removing + # punctuation. + # + # Note: The following fields are mutually exclusive: `common_characters_to_ignore`, `characters_to_skip`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CharsToIgnore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Convenience enum for indicating common characters to not transform. + module CommonCharsToIgnore + # Unused. + COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0 + + # 0-9 + NUMERIC = 1 + + # A-Z + ALPHA_UPPER_CASE = 2 + + # a-z + ALPHA_LOWER_CASE = 3 + + # US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ + PUNCTUATION = 4 + + # Whitespace character, one of [ \t\n\x0B\f\r] + WHITESPACE = 5 + end + end + + # Partially mask a string by replacing a given number of characters with a + # fixed character. Masking can start from the beginning or end of the string. + # This can be used on data of any type (numbers, longs, and so on) and when + # de-identifying structured data we'll attempt to preserve the original data's + # type. (This allows you to take a long like 123 and modify it to a string like + # **3. + # @!attribute [rw] masking_character + # @return [::String] + # Character to use to mask the sensitive values—for example, `*` for an + # alphabetic string such as a name, or `0` for a numeric string such as ZIP + # code or credit card number. This string must have a length of 1. If not + # supplied, this value defaults to `*` for strings, and `0` for digits. + # @!attribute [rw] number_to_mask + # @return [::Integer] + # Number of characters to mask. If not set, all matching chars will be + # masked. Skipped characters do not count towards this tally. + # + # If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP + # masks all but a number of characters. + # For example, suppose you have the following values: + # + # - `masking_character` is `*` + # - `number_to_mask` is `-4` + # - `reverse_order` is `false` + # - `CharsToIgnore` includes `-` + # - Input string is `1234-5678-9012-3456` + # + # The resulting de-identified string is + # `****-****-****-3456`. Cloud DLP masks all but the last four characters. + # If `reverse_order` is `true`, all but the first four characters are masked + # as `1234-****-****-****`. + # @!attribute [rw] reverse_order + # @return [::Boolean] + # Mask characters in reverse order. For example, if `masking_character` is + # `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the + # input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. + # If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` + # is `true`, then the string `12345` is masked as `12***`. + # @!attribute [rw] characters_to_ignore + # @return [::Array<::Google::Cloud::Dlp::V2::CharsToIgnore>] + # When masking a string, items in this list will be skipped when replacing + # characters. For example, if the input string is `555-555-5555` and you + # instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP + # returns `***-**5-5555`. + class CharacterMaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Buckets values based on fixed size ranges. The + # Bucketing transformation can provide all of this functionality, + # but requires more configuration. This message is provided as a convenience to + # the user for simple bucketing strategies. + # + # The transformed value will be a hyphenated string of + # \\{lower_bound}-\\{upper_bound}. For example, if lower_bound = 10 and upper_bound + # = 20, all values that are within this bucket will be replaced with "10-20". + # + # This can be used on data of type: double, long. + # + # If the bound Value type differs from the type of data + # being transformed, we will first attempt converting the type of the data to + # be transformed to match the type of the bound before comparing. + # + # See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to + # learn more. + # @!attribute [rw] lower_bound + # @return [::Google::Cloud::Dlp::V2::Value] + # Required. Lower bound value of buckets. All values less than `lower_bound` + # are grouped together into a single bucket; for example if `lower_bound` = + # 10, then all values less than 10 are replaced with the value "-10". + # @!attribute [rw] upper_bound + # @return [::Google::Cloud::Dlp::V2::Value] + # Required. Upper bound value of buckets. All values greater than upper_bound + # are grouped together into a single bucket; for example if `upper_bound` = + # 89, then all values greater than 89 are replaced with the value "89+". + # @!attribute [rw] bucket_size + # @return [::Float] + # Required. Size of each bucket (except for minimum and maximum buckets). So + # if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + # following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, + # 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. + class FixedSizeBucketingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generalization function that buckets values based on ranges. The ranges and + # replacement values are dynamically provided by the user for custom behavior, + # such as 1-30 -> LOW, 31-65 -> MEDIUM, 66-100 -> HIGH. + # + # This can be used on data of type: number, long, string, timestamp. + # + # If the bound `Value` type differs from the type of data being transformed, we + # will first attempt converting the type of the data to be transformed to match + # the type of the bound before comparing. + # See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to + # learn more. + # @!attribute [rw] buckets + # @return [::Array<::Google::Cloud::Dlp::V2::BucketingConfig::Bucket>] + # Set of buckets. Ranges must be non-overlapping. + class BucketingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Bucket is represented as a range, along with replacement values. + # @!attribute [rw] min + # @return [::Google::Cloud::Dlp::V2::Value] + # Lower bound of the range, inclusive. Type should be the same as max if + # used. + # @!attribute [rw] max + # @return [::Google::Cloud::Dlp::V2::Value] + # Upper bound of the range, exclusive; type must match min. + # @!attribute [rw] replacement_value + # @return [::Google::Cloud::Dlp::V2::Value] + # Required. Replacement value for this bucket. + class Bucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Replaces an identifier with a surrogate using Format Preserving Encryption + # (FPE) with the FFX mode of operation; however when used in the + # `ReidentifyContent` API method, it serves the opposite function by reversing + # the surrogate back into the original identifier. The identifier must be + # encoded as ASCII. For a given crypto key and context, the same identifier + # will be replaced with the same surrogate. Identifiers must be at least two + # characters long. In the case that the identifier is the empty string, it will + # be skipped. See + # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization to + # learn more. + # + # Note: We recommend using CryptoDeterministicConfig for all use cases which + # do not require preserving the input alphabet space and size, plus warrant + # referential integrity. FPE incurs significant latency costs. + # @!attribute [rw] crypto_key + # @return [::Google::Cloud::Dlp::V2::CryptoKey] + # Required. The key used by the encryption algorithm. + # @!attribute [rw] context + # @return [::Google::Cloud::Dlp::V2::FieldId] + # The 'tweak', a context may be used for higher security since the same + # identifier in two different contexts won't be given the same surrogate. If + # the context is not set, a default tweak will be used. + # + # If the context is set but: + # + # 1. there is no record present when transforming a given value or + # 1. the field is not present when transforming a given value, + # + # a default tweak will be used. + # + # Note that case (1) is expected when an `InfoTypeTransformation` is + # applied to both structured and unstructured `ContentItem`s. + # Currently, the referenced field may be of value type integer or string. + # + # The tweak is constructed as a sequence of bytes in big endian byte order + # such that: + # + # - a 64 bit integer is encoded followed by a single byte of value 1 + # - a string is encoded in UTF-8 format followed by a single byte of value 2 + # @!attribute [rw] common_alphabet + # @return [::Google::Cloud::Dlp::V2::CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet] + # Common alphabets. + # + # Note: The following fields are mutually exclusive: `common_alphabet`, `custom_alphabet`, `radix`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_alphabet + # @return [::String] + # This is supported by mapping these to the alphanumeric characters + # that the FFX mode natively supports. This happens before/after + # encryption/decryption. + # Each character listed must appear only once. + # Number of characters must be in the range [2, 95]. + # This must be encoded as ASCII. + # The order of characters does not matter. + # The full list of allowed characters is: + # ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/`` + # + # Note: The following fields are mutually exclusive: `custom_alphabet`, `common_alphabet`, `radix`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] radix + # @return [::Integer] + # The native way to select the alphabet. Must be in the range [2, 95]. + # + # Note: The following fields are mutually exclusive: `radix`, `common_alphabet`, `custom_alphabet`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] surrogate_info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The custom infoType to annotate the surrogate with. + # This annotation will be applied to the surrogate by prefixing it with + # the name of the custom infoType followed by the number of + # characters comprising the surrogate. The following scheme defines the + # format: info_type_name(surrogate_character_count):surrogate + # + # For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and + # the surrogate is 'abc', the full replacement value + # will be: 'MY_TOKEN_INFO_TYPE(3):abc' + # + # This annotation identifies the surrogate when inspecting content using the + # custom infoType + # [`SurrogateType`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#surrogatetype). + # This facilitates reversal of the surrogate when it occurs in free text. + # + # In order for inspection to work properly, the name of this infoType must + # not occur naturally anywhere in your data; otherwise, inspection may + # find a surrogate that does not correspond to an actual identifier. + # Therefore, choose your custom infoType name carefully after considering + # what your data looks like. One way to select a name that has a high chance + # of yielding reliable detection is to include one or more unicode characters + # that are highly improbable to exist in your data. + # For example, assuming your data is entered from a regular ASCII keyboard, + # the symbol with the hex code point 29DD might be used like so: + # ⧝MY_TOKEN_TYPE + class CryptoReplaceFfxFpeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # These are commonly used subsets of the alphabet that the FFX mode + # natively supports. In the algorithm, the alphabet is selected using + # the "radix". Therefore each corresponds to a particular radix. + module FfxCommonNativeAlphabet + # Unused. + FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0 + + # `[0-9]` (radix of 10) + NUMERIC = 1 + + # `[0-9A-F]` (radix of 16) + HEXADECIMAL = 2 + + # `[0-9A-Z]` (radix of 36) + UPPER_CASE_ALPHA_NUMERIC = 3 + + # `[0-9A-Za-z]` (radix of 62) + ALPHA_NUMERIC = 4 + end + end + + # This is a data encryption key (DEK) (as opposed to + # a key encryption key (KEK) stored by Cloud Key Management Service + # (Cloud KMS). + # When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate + # IAM policy on the KEK to ensure an attacker cannot + # unwrap the DEK. + # @!attribute [rw] transient + # @return [::Google::Cloud::Dlp::V2::TransientCryptoKey] + # Transient crypto key + # + # Note: The following fields are mutually exclusive: `transient`, `unwrapped`, `kms_wrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unwrapped + # @return [::Google::Cloud::Dlp::V2::UnwrappedCryptoKey] + # Unwrapped crypto key + # + # Note: The following fields are mutually exclusive: `unwrapped`, `transient`, `kms_wrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kms_wrapped + # @return [::Google::Cloud::Dlp::V2::KmsWrappedCryptoKey] + # Key wrapped using Cloud KMS + # + # Note: The following fields are mutually exclusive: `kms_wrapped`, `transient`, `unwrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CryptoKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Use this to have a random data crypto key generated. + # It will be discarded after the request finishes. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the key. + # This is an arbitrary string used to differentiate different keys. + # A unique key is generated per name: two separate `TransientCryptoKey` + # protos share the same generated key if their names are the same. + # When the data crypto key is generated, this name is not used in any way + # (repeating the api call will result in a different key being generated). + class TransientCryptoKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Using raw keys is prone to security risks due to accidentally + # leaking the key. Choose another type of key if possible. + # @!attribute [rw] key + # @return [::String] + # Required. A 128/192/256 bit key. + class UnwrappedCryptoKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Include to use an existing data crypto key wrapped by KMS. + # The wrapped key must be a 128-, 192-, or 256-bit key. + # Authorization requires the following IAM permissions when sending a request + # to perform a crypto transformation using a KMS-wrapped crypto key: + # dlp.kms.encrypt + # + # For more information, see [Creating a wrapped key] + # (https://cloud.google.com/sensitive-data-protection/docs/create-wrapped-key). + # + # Note: When you use Cloud KMS for cryptographic operations, + # [charges apply](https://cloud.google.com/kms/pricing). + # @!attribute [rw] wrapped_key + # @return [::String] + # Required. The wrapped data crypto key. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Required. The resource name of the KMS CryptoKey to use for unwrapping. + class KmsWrappedCryptoKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Shifts dates by random number of days, with option to be consistent for the + # same context. See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting + # to learn more. + # @!attribute [rw] upper_bound_days + # @return [::Integer] + # Required. Range of shift in days. Actual shift will be selected at random + # within this range (inclusive ends). Negative means shift to earlier in + # time. Must not be more than 365250 days (1000 years) each direction. + # + # For example, 3 means shift date to at most 3 days into the future. + # @!attribute [rw] lower_bound_days + # @return [::Integer] + # Required. For example, -5 means shift date to at most 5 days back in the + # past. + # @!attribute [rw] context + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Points to the field that contains the context, for example, an entity id. + # If set, must also set cryptoKey. If set, shift will be consistent for the + # given context. + # @!attribute [rw] crypto_key + # @return [::Google::Cloud::Dlp::V2::CryptoKey] + # Causes the shift to be computed based on this key and the context. This + # results in the same shift for the same context and crypto_key. If + # set, must also set context. Can only be applied to table items. + class DateShiftConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A type of transformation that will scan unstructured text and + # apply various `PrimitiveTransformation`s to each finding, where the + # transformation is applied to only values that were identified as a specific + # info_type. + # @!attribute [rw] transformations + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeTransformations::InfoTypeTransformation>] + # Required. Transformation for each infoType. Cannot specify more than one + # for a given infoType. + class InfoTypeTransformations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A transformation to apply to text that is identified as a specific + # info_type. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] + # InfoTypes to apply the transformation to. An empty list will cause + # this transformation to apply to all findings that correspond to + # infoTypes that were requested in `InspectConfig`. + # @!attribute [rw] primitive_transformation + # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] + # Required. Primitive transformation to apply to the infoType. + class InfoTypeTransformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The transformation to apply to the field. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Required. Input field(s) to apply the transformation to. + # When you have columns that reference their position within a list, + # omit the index from the FieldId. FieldId name matching ignores the index. + # For example, instead of "contact.nums[0].type", use "contact.nums.type". + # @!attribute [rw] condition + # @return [::Google::Cloud::Dlp::V2::RecordCondition] + # Only apply the transformation if the condition evaluates to true for the + # given `RecordCondition`. The conditions are allowed to reference fields + # that are not used in the actual transformation. + # + # Example Use Cases: + # + # - Apply a different bucket transformation to an age column if the zip code + # column for the same record is within a specific range. + # - Redact a field if the date of birth field is greater than 85. + # @!attribute [rw] primitive_transformation + # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] + # Apply the transformation to the entire field. + # + # Note: The following fields are mutually exclusive: `primitive_transformation`, `info_type_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] info_type_transformations + # @return [::Google::Cloud::Dlp::V2::InfoTypeTransformations] + # Treat the contents of the field as free text, and selectively + # transform content that matches an `InfoType`. + # + # Note: The following fields are mutually exclusive: `info_type_transformations`, `primitive_transformation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class FieldTransformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A type of transformation that is applied over structured data such as a + # table. + # @!attribute [rw] field_transformations + # @return [::Array<::Google::Cloud::Dlp::V2::FieldTransformation>] + # Transform the record by applying various field transformations. + # @!attribute [rw] record_suppressions + # @return [::Array<::Google::Cloud::Dlp::V2::RecordSuppression>] + # Configuration defining which records get suppressed entirely. Records that + # match any suppression rule are omitted from the output. + class RecordTransformations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration to suppress records whose suppression conditions evaluate to + # true. + # @!attribute [rw] condition + # @return [::Google::Cloud::Dlp::V2::RecordCondition] + # A condition that when it evaluates to true will result in the record being + # evaluated to be suppressed from the transformed content. + class RecordSuppression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A condition for determining whether a transformation should be applied to + # a field. + # @!attribute [rw] expressions + # @return [::Google::Cloud::Dlp::V2::RecordCondition::Expressions] + # An expression. + class RecordCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The field type of `value` and `field` do not need to match to be + # considered equal, but not all comparisons are possible. + # EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, + # but all other comparisons are invalid with incompatible types. + # A `value` of type: + # + # - `string` can be compared against all other types + # - `boolean` can only be compared against other booleans + # - `integer` can be compared against doubles or a string if the string value + # can be parsed as an integer. + # - `double` can be compared against integers or a string if the string can + # be parsed as a double. + # - `Timestamp` can be compared against strings in RFC 3339 date string + # format. + # - `TimeOfDay` can be compared against timestamps and strings in the format + # of 'HH:mm:ss'. + # + # If we fail to compare do to type mismatch, a warning will be given and + # the condition will evaluate to false. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Required. Field within the record this condition is evaluated against. + # @!attribute [rw] operator + # @return [::Google::Cloud::Dlp::V2::RelationalOperator] + # Required. Operator used to compare the field or infoType to the value. + # @!attribute [rw] value + # @return [::Google::Cloud::Dlp::V2::Value] + # Value to compare against. [Mandatory, except for `EXISTS` tests.] + class Condition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of conditions. + # @!attribute [rw] conditions + # @return [::Array<::Google::Cloud::Dlp::V2::RecordCondition::Condition>] + # A collection of conditions. + class Conditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An expression, consisting of an operator and conditions. + # @!attribute [rw] logical_operator + # @return [::Google::Cloud::Dlp::V2::RecordCondition::Expressions::LogicalOperator] + # The operator to apply to the result of conditions. Default and currently + # only supported value is `AND`. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::RecordCondition::Conditions] + # Conditions to apply to the expression. + class Expressions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Logical operators for conditional checks. + module LogicalOperator + # Unused + LOGICAL_OPERATOR_UNSPECIFIED = 0 + + # Conditional AND + AND = 1 + end + end + end + + # Overview of the modifications that occurred. + # @!attribute [rw] transformed_bytes + # @return [::Integer] + # Total size in bytes that were transformed in some way. + # @!attribute [rw] transformation_summaries + # @return [::Array<::Google::Cloud::Dlp::V2::TransformationSummary>] + # Transformations applied to the dataset. + class TransformationOverview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Summary of a single transformation. + # Only one of 'transformation', 'field_transformation', or 'record_suppress' + # will be set. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # Set if the transformation was limited to a specific InfoType. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Set if the transformation was limited to a specific FieldId. + # @!attribute [rw] transformation + # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] + # The specific transformation these stats apply to. + # @!attribute [rw] field_transformations + # @return [::Array<::Google::Cloud::Dlp::V2::FieldTransformation>] + # The field transformation that was applied. + # If multiple field transformations are requested for a single field, + # this list will contain all of them; otherwise, only one is supplied. + # @!attribute [rw] record_suppress + # @return [::Google::Cloud::Dlp::V2::RecordSuppression] + # The specific suppression option these stats apply to. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Dlp::V2::TransformationSummary::SummaryResult>] + # Collection of all transformations that took place or had an error. + # @!attribute [rw] transformed_bytes + # @return [::Integer] + # Total size in bytes that were transformed in some way. + class TransformationSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A collection that informs the user the number of times a particular + # `TransformationResultCode` and error details occurred. + # @!attribute [rw] count + # @return [::Integer] + # Number of transformations counted by this result. + # @!attribute [rw] code + # @return [::Google::Cloud::Dlp::V2::TransformationSummary::TransformationResultCode] + # Outcome of the transformation. + # @!attribute [rw] details + # @return [::String] + # A place for warnings or errors to show up if a transformation didn't + # work as expected. + class SummaryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible outcomes of transformations. + module TransformationResultCode + # Unused + TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0 + + # Transformation completed without an error. + SUCCESS = 1 + + # Transformation had an error. + ERROR = 2 + end + end + + # A flattened description of a `PrimitiveTransformation` or + # `RecordSuppression`. + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::TransformationType] + # The transformation type. + # @!attribute [rw] description + # @return [::String] + # A description of the transformation. This is empty for a + # RECORD_SUPPRESSION, or is the output of calling toString() on the + # `PrimitiveTransformation` protocol buffer message for any other type of + # transformation. + # @!attribute [rw] condition + # @return [::String] + # A human-readable string representation of the `RecordCondition` + # corresponding to this transformation. Set if a `RecordCondition` was used + # to determine whether or not to apply this transformation. + # + # Examples: + # * (age_field > 85) + # * (age_field <= 18) + # * (zip_field exists) + # * (zip_field == 01234) && (city_field != "Springville") + # * (zip_field == 01234) && (age_field <= 18) && (city_field exists) + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # Set if the transformation was limited to a specific `InfoType`. + class TransformationDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about a single transformation. This object contains a description of + # the transformation, information about whether the transformation was + # successfully applied, and the precise location where the transformation + # occurred. These details are stored in a user-specified BigQuery table. + # @!attribute [rw] resource_name + # @return [::String] + # The name of the job that completed the transformation. + # @!attribute [rw] container_name + # @return [::String] + # The top level name of the container where the transformation is located + # (this will be the source file name or table name). + # @!attribute [rw] transformation + # @return [::Array<::Google::Cloud::Dlp::V2::TransformationDescription>] + # Description of transformation. This would only contain more than one + # element if there were multiple matching transformations and which one to + # apply was ambiguous. Not set for states that contain no transformation, + # currently only state that contains no transformation is + # TransformationResultStateType.METADATA_UNRETRIEVABLE. + # @!attribute [rw] status_details + # @return [::Google::Cloud::Dlp::V2::TransformationResultStatus] + # Status of the transformation, if transformation was not successful, this + # will specify what caused it to fail, otherwise it will show that the + # transformation was successful. + # @!attribute [rw] transformed_bytes + # @return [::Integer] + # The number of bytes that were transformed. If transformation was + # unsuccessful or did not take place because there was no content to + # transform, this will be zero. + # @!attribute [rw] transformation_location + # @return [::Google::Cloud::Dlp::V2::TransformationLocation] + # The precise location of the transformed content in the original container. + class TransformationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the location of a transformation. + # @!attribute [rw] finding_id + # @return [::String] + # For infotype transformations, link to the corresponding findings ID so + # that location information does not need to be duplicated. Each findings + # ID correlates to an entry in the findings output table, this table only + # gets created when users specify to save findings (add the save findings + # action to the request). + # + # Note: The following fields are mutually exclusive: `finding_id`, `record_transformation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] record_transformation + # @return [::Google::Cloud::Dlp::V2::RecordTransformation] + # For record transformations, provide a field and container information. + # + # Note: The following fields are mutually exclusive: `record_transformation`, `finding_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] container_type + # @return [::Google::Cloud::Dlp::V2::TransformationContainerType] + # Information about the functionality of the container where this finding + # occurred, if available. + class TransformationLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The field in a record to transform. + # @!attribute [rw] field_id + # @return [::Google::Cloud::Dlp::V2::FieldId] + # For record transformations, provide a field. + # @!attribute [rw] container_timestamp + # @return [::Google::Protobuf::Timestamp] + # Findings container modification timestamp, if applicable. + # @!attribute [rw] container_version + # @return [::String] + # Container version, if available ("generation" for Cloud Storage). + class RecordTransformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The outcome of a transformation. + # @!attribute [rw] result_status_type + # @return [::Google::Cloud::Dlp::V2::TransformationResultStatusType] + # Transformation result status type, this will be either SUCCESS, or it will + # be the reason for why the transformation was not completely successful. + # @!attribute [rw] details + # @return [::Google::Rpc::Status] + # Detailed error codes and messages + class TransformationResultStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for storing transformation details. + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # The BigQuery table in which to store the output. This may be an existing + # table or in a new table in an existing dataset. + # If table_id is not set a new one will be generated for you with the + # following format: + # dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific + # time zone will be used for generating the date details. + class TransformationDetailsStorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schedule for inspect job triggers. + # @!attribute [rw] recurrence_period_duration + # @return [::Google::Protobuf::Duration] + # With this option a job is started on a regular periodic basis. For + # example: every day (86400 seconds). + # + # A scheduled start time will be skipped if the previous + # execution has not ended when its scheduled time occurs. + # + # This value must be set to a time duration greater than or equal + # to 1 day and can be no longer than 60 days. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Job trigger option for hybrid jobs. Jobs must be manually created + # and finished. + class Manual + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The inspectTemplate contains a configuration (set of types of sensitive data + # to be detected) to be used anywhere you otherwise would normally specify + # InspectConfig. See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to + # learn more. + # @!attribute [r] name + # @return [::String] + # Output only. The template name. + # + # The template will have one of the following formats: + # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR + # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; + # @!attribute [rw] display_name + # @return [::String] + # Display name (max 256 chars). + # @!attribute [rw] description + # @return [::String] + # Short description (max 256 chars). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of an inspectTemplate. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of an inspectTemplate. + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # The core content of the template. Configuration of the scanning process. + class InspectTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeidentifyTemplates contains instructions on how to de-identify content. + # See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to + # learn more. + # @!attribute [r] name + # @return [::String] + # Output only. The template name. + # + # The template will have one of the following formats: + # `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR + # `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` + # @!attribute [rw] display_name + # @return [::String] + # Display name (max 256 chars). + # @!attribute [rw] description + # @return [::String] + # Short description (max 256 chars). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of an inspectTemplate. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of an inspectTemplate. + # @!attribute [rw] deidentify_config + # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] + # The core content of the template. + class DeidentifyTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details information about an error encountered during job execution or + # the results of an unsuccessful activation of the JobTrigger. + # @!attribute [rw] details + # @return [::Google::Rpc::Status] + # Detailed error codes and messages. + # @!attribute [rw] timestamps + # @return [::Array<::Google::Protobuf::Timestamp>] + # The times the error occurred. List includes the oldest timestamp and the + # last 9 timestamps. + # @!attribute [rw] extra_info + # @return [::Google::Cloud::Dlp::V2::Error::ErrorExtraInfo] + # Additional information about the error. + class Error + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional information about the error. + module ErrorExtraInfo + # Unused. + ERROR_INFO_UNSPECIFIED = 0 + + # Image scan is not available in the region. + IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1 + + # File store cluster is not supported for profile generation. + FILE_STORE_CLUSTER_UNSUPPORTED = 2 + end + end + + # Contains a configuration to make API calls on a repeating basis. + # See + # https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers + # to learn more. + # @!attribute [rw] name + # @return [::String] + # Unique resource name for the triggeredJob, assigned by the service when the + # triggeredJob is created, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @!attribute [rw] display_name + # @return [::String] + # Display name (max 100 chars) + # @!attribute [rw] description + # @return [::String] + # User provided description (max 256 chars) + # @!attribute [rw] inspect_job + # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] + # For inspect jobs, a snapshot of the configuration. + # @!attribute [rw] triggers + # @return [::Array<::Google::Cloud::Dlp::V2::JobTrigger::Trigger>] + # A list of triggers which will be OR'ed together. Only one in the list + # needs to trigger for a job to be started. The list may contain only + # a single Schedule trigger and must have at least one object. + # @!attribute [r] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # Output only. A stream of errors encountered when the trigger was activated. + # Repeated errors may result in the JobTrigger automatically being paused. + # Will return the last 100 errors. Whenever the JobTrigger is modified + # this list will be cleared. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a triggeredJob. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a triggeredJob. + # @!attribute [r] last_run_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the last time this trigger executed. + # @!attribute [rw] status + # @return [::Google::Cloud::Dlp::V2::JobTrigger::Status] + # Required. A status for this trigger. + class JobTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # What event needs to occur for a new job to be started. + # @!attribute [rw] schedule + # @return [::Google::Cloud::Dlp::V2::Schedule] + # Create a job on a repeating basis based on the elapse of time. + # + # Note: The following fields are mutually exclusive: `schedule`, `manual`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] manual + # @return [::Google::Cloud::Dlp::V2::Manual] + # For use with hybrid jobs. Jobs must be manually created and finished. + # + # Note: The following fields are mutually exclusive: `manual`, `schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Trigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs + # will be created with this configuration. The service may automatically + # pause triggers experiencing frequent errors. To restart a job, set the + # status to HEALTHY after correcting user errors. + module Status + # Unused. + STATUS_UNSPECIFIED = 0 + + # Trigger is healthy. + HEALTHY = 1 + + # Trigger is temporarily paused. + PAUSED = 2 + + # Trigger is cancelled and can not be resumed. + CANCELLED = 3 + end + end + + # A task to execute on the completion of a job. + # See https://cloud.google.com/sensitive-data-protection/docs/concepts-actions + # to learn more. + # @!attribute [rw] save_findings + # @return [::Google::Cloud::Dlp::V2::Action::SaveFindings] + # Save resulting findings in a provided location. + # + # Note: The following fields are mutually exclusive: `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pub_sub + # @return [::Google::Cloud::Dlp::V2::Action::PublishToPubSub] + # Publish a notification to a Pub/Sub topic. + # + # Note: The following fields are mutually exclusive: `pub_sub`, `save_findings`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_summary_to_cscc + # @return [::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc] + # Publish summary to Cloud Security Command Center (Alpha). + # + # Note: The following fields are mutually exclusive: `publish_summary_to_cscc`, `save_findings`, `pub_sub`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_findings_to_cloud_data_catalog + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog] + # Deprecated because Data Catalog is being turned down. Use + # publish_findings_to_dataplex_catalog to publish findings to Dataplex + # Universal Catalog. + # + # Note: The following fields are mutually exclusive: `publish_findings_to_cloud_data_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_findings_to_dataplex_catalog + # @return [::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog] + # Publish findings as an aspect to Dataplex Universal Catalog. + # + # Note: The following fields are mutually exclusive: `publish_findings_to_dataplex_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deidentify + # @return [::Google::Cloud::Dlp::V2::Action::Deidentify] + # Create a de-identified copy of the input data. + # + # Note: The following fields are mutually exclusive: `deidentify`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] job_notification_emails + # @return [::Google::Cloud::Dlp::V2::Action::JobNotificationEmails] + # Sends an email when the job completes. The email goes to IAM project + # owners and technical [Essential + # Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). + # + # Note: The following fields are mutually exclusive: `job_notification_emails`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_to_stackdriver + # @return [::Google::Cloud::Dlp::V2::Action::PublishToStackdriver] + # Enable Stackdriver metric dlp.googleapis.com/finding_count. + # + # Note: The following fields are mutually exclusive: `publish_to_stackdriver`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If set, the detailed findings will be persisted to the specified + # OutputStorageConfig. Only a single instance of this action can be + # specified. + # Compatible with: Inspect, Risk + # @!attribute [rw] output_config + # @return [::Google::Cloud::Dlp::V2::OutputStorageConfig] + # Location to store findings outside of DLP. + class SaveFindings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Publish a message into a given Pub/Sub topic when DlpJob has completed. The + # message contains a single field, `DlpJobName`, which is equal to the + # finished job's + # [`DlpJob.name`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob). + # Compatible with: Inspect, Risk + # @!attribute [rw] topic + # @return [::String] + # Cloud Pub/Sub topic to send notifications to. The topic must have given + # publishing access rights to the DLP API service account executing + # the long running DlpJob sending the notifications. + # Format is projects/\\{project}/topics/\\{topic}. + class PublishToPubSub + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Publish the result summary of a DlpJob to [Security Command + # Center](https://cloud.google.com/security-command-center). This action is + # available for only projects that belong to an organization. This action + # publishes the count of finding instances and their infoTypes. The summary + # of findings are persisted in Security Command Center and are governed by + # [service-specific policies for Security Command + # Center](https://cloud.google.com/terms/service-terms). Only a single + # instance of this action can be specified. Compatible with: Inspect + class PublishSummaryToCscc + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag + # templates are applied to the resource that Cloud DLP scanned. Data + # Catalog tag templates are stored in the same project and region where the + # BigQuery table exists. For Cloud DLP to create and apply the tag template, + # the Cloud DLP service agent must have the + # `roles/datacatalog.tagTemplateOwner` permission on the project. The tag + # template contains fields summarizing the results of the DlpJob. Any field + # values previously written by another DlpJob are deleted. [InfoType naming + # patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using + # this feature. + # + # Findings are persisted in Data Catalog storage and are governed by + # service-specific policies for Data Catalog. For more information, see + # [Service Specific Terms](https://cloud.google.com/terms/service-terms). + # + # Only a single instance of this action can be specified. This action is + # allowed only if all resources being scanned are BigQuery tables. + # Compatible with: Inspect + class PublishFindingsToCloudDataCatalog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Publish findings of a DlpJob to Dataplex Universal Catalog as a + # `sensitive-data-protection-job-result` aspect. For more information, + # see [Send inspection results to Dataplex Universal Catalog as + # aspects](https://cloud.google.com/sensitive-data-protection/docs/add-aspects-inspection-job). + # + # Aspects are stored in Dataplex Universal Catalog storage and are + # governed by service-specific policies for Dataplex Universal Catalog. For + # more information, see [Service Specific + # Terms](https://cloud.google.com/terms/service-terms). + # + # Only a single instance of this action can be specified. This action is + # allowed only if all resources being scanned are BigQuery tables. + # Compatible with: Inspect + class PublishFindingsToDataplexCatalog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create a de-identified copy of a storage bucket. Only compatible + # with Cloud Storage buckets. + # + # + # A TransformationDetail will be created for each transformation. + # + # + # Compatible with: Inspection of Cloud Storage + # @!attribute [rw] transformation_config + # @return [::Google::Cloud::Dlp::V2::TransformationConfig] + # User specified deidentify templates and configs for structured, + # unstructured, and image files. + # @!attribute [rw] transformation_details_storage_config + # @return [::Google::Cloud::Dlp::V2::TransformationDetailsStorageConfig] + # Config for storing transformation details. + # + # This field specifies the configuration for storing detailed metadata + # about each transformation performed during a de-identification process. + # The metadata is stored separately from the de-identified content itself + # and provides a granular record of both successful transformations and any + # failures that occurred. + # + # Enabling this configuration is essential for users who need to access + # comprehensive information about the status, outcome, and specifics of + # each transformation. The details are captured in the + # {::Google::Cloud::Dlp::V2::TransformationDetails TransformationDetails} + # message for each operation. + # + # Key use cases: + # + # * **Auditing and compliance** + # * Provides a verifiable audit trail of de-identification activities, + # which is crucial for meeting regulatory requirements and internal + # data governance policies. + # * Logs what data was transformed, what transformations were applied, + # when they occurred, and their success status. This helps + # demonstrate accountability and due diligence in protecting + # sensitive data. + # + # * **Troubleshooting and debugging** + # * Offers detailed error messages and context if a transformation + # fails. This information is useful for diagnosing and resolving + # issues in the de-identification pipeline. + # * Helps pinpoint the exact location and nature of failures, speeding + # up the debugging process. + # + # * **Process verification and quality assurance** + # * Allows users to confirm that de-identification rules and + # transformations were applied correctly and consistently across + # the dataset as intended. + # * Helps in verifying the effectiveness of the chosen + # de-identification strategies. + # + # * **Data lineage and impact analysis** + # * Creates a record of how data elements were modified, contributing + # to data lineage. This is useful for understanding the provenance + # of de-identified data. + # * Aids in assessing the potential impact of de-identification choices + # on downstream analytical processes or data usability. + # + # * **Reporting and operational insights** + # * You can analyze the metadata stored in a queryable BigQuery table + # to generate reports on transformation success rates, common + # error types, processing volumes (e.g., transformedBytes), and the + # types of transformations applied. + # * These insights can inform optimization of de-identification + # configurations and resource planning. + # + # To take advantage of these benefits, set this configuration. The stored + # details include a description of the transformation, success or + # error codes, error messages, the number of bytes transformed, the + # location of the transformed content, and identifiers for the job and + # source data. + # @!attribute [rw] cloud_storage_output + # @return [::String] + # Required. User settable Cloud Storage bucket and folders to store + # de-identified files. This field must be set for Cloud Storage + # deidentification. The output Cloud Storage bucket must be different + # from the input bucket. De-identified files will overwrite files in the + # output path. + # + # Form of: gs://bucket/folder/ or gs://bucket + # @!attribute [rw] file_types_to_transform + # @return [::Array<::Google::Cloud::Dlp::V2::FileType>] + # List of user-specified file type groups to transform. If specified, only + # the files with these file types are transformed. If empty, all + # supported files are transformed. Supported types may be automatically + # added over time. Any unsupported file types that are set in this field + # are excluded from de-identification. An error is recorded for each + # unsupported file in the TransformationDetails output table. Currently the + # only file types supported are: IMAGES, TEXT_FILES, CSV, TSV. + class Deidentify + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sends an email when the job completes. The email goes to IAM project owners + # and technical [Essential + # Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). + class JobNotificationEmails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enable Stackdriver metric dlp.googleapis.com/finding_count. This + # will publish a metric to stack driver on each infotype requested and + # how many findings were found for it. CustomDetectors will be bucketed + # as 'Custom' under the Stackdriver label 'info_type'. + class PublishToStackdriver + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User specified templates and configs for how to deidentify structured, + # unstructures, and image files. User must provide either a unstructured + # deidentify template or at least one redact image config. + # @!attribute [rw] deidentify_template + # @return [::String] + # De-identify template. + # If this template is specified, it will serve as the default de-identify + # template. This template cannot contain `record_transformations` since it + # can be used for unstructured content such as free-form text files. If this + # template is not set, a default `ReplaceWithInfoTypeConfig` will be used to + # de-identify unstructured content. + # @!attribute [rw] structured_deidentify_template + # @return [::String] + # Structured de-identify template. + # If this template is specified, it will serve as the de-identify template + # for structured content such as delimited files and tables. If this template + # is not set but the `deidentify_template` is set, then `deidentify_template` + # will also apply to the structured content. If neither template is set, a + # default `ReplaceWithInfoTypeConfig` will be used to de-identify structured + # content. + # @!attribute [rw] image_redact_template + # @return [::String] + # Image redact template. + # If this template is specified, it will serve as the de-identify template + # for images. If this template is not set, all findings in the image will be + # redacted with a black box. + class TransformationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateInspectTemplate. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] inspect_template + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # Required. The InspectTemplate to create. + # @!attribute [rw] template_id + # @return [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class CreateInspectTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateInspectTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of organization and inspectTemplate to be updated, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + # @!attribute [rw] inspect_template + # @return [::Google::Cloud::Dlp::V2::InspectTemplate] + # New InspectTemplate value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask to control which fields get updated. + class UpdateInspectTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetInspectTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and inspectTemplate to be read, + # for example `organizations/433245324/inspectTemplates/432452342` or + # projects/project-id/inspectTemplates/432452342. + class GetInspectTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListInspectTemplates. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListInspectTemplates`. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListInspectTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListInspectTemplates. + # @!attribute [rw] inspect_templates + # @return [::Array<::Google::Cloud::Dlp::V2::InspectTemplate>] + # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest. + # @!attribute [rw] next_page_token + # @return [::String] + # If the next page is available then the next page token to be used in the + # following ListInspectTemplates request. + class ListInspectTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteInspectTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and inspectTemplate to be + # deleted, for example `organizations/433245324/inspectTemplates/432452342` + # or projects/project-id/inspectTemplates/432452342. + class DeleteInspectTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateJobTrigger. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] job_trigger + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # Required. The JobTrigger to create. + # @!attribute [rw] trigger_id + # @return [::String] + # The trigger id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class CreateJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ActivateJobTrigger. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the trigger to activate, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + class ActivateJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateJobTrigger. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + # @!attribute [rw] job_trigger + # @return [::Google::Cloud::Dlp::V2::JobTrigger] + # New JobTrigger value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask to control which fields get updated. + class UpdateJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetJobTrigger. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + class GetJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDiscoveryConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] discovery_config + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # Required. The DiscoveryConfig to create. + # @!attribute [rw] config_id + # @return [::String] + # The config ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + class CreateDiscoveryConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDiscoveryConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + # @!attribute [rw] discovery_config + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # Required. New DiscoveryConfig value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask to control which fields get updated. + class UpdateDiscoveryConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetDiscoveryConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the configuration, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + class GetDiscoveryConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDiscoveryConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value is as follows: + # `projects/{project_id}/locations/{location_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListDiscoveryConfigs. `order_by` field must not + # change for subsequent calls. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by a server. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of config fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + # - `name`: corresponds to the DiscoveryConfig's name. + # - `status`: corresponds to DiscoveryConfig's status. + class ListDiscoveryConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDiscoveryConfigs. + # @!attribute [rw] discovery_configs + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryConfig>] + # List of configs, up to page_size in ListDiscoveryConfigsRequest. + # @!attribute [rw] next_page_token + # @return [::String] + # If the next page is available then this value is the next page token to be + # used in the following ListDiscoveryConfigs request. + class ListDiscoveryConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteDiscoveryConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the config, for example + # `projects/dlp-test-project/discoveryConfigs/53234423`. + class DeleteDiscoveryConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDlpJobRequest. Used to initiate long running + # jobs such as calculating risk metrics or inspecting Google Cloud + # Storage. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] inspect_job + # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] + # An inspection job scans a storage repository for InfoTypes. + # + # Note: The following fields are mutually exclusive: `inspect_job`, `risk_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] risk_job + # @return [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig] + # A risk analysis job calculates re-identification risk metrics for a + # BigQuery table. + # + # Note: The following fields are mutually exclusive: `risk_job`, `inspect_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] job_id + # @return [::String] + # The job id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class CreateDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListJobTriggers. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. Comes from the previous call + # to ListJobTriggers. `order_by` field must not + # change for subsequent calls. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by a server. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of triggeredJob fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the JobTrigger was created. + # - `update_time`: corresponds to the time the JobTrigger was last updated. + # - `last_run_time`: corresponds to the last time the JobTrigger ran. + # - `name`: corresponds to the JobTrigger's name. + # - `display_name`: corresponds to the JobTrigger's display name. + # - `status`: corresponds to JobTrigger's status. + # @!attribute [rw] filter + # @return [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect triggers: + # - `status` - HEALTHY|PAUSED|CANCELLED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + # quotation marks. Nanoseconds are ignored. + # - 'error_count' - Number of errors that have occurred while running. + # * The operator must be `=` or `!=` for status and inspected_storage. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND status = HEALTHY + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + # * last_run_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of jobs. Will use `DlpJobType.INSPECT` if not set. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListJobTriggersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListJobTriggers. + # @!attribute [rw] job_triggers + # @return [::Array<::Google::Cloud::Dlp::V2::JobTrigger>] + # List of triggeredJobs, up to page_size in ListJobTriggersRequest. + # @!attribute [rw] next_page_token + # @return [::String] + # If the next page is available then this value is the next page token to be + # used in the following ListJobTriggers request. + class ListJobTriggersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteJobTrigger. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the project and the triggeredJob, for example + # `projects/dlp-test-project/jobTriggers/53234423`. + class DeleteJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Controls what and how to inspect for findings. + # @!attribute [rw] storage_config + # @return [::Google::Cloud::Dlp::V2::StorageConfig] + # The data to scan. + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # How and what to scan for. + # @!attribute [rw] inspect_template_name + # @return [::String] + # If provided, will be used as the default for all values in InspectConfig. + # `inspect_config` will be merged into the values persisted as part of the + # template. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dlp::V2::Action>] + # Actions to execute at the completion of the job. + class InspectJobConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A task to execute when a data profile has been generated. + # @!attribute [rw] export_data + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::Export] + # Export data profiles into a provided location. + # + # Note: The following fields are mutually exclusive: `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pub_sub_notification + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification] + # Publish a message into the Pub/Sub topic. + # + # Note: The following fields are mutually exclusive: `pub_sub_notification`, `export_data`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_to_chronicle + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToChronicle] + # Publishes generated data profiles to Google Security Operations. + # For more information, see [Use Sensitive Data Protection data in + # context-aware + # analytics](https://cloud.google.com/chronicle/docs/detection/usecase-dlp-high-risk-user-download). + # + # Note: The following fields are mutually exclusive: `publish_to_chronicle`, `export_data`, `pub_sub_notification`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_to_scc + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToSecurityCommandCenter] + # Publishes findings to Security Command Center for each data profile. + # + # Note: The following fields are mutually exclusive: `publish_to_scc`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tag_resources + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources] + # Tags the profiled resources with the specified tag values. + # + # Note: The following fields are mutually exclusive: `tag_resources`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] publish_to_dataplex_catalog + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToDataplexCatalog] + # Publishes a portion of each profile to Dataplex Universal Catalog with + # the aspect type Sensitive Data Protection Profile. + # + # Note: The following fields are mutually exclusive: `publish_to_dataplex_catalog`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataProfileAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # If set, the detailed data profiles will be persisted to the location + # of your choice whenever updated. + # @!attribute [rw] profile_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Store all profiles to BigQuery. + # + # * The system will create a new dataset and table for you if none are + # are provided. The dataset will be named + # `sensitive_data_protection_discovery` and table will be named + # `discovery_profiles`. This table will be placed in the same project as + # the container project running the scan. After the first profile is + # generated and the dataset and table are created, the discovery scan + # configuration will be updated with the dataset and table names. + # * See [Analyze data profiles stored in + # BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles). + # * See [Sample queries for your BigQuery + # table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries). + # * Data is inserted using [streaming + # insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) + # and so data may be in the buffer for a period of time after the + # profile has finished. + # * The Pub/Sub notification is sent before the streaming buffer is + # guaranteed to be written, so data may not be instantly + # visible to queries by the time your topic receives the Pub/Sub + # notification. + # * The best practice is to use the same table for an entire organization + # so that you can take advantage of the [provided Looker + # reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report). + # If you use VPC Service Controls to define security perimeters, then + # you must use a separate table for each boundary. + # @!attribute [rw] sample_findings_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Store sample [data profile + # findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table + # or a new table in an existing dataset. Each regeneration will result in + # new rows in BigQuery. Data is inserted using [streaming + # insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) + # and so data may be in the buffer for a period of time after the profile + # has finished. + class Export + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Send a Pub/Sub message into the given Pub/Sub topic to connect other + # systems to data profile generation. The message payload data will + # be the byte serialization of `DataProfilePubSubMessage`. + # @!attribute [rw] topic + # @return [::String] + # Cloud Pub/Sub topic to send notifications to. + # Format is projects/\\{project}/topics/\\{topic}. + # @!attribute [rw] event + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType] + # The type of event that triggers a Pub/Sub. At most one + # `PubSubNotification` per EventType is permitted. + # @!attribute [rw] pubsub_condition + # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition] + # Conditions (e.g., data risk or sensitivity level) for triggering a + # Pub/Sub. + # @!attribute [rw] detail_of_message + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel] + # How much data to include in the Pub/Sub message. If the user wishes to + # limit the size of the message, they can use resource_name and fetch the + # profile fields they wish to. Per table profile (not per column). + class PubSubNotification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The levels of detail that can be included in the Pub/Sub message. + module DetailLevel + # Unused. + DETAIL_LEVEL_UNSPECIFIED = 0 + + # The full table data profile. + TABLE_PROFILE = 1 + + # The name of the profiled resource. + RESOURCE_NAME = 2 + + # The full file store data profile. + FILE_STORE_PROFILE = 3 + end + end + + # Message expressing intention to publish to Google Security Operations. + class PublishToChronicle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # If set, a summary finding will be created or updated in Security Command + # Center for each profile. + class PublishToSecurityCommandCenter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create Dataplex Universal Catalog aspects for profiled resources with the + # aspect type Sensitive Data Protection Profile. To learn more about aspects, + # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects. + # @!attribute [rw] lower_data_risk_to_low + # @return [::Boolean] + # Whether creating a Dataplex Universal Catalog aspect for a profiled + # resource should lower the risk of the profile for that resource. This + # also lowers the data risk of resources at the lower levels of the + # resource hierarchy. For example, reducing the data risk of a table data + # profile also reduces the data risk of the constituent column data + # profiles. + class PublishToDataplexCatalog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # If set, attaches the [tags] + # (https://cloud.google.com/resource-manager/docs/tags/tags-overview) + # provided to profiled resources. Tags support [access + # control](https://cloud.google.com/iam/docs/tags-access-control). You can + # conditionally grant or deny access to a resource based on whether the + # resource has a specific tag. + # @!attribute [rw] tag_conditions + # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>] + # The tags to associate with different conditions. + # @!attribute [rw] profile_generations_to_tag + # @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>] + # The profile generations for which the tag should be attached to + # resources. If you attach a tag to only new profiles, then if the + # sensitivity score of a profile subsequently changes, its tag doesn't + # change. By default, this field includes only new profiles. To include + # both new and updated profiles for tagging, this field should explicitly + # include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`. + # @!attribute [rw] lower_data_risk_to_low + # @return [::Boolean] + # Whether applying a tag to a resource should lower the risk of the profile + # for that resource. For example, in conjunction with an [IAM deny + # policy](https://cloud.google.com/iam/docs/deny-overview), you can deny + # all principals a permission if a tag value is present, mitigating the + # risk of the resource. This also lowers the data risk of resources at the + # lower levels of the resource hierarchy. For example, reducing the data + # risk of a table data profile also reduces the data risk of the + # constituent column data profiles. + class TagResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The tag to attach to profiles matching the condition. At most one + # `TagCondition` can be specified per sensitivity level. + # @!attribute [rw] tag + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue] + # The tag value to attach to resources. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # Conditions attaching the tag to a resource on its profile having this + # sensitivity score. + class TagCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A value of a tag. + # @!attribute [rw] namespaced_value + # @return [::String] + # The namespaced name for the tag value to attach to resources. Must be + # in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for + # example, "123456/environment/prod" for an organization parent, or + # "my-project/environment/prod" for a project parent. + class TagValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Types of event that can trigger an action. + module EventType + # Unused. + EVENT_TYPE_UNSPECIFIED = 0 + + # New profile (not a re-profile). + NEW_PROFILE = 1 + + # One of the following profile metrics changed: Data risk score, + # Sensitivity score, Resource visibility, Encryption type, Predicted + # infoTypes, Other infoTypes + CHANGED_PROFILE = 2 + + # Table data risk score or sensitivity score increased. + SCORE_INCREASED = 3 + + # A user (non-internal) error occurred. + ERROR_CHANGED = 4 + end + end + + # Details about a piece of potentially sensitive information that was detected + # when the data resource was profiled. + # @!attribute [rw] quote + # @return [::String] + # The content that was found. Even if the content is not textual, it + # may be converted to a textual representation here. If the finding exceeds + # 4096 bytes in length, the quote may be omitted. + # @!attribute [rw] infotype + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The [type of + # content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference) + # that might have been found. + # @!attribute [rw] quote_info + # @return [::Google::Cloud::Dlp::V2::QuoteInfo] + # Contains data parsed from quotes. Currently supported infoTypes: DATE, + # DATE_OF_BIRTH, and TIME. + # @!attribute [rw] data_profile_resource_name + # @return [::String] + # Resource name of the data profile associated with the finding. + # @!attribute [rw] finding_id + # @return [::String] + # A unique identifier for the finding. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Timestamp when the finding was detected. + # @!attribute [rw] location + # @return [::Google::Cloud::Dlp::V2::DataProfileFindingLocation] + # Where the content was found. + # @!attribute [rw] resource_visibility + # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] + # How broadly a resource has been shared. + # @!attribute [rw] full_resource_name + # @return [::String] + # The [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # of the resource profiled for this finding. + # @!attribute [rw] data_source_type + # @return [::Google::Cloud::Dlp::V2::DataSourceType] + # The type of the resource that was profiled. + class DataProfileFinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of a data profile finding within a resource. + # @!attribute [rw] container_name + # @return [::String] + # Name of the container where the finding is located. + # The top-level name is the source file name or table name. Names of some + # common storage containers are formatted as follows: + # + # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + # * Cloud Storage files: `gs://{bucket}/{path}` + # @!attribute [rw] data_profile_finding_record_location + # @return [::Google::Cloud::Dlp::V2::DataProfileFindingRecordLocation] + # Location of a finding within a resource that produces a table data + # profile. + class DataProfileFindingLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of a finding within a resource that produces a table data profile. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Field ID of the column containing the finding. + class DataProfileFindingRecordLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for setting up a job to scan resources for profile generation. + # Only one data profile configuration may exist per organization, folder, + # or project. + # + # The generated data profiles are retained according to the + # [data retention policy] + # (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). + # @!attribute [rw] location + # @return [::Google::Cloud::Dlp::V2::DataProfileLocation] + # The data to scan. + # @!attribute [rw] project_id + # @return [::String] + # The project that will run the scan. The DLP service + # account that exists within this project must have access to all resources + # that are profiled, and the DLP API must be enabled. + # @!attribute [rw] other_cloud_starting_location + # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation] + # Must be set only when scanning other clouds. + # @!attribute [rw] inspect_templates + # @return [::Array<::String>] + # Detection logic for profile generation. + # + # Not all template features are used by profiles. FindingLimits, + # include_quote and exclude_info_types have no impact on + # data profiling. + # + # Multiple templates may be provided if there is data in multiple regions. + # At most one template must be specified per-region (including "global"). + # Each region is scanned using the applicable template. If no region-specific + # template is specified, but a "global" template is specified, it will be + # copied to that region and used instead. If no global or region-specific + # template is provided for a region with data, that region's data will not be + # scanned. + # + # For more information, see + # https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. + # @!attribute [rw] data_profile_actions + # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction>] + # Actions to execute at the completion of the job. + class DataProfileJobConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more tables, datasets, or projects that + # contain BigQuery tables. At least one pattern must be specified. + # Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + # @!attribute [rw] project_id_regex + # @return [::String] + # For organizations, if unset, will match all projects. Has no effect + # for data profile configurations created within a project. + # @!attribute [rw] dataset_id_regex + # @return [::String] + # If unset, this property matches all datasets. + # @!attribute [rw] table_id_regex + # @return [::String] + # If unset, this property matches all tables. + class BigQueryRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of regular expressions to determine what tables to match + # against. + # @!attribute [rw] patterns + # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryRegex>] + # A single BigQuery regular expression pattern to match against one or more + # tables, datasets, or projects that contain BigQuery tables. + class BigQueryRegexes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The types of BigQuery tables supported by Cloud DLP. + # @!attribute [rw] types + # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryTableType>] + # A set of BigQuery table types. + class BigQueryTableTypes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Do not profile the tables. + class Disabled + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data that will be profiled. + # @!attribute [rw] organization_id + # @return [::Integer] + # The ID of an organization to scan. + # + # Note: The following fields are mutually exclusive: `organization_id`, `folder_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] folder_id + # @return [::Integer] + # The ID of the folder within an organization to scan. + # + # Note: The following fields are mutually exclusive: `folder_id`, `organization_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataProfileLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for discovery to scan resources for profile generation. + # Only one discovery configuration may exist per organization, folder, + # or project. + # + # The generated data profiles are retained according to the + # [data retention policy] + # (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). + # @!attribute [rw] name + # @return [::String] + # Unique resource name for the DiscoveryConfig, assigned by the service when + # the DiscoveryConfig is created, for example + # `projects/dlp-test-project/locations/global/discoveryConfigs/53234423`. + # @!attribute [rw] display_name + # @return [::String] + # Display name (max 100 chars) + # @!attribute [rw] org_config + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig::OrgConfig] + # Only set when the parent is an org. + # @!attribute [rw] other_cloud_starting_location + # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation] + # Must be set only when scanning other clouds. + # @!attribute [rw] inspect_templates + # @return [::Array<::String>] + # Detection logic for profile generation. + # + # Not all template features are used by Discovery. FindingLimits, + # include_quote and exclude_info_types have no impact on + # Discovery. + # + # Multiple templates may be provided if there is data in multiple regions. + # At most one template must be specified per-region (including "global"). + # Each region is scanned using the applicable template. If no region-specific + # template is specified, but a "global" template is specified, it will be + # copied to that region and used instead. If no global or region-specific + # template is provided for a region with data, that region's data will not be + # scanned. + # + # For more information, see + # https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction>] + # Actions to execute at the completion of scanning. + # @!attribute [rw] targets + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryTarget>] + # Target to match against for determining what to scan and how frequently. + # @!attribute [r] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # Output only. A stream of errors encountered when the config was activated. + # Repeated errors may result in the config automatically being paused. Output + # only field. Will return the last 100 errors. Whenever the config is + # modified this list will be cleared. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a DiscoveryConfig. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a DiscoveryConfig. + # @!attribute [r] last_run_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the last time this config was executed. + # @!attribute [rw] status + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig::Status] + # Required. A status for this configuration. + # @!attribute [rw] processing_location + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation] + # Optional. Processing location configuration. Vertex AI dataset scanning + # will set processing_location.image_fallback_type to MultiRegionProcessing + # by default. + class DiscoveryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Project and scan location information. Only set when the parent is an org. + # @!attribute [rw] location + # @return [::Google::Cloud::Dlp::V2::DiscoveryStartingLocation] + # The data to scan: folder, org, or project + # @!attribute [rw] project_id + # @return [::String] + # The project that will run the scan. The DLP service + # account that exists within this project must have access to all resources + # that are profiled, and the DLP API must be enabled. + class OrgConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Whether the discovery config is currently active. New options may be added + # at a later time. + module Status + # Unused + STATUS_UNSPECIFIED = 0 + + # The discovery config is currently active. + RUNNING = 1 + + # The discovery config is paused temporarily. + PAUSED = 2 + end + end + + # Target used to match against for Discovery. + # @!attribute [rw] big_query_target + # @return [::Google::Cloud::Dlp::V2::BigQueryDiscoveryTarget] + # BigQuery target for Discovery. The first target to match a table will be + # the one applied. + # + # Note: The following fields are mutually exclusive: `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_sql_target + # @return [::Google::Cloud::Dlp::V2::CloudSqlDiscoveryTarget] + # Cloud SQL target for Discovery. The first target to match a table will be + # the one applied. + # + # Note: The following fields are mutually exclusive: `cloud_sql_target`, `big_query_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secrets_target + # @return [::Google::Cloud::Dlp::V2::SecretsDiscoveryTarget] + # Discovery target that looks for credentials and secrets stored in cloud + # resource metadata and reports them as vulnerabilities to Security Command + # Center. Only one target of this type is allowed. + # + # Note: The following fields are mutually exclusive: `secrets_target`, `big_query_target`, `cloud_sql_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_storage_target + # @return [::Google::Cloud::Dlp::V2::CloudStorageDiscoveryTarget] + # Cloud Storage target for Discovery. The first target to match a table + # will be the one applied. + # + # Note: The following fields are mutually exclusive: `cloud_storage_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] other_cloud_target + # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryTarget] + # Other clouds target for discovery. The first target to match a resource + # will be the one applied. + # + # Note: The following fields are mutually exclusive: `other_cloud_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vertex_dataset_target + # @return [::Google::Cloud::Dlp::V2::VertexDatasetDiscoveryTarget] + # Vertex AI dataset target for Discovery. The first target to match a + # dataset will be the one applied. Note that discovery for Vertex AI can + # incur Cloud Storage Class B operation charges for storage.objects.get + # operations and retrieval fees. For more information, see [Cloud Storage + # pricing](https://cloud.google.com/storage/pricing#price-tables). + # Note that discovery for Vertex AI dataset will not be able to scan images + # unless DiscoveryConfig.processing_location.image_fallback_location has + # multi_region_processing or global_processing configured. + # + # Note: The following fields are mutually exclusive: `vertex_dataset_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target used to match against for discovery with BigQuery tables + # @!attribute [rw] filter + # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryFilter] + # Required. The tables the discovery cadence applies to. The first target + # with a matching filter will be the one to apply to a table. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryConditions] + # In addition to matching the filter, these conditions must be true + # before a profile is generated. + # @!attribute [rw] cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryGenerationCadence] + # How often and when to update profiles. New tables that match both the + # filter and conditions are scanned as quickly as possible depending on + # system capacity. + # + # Note: The following fields are mutually exclusive: `cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disabled + # @return [::Google::Cloud::Dlp::V2::Disabled] + # Tables that match this filter will not have profiles created. + # + # Note: The following fields are mutually exclusive: `disabled`, `cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BigQueryDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines what tables will have profiles generated within an organization + # or project. Includes the ability to filter by regular expression patterns + # on project ID, dataset ID, and table ID. + # @!attribute [rw] tables + # @return [::Google::Cloud::Dlp::V2::BigQueryTableCollection] + # A specific set of tables for this filter to apply to. A table collection + # must be specified in only one filter per config. + # If a table id or dataset is empty, Cloud DLP assumes all tables in that + # collection must be profiled. Must specify a project ID. + # + # Note: The following fields are mutually exclusive: `tables`, `other_tables`, `table_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] other_tables + # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryFilter::AllOtherBigQueryTables] + # Catch-all. This should always be the last filter in the list because + # anything above it will apply first. Should only appear once in a + # configuration. If none is specified, a default one will be added + # automatically. + # + # Note: The following fields are mutually exclusive: `other_tables`, `tables`, `table_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table_reference + # @return [::Google::Cloud::Dlp::V2::TableReference] + # The table to scan. Discovery configurations including this can only + # include one DiscoveryTarget (the DiscoveryTarget with this + # TableReference). + # + # Note: The following fields are mutually exclusive: `table_reference`, `tables`, `other_tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryBigQueryFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Catch-all for all other tables not specified by other filters. Should + # always be last, except for single-table configurations, which will only + # have a TableReference target. + class AllOtherBigQueryTables + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies a collection of BigQuery tables. Used for Discovery. + # @!attribute [rw] include_regexes + # @return [::Google::Cloud::Dlp::V2::BigQueryRegexes] + # A collection of regular expressions to match a BigQuery table against. + class BigQueryTableCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requirements that must be true before a table is scanned in discovery for the + # first time. There is an AND relationship between the top-level attributes. + # Additionally, minimum conditions with an OR relationship that must be met + # before Cloud DLP scans a table can be set (like a minimum row count or a + # minimum table age). + # @!attribute [rw] created_after + # @return [::Google::Protobuf::Timestamp] + # BigQuery table must have been created after this date. Used to avoid + # backfilling. + # @!attribute [rw] types + # @return [::Google::Cloud::Dlp::V2::BigQueryTableTypes] + # Restrict discovery to specific table types. + # + # Note: The following fields are mutually exclusive: `types`, `type_collection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type_collection + # @return [::Google::Cloud::Dlp::V2::BigQueryTableTypeCollection] + # Restrict discovery to categories of table types. + # + # Note: The following fields are mutually exclusive: `type_collection`, `types`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] or_conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryConditions::OrConditions] + # At least one of the conditions must be true for a table to be scanned. + class DiscoveryBigQueryConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # There is an OR relationship between these attributes. They are used to + # determine if a table should be scanned or not in Discovery. + # @!attribute [rw] min_row_count + # @return [::Integer] + # Minimum number of rows that should be present before Cloud DLP + # profiles a table + # @!attribute [rw] min_age + # @return [::Google::Protobuf::Duration] + # Minimum age a table must have before Cloud DLP can profile it. Value must + # be 1 hour or greater. + class OrConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # What must take place for a profile to be updated and how + # frequently it should occur. + # New tables are scanned as quickly as possible depending on system + # capacity. + # @!attribute [rw] schema_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoverySchemaModifiedCadence] + # Governs when to update data profiles when a schema is modified. + # @!attribute [rw] table_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryTableModifiedCadence] + # Governs when to update data profiles when a table is modified. + # @!attribute [rw] inspect_template_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] + # Governs when to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # If not set, changing the template will not cause a data profile to update. + # @!attribute [rw] refresh_frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # Frequency at which profiles should be updated, regardless of whether the + # underlying resource has changed. Defaults to never. + class DiscoveryGenerationCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The cadence at which to update data profiles when a table is modified. + # @!attribute [rw] types + # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryTableModification>] + # The type of events to consider when deciding if the table has been + # modified and should have the profile updated. Defaults to + # MODIFIED_TIMESTAMP. + # @!attribute [rw] frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # How frequently data profiles can be updated when tables are modified. + # Defaults to never. + class DiscoveryTableModifiedCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The cadence at which to update data profiles when a schema is modified. + # @!attribute [rw] types + # @return [::Array<::Google::Cloud::Dlp::V2::BigQuerySchemaModification>] + # The type of events to consider when deciding if the table's schema + # has been modified and should have the profile updated. Defaults to + # NEW_COLUMNS. + # @!attribute [rw] frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # How frequently profiles may be updated when schemas are + # modified. Defaults to monthly. + class DiscoverySchemaModifiedCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The cadence at which to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # @!attribute [rw] frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # How frequently data profiles can be updated when the template is modified. + # Defaults to never. + class DiscoveryInspectTemplateModifiedCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target used to match against for discovery with Cloud SQL tables. + # @!attribute [rw] filter + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlFilter] + # Required. The tables the discovery cadence applies to. The first target + # with a matching filter will be the one to apply to a table. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions] + # In addition to matching the filter, these conditions must be true + # before a profile is generated. + # @!attribute [rw] generation_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence] + # How often and when to update profiles. New tables that match both the + # filter and conditions are scanned as quickly as possible depending on + # system capacity. + # + # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disabled + # @return [::Google::Cloud::Dlp::V2::Disabled] + # Disable profiling for database resources that match this filter. + # + # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CloudSqlDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines what tables will have profiles generated within an organization + # or project. Includes the ability to filter by regular expression patterns + # on project ID, location, instance, database, and database resource name. + # @!attribute [rw] collection + # @return [::Google::Cloud::Dlp::V2::DatabaseResourceCollection] + # A specific set of database resources for this filter to apply to. + # + # Note: The following fields are mutually exclusive: `collection`, `others`, `database_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] others + # @return [::Google::Cloud::Dlp::V2::AllOtherDatabaseResources] + # Catch-all. This should always be the last target in the list because + # anything above it will apply first. Should only appear once in a + # configuration. If none is specified, a default one will be added + # automatically. + # + # Note: The following fields are mutually exclusive: `others`, `collection`, `database_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] database_resource_reference + # @return [::Google::Cloud::Dlp::V2::DatabaseResourceReference] + # The database resource to scan. Targets including this can only include + # one target (the target with this database resource reference). + # + # Note: The following fields are mutually exclusive: `database_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryCloudSqlFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Match database resources using regex filters. Examples of database + # resources are tables, views, and stored procedures. + # @!attribute [rw] include_regexes + # @return [::Google::Cloud::Dlp::V2::DatabaseResourceRegexes] + # A collection of regular expressions to match a database resource against. + class DatabaseResourceCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of regular expressions to determine what database resources to + # match against. + # @!attribute [rw] patterns + # @return [::Array<::Google::Cloud::Dlp::V2::DatabaseResourceRegex>] + # A group of regular expression patterns to match against one or more + # database resources. + # Maximum of 100 entries. The sum of all regular expression's length can't + # exceed 10 KiB. + class DatabaseResourceRegexes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more database resources. At least one + # pattern must be specified. Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + # @!attribute [rw] project_id_regex + # @return [::String] + # For organizations, if unset, will match all projects. Has no effect + # for configurations created within a project. + # @!attribute [rw] instance_regex + # @return [::String] + # Regex to test the instance name against. If empty, all instances match. + # @!attribute [rw] database_regex + # @return [::String] + # Regex to test the database name against. If empty, all databases match. + # @!attribute [rw] database_resource_name_regex + # @return [::String] + # Regex to test the database resource's name against. An example of a + # database resource name is a table's name. Other database resource names + # like view names could be included in the future. If empty, all database + # resources match. + class DatabaseResourceRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Match database resources not covered by any other filter. + class AllOtherDatabaseResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identifies a single database resource, like a table within a database. + # @!attribute [rw] project_id + # @return [::String] + # Required. If within a project-level config, then this must match the + # config's project ID. + # @!attribute [rw] instance + # @return [::String] + # Required. The instance where this resource is located. For example: Cloud + # SQL instance ID. + # @!attribute [rw] database + # @return [::String] + # Required. Name of a database within the instance. + # @!attribute [rw] database_resource + # @return [::String] + # Required. Name of a database resource, for example, a table within the + # database. + class DatabaseResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requirements that must be true before a table is profiled for the + # first time. + # @!attribute [rw] database_engines + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions::DatabaseEngine>] + # Optional. Database engines that should be profiled. + # Optional. Defaults to ALL_SUPPORTED_DATABASE_ENGINES if unspecified. + # @!attribute [rw] types + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions::DatabaseResourceType>] + # Data profiles will only be generated for the database resource types + # specified in this field. + # If not specified, defaults to [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES]. + class DiscoveryCloudSqlConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The database engines that should be profiled. + module DatabaseEngine + # Unused. + DATABASE_ENGINE_UNSPECIFIED = 0 + + # Include all supported database engines. + ALL_SUPPORTED_DATABASE_ENGINES = 1 + + # MySQL database. + MYSQL = 2 + + # PostgreSQL database. + POSTGRES = 3 + end + + # Cloud SQL database resource types. New values can be added at a later time. + module DatabaseResourceType + # Unused. + DATABASE_RESOURCE_TYPE_UNSPECIFIED = 0 + + # Includes database resource types that become supported at a later time. + DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES = 1 + + # Tables. + DATABASE_RESOURCE_TYPE_TABLE = 2 + end + end + + # How often existing tables should have their profiles refreshed. + # New tables are scanned as quickly as possible depending on system + # capacity. + # @!attribute [rw] schema_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence] + # When to reprofile if the schema has changed. + # @!attribute [rw] refresh_frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # Data changes (non-schema changes) in Cloud SQL tables can't trigger + # reprofiling. If you set this field, profiles are refreshed at this + # frequency regardless of whether the underlying tables have changed. + # Defaults to never. + # @!attribute [rw] inspect_template_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] + # Governs when to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # If not set, changing the template will not cause a data profile to update. + class DiscoveryCloudSqlGenerationCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How frequently to modify the profile when the table's schema is modified. + # @!attribute [rw] types + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence::CloudSqlSchemaModification>] + # The types of schema modifications to consider. + # Defaults to NEW_COLUMNS. + # @!attribute [rw] frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # Frequency to regenerate data profiles when the schema is modified. + # Defaults to monthly. + class SchemaModifiedCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of modification that causes a profile update. + module CloudSqlSchemaModification + # Unused. + SQL_SCHEMA_MODIFICATION_UNSPECIFIED = 0 + + # New columns have appeared. + NEW_COLUMNS = 1 + + # Columns have been removed from the table. + REMOVED_COLUMNS = 2 + end + end + end + + # Discovery target for credentials and secrets in cloud resource metadata. + # + # This target does not include any filtering or frequency controls. Cloud + # DLP will scan cloud resource metadata for secrets daily. + # + # No inspect template should be included in the discovery config for a + # security benchmarks scan. Instead, the built-in list of secrets and + # credentials infoTypes will be used (see + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets). + # + # Credentials and secrets discovered will be reported as vulnerabilities to + # Security Command Center. + class SecretsDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target used to match against for discovery with Cloud Storage buckets. + # @!attribute [rw] filter + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageFilter] + # Required. The buckets the generation_cadence applies to. The first target + # with a matching filter will be the one to apply to a bucket. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryFileStoreConditions] + # Optional. In addition to matching the filter, these conditions must be true + # before a profile is generated. + # @!attribute [rw] generation_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageGenerationCadence] + # Optional. How often and when to update profiles. New buckets that match + # both the filter and conditions are scanned as quickly as possible + # depending on system capacity. + # + # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disabled + # @return [::Google::Cloud::Dlp::V2::Disabled] + # Optional. Disable profiling for buckets that match this filter. + # + # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CloudStorageDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines which buckets will have profiles generated within an organization + # or project. Includes the ability to filter by regular expression patterns + # on project ID and bucket name. + # @!attribute [rw] collection + # @return [::Google::Cloud::Dlp::V2::FileStoreCollection] + # Optional. A specific set of buckets for this filter to apply to. + # + # Note: The following fields are mutually exclusive: `collection`, `cloud_storage_resource_reference`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_storage_resource_reference + # @return [::Google::Cloud::Dlp::V2::CloudStorageResourceReference] + # Optional. The bucket to scan. Targets including this can only include one + # target (the target with this bucket). This enables profiling the contents + # of a single bucket, while the other options allow for easy profiling of + # many bucets within a project or an organization. + # + # Note: The following fields are mutually exclusive: `cloud_storage_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] others + # @return [::Google::Cloud::Dlp::V2::AllOtherResources] + # Optional. Catch-all. This should always be the last target in the list + # because anything above it will apply first. Should only appear once in a + # configuration. If none is specified, a default one will be added + # automatically. + # + # Note: The following fields are mutually exclusive: `others`, `collection`, `cloud_storage_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryCloudStorageFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Match file stores (e.g. buckets) using filters. + # @!attribute [rw] include_regexes + # @return [::Google::Cloud::Dlp::V2::FileStoreRegexes] + # Optional. A collection of regular expressions to match a file store + # against. + # @!attribute [rw] include_tags + # @return [::Google::Cloud::Dlp::V2::TagFilters] + # Optional. To be included in the collection, a resource must meet all of the + # following requirements: + # + # - If tag filters are provided, match all provided tag filters. + # - If one or more patterns are specified, match at least one pattern. + # + # For a resource to match the tag filters, the resource must have all of the + # provided tags attached. Tags refer to Resource Manager tags bound to the + # resource or its ancestors. For more information, see [Manage + # schedules](https://cloud.google.com/sensitive-data-protection/docs/profile-project-cloud-storage#manage-schedules). + class FileStoreCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of regular expressions to determine what file store to match + # against. + # @!attribute [rw] patterns + # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreRegex>] + # Required. The group of regular expression patterns to match against one or + # more file stores. Maximum of 100 entries. The sum of all regular + # expression's length can't exceed 10 KiB. + class FileStoreRegexes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more file stores. + # @!attribute [rw] cloud_storage_regex + # @return [::Google::Cloud::Dlp::V2::CloudStorageRegex] + # Optional. Regex for Cloud Storage. + class FileStoreRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more file stores. At least one + # pattern must be specified. Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + # @!attribute [rw] project_id_regex + # @return [::String] + # Optional. For organizations, if unset, will match all projects. + # @!attribute [rw] bucket_name_regex + # @return [::String] + # Optional. Regex to test the bucket name against. If empty, all buckets + # match. Example: "marketing2021" or "(marketing)\d\\{4}" will both match the + # bucket gs://marketing2021 + class CloudStorageRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identifies a single Cloud Storage bucket. + # @!attribute [rw] bucket_name + # @return [::String] + # Required. The bucket to scan. + # @!attribute [rw] project_id + # @return [::String] + # Required. If within a project-level config, then this must match the + # config's project id. + class CloudStorageResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How often existing buckets should have their profiles refreshed. + # New buckets are scanned as quickly as possible depending on system + # capacity. + # @!attribute [rw] refresh_frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # Optional. Data changes in Cloud Storage can't trigger reprofiling. If you + # set this field, profiles are refreshed at this frequency regardless of + # whether the underlying buckets have changed. Defaults to never. + # @!attribute [rw] inspect_template_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] + # Optional. Governs when to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # If not set, changing the template will not cause a data profile to update. + class DiscoveryCloudStorageGenerationCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requirements that must be true before a Cloud Storage bucket or object is + # scanned in discovery for the first time. There is an AND relationship between + # the top-level attributes. + # @!attribute [rw] included_object_attributes + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions::CloudStorageObjectAttribute>] + # Required. Only objects with the specified attributes will be scanned. If an + # object has one of the specified attributes but is inside an excluded + # bucket, it will not be scanned. Defaults to [ALL_SUPPORTED_OBJECTS]. A + # profile will be created even if no objects match the + # included_object_attributes. + # @!attribute [rw] included_bucket_attributes + # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions::CloudStorageBucketAttribute>] + # Required. Only objects with the specified attributes will be scanned. + # Defaults to [ALL_SUPPORTED_BUCKETS] if unset. + class DiscoveryCloudStorageConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The attribute of an object. See + # https://cloud.google.com/storage/docs/storage-classes for more information + # on storage classes. + module CloudStorageObjectAttribute + # Unused. + CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED = 0 + + # Scan objects regardless of the attribute. + ALL_SUPPORTED_OBJECTS = 1 + + # Scan objects with the standard storage class. + STANDARD = 2 + + # Scan objects with the nearline storage class. This will incur retrieval + # fees. + NEARLINE = 3 + + # Scan objects with the coldline storage class. This will incur retrieval + # fees. + COLDLINE = 4 + + # Scan objects with the archive storage class. This will incur retrieval + # fees. + ARCHIVE = 5 + + # Scan objects with the regional storage class. + REGIONAL = 6 + + # Scan objects with the multi-regional storage class. + MULTI_REGIONAL = 7 + + # Scan objects with the dual-regional storage class. This will incur + # retrieval fees. + DURABLE_REDUCED_AVAILABILITY = 8 + end + + # The attribute of a bucket. + module CloudStorageBucketAttribute + # Unused. + CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED = 0 + + # Scan buckets regardless of the attribute. + ALL_SUPPORTED_BUCKETS = 1 + + # Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) + # disabled. Only one of + # AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. + AUTOCLASS_DISABLED = 2 + + # Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) + # enabled. Only one of + # AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. Scanning + # Autoclass-enabled buckets can affect object storage classes. + AUTOCLASS_ENABLED = 3 + end + end + + # Requirements that must be true before a file store is scanned in discovery + # for the first time. There is an AND relationship between the top-level + # attributes. + # @!attribute [rw] created_after + # @return [::Google::Protobuf::Timestamp] + # Optional. File store must have been created after this date. Used to avoid + # backfilling. + # @!attribute [rw] min_age + # @return [::Google::Protobuf::Duration] + # Optional. Minimum age a file store must have. If set, the value must be 1 + # hour or greater. + # @!attribute [rw] cloud_storage_conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions] + # Optional. Cloud Storage conditions. + class DiscoveryFileStoreConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target used to match against for discovery of resources from other clouds. + # An [AWS connector in Security Command Center + # (Enterprise](https://cloud.google.com/security-command-center/docs/connect-scc-to-aws) + # is required to use this feature. + # @!attribute [rw] data_source_type + # @return [::Google::Cloud::Dlp::V2::DataSourceType] + # Required. The type of data profiles generated by this discovery target. + # Supported values are: + # * aws/s3/bucket + # @!attribute [rw] filter + # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudFilter] + # Required. The resources that the discovery cadence applies to. The + # first target with a matching filter will be the one to apply to a resource. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudConditions] + # Optional. In addition to matching the filter, these conditions must be true + # before a profile is generated. + # @!attribute [rw] generation_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudGenerationCadence] + # How often and when to update data profiles. New resources that match both + # the filter and conditions are scanned as quickly as possible depending on + # system capacity. + # + # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disabled + # @return [::Google::Cloud::Dlp::V2::Disabled] + # Disable profiling for resources that match this filter. + # + # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OtherCloudDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines which resources from the other cloud will have profiles generated. + # Includes the ability to filter by resource names. + # @!attribute [rw] collection + # @return [::Google::Cloud::Dlp::V2::OtherCloudResourceCollection] + # A collection of resources for this filter to apply to. + # + # Note: The following fields are mutually exclusive: `collection`, `single_resource`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] single_resource + # @return [::Google::Cloud::Dlp::V2::OtherCloudSingleResourceReference] + # The resource to scan. Configs using this filter can only have one target + # (the target with this single resource reference). + # + # Note: The following fields are mutually exclusive: `single_resource`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] others + # @return [::Google::Cloud::Dlp::V2::AllOtherResources] + # Optional. Catch-all. This should always be the last target in the list + # because anything above it will apply first. Should only appear once in a + # configuration. If none is specified, a default one will be added + # automatically. + # + # Note: The following fields are mutually exclusive: `others`, `collection`, `single_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryOtherCloudFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Match resources using regex filters. + # @!attribute [rw] include_regexes + # @return [::Google::Cloud::Dlp::V2::OtherCloudResourceRegexes] + # A collection of regular expressions to match a resource against. + class OtherCloudResourceCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of regular expressions to determine what resources to match + # against. + # @!attribute [rw] patterns + # @return [::Array<::Google::Cloud::Dlp::V2::OtherCloudResourceRegex>] + # A group of regular expression patterns to match against one or more + # resources. + # Maximum of 100 entries. The sum of all regular expression's length can't + # exceed 10 KiB. + class OtherCloudResourceRegexes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more resources. At least one pattern must + # be specified. Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + # @!attribute [rw] amazon_s3_bucket_regex + # @return [::Google::Cloud::Dlp::V2::AmazonS3BucketRegex] + # Regex for Amazon S3 buckets. + class OtherCloudResourceRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AWS account regex. + # @!attribute [rw] account_id_regex + # @return [::String] + # Optional. Regex to test the AWS account ID against. + # If empty, all accounts match. + class AwsAccountRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Amazon S3 bucket regex. + # @!attribute [rw] aws_account_regex + # @return [::Google::Cloud::Dlp::V2::AwsAccountRegex] + # The AWS account regex. + # @!attribute [rw] bucket_name_regex + # @return [::String] + # Optional. Regex to test the bucket name against. + # If empty, all buckets match. + class AmazonS3BucketRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identifies a single resource, like a single Amazon S3 bucket. + # @!attribute [rw] amazon_s3_bucket + # @return [::Google::Cloud::Dlp::V2::AmazonS3Bucket] + # Amazon S3 bucket. + class OtherCloudSingleResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AWS account. + # @!attribute [rw] account_id + # @return [::String] + # Required. AWS account ID. + class AwsAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Amazon S3 bucket. + # @!attribute [rw] aws_account + # @return [::Google::Cloud::Dlp::V2::AwsAccount] + # The AWS account. + # @!attribute [rw] bucket_name + # @return [::String] + # Required. The bucket name. + class AmazonS3Bucket + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requirements that must be true before a resource is profiled for the first + # time. + # @!attribute [rw] min_age + # @return [::Google::Protobuf::Duration] + # Minimum age a resource must be before Cloud DLP can profile it. Value must + # be 1 hour or greater. + # @!attribute [rw] amazon_s3_bucket_conditions + # @return [::Google::Cloud::Dlp::V2::AmazonS3BucketConditions] + # Amazon S3 bucket conditions. + class DiscoveryOtherCloudConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Amazon S3 bucket conditions. + # @!attribute [rw] bucket_types + # @return [::Array<::Google::Cloud::Dlp::V2::AmazonS3BucketConditions::BucketType>] + # Optional. Bucket types that should be profiled. + # Optional. Defaults to TYPE_ALL_SUPPORTED if unspecified. + # @!attribute [rw] object_storage_classes + # @return [::Array<::Google::Cloud::Dlp::V2::AmazonS3BucketConditions::ObjectStorageClass>] + # Optional. Object classes that should be profiled. + # Optional. Defaults to ALL_SUPPORTED_CLASSES if unspecified. + class AmazonS3BucketConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported Amazon S3 bucket types. + # Defaults to TYPE_ALL_SUPPORTED. + module BucketType + # Unused. + TYPE_UNSPECIFIED = 0 + + # All supported classes. + TYPE_ALL_SUPPORTED = 1 + + # A general purpose Amazon S3 bucket. + TYPE_GENERAL_PURPOSE = 2 + end + + # Supported Amazon S3 object storage classes. + # Defaults to ALL_SUPPORTED_CLASSES. + module ObjectStorageClass + # Unused. + UNSPECIFIED = 0 + + # All supported classes. + ALL_SUPPORTED_CLASSES = 1 + + # Standard object class. + STANDARD = 2 + + # Standard - infrequent access object class. + STANDARD_INFREQUENT_ACCESS = 4 + + # Glacier - instant retrieval object class. + GLACIER_INSTANT_RETRIEVAL = 6 + + # Objects in the S3 Intelligent-Tiering access tiers. + INTELLIGENT_TIERING = 7 + end + end + + # How often existing resources should have their profiles refreshed. + # New resources are scanned as quickly as possible depending on system + # capacity. + # @!attribute [rw] refresh_frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # Optional. Frequency to update profiles regardless of whether the underlying + # resource has changes. Defaults to never. + # @!attribute [rw] inspect_template_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] + # Optional. Governs when to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # If not set, changing the template will not cause a data profile to update. + class DiscoveryOtherCloudGenerationCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location to begin a discovery scan. Denotes an organization ID or folder + # ID within an organization. + # @!attribute [rw] organization_id + # @return [::Integer] + # The ID of an organization to scan. + # + # Note: The following fields are mutually exclusive: `organization_id`, `folder_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] folder_id + # @return [::Integer] + # The ID of the folder within an organization to be scanned. + # + # Note: The following fields are mutually exclusive: `folder_id`, `organization_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryStartingLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The other cloud starting location for discovery. + # @!attribute [rw] aws_location + # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation::AwsDiscoveryStartingLocation] + # The AWS starting location for discovery. + class OtherCloudDiscoveryStartingLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The AWS starting location for discovery. + # @!attribute [rw] account_id + # @return [::String] + # The AWS account ID that this discovery config applies to. + # Within an AWS organization, you can find the AWS account ID inside an + # AWS account ARN. Example: + # arn:\\{partition}:organizations::\\{management_account_id}:account/\\{org_id}/\\{account_id} + # + # Note: The following fields are mutually exclusive: `account_id`, `all_asset_inventory_assets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] all_asset_inventory_assets + # @return [::Boolean] + # All AWS assets stored in Asset Inventory that didn't match other AWS + # discovery configs. + # + # Note: The following fields are mutually exclusive: `all_asset_inventory_assets`, `account_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AwsDiscoveryStartingLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Match discovery resources not covered by any other filter. + class AllOtherResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Target used to match against for discovery with Vertex AI datasets. + # @!attribute [rw] filter + # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetFilter] + # Required. The datasets the discovery cadence applies to. The first target + # with a matching filter will be the one to apply to a dataset. + # @!attribute [rw] conditions + # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetConditions] + # In addition to matching the filter, these conditions must be true + # before a profile is generated. + # @!attribute [rw] generation_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetGenerationCadence] + # How often and when to update profiles. New datasets that match both the + # filter and conditions are scanned as quickly as possible depending on + # system capacity. + # + # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disabled + # @return [::Google::Cloud::Dlp::V2::Disabled] + # Disable profiling for datasets that match this filter. + # + # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class VertexDatasetDiscoveryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines what datasets will have profiles generated within an organization + # or project. Includes the ability to filter by regular expression patterns + # on project ID or dataset regex. + # @!attribute [rw] collection + # @return [::Google::Cloud::Dlp::V2::VertexDatasetCollection] + # A specific set of Vertex AI datasets for this filter to apply to. + # + # Note: The following fields are mutually exclusive: `collection`, `vertex_dataset_resource_reference`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vertex_dataset_resource_reference + # @return [::Google::Cloud::Dlp::V2::VertexDatasetResourceReference] + # The dataset resource to scan. Targets including this can only include + # one target (the target with this dataset resource reference). + # + # Note: The following fields are mutually exclusive: `vertex_dataset_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] others + # @return [::Google::Cloud::Dlp::V2::AllOtherResources] + # Catch-all. This should always be the last target in the list because + # anything above it will apply first. Should only appear once in a + # configuration. If none is specified, a default one will be added + # automatically. + # + # Note: The following fields are mutually exclusive: `others`, `collection`, `vertex_dataset_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryVertexDatasetFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Match dataset resources using regex filters. + # @!attribute [rw] vertex_dataset_regexes + # @return [::Google::Cloud::Dlp::V2::VertexDatasetRegexes] + # The regex used to filter dataset resources. + class VertexDatasetCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of regular expressions to determine what datasets to match + # against. + # @!attribute [rw] patterns + # @return [::Array<::Google::Cloud::Dlp::V2::VertexDatasetRegex>] + # Required. The group of regular expression patterns to match against one or + # more datasets. Maximum of 100 entries. The sum of the lengths of all + # regular expressions can't exceed 10 KiB. + class VertexDatasetRegexes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A pattern to match against one or more dataset resources. + # @!attribute [rw] project_id_regex + # @return [::String] + # For organizations, if unset, will match all projects. Has no effect + # for configurations created within a project. + class VertexDatasetRegex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identifies a single Vertex AI resource. Only datasets are + # supported. + # @!attribute [rw] dataset_resource_name + # @return [::String] + # Required. The name of the Vertex AI resource. If set within a project-level + # configuration, the specified resource must be within the project. + # Examples: + # + # * `projects/{project}/locations/{location}/datasets/{dataset}` + class VertexDatasetResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requirements that must be true before a dataset is profiled for the + # first time. + # @!attribute [rw] created_after + # @return [::Google::Protobuf::Timestamp] + # Vertex AI dataset must have been created after this date. Used to avoid + # backfilling. + # @!attribute [rw] min_age + # @return [::Google::Protobuf::Duration] + # Minimum age a Vertex AI dataset must have. If set, the value must be 1 hour + # or greater. + class DiscoveryVertexDatasetConditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How often existing datasets should have their profiles refreshed. + # New datasets are scanned as quickly as possible depending on system + # capacity. + # @!attribute [rw] refresh_frequency + # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] + # If you set this field, profiles are refreshed at this + # frequency regardless of whether the underlying datasets have changed. + # Defaults to never. + # @!attribute [rw] inspect_template_modified_cadence + # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] + # Governs when to update data profiles when the inspection rules + # defined by the `InspectTemplate` change. + # If not set, changing the template will not cause a data profile to be + # updated. + class DiscoveryVertexDatasetGenerationCadence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Combines all of the information about a DLP job. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of job. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::DlpJob::JobState] + # State of a job. + # @!attribute [rw] risk_details + # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails] + # Results from analyzing risk of a data source. + # + # Note: The following fields are mutually exclusive: `risk_details`, `inspect_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] inspect_details + # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails] + # Results from inspecting a data source. + # + # Note: The following fields are mutually exclusive: `inspect_details`, `risk_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time when the job was created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the job started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Time when the job finished. + # @!attribute [rw] last_modified + # @return [::Google::Protobuf::Timestamp] + # Time when the job was last modified by the system. + # @!attribute [rw] job_trigger_name + # @return [::String] + # If created by a job trigger, the resource name of the trigger that + # instantiated the job. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # A stream of errors encountered running the job. + # @!attribute [rw] action_details + # @return [::Array<::Google::Cloud::Dlp::V2::ActionDetails>] + # Events that should occur after the job has completed. + class DlpJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a job. New items may be added. + module JobState + # Unused. + JOB_STATE_UNSPECIFIED = 0 + + # The job has not yet started. + PENDING = 1 + + # The job is currently running. Once a job has finished it will transition + # to FAILED or DONE. + RUNNING = 2 + + # The job is no longer running. + DONE = 3 + + # The job was canceled before it could be completed. + CANCELED = 4 + + # The job had an error and did not complete. + FAILED = 5 + + # The job is currently accepting findings via hybridInspect. + # A hybrid job in ACTIVE state may continue to have findings added to it + # through the calling of hybridInspect. After the job has finished no more + # calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. + ACTIVE = 6 + end + end + + # The request message for + # {::Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job GetDlpJob}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DlpJob resource. + class GetDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for listing DLP jobs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on whether you have [specified a + # processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] filter + # @return [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields/values for inspect jobs: + # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + # - `trigger_name` - The name of the trigger that created the job. + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * Supported fields for risk analysis jobs: + # - `state` - RUNNING|CANCELED|FINISHED|FAILED + # - 'end_time` - Corresponds to the time the job finished. + # - 'start_time` - Corresponds to the time the job finished. + # * The operator must be `=` or `!=`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * inspected_storage = cloud_storage AND state = done + # * inspected_storage = cloud_storage OR inspected_storage = bigquery + # * inspected_storage = cloud_storage AND (state = done OR state = canceled) + # * end_time > \"2017-12-12T00:00:00+00:00\" + # + # The length of this field should be no more than 500 characters. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] type + # @return [::Google::Cloud::Dlp::V2::DlpJobType] + # The type of job. Defaults to `DlpJobType.INSPECT` + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, end_time asc, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the job was created. + # - `end_time`: corresponds to the time the job ended. + # - `name`: corresponds to the job's name. + # - `state`: corresponds to `state` + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListDlpJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for listing DLP jobs. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Dlp::V2::DlpJob>] + # A list of DlpJobs that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListDlpJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for canceling a DLP job. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DlpJob resource to be cancelled. + class CancelDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for finishing a DLP hybrid job. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DlpJob resource to be finished. + class FinishDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for deleting a DLP job. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the DlpJob resource to be deleted. + class DeleteDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDeidentifyTemplate. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] deidentify_template + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # Required. The DeidentifyTemplate to create. + # @!attribute [rw] template_id + # @return [::String] + # The template id can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class CreateDeidentifyTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDeidentifyTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of organization and deidentify template to be + # updated, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + # @!attribute [rw] deidentify_template + # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] + # New DeidentifyTemplate value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask to control which fields get updated. + class UpdateDeidentifyTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetDeidentifyTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and deidentify template to be + # read, for example `organizations/433245324/deidentifyTemplates/432452342` + # or projects/project-id/deidentifyTemplates/432452342. + class GetDeidentifyTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDeidentifyTemplates. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListDeidentifyTemplates`. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc,update_time, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the template was created. + # - `update_time`: corresponds to the time the template was last updated. + # - `name`: corresponds to the template's name. + # - `display_name`: corresponds to the template's display name. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListDeidentifyTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDeidentifyTemplates. + # @!attribute [rw] deidentify_templates + # @return [::Array<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] + # List of deidentify templates, up to page_size in + # ListDeidentifyTemplatesRequest. + # @!attribute [rw] next_page_token + # @return [::String] + # If the next page is available then the next page token to be used in the + # following ListDeidentifyTemplates request. + class ListDeidentifyTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteDeidentifyTemplate. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and deidentify template to be + # deleted, for example + # `organizations/433245324/deidentifyTemplates/432452342` or + # projects/project-id/deidentifyTemplates/432452342. + class DeleteDeidentifyTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a custom dictionary created from a data source of any size + # up to the maximum size defined in the + # [limits](https://cloud.google.com/sensitive-data-protection/limits) page. The + # artifacts of dictionary creation are stored in the specified Cloud Storage + # location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries + # that satisfy the size requirements. + # @!attribute [rw] output_path + # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] + # Location to store dictionary artifacts in Cloud Storage. These files + # will only be accessible by project owners and the DLP API. If any of these + # artifacts are modified, the dictionary is considered invalid and can no + # longer be used. + # @!attribute [rw] cloud_storage_file_set + # @return [::Google::Cloud::Dlp::V2::CloudStorageFileSet] + # Set of files containing newline-delimited lists of dictionary phrases. + # + # Note: The following fields are mutually exclusive: `cloud_storage_file_set`, `big_query_field`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] big_query_field + # @return [::Google::Cloud::Dlp::V2::BigQueryField] + # Field in a BigQuery table where each cell represents a dictionary phrase. + # + # Note: The following fields are mutually exclusive: `big_query_field`, `cloud_storage_file_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class LargeCustomDictionaryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Summary statistics of a custom dictionary. + # @!attribute [rw] approx_num_phrases + # @return [::Integer] + # Approximate number of distinct phrases in the dictionary. + class LargeCustomDictionaryStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for stored infoTypes. All fields and subfield are provided + # by the user. For more information, see + # https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the StoredInfoType (max 256 characters). + # @!attribute [rw] description + # @return [::String] + # Description of the StoredInfoType (max 256 characters). + # @!attribute [rw] large_custom_dictionary + # @return [::Google::Cloud::Dlp::V2::LargeCustomDictionaryConfig] + # StoredInfoType where findings are defined by a dictionary of phrases. + # + # Note: The following fields are mutually exclusive: `large_custom_dictionary`, `dictionary`, `regex`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dictionary + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] + # Store dictionary-based CustomInfoType. + # + # Note: The following fields are mutually exclusive: `dictionary`, `large_custom_dictionary`, `regex`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] + # Store regular expression-based StoredInfoType. + # + # Note: The following fields are mutually exclusive: `regex`, `large_custom_dictionary`, `dictionary`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StoredInfoTypeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Statistics for a StoredInfoType. + # @!attribute [rw] large_custom_dictionary + # @return [::Google::Cloud::Dlp::V2::LargeCustomDictionaryStats] + # StoredInfoType where findings are defined by a dictionary of phrases. + class StoredInfoTypeStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Version of a StoredInfoType, including the configuration used to build it, + # create timestamp, and current state. + # @!attribute [rw] config + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] + # StoredInfoType configuration. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Create timestamp of the version. Read-only, determined by the system + # when the version is created. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeState] + # Stored info type version state. Read-only, updated by the system + # during dictionary creation. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # Errors that occurred when creating this storedInfoType version, or + # anomalies detected in the storedInfoType data that render it unusable. Only + # the five most recent errors will be displayed, with the most recent error + # appearing first. + # + # For example, some of the data for stored custom dictionaries is put in + # the user's Cloud Storage bucket, and if this data is modified or + # deleted by the user or another system, the dictionary becomes invalid. + # + # If any errors occur, fix the problem indicated by the error message and + # use the UpdateStoredInfoType API method to create another version of the + # storedInfoType to continue using it, reusing the same `config` if it was + # not the source of the error. + # @!attribute [rw] stats + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeStats] + # Statistics about this storedInfoType version. + class StoredInfoTypeVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # StoredInfoType resource message that contains information about the current + # version and any pending updates. + # @!attribute [rw] name + # @return [::String] + # Resource name. + # @!attribute [rw] current_version + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeVersion] + # Current version of the stored info type. + # @!attribute [rw] pending_versions + # @return [::Array<::Google::Cloud::Dlp::V2::StoredInfoTypeVersion>] + # Pending versions of the stored info type. Empty if no versions are + # pending. + class StoredInfoType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateStoredInfoType. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + Organizations scope, location specified: + # `organizations/{org_id}/locations/{location_id}` + # + Organizations scope, no location specified (defaults to global): + # `organizations/{org_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] config + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] + # Required. Configuration of the storedInfoType to create. + # @!attribute [rw] stored_info_type_id + # @return [::String] + # The storedInfoType ID can contain uppercase and lowercase letters, + # numbers, and hyphens; that is, it must match the regular + # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + # characters. Can be empty to allow the system to generate one. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class CreateStoredInfoTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateStoredInfoType. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of organization and storedInfoType to be updated, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + # @!attribute [rw] config + # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] + # Updated configuration for the storedInfoType. If not provided, a new + # version of the storedInfoType will be created with the existing + # configuration. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask to control which fields get updated. + class UpdateStoredInfoTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetStoredInfoType. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and storedInfoType to be read, + # for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + class GetStoredInfoTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListStoredInfoTypes. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization) and whether you have [specified a processing + # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + # + # + Projects scope, location specified: + # `projects/{project_id}/locations/{location_id}` + # + Projects scope, no location specified (defaults to global): + # `projects/{project_id}` + # + # The following example `parent` string specifies a parent project with the + # identifier `example-project`, and specifies the `europe-west3` location + # for processing data: + # + # parent=projects/example-project/locations/europe-west3 + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. Comes from the previous call + # to `ListStoredInfoTypes`. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, + # followed by `asc` or `desc` postfix. This list is case insensitive. The + # default sorting order is ascending. Redundant space characters are + # insignificant. + # + # Example: `name asc, display_name, create_time desc` + # + # Supported fields are: + # + # - `create_time`: corresponds to the time the most recent version of the + # resource was created. + # - `state`: corresponds to the state of the resource. + # - `name`: corresponds to resource name. + # - `display_name`: corresponds to info type's display name. + # @!attribute [rw] location_id + # @return [::String] + # Deprecated. This field has no effect. + class ListStoredInfoTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListStoredInfoTypes. + # @!attribute [rw] stored_info_types + # @return [::Array<::Google::Cloud::Dlp::V2::StoredInfoType>] + # List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. + # @!attribute [rw] next_page_token + # @return [::String] + # If the next page is available then the next page token to be used + # in the following ListStoredInfoTypes request. + class ListStoredInfoTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteStoredInfoType. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the organization and storedInfoType to be + # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + # projects/project-id/storedInfoTypes/432452342. + class DeleteStoredInfoTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to search for potentially sensitive info in a custom location. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the trigger to execute a hybrid inspect on, for + # example `projects/dlp-test-project/jobTriggers/53234423`. + # @!attribute [rw] hybrid_item + # @return [::Google::Cloud::Dlp::V2::HybridContentItem] + # The item to inspect. + class HybridInspectJobTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to search for potentially sensitive info in a custom location. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the job to execute a hybrid inspect on, for + # example `projects/dlp-test-project/dlpJob/53234423`. + # @!attribute [rw] hybrid_item + # @return [::Google::Cloud::Dlp::V2::HybridContentItem] + # The item to inspect. + class HybridInspectDlpJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An individual hybrid item to inspect. Will be stored temporarily during + # processing. + # @!attribute [rw] item + # @return [::Google::Cloud::Dlp::V2::ContentItem] + # The item to inspect. + # @!attribute [rw] finding_details + # @return [::Google::Cloud::Dlp::V2::HybridFindingDetails] + # Supplementary information that will be added to each finding. + class HybridContentItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Populate to associate additional data with each finding. + # @!attribute [rw] container_details + # @return [::Google::Cloud::Dlp::V2::Container] + # Details about the container where the content being inspected is from. + # @!attribute [rw] file_offset + # @return [::Integer] + # Offset in bytes of the line, from the beginning of the file, where the + # finding is located. Populate if the item being scanned is only part of a + # bigger item, such as a shard of a file and you want to track the absolute + # position of the finding. + # @!attribute [rw] row_offset + # @return [::Integer] + # Offset of the row for tables. Populate if the row(s) being scanned are + # part of a bigger dataset and you want to keep track of their absolute + # position. + # @!attribute [rw] table_options + # @return [::Google::Cloud::Dlp::V2::TableOptions] + # If the container is a table, additional information to make findings + # meaningful such as the columns that are primary keys. If not known ahead + # of time, can also be set within each inspect hybrid call and the two + # will be merged. Note that identifying_fields will only be stored to + # BigQuery, and only if the BigQuery action has been included. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels to represent user provided metadata about the data being inspected. + # If configured by the job, some key values may be required. + # The labels associated with `Finding`'s produced by hybrid + # inspection. + # + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + # + # No more than 10 labels can be associated with a given finding. + # + # Examples: + # + # * `"environment" : "production"` + # * `"pipeline" : "etl"` + class HybridFindingDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Quota exceeded errors will be thrown once quota has been met. + class HybridInspectResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the relationship between bounding boxes for image findings. + # @!attribute [rw] encloses + # @return [::Google::Cloud::Dlp::V2::Encloses] + # The context finding's bounding box must fully contain the target + # finding's bounding box. + # + # Note: The following fields are mutually exclusive: `encloses`, `fully_inside`, `overlaps`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fully_inside + # @return [::Google::Cloud::Dlp::V2::FullyInside] + # The context finding's bounding box must be fully inside the target + # finding's bounding box. + # + # Note: The following fields are mutually exclusive: `fully_inside`, `encloses`, `overlaps`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] overlaps + # @return [::Google::Cloud::Dlp::V2::Overlap] + # The context finding's bounding box and the target finding's bounding box + # must have a non-zero intersection. + # + # Note: The following fields are mutually exclusive: `overlaps`, `encloses`, `fully_inside`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ImageContainmentType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a condition for overlapping bounding boxes. + class Overlap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a condition where one bounding box encloses another. + class Encloses + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a condition where one bounding box is fully inside another. + class FullyInside + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list the profiles generated for a given organization or project. + # @!attribute [rw] parent + # @return [::String] + # Required. organizations/\\{org_id}/locations/\\{loc_id} + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id` + # * `sensitivity_level desc` + # + # Supported fields: + # + # - `project_id`: Google Cloud project ID + # - `sensitivity_level`: How sensitive the data in a project is, at most + # - `data_risk_level`: How much risk is associated with this data + # - `profile_last_generated`: Date and time (in epoch seconds) the profile + # was last generated + # @!attribute [rw] filter + # @return [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: the Google Cloud project ID + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + class ListProjectDataProfilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of profiles generated for a given organization or project. + # @!attribute [rw] project_data_profiles + # @return [::Array<::Google::Cloud::Dlp::V2::ProjectDataProfile>] + # List of data profiles. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. + class ListProjectDataProfilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list the profiles generated for a given organization or project. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `row_count`: Number of rows in this resource. + # @!attribute [rw] filter + # @return [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `dataset_id`: The BigQuery dataset ID + # - `table_id`: The ID of the BigQuery table + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + class ListTableDataProfilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of profiles generated for a given organization or project. + # @!attribute [rw] table_data_profiles + # @return [::Array<::Google::Cloud::Dlp::V2::TableDataProfile>] + # List of data profiles. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. + class ListTableDataProfilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list the profiles generated for a given organization or project. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @!attribute [rw] page_token + # @return [::String] + # Page token to continue retrieval. + # @!attribute [rw] page_size + # @return [::Integer] + # Size of the page. This value can be limited by the server. If zero, server + # returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `table_id` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `dataset_id`: The ID of a BigQuery dataset. + # - `table_id`: The ID of a BigQuery table. + # - `sensitivity_level`: How sensitive the data in a column is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # @!attribute [rw] filter + # @return [::String] + # Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `table_data_profile_name`: The name of the related table data + # profile + # - `project_id`: The Google Cloud project ID (REQUIRED) + # - `dataset_id`: The BigQuery dataset ID (REQUIRED) + # - `table_id`: The BigQuery table ID (REQUIRED) + # - `field_id`: The ID of the BigQuery field + # - `info_type`: The infotype detected in the resource + # - `sensitivity_level`: HIGH|MEDIUM|LOW + # - `data_risk_level`: How much risk is associated with this data + # - `status_code`: An RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # * The operator must be `=` for project_id, dataset_id, and table_id. Other + # filters also support `!=`. The `profile_last_generated` filter also + # supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * project_id = 12345 AND status_code = 1 + # * project_id = 12345 AND sensitivity_level = HIGH + # * project_id = 12345 AND info_type = STREET_ADDRESS + # * profile_last_generated < "2025-01-01T00:00:00.000Z" + # + # The length of this field should be no more than 500 characters. + class ListColumnDataProfilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of profiles generated for a given organization or project. + # @!attribute [rw] column_data_profiles + # @return [::Array<::Google::Cloud::Dlp::V2::ColumnDataProfile>] + # List of data profiles. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. + class ListColumnDataProfilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Score is a summary of all elements in the data profile. + # A higher number means more risk. + # @!attribute [rw] score + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel::DataRiskLevelScore] + # The score applied to the resource. + class DataRiskLevel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Various score levels for resources. + module DataRiskLevelScore + # Unused. + RISK_SCORE_UNSPECIFIED = 0 + + # Low risk - Lower indication of sensitive data that appears to have + # additional access restrictions in place or no indication of sensitive + # data found. + RISK_LOW = 10 + + # Unable to determine risk. + RISK_UNKNOWN = 12 + + # Medium risk - Sensitive data may be present but additional access or fine + # grain access restrictions appear to be present. Consider limiting + # access even further or transform data to mask. + RISK_MODERATE = 20 + + # High risk – SPII may be present. Access controls may include public + # ACLs. Exfiltration of data may lead to user data loss. Re-identification + # of users may be possible. Consider limiting usage and or removing SPII. + RISK_HIGH = 30 + end + end + + # An aggregated profile for this project, based on the resources profiled + # within it. + # @!attribute [rw] name + # @return [::String] + # The resource name of the profile. + # @!attribute [rw] project_id + # @return [::String] + # Project ID or account that was profiled. + # @!attribute [rw] profile_last_generated + # @return [::Google::Protobuf::Timestamp] + # The last time the profile was generated. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The sensitivity score of this project. + # @!attribute [rw] data_risk_level + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] + # The data risk level of this project. + # @!attribute [rw] profile_status + # @return [::Google::Cloud::Dlp::V2::ProfileStatus] + # Success or error status of the last attempt to profile the project. + # @!attribute [rw] table_data_profile_count + # @return [::Integer] + # The number of table data profiles generated for this project. + # @!attribute [rw] file_store_data_profile_count + # @return [::Integer] + # The number of file store data profiles generated for this project. + class ProjectDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Snapshot of the configurations used to generate the profile. + # @!attribute [rw] inspect_config + # @return [::Google::Cloud::Dlp::V2::InspectConfig] + # A copy of the inspection config used to generate this profile. This + # is a copy of the inspect_template specified in `DataProfileJobConfig`. + # @!attribute [rw] data_profile_job + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Dlp::V2::DataProfileJobConfig] + # A copy of the configuration used to generate this profile. This is + # deprecated, and the DiscoveryConfig field is preferred moving forward. + # DataProfileJobConfig will still be written here for Discovery in BigQuery + # for backwards compatibility, but will not be updated with new fields, while + # DiscoveryConfig will. + # @!attribute [rw] discovery_config + # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] + # A copy of the configuration used to generate this profile. + # @!attribute [rw] inspect_template_name + # @return [::String] + # Name of the inspection template used to generate this profile + # @!attribute [rw] inspect_template_modified_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp when the template was modified + class DataProfileConfigSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile for a scanned table. + # @!attribute [rw] name + # @return [::String] + # The name of the profile. + # @!attribute [rw] data_source_type + # @return [::Google::Cloud::Dlp::V2::DataSourceType] + # The resource type that was profiled. + # @!attribute [rw] project_data_profile + # @return [::String] + # The resource name of the project data profile for this table. + # @!attribute [rw] dataset_project_id + # @return [::String] + # The Google Cloud project ID that owns the resource. + # @!attribute [rw] dataset_location + # @return [::String] + # If supported, the location where the dataset's data is stored. + # See https://cloud.google.com/bigquery/docs/locations for supported + # locations. + # @!attribute [rw] dataset_id + # @return [::String] + # If the resource is BigQuery, the dataset ID. + # @!attribute [rw] table_id + # @return [::String] + # The table ID. + # @!attribute [rw] full_resource + # @return [::String] + # The Cloud Asset Inventory resource that was profiled in order to generate + # this TableDataProfile. + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] profile_status + # @return [::Google::Cloud::Dlp::V2::ProfileStatus] + # Success or error status from the most recent profile generation attempt. + # May be empty if the profile is still being generated. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::TableDataProfile::State] + # State of a profile. This will always be set to DONE when the table data + # profile is written to another service like BigQuery or Pub/Sub. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The sensitivity score of this table. + # @!attribute [rw] data_risk_level + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] + # The data risk level of this table. + # @!attribute [rw] predicted_info_types + # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeSummary>] + # The infoTypes predicted from this table's data. + # @!attribute [rw] other_info_types + # @return [::Array<::Google::Cloud::Dlp::V2::OtherInfoTypeSummary>] + # Other infoTypes found in this table's data. + # @!attribute [rw] config_snapshot + # @return [::Google::Cloud::Dlp::V2::DataProfileConfigSnapshot] + # The snapshot of the configurations used to generate the profile. + # @!attribute [rw] last_modified_time + # @return [::Google::Protobuf::Timestamp] + # The time when this table was last modified + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when this table expires. + # @!attribute [rw] scanned_column_count + # @return [::Integer] + # The number of columns profiled in the table. + # @!attribute [rw] failed_column_count + # @return [::Integer] + # The number of columns skipped in the table because of an error. + # @!attribute [rw] table_size_bytes + # @return [::Integer] + # The size of the table when the profile was generated. + # @!attribute [rw] row_count + # @return [::Integer] + # Number of rows in the table when the profile was generated. + # This will not be populated for BigLake tables. + # @!attribute [rw] encryption_status + # @return [::Google::Cloud::Dlp::V2::EncryptionStatus] + # How the table is encrypted. + # @!attribute [rw] resource_visibility + # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] + # How broadly a resource has been shared. + # @!attribute [rw] profile_last_generated + # @return [::Google::Protobuf::Timestamp] + # The last time the profile was generated. + # @!attribute [rw] resource_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels applied to the resource at the time the profile was generated. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the table was created. + # @!attribute [rw] sample_findings_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # The BigQuery table to which the sample findings are written. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::Dlp::V2::Tag>] + # The tags attached to the table, including any tags attached during + # profiling. Because tags are attached to Cloud SQL instances rather than + # Cloud SQL tables, this field is empty for Cloud SQL table profiles. + # @!attribute [rw] related_resources + # @return [::Array<::Google::Cloud::Dlp::V2::RelatedResource>] + # Resources related to this profile. + # @!attribute [rw] domains + # @return [::Array<::Google::Cloud::Dlp::V2::Domain>] + # Domains associated with the profile. + class TableDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible states of a profile. New items may be added. + module State + # Unused. + STATE_UNSPECIFIED = 0 + + # The profile is currently running. Once a profile has finished it will + # transition to DONE. + RUNNING = 1 + + # The profile is no longer generating. + # If profile_status.status.code is 0, the profile succeeded, otherwise, it + # failed. + DONE = 2 + end + end + + # Success or errors for the profile generation. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Profiling status code and optional message. The `status.code` value is 0 + # (default value) for OK. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Time when the profile generation status was updated + class ProfileStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The infoType details for this column. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The infoType. + # @!attribute [rw] estimated_prevalence + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Not populated for predicted infotypes. + class InfoTypeSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Infotype details for other infoTypes found within a column. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The other infoType. + # @!attribute [rw] estimated_prevalence + # @return [::Integer] + # Approximate percentage of non-null rows that contained data detected by + # this infotype. + # @!attribute [rw] excluded_from_analysis + # @return [::Boolean] + # Whether this infoType was excluded from sensitivity and risk analysis due + # to factors such as low prevalence (subject to change). + class OtherInfoTypeSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile for a scanned column within a table. + # @!attribute [rw] name + # @return [::String] + # The name of the profile. + # @!attribute [rw] profile_status + # @return [::Google::Cloud::Dlp::V2::ProfileStatus] + # Success or error status from the most recent profile generation attempt. + # May be empty if the profile is still being generated. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::State] + # State of a profile. + # @!attribute [rw] profile_last_generated + # @return [::Google::Protobuf::Timestamp] + # The last time the profile was generated. + # @!attribute [rw] table_data_profile + # @return [::String] + # The resource name of the table data profile. + # @!attribute [rw] table_full_resource + # @return [::String] + # The resource name of the resource this column is within. + # @!attribute [rw] dataset_project_id + # @return [::String] + # The Google Cloud project ID that owns the profiled resource. + # @!attribute [rw] dataset_location + # @return [::String] + # If supported, the location where the dataset's data is stored. + # See https://cloud.google.com/bigquery/docs/locations for supported + # BigQuery locations. + # @!attribute [rw] dataset_id + # @return [::String] + # The BigQuery dataset ID, if the resource profiled is a BigQuery table. + # @!attribute [rw] table_id + # @return [::String] + # The table ID. + # @!attribute [rw] column + # @return [::String] + # The name of the column. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The sensitivity of this column. + # @!attribute [rw] data_risk_level + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] + # The data risk level for this column. + # @!attribute [rw] column_info_type + # @return [::Google::Cloud::Dlp::V2::InfoTypeSummary] + # If it's been determined this column can be identified as a single type, + # this will be set. Otherwise the column either has unidentifiable content + # or mixed types. + # @!attribute [rw] other_matches + # @return [::Array<::Google::Cloud::Dlp::V2::OtherInfoTypeSummary>] + # Other types found within this column. List will be unordered. + # @!attribute [rw] estimated_null_percentage + # @return [::Google::Cloud::Dlp::V2::NullPercentageLevel] + # Approximate percentage of entries being null in the column. + # @!attribute [rw] estimated_uniqueness_score + # @return [::Google::Cloud::Dlp::V2::UniquenessScoreLevel] + # Approximate uniqueness of the column. + # @!attribute [rw] free_text_score + # @return [::Float] + # The likelihood that this column contains free-form text. + # A value close to 1 may indicate the column is likely to contain + # free-form or natural language text. + # Range in 0-1. + # @!attribute [rw] column_type + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::ColumnDataType] + # The data type of a given column. + # @!attribute [rw] policy_state + # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::ColumnPolicyState] + # Indicates if a policy tag has been applied to the column. + class ColumnDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a profile. New items may be added. + module State + # Unused. + STATE_UNSPECIFIED = 0 + + # The profile is currently running. Once a profile has finished it will + # transition to DONE. + RUNNING = 1 + + # The profile is no longer generating. + # If profile_status.status.code is 0, the profile succeeded, otherwise, it + # failed. + DONE = 2 + end + + # Data types of the data in a column. Types may be added over time. + module ColumnDataType + # Invalid type. + COLUMN_DATA_TYPE_UNSPECIFIED = 0 + + # Encoded as a string in decimal format. + TYPE_INT64 = 1 + + # Encoded as a boolean "false" or "true". + TYPE_BOOL = 2 + + # Encoded as a number, or string "NaN", "Infinity" or "-Infinity". + TYPE_FLOAT64 = 3 + + # Encoded as a string value. + TYPE_STRING = 4 + + # Encoded as a base64 string per RFC 4648, section 4. + TYPE_BYTES = 5 + + # Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string: + # 1985-04-12T23:20:50.52Z + TYPE_TIMESTAMP = 6 + + # Encoded as RFC 3339 full-date format string: 1985-04-12 + TYPE_DATE = 7 + + # Encoded as RFC 3339 partial-time format string: 23:20:50.52 + TYPE_TIME = 8 + + # Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52 + TYPE_DATETIME = 9 + + # Encoded as WKT + TYPE_GEOGRAPHY = 10 + + # Encoded as a decimal string. + TYPE_NUMERIC = 11 + + # Container of ordered fields, each with a type and field name. + TYPE_RECORD = 12 + + # Decimal type. + TYPE_BIGNUMERIC = 13 + + # Json type. + TYPE_JSON = 14 + + # Interval type. + TYPE_INTERVAL = 15 + + # `Range` type. + TYPE_RANGE_DATE = 16 + + # `Range` type. + TYPE_RANGE_DATETIME = 17 + + # `Range` type. + TYPE_RANGE_TIMESTAMP = 18 + end + + # The possible policy states for a column. + module ColumnPolicyState + # No policy tags. + COLUMN_POLICY_STATE_UNSPECIFIED = 0 + + # Column has policy tag applied. + COLUMN_POLICY_TAGGED = 1 + end + end + + # The profile for a file store. + # + # * Cloud Storage: maps 1:1 with a bucket. + # * Amazon S3: maps 1:1 with a bucket. + # @!attribute [rw] name + # @return [::String] + # The name of the profile. + # @!attribute [rw] data_source_type + # @return [::Google::Cloud::Dlp::V2::DataSourceType] + # The resource type that was profiled. + # @!attribute [rw] project_data_profile + # @return [::String] + # The resource name of the project data profile for this file store. + # @!attribute [rw] project_id + # @return [::String] + # The Google Cloud project ID that owns the resource. + # For Amazon S3 buckets, this is the AWS Account Id. + # @!attribute [rw] file_store_location + # @return [::String] + # The location of the file store. + # + # * Cloud Storage: + # https://cloud.google.com/storage/docs/locations#available-locations + # * Amazon S3: + # https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints + # @!attribute [rw] data_storage_locations + # @return [::Array<::String>] + # For resources that have multiple storage locations, these are those + # regions. For Cloud Storage this is the list of regions chosen for + # dual-region storage. `file_store_location` will normally be the + # corresponding multi-region for the list of individual locations. The first + # region is always picked as the processing and storage location for the data + # profile. + # @!attribute [rw] location_type + # @return [::String] + # The location type of the file store (region, dual-region, multi-region, + # etc). If dual-region, expect data_storage_locations to be populated. + # @!attribute [rw] file_store_path + # @return [::String] + # The file store path. + # + # * Cloud Storage: `gs://{bucket}` + # * Amazon S3: `s3://{bucket}` + # * Vertex AI dataset: + # `projects/{project_number}/locations/{location}/datasets/{dataset_id}` + # @!attribute [rw] full_resource + # @return [::String] + # The resource name of the resource profiled. + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # + # Example format of an S3 bucket full resource name: + # `//cloudasset.googleapis.com/organizations/{org_id}/otherCloudConnections/aws/arn:aws:s3:::{bucket_name}` + # @!attribute [rw] config_snapshot + # @return [::Google::Cloud::Dlp::V2::DataProfileConfigSnapshot] + # The snapshot of the configurations used to generate the profile. + # @!attribute [rw] profile_status + # @return [::Google::Cloud::Dlp::V2::ProfileStatus] + # Success or error status from the most recent profile generation attempt. + # May be empty if the profile is still being generated. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile::State] + # State of a profile. + # @!attribute [rw] profile_last_generated + # @return [::Google::Protobuf::Timestamp] + # The last time the profile was generated. + # @!attribute [rw] resource_visibility + # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] + # How broadly a resource has been shared. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The sensitivity score of this resource. + # @!attribute [rw] data_risk_level + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] + # The data risk level of this resource. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the file store was first created. + # @!attribute [rw] last_modified_time + # @return [::Google::Protobuf::Timestamp] + # The time the file store was last modified. + # @!attribute [rw] file_cluster_summaries + # @return [::Array<::Google::Cloud::Dlp::V2::FileClusterSummary>] + # FileClusterSummary per each cluster. + # @!attribute [rw] resource_attributes + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dlp::V2::Value}] + # Attributes of the resource being profiled. + # Currently used attributes: + # + # * customer_managed_encryption: boolean + # - true: the resource is encrypted with a customer-managed key. + # - false: the resource is encrypted with a provider-managed key. + # @!attribute [rw] resource_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels applied to the resource at the time the profile was generated. + # @!attribute [rw] file_store_info_type_summaries + # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreInfoTypeSummary>] + # InfoTypes detected in this file store. + # @!attribute [rw] sample_findings_table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # The BigQuery table to which the sample findings are written. + # @!attribute [rw] file_store_is_empty + # @return [::Boolean] + # The file store does not have any files. If the profiling operation failed, + # this is false. + # @!attribute [rw] tags + # @return [::Array<::Google::Cloud::Dlp::V2::Tag>] + # The tags attached to the resource, including any tags attached during + # profiling. + # @!attribute [rw] related_resources + # @return [::Array<::Google::Cloud::Dlp::V2::RelatedResource>] + # Resources related to this profile. + # @!attribute [rw] domains + # @return [::Array<::Google::Cloud::Dlp::V2::Domain>] + # Domains associated with the profile. + class FileStoreDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dlp::V2::Value] + class ResourceAttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible states of a profile. New items may be added. + module State + # Unused. + STATE_UNSPECIFIED = 0 + + # The profile is currently running. Once a profile has finished it will + # transition to DONE. + RUNNING = 1 + + # The profile is no longer generating. + # If profile_status.status.code is 0, the profile succeeded, otherwise, it + # failed. + DONE = 2 + end + end + + # A tag associated with a resource. + # @!attribute [rw] namespaced_tag_value + # @return [::String] + # The namespaced name for the tag value to attach to Google Cloud resources. + # Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for + # example, "123456/environment/prod" for an organization parent, or + # "my-project/environment/prod" for a project parent. This is only set for + # Google Cloud resources. + # @!attribute [rw] key + # @return [::String] + # The key of a tag key-value pair. For Google Cloud resources, this is the + # resource name of the key, for example, "tagKeys/123456". + # @!attribute [rw] value + # @return [::String] + # The value of a tag key-value pair. For Google Cloud resources, this is the + # resource name of the value, for example, "tagValues/123456". + class Tag + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Tags to match against for filtering. + # @!attribute [rw] tag_filters + # @return [::Array<::Google::Cloud::Dlp::V2::TagFilter>] + # Required. A resource must match ALL of the specified tag filters to be + # included in the collection. + class TagFilters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single tag to filter against. + # @!attribute [rw] namespaced_tag_value + # @return [::String] + # The namespaced name for the tag value. Must be in the format + # `{parent_id}/{tag_key_short_name}/{short_name}`, for example, + # "123456/environment/prod" for an organization parent, or + # "my-project/environment/prod" for a project parent. + # + # Note: The following fields are mutually exclusive: `namespaced_tag_value`, `namespaced_tag_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] namespaced_tag_key + # @return [::String] + # The namespaced name for the tag key. Must be in the format + # `{parent_id}/{tag_key_short_name}`, for example, "123456/sensitive" for + # an organization parent, or "my-project/sensitive" for a project parent. + # + # Note: The following fields are mutually exclusive: `namespaced_tag_key`, `namespaced_tag_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TagFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A related resource. + # Examples: + # + # * The source BigQuery table for a Vertex AI dataset. + # * The source Cloud Storage bucket for a Vertex AI dataset. + # @!attribute [rw] full_resource + # @return [::String] + # The full resource name of the related resource. + class RelatedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding the discovered InfoType. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # The InfoType seen. + class FileStoreInfoTypeSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding the discovered file extension. + # @!attribute [rw] file_extension + # @return [::String] + # The file extension if set. (aka .pdf, .jpg, .txt) + class FileExtensionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The file cluster summary. + # @!attribute [rw] file_cluster_type + # @return [::Google::Cloud::Dlp::V2::FileClusterType] + # The file cluster type. + # @!attribute [rw] file_store_info_type_summaries + # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreInfoTypeSummary>] + # InfoTypes detected in this cluster. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # The sensitivity score of this cluster. The score will be SENSITIVITY_LOW + # if nothing has been scanned. + # @!attribute [rw] data_risk_level + # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] + # The data risk level of this cluster. RISK_LOW if nothing has been + # scanned. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # A list of errors detected while scanning this cluster. The list is + # truncated to 10 per cluster. + # @!attribute [rw] file_extensions_scanned + # @return [::Array<::Google::Cloud::Dlp::V2::FileExtensionInfo>] + # A sample of file types scanned in this cluster. Empty if no files were + # scanned. File extensions can be derived from the file name or the file + # content. + # @!attribute [rw] file_extensions_seen + # @return [::Array<::Google::Cloud::Dlp::V2::FileExtensionInfo>] + # A sample of file types seen in this cluster. Empty if no files were seen. + # File extensions can be derived from the file name or the file content. + # @!attribute [rw] no_files_exist + # @return [::Boolean] + # True if no files exist in this cluster. If the file store had more files + # than could be listed, this will be false even if no files for this cluster + # were seen and file_extensions_seen is empty. + class FileClusterSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a project data profile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/projectDataProfiles/53234423`. + class GetProjectDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a file store data profile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + class GetFileStoreDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list the file store profiles generated for a given organization or + # project. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the organization or project, for + # example `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token to continue retrieval. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Size of the page. This value can be limited by the server. If + # zero, server returns a page of max size 100. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Comma-separated list of fields to order by, followed by `asc` or + # `desc` postfix. This list is case insensitive. The default sorting order is + # ascending. Redundant space characters are insignificant. Only one order + # field at a time is allowed. + # + # Examples: + # + # * `project_id asc` + # * `name` + # * `sensitivity_level desc` + # + # Supported fields are: + # + # - `project_id`: The Google Cloud project ID. + # - `sensitivity_level`: How sensitive the data in a table is, at most. + # - `data_risk_level`: How much risk is associated with this data. + # - `profile_last_generated`: When the profile was last updated in epoch + # seconds. + # - `last_modified`: The last time the resource was modified. + # - `resource_visibility`: Visibility restriction for this resource. + # - `name`: The name of the profile. + # - `create_time`: The time the file store was first created. + # @!attribute [rw] filter + # @return [::String] + # Optional. Allows filtering. + # + # Supported syntax: + # + # * Filter expressions are made up of one or more restrictions. + # * Restrictions can be combined by `AND` or `OR` logical operators. A + # sequence of restrictions implicitly uses `AND`. + # * A restriction has the form of `{field} {operator} {value}`. + # * Supported fields: + # - `project_id`: The Google Cloud project ID + # - `account_id`: The AWS account ID + # - `file_store_path`: The path like "gs://bucket" + # - `data_source_type`: The profile's data source type, like + # "google/storage/bucket" + # - `data_storage_location`: The location where the file store's data is + # stored, like "us-central1" + # - `sensitivity_level`: HIGH|MODERATE|LOW + # - `data_risk_level`: HIGH|MODERATE|LOW + # - `resource_visibility`: PUBLIC|RESTRICTED + # - `status_code`: an RPC status code as defined in + # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + # - `profile_last_generated`: Date and time the profile was last + # generated + # + # * The operator must be `=` or `!=`. The `profile_last_generated` filter + # also supports `<` and `>`. + # + # The syntax is based on https://google.aip.dev/160. + # + # Examples: + # + # * `project_id = 12345 AND status_code = 1` + # * `project_id = 12345 AND sensitivity_level = HIGH` + # * `project_id = 12345 AND resource_visibility = PUBLIC` + # * `file_store_path = "gs://mybucket"` + # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + # + # The length of this field should be no more than 500 characters. + class ListFileStoreDataProfilesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of file store data profiles generated for a given organization or + # project. + # @!attribute [rw] file_store_data_profiles + # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] + # List of data profiles. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token. + class ListFileStoreDataProfilesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteFileStoreProfile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the file store data profile. + class DeleteFileStoreDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a table data profile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/tableDataProfiles/53234423`. + class GetTableDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a column data profile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name, for example + # `organizations/12345/locations/us/columnDataProfiles/53234423`. + class GetColumnDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A condition for determining whether a Pub/Sub should be triggered. + # @!attribute [rw] expressions + # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubExpressions] + # An expression. + class DataProfilePubSubCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A condition consisting of a value. + # @!attribute [rw] minimum_risk_score + # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::ProfileScoreBucket] + # The minimum data risk score that triggers the condition. + # + # Note: The following fields are mutually exclusive: `minimum_risk_score`, `minimum_sensitivity_score`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] minimum_sensitivity_score + # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::ProfileScoreBucket] + # The minimum sensitivity level that triggers the condition. + # + # Note: The following fields are mutually exclusive: `minimum_sensitivity_score`, `minimum_risk_score`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PubSubCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An expression, consisting of an operator and conditions. + # @!attribute [rw] logical_operator + # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubExpressions::PubSubLogicalOperator] + # The operator to apply to the collection of conditions. + # @!attribute [rw] conditions + # @return [::Array<::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubCondition>] + # Conditions to apply to the expression. + class PubSubExpressions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Logical operators for conditional checks. + module PubSubLogicalOperator + # Unused. + LOGICAL_OPERATOR_UNSPECIFIED = 0 + + # Conditional OR. + OR = 1 + + # Conditional AND. + AND = 2 + end + end + + # Various score levels for resources. + module ProfileScoreBucket + # Unused. + PROFILE_SCORE_BUCKET_UNSPECIFIED = 0 + + # High risk/sensitivity detected. + HIGH = 1 + + # Medium or high risk/sensitivity detected. + MEDIUM_OR_HIGH = 2 + end + end + + # Pub/Sub topic message for a DataProfileAction.PubSubNotification event. + # To receive a message of protocol buffer schema type, convert the message data + # to an object of this proto class. + # @!attribute [rw] profile + # @return [::Google::Cloud::Dlp::V2::TableDataProfile] + # If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. + # Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and + # `full_resource` will be populated. + # @!attribute [rw] file_store_profile + # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] + # If `DetailLevel` is `FILE_STORE_PROFILE` this will be fully populated. + # Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and + # `file_store_path` will be populated. + # @!attribute [rw] event + # @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType] + # The event that caused the Pub/Sub message to be sent. + class DataProfilePubSubMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateConnection. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # + # The format of this value varies depending on the scope of the request + # (project or organization): + # + # + Projects scope: + # `projects/{project_id}/locations/{location_id}` + # + Organizations scope: + # `organizations/{org_id}/locations/{location_id}` + # @!attribute [rw] connection + # @return [::Google::Cloud::Dlp::V2::Connection] + # Required. The connection resource. + class CreateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetConnection. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + class GetConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the organization or project, for + # example, `organizations/433245324/locations/europe` or + # `projects/project-id/locations/asia`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of results per page, max 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @!attribute [rw] filter + # @return [::String] + # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + class ListConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SearchConnections. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the organization or project with a wildcard + # location, for example, `organizations/433245324/locations/-` or + # `projects/project-id/locations/-`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of results per page, max 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token from a previous page to return the next set of + # results. If set, all other request fields must match the original request. + # @!attribute [rw] filter + # @return [::String] + # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + # + # The syntax is based on https://google.aip.dev/160. + class SearchConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListConnections. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::Dlp::V2::Connection>] + # List of connections. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. An empty value means there are + # no more results. + class ListConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SearchConnections. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::Dlp::V2::Connection>] + # List of connections that match the search query. Note that only a subset + # of the fields will be populated, and only "name" is guaranteed to be set. + # For full details of a Connection, call GetConnection with the name. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. An empty value means there are + # no more results. + class SearchConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateConnection. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + # @!attribute [rw] connection + # @return [::Google::Cloud::Dlp::V2::Connection] + # Required. The connection with new values for the relevant fields. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Mask to control which fields get updated. + class UpdateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteConnection. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the Connection to be deleted, in the format: + # `projects/{project}/locations/{location}/connections/{connection}`. + class DeleteConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A data connection to allow the DLP API to profile data in locations that + # require additional configuration. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the connection: + # `projects/{project}/locations/{location}/connections/{name}`. + # @!attribute [rw] state + # @return [::Google::Cloud::Dlp::V2::ConnectionState] + # Required. The connection's state in its lifecycle. + # @!attribute [r] errors + # @return [::Array<::Google::Cloud::Dlp::V2::Error>] + # Output only. Set if status == ERROR, to provide additional details. Will + # store the last 10 errors sorted with the most recent first. + # @!attribute [rw] cloud_sql + # @return [::Google::Cloud::Dlp::V2::CloudSqlProperties] + # Connect to a Cloud SQL instance. + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A credential consisting of a username and password, where the password is + # stored in a Secret Manager resource. + # Note: Secret Manager [charges + # apply](https://cloud.google.com/secret-manager/pricing). + # @!attribute [rw] username + # @return [::String] + # Required. The username. + # @!attribute [rw] password_secret_version_name + # @return [::String] + # Required. The name of the Secret Manager resource that stores the password, + # in the form `projects/project-id/secrets/secret-name/versions/version`. + class SecretManagerCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Use IAM authentication to connect. This requires the Cloud SQL IAM feature + # to be enabled on the instance, which is not the default for Cloud SQL. + # See https://cloud.google.com/sql/docs/postgres/authentication and + # https://cloud.google.com/sql/docs/mysql/authentication. + class CloudSqlIamCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud SQL connection properties. + # @!attribute [rw] connection_name + # @return [::String] + # Optional. Immutable. The Cloud SQL instance for which the connection is + # defined. Only one connection per instance is allowed. This can only be set + # at creation time, and cannot be updated. + # + # It is an error to use a connection_name from different project or region + # than the one that holds the connection. + # For example, a Connection resource for Cloud SQL connection_name + # `project-id:us-central1:sql-instance` + # must be created under the parent + # `projects/project-id/locations/us-central1` + # @!attribute [rw] username_password + # @return [::Google::Cloud::Dlp::V2::SecretManagerCredential] + # A username and password stored in Secret Manager. + # + # Note: The following fields are mutually exclusive: `username_password`, `cloud_sql_iam`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_sql_iam + # @return [::Google::Cloud::Dlp::V2::CloudSqlIamCredential] + # Built-in IAM authentication (must be configured in Cloud SQL). + # + # Note: The following fields are mutually exclusive: `cloud_sql_iam`, `username_password`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_connections + # @return [::Integer] + # Required. The DLP API will limit its connections to max_connections. + # Must be 2 or greater. + # @!attribute [rw] database_engine + # @return [::Google::Cloud::Dlp::V2::CloudSqlProperties::DatabaseEngine] + # Required. The database engine used by the Cloud SQL instance that this + # connection configures. + class CloudSqlProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Database engine of a Cloud SQL instance. + # New values may be added over time. + module DatabaseEngine + # An engine that is not currently supported by Sensitive Data Protection. + DATABASE_ENGINE_UNKNOWN = 0 + + # Cloud SQL for MySQL instance. + DATABASE_ENGINE_MYSQL = 1 + + # Cloud SQL for PostgreSQL instance. + DATABASE_ENGINE_POSTGRES = 2 + end + end + + # Request message for DeleteTableProfile. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the table data profile. + class DeleteTableDataProfileRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message used to identify the type of resource being profiled. + # @!attribute [rw] data_source + # @return [::String] + # A string that identifies the type of resource being profiled. + # Current values: + # + # * google/bigquery/table + # * google/project + # * google/sql/table + # * google/gcs/bucket + class DataSourceType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message used to identify file cluster type being profiled. + # @!attribute [rw] cluster + # @return [::Google::Cloud::Dlp::V2::FileClusterType::Cluster] + # Cluster type. + class FileClusterType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Cluster type. Each cluster corresponds to a set of file types. + # Over time, new types may be added and files may move between clusters. + module Cluster + # Unused. + CLUSTER_UNSPECIFIED = 0 + + # Unsupported files. + CLUSTER_UNKNOWN = 1 + + # Plain text. + CLUSTER_TEXT = 2 + + # Structured data like CSV, TSV etc. + CLUSTER_STRUCTURED_DATA = 3 + + # Source code. + CLUSTER_SOURCE_CODE = 4 + + # Rich document like docx, xlsx etc. + CLUSTER_RICH_DOCUMENT = 5 + + # Images like jpeg, bmp. + CLUSTER_IMAGE = 6 + + # Archives and containers like .zip, .tar etc. + CLUSTER_ARCHIVE = 7 + + # Multimedia like .mp4, .avi etc. + CLUSTER_MULTIMEDIA = 8 + + # Executable files like .exe, .class, .apk etc. + CLUSTER_EXECUTABLE = 9 + + # AI models like .tflite etc. + CLUSTER_AI_MODEL = 10 + end + end + + # Configure processing location for discovery and inspection. For example, + # image OCR is only provided in limited regions but configuring + # ProcessingLocation will redirect OCR to a location where OCR is provided. + # @!attribute [rw] image_fallback_location + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::ImageFallbackLocation] + # Image processing falls back using this configuration. + # @!attribute [rw] document_fallback_location + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::DocumentFallbackLocation] + # Document processing falls back using this configuration. + class ProcessingLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Processing occurs in a multi-region that contains the current region + # if available. + class MultiRegionProcessing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Processing occurs in the global region. + class GlobalProcessing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configure image processing to fall back to any of the following processing + # options if image processing is unavailable in the original request + # location. + # @!attribute [rw] multi_region_processing + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::MultiRegionProcessing] + # Processing occurs in a multi-region that contains the current region + # if available. + # @!attribute [rw] global_processing + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::GlobalProcessing] + # Processing occurs in the global region. + class ImageFallbackLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configure document processing to fall back to any of the following + # processing options if document processing is unavailable in the original + # request location. + # @!attribute [rw] multi_region_processing + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::MultiRegionProcessing] + # Processing occurs in a multi-region that contains the current region + # if available. + # @!attribute [rw] global_processing + # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::GlobalProcessing] + # Processing occurs in the global region. + class DocumentFallbackLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Collection of findings saved to a Cloud Storage bucket. This is used as the + # proto schema for textproto files created when specifying a cloud storage + # path to save Inspect findings. + # @!attribute [rw] findings + # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] + # List of findings. + class SaveToGcsFindingsOutput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A domain represents a thematic category that a data profile can fall under. + # @!attribute [rw] category + # @return [::Google::Cloud::Dlp::V2::Domain::Category] + # A domain category that this profile is related to. + # @!attribute [rw] signals + # @return [::Array<::Google::Cloud::Dlp::V2::Domain::Signal>] + # The collection of signals that influenced selection of the category. + class Domain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum defines the various domain categories a data profile can fall + # under. + module Category + # Category unspecified. + CATEGORY_UNSPECIFIED = 0 + + # Indicates that the data profile is related to artificial intelligence. + # When set, all findings stored to Security Command Center will set the + # corresponding AI domain field of `Finding` objects. + AI = 1 + + # Indicates that the data profile is related to code. + CODE = 2 + end + + # The signal used to determine the category. + # New values may be added in the future. + module Signal + # Unused. + SIGNAL_UNSPECIFIED = 0 + + # One or more machine learning models are present. + MODEL = 1 + + # A table appears to contain text embeddings. + TEXT_EMBEDDING = 2 + + # A table appears to contain embeddings of any type (for example, text, + # image, multimodal). The `TEXT_EMBEDDING` signal might also be present if + # the table contains text embeddings. + EMBEDDING = 7 + + # The [Cloud SQL Vertex + # AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) + # plugin is installed on the database. + VERTEX_PLUGIN = 3 + + # Support for [Cloud SQL vector + # embeddings](https://cloud.google.com/sql/docs/mysql/enable-vector-search) + # is enabled on the database. + VECTOR_PLUGIN = 4 + + # Source code is present. + SOURCE_CODE = 5 + + # If the service determines the category type. For example, Vertex AI + # assets would always have a `Category` of `AI`. + SERVICE = 6 + end + end + + # Enum of possible outcomes of transformations. SUCCESS if transformation and + # storing of transformation was successful, otherwise, reason for not + # transforming. + module TransformationResultStatusType + # Unused. + STATE_TYPE_UNSPECIFIED = 0 + + # This will be set when a finding could not be transformed (i.e. outside user + # set bucket range). + INVALID_TRANSFORM = 1 + + # This will be set when a BigQuery transformation was successful but could + # not be stored back in BigQuery because the transformed row exceeds + # BigQuery's max row size. + BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2 + + # This will be set when there is a finding in the custom metadata of a file, + # but at the write time of the transformed file, this key / value pair is + # unretrievable. + METADATA_UNRETRIEVABLE = 3 + + # This will be set when the transformation and storing of it is successful. + SUCCESS = 4 + end + + # Describes functionality of a given container in its original format. + module TransformationContainerType + # Unused. + TRANSFORM_UNKNOWN_CONTAINER = 0 + + # Body of a file. + TRANSFORM_BODY = 1 + + # Metadata for a file. + TRANSFORM_METADATA = 2 + + # A table. + TRANSFORM_TABLE = 3 + end + + # An enum of rules that can be used to transform a value. Can be a + # record suppression, or one of the transformation rules specified under + # `PrimitiveTransformation`. + module TransformationType + # Unused + TRANSFORMATION_TYPE_UNSPECIFIED = 0 + + # Record suppression + RECORD_SUPPRESSION = 1 + + # Replace value + REPLACE_VALUE = 2 + + # Replace value using a dictionary. + REPLACE_DICTIONARY = 15 + + # Redact + REDACT = 3 + + # Character mask + CHARACTER_MASK = 4 + + # FFX-FPE + CRYPTO_REPLACE_FFX_FPE = 5 + + # Fixed size bucketing + FIXED_SIZE_BUCKETING = 6 + + # Bucketing + BUCKETING = 7 + + # Replace with info type + REPLACE_WITH_INFO_TYPE = 8 + + # Time part + TIME_PART = 9 + + # Crypto hash + CRYPTO_HASH = 10 + + # Date shift + DATE_SHIFT = 12 + + # Deterministic crypto + CRYPTO_DETERMINISTIC_CONFIG = 13 + + # Redact image + REDACT_IMAGE = 14 + end + + # Whether a profile being created is the first generation or an update. + module ProfileGeneration + # Unused. + PROFILE_GENERATION_UNSPECIFIED = 0 + + # The profile is the first profile for the resource. + PROFILE_GENERATION_NEW = 1 + + # The profile is an update to a previous profile. + PROFILE_GENERATION_UPDATE = 2 + end + + # Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and + # non-BigLake external tables are not supported. + module BigQueryTableTypeCollection + # Unused. + BIG_QUERY_COLLECTION_UNSPECIFIED = 0 + + # Automatically generate profiles for all tables, even if the table type is + # not yet fully supported for analysis. Profiles for unsupported tables will + # be generated with errors to indicate their partial support. When full + # support is added, the tables will automatically be profiled during the next + # scheduled run. + BIG_QUERY_COLLECTION_ALL_TYPES = 1 + + # Only those types fully supported will be profiled. Will expand + # automatically as Cloud DLP adds support for new table types. Unsupported + # table types will not have partial profiles generated. + BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES = 2 + end + + # Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and + # non-BigLake external tables are not supported. + module BigQueryTableType + # Unused. + BIG_QUERY_TABLE_TYPE_UNSPECIFIED = 0 + + # A normal BigQuery table. + BIG_QUERY_TABLE_TYPE_TABLE = 1 + + # A table that references data stored in Cloud Storage. + BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE = 2 + + # A snapshot of a BigQuery table. + BIG_QUERY_TABLE_TYPE_SNAPSHOT = 3 + end + + # How frequently data profiles can be updated. New options can be added at a + # later time. + module DataProfileUpdateFrequency + # Unspecified. + UPDATE_FREQUENCY_UNSPECIFIED = 0 + + # After the data profile is created, it will never be updated. + UPDATE_FREQUENCY_NEVER = 1 + + # The data profile can be updated up to once every 24 hours. + UPDATE_FREQUENCY_DAILY = 2 + + # The data profile can be updated up to once every 30 days. Default. + UPDATE_FREQUENCY_MONTHLY = 4 + end + + # Attributes evaluated to determine if a table has been modified. New values + # may be added at a later time. + module BigQueryTableModification + # Unused. + TABLE_MODIFICATION_UNSPECIFIED = 0 + + # A table will be considered modified when the last_modified_time from + # BigQuery has been updated. + TABLE_MODIFIED_TIMESTAMP = 1 + end + + # Attributes evaluated to determine if a schema has been modified. New values + # may be added at a later time. + module BigQuerySchemaModification + # Unused + SCHEMA_MODIFICATION_UNSPECIFIED = 0 + + # Profiles should be regenerated when new columns are added to the table. + # Default. + SCHEMA_NEW_COLUMNS = 1 + + # Profiles should be regenerated when columns are removed from the table. + SCHEMA_REMOVED_COLUMNS = 2 + end + + # Operators available for comparing the value of fields. + module RelationalOperator + # Unused + RELATIONAL_OPERATOR_UNSPECIFIED = 0 + + # Equal. Attempts to match even with incompatible types. + EQUAL_TO = 1 + + # Not equal to. Attempts to match even with incompatible types. + NOT_EQUAL_TO = 2 + + # Greater than. + GREATER_THAN = 3 + + # Less than. + LESS_THAN = 4 + + # Greater than or equals. + GREATER_THAN_OR_EQUALS = 5 + + # Less than or equals. + LESS_THAN_OR_EQUALS = 6 + + # Exists + EXISTS = 7 + end + + # Type of the match which can be applied to different ways of matching, like + # Dictionary, regular expression and intersecting with findings of another + # infoType. + module MatchingType + # Invalid. + MATCHING_TYPE_UNSPECIFIED = 0 + + # Full match. + # + # - Dictionary: join of Dictionary results matched the complete finding quote + # - Regex: all regex matches fill a finding quote from start to end + # - Exclude infoType: completely inside affecting infoTypes findings + MATCHING_TYPE_FULL_MATCH = 1 + + # Partial match. + # + # - Dictionary: at least one of the tokens in the finding matches + # - Regex: substring of the finding matches + # - Exclude infoType: intersects with affecting infoTypes findings + MATCHING_TYPE_PARTIAL_MATCH = 2 + + # Inverse match. + # + # - Dictionary: no tokens in the finding match the dictionary + # - Regex: finding doesn't match the regex + # - Exclude infoType: no intersection with affecting infoTypes findings + MATCHING_TYPE_INVERSE_MATCH = 3 + + # Rule-specific match. + # + # The matching logic is based on the specific rule being used. This is + # required for rules where the matching behavior is not a simple string + # comparison (e.g., image containment). This matching type can only be + # used with the `ExcludeByImageFindings` rule. + # + # - Exclude by image findings: The matching logic is defined within + # `ExcludeByImageFindings` based on spatial relationships between bounding + # boxes. + MATCHING_TYPE_RULE_SPECIFIC = 4 + end + + # Deprecated and unused. + module ContentOption + # Includes entire content of a file or a data stream. + CONTENT_UNSPECIFIED = 0 + + # Text content within the data, excluding any metadata. + CONTENT_TEXT = 1 + + # Images found in the data. + CONTENT_IMAGE = 2 + end + + # Type of metadata containing the finding. + module MetadataType + # Unused + METADATATYPE_UNSPECIFIED = 0 + + # General file metadata provided by Cloud Storage. + STORAGE_METADATA = 2 + + # Metadata extracted from the files. + CONTENT_METADATA = 3 + + # Metadata provided by the client. + CLIENT_PROVIDED_METADATA = 4 + end + + # Parts of the APIs which use certain infoTypes. + module InfoTypeSupportedBy + # Unused. + ENUM_TYPE_UNSPECIFIED = 0 + + # Supported by the inspect operations. + INSPECT = 1 + + # Supported by the risk analysis operations. + RISK_ANALYSIS = 2 + end + + # An enum to represent the various types of DLP jobs. + module DlpJobType + # Defaults to INSPECT_JOB. + DLP_JOB_TYPE_UNSPECIFIED = 0 + + # The job inspected Google Cloud for sensitive data. + INSPECT_JOB = 1 + + # The job executed a Risk Analysis computation. + RISK_ANALYSIS_JOB = 2 + end + + # State of a StoredInfoType version. + module StoredInfoTypeState + # Unused + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0 + + # StoredInfoType version is being created. + PENDING = 1 + + # StoredInfoType version is ready for use. + READY = 2 + + # StoredInfoType creation failed. All relevant error messages are returned in + # the `StoredInfoTypeVersion` message. + FAILED = 3 + + # StoredInfoType is no longer valid because artifacts stored in + # user-controlled storage were modified. To fix an invalid StoredInfoType, + # use the `UpdateStoredInfoType` method to create a new version. + INVALID = 4 + end + + # How broadly the data in the resource has been shared. New items may be added + # over time. A higher number means more restricted. + module ResourceVisibility + # Unused. + RESOURCE_VISIBILITY_UNSPECIFIED = 0 + + # Visible to any user. + RESOURCE_VISIBILITY_PUBLIC = 10 + + # May contain public items. + # For example, if a Cloud Storage bucket has uniform bucket level access + # disabled, some objects inside it may be public, but none are known yet. + RESOURCE_VISIBILITY_INCONCLUSIVE = 15 + + # Visible only to specific users. + RESOURCE_VISIBILITY_RESTRICTED = 20 + end + + # How a resource is encrypted. + module EncryptionStatus + # Unused. + ENCRYPTION_STATUS_UNSPECIFIED = 0 + + # Google manages server-side encryption keys on your behalf. + ENCRYPTION_GOOGLE_MANAGED = 1 + + # Customer provides the key. + ENCRYPTION_CUSTOMER_MANAGED = 2 + end + + # Bucketized nullness percentage levels. A higher level means a higher + # percentage of the column is null. + module NullPercentageLevel + # Unused. + NULL_PERCENTAGE_LEVEL_UNSPECIFIED = 0 + + # Very few null entries. + NULL_PERCENTAGE_VERY_LOW = 1 + + # Some null entries. + NULL_PERCENTAGE_LOW = 2 + + # A few null entries. + NULL_PERCENTAGE_MEDIUM = 3 + + # A lot of null entries. + NULL_PERCENTAGE_HIGH = 4 + end + + # Bucketized uniqueness score levels. A higher uniqueness score is a strong + # signal that the column may contain a unique identifier like user id. A low + # value indicates that the column contains few unique values like booleans or + # other classifiers. + module UniquenessScoreLevel + # Some columns do not have estimated uniqueness. Possible reasons include + # having too few values. + UNIQUENESS_SCORE_LEVEL_UNSPECIFIED = 0 + + # Low uniqueness, possibly a boolean, enum or similiarly typed column. + UNIQUENESS_SCORE_LOW = 1 + + # Medium uniqueness. + UNIQUENESS_SCORE_MEDIUM = 2 + + # High uniqueness, possibly a column of free text or unique identifiers. + UNIQUENESS_SCORE_HIGH = 3 + end + + # State of the connection. + # New values may be added over time. + module ConnectionState + # Unused + CONNECTION_STATE_UNSPECIFIED = 0 + + # The DLP API automatically created this connection during an initial scan, + # and it is awaiting full configuration by a user. + MISSING_CREDENTIALS = 1 + + # A configured connection that has not encountered any errors. + AVAILABLE = 2 + + # A configured connection that encountered errors during its last use. It + # will not be used again until it is set to AVAILABLE. + # + # If the resolution requires external action, then the client must send a + # request to set the status to AVAILABLE when the connection is ready for + # use. If the resolution doesn't require external action, then any changes to + # the connection properties will automatically mark it as AVAILABLE. + ERROR = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb new file mode 100644 index 000000000000..8120b766540f --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb @@ -0,0 +1,1047 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dlp + module V2 + # Type of information detected by the API. + # @!attribute [rw] name + # @return [::String] + # Name of the information type. Either a name of your choosing when + # creating a CustomInfoType, or one of the names listed + # at + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # when specifying a built-in type. When sending Cloud DLP results to Data + # Catalog, infoType names should conform to the pattern + # `[A-Za-z0-9$_-]{1,64}`. + # @!attribute [rw] version + # @return [::String] + # Optional version name for this InfoType. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # Optional custom sensitivity for this InfoType. + # This only applies to data profiling. + class InfoType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Score is calculated from of all elements in the data profile. + # A higher level means the data is more sensitive. + # @!attribute [rw] score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore::SensitivityScoreLevel] + # The sensitivity score applied to the resource. + class SensitivityScore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Various sensitivity score levels for resources. + module SensitivityScoreLevel + # Unused. + SENSITIVITY_SCORE_UNSPECIFIED = 0 + + # No sensitive information detected. The resource isn't publicly + # accessible. + SENSITIVITY_LOW = 10 + + # Unable to determine sensitivity. + SENSITIVITY_UNKNOWN = 12 + + # Medium risk. Contains personally identifiable information (PII), + # potentially sensitive data, or fields with free-text data that are at a + # higher risk of having intermittent sensitive data. Consider limiting + # access. + SENSITIVITY_MODERATE = 20 + + # High risk. Sensitive personally identifiable information (SPII) can be + # present. Exfiltration of data can lead to user data loss. + # Re-identification of users might be possible. Consider limiting usage and + # or removing SPII. + SENSITIVITY_HIGH = 30 + end + end + + # A reference to a StoredInfoType to use with scanning. + # @!attribute [rw] name + # @return [::String] + # Resource name of the requested `StoredInfoType`, for example + # `organizations/433245324/storedInfoTypes/432452342` or + # `projects/project-id/storedInfoTypes/432452342`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp indicating when the version of the `StoredInfoType` used for + # inspection was created. Output-only field, populated by the system. + class StoredType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom information type provided by the user. Used to find domain-specific + # sensitive information configurable to the data in question. + # @!attribute [rw] info_type + # @return [::Google::Cloud::Dlp::V2::InfoType] + # CustomInfoType can either be a new infoType, or an extension of built-in + # infoType, when the name matches one of existing infoTypes and that infoType + # is specified in `InspectContent.info_types` field. Specifying the latter + # adds findings to the one detected by the system. If built-in info type is + # not specified in `InspectContent.info_types` list then the name is treated + # as a custom info type. + # @!attribute [rw] likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Likelihood to return for this CustomInfoType. This base value can be + # altered by a detection rule if the finding meets the criteria specified by + # the rule. Defaults to `VERY_LIKELY` if not specified. + # @!attribute [rw] dictionary + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] + # A list of phrases to detect as a CustomInfoType. + # + # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] + # Regular expression based CustomInfoType. + # + # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] surrogate_type + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::SurrogateType] + # Message for detecting output from deidentification transformations that + # support reversing. + # + # Note: The following fields are mutually exclusive: `surrogate_type`, `dictionary`, `regex`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] stored_type + # @return [::Google::Cloud::Dlp::V2::StoredType] + # Loads an existing `StoredInfoType` resource. + # + # Note: The following fields are mutually exclusive: `stored_type`, `dictionary`, `regex`, `surrogate_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metadata_key_value_expression + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::MetadataKeyValueExpression] + # Key-value pair to detect in the metadata. + # + # Note: The following fields are mutually exclusive: `metadata_key_value_expression`, `dictionary`, `regex`, `surrogate_type`, `stored_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] detection_rules + # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule>] + # Set of detection rules to apply to all findings of this CustomInfoType. + # Rules are applied in the order that they are specified. Only supported + # for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. + # @!attribute [rw] exclusion_type + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::ExclusionType] + # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding + # to be returned. It still can be used for rules matching. Only supported + # for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::Dlp::V2::SensitivityScore] + # Sensitivity for this CustomInfoType. If this CustomInfoType extends an + # existing InfoType, the sensitivity here will take precedence over that of + # the original InfoType. If unset for a CustomInfoType, it will default to + # HIGH. + # This only applies to data profiling. + class CustomInfoType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Custom information type based on a dictionary of words or phrases. This can + # be used to match sensitive information specific to the data, such as a list + # of employee IDs or job titles. + # + # Dictionary words are case-insensitive and all characters other than letters + # and digits in the unicode [Basic Multilingual + # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) + # will be replaced with whitespace when scanning for matches, so the + # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", + # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters + # surrounding any match must be of a different type than the adjacent + # characters within the word, so letters must be next to non-letters and + # digits next to non-digits. For example, the dictionary word "jen" will + # match the first three letters of the text "jen123" but will return no + # matches for "jennifer". + # + # Dictionary words containing a large number of characters that are not + # letters or digits may result in unexpected findings because such characters + # are treated as whitespace. The + # [limits](https://cloud.google.com/sensitive-data-protection/limits) page + # contains details about the size limits of dictionaries. For dictionaries + # that do not fit within these constraints, consider using + # `LargeCustomDictionaryConfig` in the `StoredInfoType` API. + # @!attribute [rw] word_list + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList] + # List of words or phrases to search for. + # + # Note: The following fields are mutually exclusive: `word_list`, `cloud_storage_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_storage_path + # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] + # Newline-delimited file of words in Cloud Storage. Only a single file + # is accepted. + # + # Note: The following fields are mutually exclusive: `cloud_storage_path`, `word_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Dictionary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message defining a list of words or phrases to search for in the data. + # @!attribute [rw] words + # @return [::Array<::String>] + # Words or phrases defining the dictionary. The dictionary must contain + # at least one phrase and every phrase must contain at least 2 characters + # that are letters or digits. [required] + class WordList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message defining a custom regular expression. + # @!attribute [rw] pattern + # @return [::String] + # Pattern defining the regular expression. Its syntax + # (https://github.com/google/re2/wiki/Syntax) can be found under the + # google/re2 repository on GitHub. + # @!attribute [rw] group_indexes + # @return [::Array<::Integer>] + # The index of the submatch to extract as findings. When not + # specified, the entire match is returned. No more than 3 may be included. + class Regex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for detecting output from deidentification transformations + # such as + # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). + # These types of transformations are + # those that perform pseudonymization, thereby producing a "surrogate" as + # output. This should be used in conjunction with a field on the + # transformation such as `surrogate_info_type`. This CustomInfoType does + # not support the use of `detection_rules`. + class SurrogateType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a custom infoType that detects key-value pairs in the + # metadata matching the specified regular expressions. + # @!attribute [rw] key_regex + # @return [::String] + # The regular expression for the key. Key should be + # non-empty. + # @!attribute [rw] value_regex + # @return [::String] + # The regular expression for the value. Value should be non-empty. + class MetadataKeyValueExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a + # `CustomInfoType` to alter behavior under certain circumstances, depending + # on the specific details of the rule. Not supported for the `surrogate_type` + # custom infoType. + # @!attribute [rw] hotword_rule + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule] + # Hotword-based detection rule. + class DetectionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message for specifying a window around a finding to apply a detection + # rule. + # @!attribute [rw] window_before + # @return [::Integer] + # Number of characters before the finding to consider. For tabular data, + # if you want to modify the likelihood of an entire column of findngs, + # set this to 1. For more information, see + # [Hotword example: Set the match likelihood of a table column] + # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). + # @!attribute [rw] window_after + # @return [::Integer] + # Number of characters after the finding to consider. + class Proximity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for specifying an adjustment to the likelihood of a finding as + # part of a detection rule. + # @!attribute [rw] fixed_likelihood + # @return [::Google::Cloud::Dlp::V2::Likelihood] + # Set the likelihood of a finding to a fixed value. + # + # Note: The following fields are mutually exclusive: `fixed_likelihood`, `relative_likelihood`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_likelihood + # @return [::Integer] + # Increase or decrease the likelihood by the specified number of + # levels. For example, if a finding would be `POSSIBLE` without the + # detection rule and `relative_likelihood` is 1, then it is upgraded to + # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. + # Likelihood may never drop below `VERY_UNLIKELY` or exceed + # `VERY_LIKELY`, so applying an adjustment of 1 followed by an + # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in + # a final likelihood of `LIKELY`. + # + # Note: The following fields are mutually exclusive: `relative_likelihood`, `fixed_likelihood`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class LikelihoodAdjustment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rule that adjusts the likelihood of findings within a certain + # proximity of hotwords. + # @!attribute [rw] hotword_regex + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] + # Regular expression pattern defining what qualifies as a hotword. + # @!attribute [rw] proximity + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity] + # Range of characters within which the entire hotword must reside. + # The total length of the window cannot exceed 1000 characters. + # The finding itself will be included in the window, so that hotwords can + # be used to match substrings of the finding itself. Suppose you + # want Cloud DLP to promote the likelihood of the phone number + # regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the + # area code of a company's office. In this case, use the hotword regex + # "\(xxx\)", where "xxx" is the area code in question. + # + # For tabular data, if you want to modify the likelihood of an entire + # column of findngs, see + # [Hotword example: Set the match likelihood of a table column] + # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). + # @!attribute [rw] likelihood_adjustment + # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment] + # Likelihood adjustment to apply to all matching findings. + class HotwordRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Type of exclusion rule. + module ExclusionType + # A finding of this custom info type will not be excluded from results. + EXCLUSION_TYPE_UNSPECIFIED = 0 + + # A finding of this custom info type will be excluded from final results, + # but can still affect rule execution. + EXCLUSION_TYPE_EXCLUDE = 1 + end + end + + # General identifier of a data field in a storage service. + # @!attribute [rw] name + # @return [::String] + # Name describing the field. + class FieldId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Datastore partition ID. + # A partition ID identifies a grouping of entities. The grouping is always + # by project and namespace, however the namespace ID may be empty. + # + # A partition ID contains several dimensions: + # project ID and namespace ID. + # @!attribute [rw] project_id + # @return [::String] + # The ID of the project to which the entities belong. + # @!attribute [rw] namespace_id + # @return [::String] + # If not empty, the ID of the namespace to which the entities belong. + class PartitionId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of a Datastore kind. + # @!attribute [rw] name + # @return [::String] + # The name of the kind. + class KindExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options defining a data set within Google Cloud Datastore. + # @!attribute [rw] partition_id + # @return [::Google::Cloud::Dlp::V2::PartitionId] + # A partition ID identifies a grouping of entities. The grouping is always + # by project and namespace, however the namespace ID may be empty. + # @!attribute [rw] kind + # @return [::Google::Cloud::Dlp::V2::KindExpression] + # The kind to process. + class DatastoreOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a set of files in a Cloud Storage bucket. Regular + # expressions are used to allow fine-grained control over which files in the + # bucket to include. + # + # Included files are those that match at least one item in `include_regex` and + # do not match any items in `exclude_regex`. Note that a file that matches + # items from both lists will _not_ be included. For a match to occur, the + # entire file path (i.e., everything in the url after the bucket name) must + # match the regular expression. + # + # For example, given the input `{bucket_name: "mybucket", include_regex: + # ["directory1/.*"], exclude_regex: + # ["directory1/excluded.*"]}`: + # + # * `gs://mybucket/directory1/myfile` will be included + # * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches + # across `/`) + # * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the + # full path doesn't match any items in `include_regex`) + # * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path + # matches an item in `exclude_regex`) + # + # If `include_regex` is left empty, it will match all files by default + # (this is equivalent to setting `include_regex: [".*"]`). + # + # Some other common use cases: + # + # * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all + # files in `mybucket` except for .pdf files + # * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will + # include all files directly under `gs://mybucket/directory/`, without matching + # across `/` + # @!attribute [rw] bucket_name + # @return [::String] + # The name of a Cloud Storage bucket. Required. + # @!attribute [rw] include_regex + # @return [::Array<::String>] + # A list of regular expressions matching file paths to include. All files in + # the bucket that match at least one of these regular expressions will be + # included in the set of files, except for those that also match an item in + # `exclude_regex`. Leaving this field empty will match all files by default + # (this is equivalent to including `.*` in the list). + # + # Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + # @!attribute [rw] exclude_regex + # @return [::Array<::String>] + # A list of regular expressions matching file paths to exclude. All files in + # the bucket that match at least one of these regular expressions will be + # excluded from the scan. + # + # Regular expressions use RE2 + # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + # under the google/re2 repository on GitHub. + class CloudStorageRegexFileSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options defining a file or a set of files within a Cloud Storage + # bucket. + # @!attribute [rw] file_set + # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions::FileSet] + # The set of one or more files to scan. + # @!attribute [rw] bytes_limit_per_file + # @return [::Integer] + # Max number of bytes to scan from a file. If a scanned file's size is bigger + # than this value then the rest of the bytes are omitted. Only one of + # `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified. + # This field can't be set if de-identification is requested. For certain file + # types, setting this field has no effect. For more information, see [Limits + # on bytes scanned per + # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). + # @!attribute [rw] bytes_limit_per_file_percent + # @return [::Integer] + # Max percentage of bytes to scan from a file. The rest are omitted. The + # number of bytes scanned is rounded down. Must be between 0 and 100, + # inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of + # bytes_limit_per_file and bytes_limit_per_file_percent can be specified. + # This field can't be set if de-identification is requested. For certain file + # types, setting this field has no effect. For more information, see [Limits + # on bytes scanned per + # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). + # @!attribute [rw] file_types + # @return [::Array<::Google::Cloud::Dlp::V2::FileType>] + # List of file type groups to include in the scan. + # If empty, all files are scanned and available data format processors + # are applied. In addition, the binary content of the selected files + # is always scanned as well. + # Images are scanned only as binary if the specified region + # does not support image inspection and no file_types were specified. + # Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. + # @!attribute [rw] sample_method + # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions::SampleMethod] + # How to sample the data. + # @!attribute [rw] files_limit_percent + # @return [::Integer] + # Limits the number of files to scan to this percentage of the input FileSet. + # Number of files scanned is rounded down. Must be between 0 and 100, + # inclusively. Both 0 and 100 means no limit. Defaults to 0. + class CloudStorageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Set of files to scan. + # @!attribute [rw] url + # @return [::String] + # The Cloud Storage url of the file(s) to scan, in the format + # `gs:///`. Trailing wildcard in the path is allowed. + # + # If the url ends in a trailing slash, the bucket or directory represented + # by the url will be scanned non-recursively (content in sub-directories + # will not be scanned). This means that `gs://mybucket/` is equivalent to + # `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to + # `gs://mybucket/directory/*`. + # + # Exactly one of `url` or `regex_file_set` must be set. + # @!attribute [rw] regex_file_set + # @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet] + # The regex-filtered set of files to scan. Exactly one of `url` or + # `regex_file_set` must be set. + class FileSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How to sample bytes if not all bytes are scanned. Meaningful only when used + # in conjunction with bytes_limit_per_file. If not specified, scanning would + # start from the top. + module SampleMethod + # No sampling. + SAMPLE_METHOD_UNSPECIFIED = 0 + + # Scan from the top (default). + TOP = 1 + + # For each file larger than bytes_limit_per_file, randomly pick the offset + # to start scanning. The scanned bytes are contiguous. + RANDOM_START = 2 + end + end + + # Message representing a set of files in Cloud Storage. + # @!attribute [rw] url + # @return [::String] + # The url, in the format `gs:///`. Trailing wildcard in the + # path is allowed. + class CloudStorageFileSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a single file or path in Cloud Storage. + # @!attribute [rw] path + # @return [::String] + # A URL representing a file or path (no wildcards) in Cloud Storage. + # Example: `gs://[BUCKET_NAME]/dictionary.txt` + class CloudStoragePath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options defining BigQuery table and row identifiers. + # @!attribute [rw] table_reference + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Complete BigQuery table reference. + # @!attribute [rw] identifying_fields + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Table fields that may uniquely identify a row within the table. When + # `actions.saveFindings.outputConfig.table` is specified, the values of + # columns specified here are available in the output table under + # `location.content_locations.record_location.record_key.id_values`. Nested + # fields such as `person.birthdate.year` are allowed. + # @!attribute [rw] rows_limit + # @return [::Integer] + # Max number of rows to scan. If the table has more rows than this value, the + # rest of the rows are omitted. If not set, or if set to 0, all rows will be + # scanned. Only one of rows_limit and rows_limit_percent can be specified. + # Cannot be used in conjunction with TimespanConfig. + # @!attribute [rw] rows_limit_percent + # @return [::Integer] + # Max percentage of rows to scan. The rest are omitted. The number of rows + # scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and + # 100 means no limit. Defaults to 0. Only one of rows_limit and + # rows_limit_percent can be specified. Cannot be used in conjunction with + # TimespanConfig. + # + # Caution: A [known + # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) + # is causing the `rowsLimitPercent` field to behave unexpectedly. We + # recommend using `rowsLimit` instead. + # @!attribute [rw] sample_method + # @return [::Google::Cloud::Dlp::V2::BigQueryOptions::SampleMethod] + # How to sample the data. + # @!attribute [rw] excluded_fields + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # References to fields excluded from scanning. This allows you to skip + # inspection of entire columns which you know have no findings. + # When inspecting a table, we recommend that you inspect all columns. + # Otherwise, findings might be affected because hints from excluded columns + # will not be used. + # @!attribute [rw] included_fields + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # Limit scanning only to these fields. + # When inspecting a table, we recommend that you inspect all columns. + # Otherwise, findings might be affected because hints from excluded columns + # will not be used. + class BigQueryOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How to sample rows if not all rows are scanned. Meaningful only when used + # in conjunction with either rows_limit or rows_limit_percent. If not + # specified, rows are scanned in the order BigQuery reads them. + module SampleMethod + # No sampling. + SAMPLE_METHOD_UNSPECIFIED = 0 + + # Scan groups of rows in the order BigQuery provides (default). Multiple + # groups of rows may be scanned in parallel, so results may not appear in + # the same order the rows are read. + TOP = 1 + + # Randomly pick groups of rows to scan. + RANDOM_START = 2 + end + end + + # Shared message indicating Cloud storage type. + # @!attribute [rw] datastore_options + # @return [::Google::Cloud::Dlp::V2::DatastoreOptions] + # Google Cloud Datastore options. + # + # Note: The following fields are mutually exclusive: `datastore_options`, `cloud_storage_options`, `big_query_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_storage_options + # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions] + # Cloud Storage options. + # + # Note: The following fields are mutually exclusive: `cloud_storage_options`, `datastore_options`, `big_query_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] big_query_options + # @return [::Google::Cloud::Dlp::V2::BigQueryOptions] + # BigQuery options. + # + # Note: The following fields are mutually exclusive: `big_query_options`, `datastore_options`, `cloud_storage_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hybrid_options + # @return [::Google::Cloud::Dlp::V2::HybridOptions] + # Hybrid inspection options. + # + # Note: The following fields are mutually exclusive: `hybrid_options`, `datastore_options`, `cloud_storage_options`, `big_query_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timespan_config + # @return [::Google::Cloud::Dlp::V2::StorageConfig::TimespanConfig] + # Configuration of the timespan of the items to include in scanning. + class StorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of the timespan of the items to include in scanning. + # Currently only supported when inspecting Cloud Storage and BigQuery. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Exclude files, tables, or rows older than this value. + # If not set, no lower time limit is applied. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Exclude files, tables, or rows newer than this value. + # If not set, no upper time limit is applied. + # @!attribute [rw] timestamp_field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Specification of the field containing the timestamp of scanned items. + # Used for data sources like Datastore and BigQuery. + # + # **For BigQuery** + # + # If this value is not specified and the table was modified between the + # given start and end times, the entire table will be scanned. If this + # value is specified, then rows are filtered based on the given start and + # end times. Rows with a `NULL` value in the provided BigQuery column are + # skipped. + # Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, + # `TIMESTAMP`, and `DATETIME`. + # + # If your BigQuery table is [partitioned at ingestion + # time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + # you can use any of the following pseudo-columns as your timestamp field. + # When used with Cloud DLP, these pseudo-column names are case sensitive. + # + # - `_PARTITIONTIME` + # - `_PARTITIONDATE` + # - `_PARTITION_LOAD_TIME` + # + # **For Datastore** + # + # If this value is specified, then entities are filtered based on the given + # start and end times. If an entity does not contain the provided timestamp + # property or contains empty or invalid values, then it is included. + # Valid data types of the provided timestamp property are: `TIMESTAMP`. + # + # See the + # [known + # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) + # related to this operation. + # @!attribute [rw] enable_auto_population_of_timespan_config + # @return [::Boolean] + # When the job is started by a JobTrigger we will automatically figure out + # a valid start_time to avoid scanning files that have not been modified + # since the last time the JobTrigger executed. This will be based on the + # time of the execution of the last run of the JobTrigger or the timespan + # end_time used in the last run of the JobTrigger. + # + # **For BigQuery** + # + # Inspect jobs triggered by automatic population will scan data that is at + # least three hours old when the job starts. This is because streaming + # buffer rows are not read during inspection and reading up to the current + # timestamp will result in skipped rows. + # + # See the [known + # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data) + # related to this operation. + class TimespanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration to control jobs where the content being inspected is outside + # of Google Cloud Platform. + # @!attribute [rw] description + # @return [::String] + # A short description of where the data is coming from. Will be stored once + # in the job. 256 max length. + # @!attribute [rw] required_finding_label_keys + # @return [::Array<::String>] + # These are labels that each inspection request must include within their + # 'finding_labels' map. Request may contain others, but any missing one of + # these will be rejected. + # + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # + # No more than 10 keys can be required. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # To organize findings, these labels will be added to each finding. + # + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + # + # No more than 10 labels can be associated with a given finding. + # + # Examples: + # + # * `"environment" : "production"` + # * `"pipeline" : "etl"` + # @!attribute [rw] table_options + # @return [::Google::Cloud::Dlp::V2::TableOptions] + # If the container is a table, additional information to make findings + # meaningful such as the columns that are primary keys. + class HybridOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Row key for identifying a record in BigQuery table. + # @!attribute [rw] table_reference + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Complete BigQuery table reference. + # @!attribute [rw] row_number + # @return [::Integer] + # Row number inferred at the time the table was scanned. This value is + # nondeterministic, cannot be queried, and may be null for inspection + # jobs. To locate findings within a table, specify + # `inspect_job.storage_config.big_query_options.identifying_fields` in + # `CreateDlpJobRequest`. + class BigQueryKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Record key for a finding in Cloud Datastore. + # @!attribute [rw] entity_key + # @return [::Google::Cloud::Dlp::V2::Key] + # Datastore entity key. + class DatastoreKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A unique identifier for a Datastore entity. + # If a key's partition ID or any of its path kinds or names are + # reserved/read-only, the key is reserved/read-only. + # A reserved/read-only key is forbidden in certain documented contexts. + # @!attribute [rw] partition_id + # @return [::Google::Cloud::Dlp::V2::PartitionId] + # Entities are partitioned into subsets, currently identified by a project + # ID and namespace ID. + # Queries are scoped to a single partition. + # @!attribute [rw] path + # @return [::Array<::Google::Cloud::Dlp::V2::Key::PathElement>] + # The entity path. + # An entity path consists of one or more elements composed of a kind and a + # string or numerical identifier, which identify entities. The first + # element identifies a _root entity_, the second element identifies + # a _child_ of the root entity, the third element identifies a child of the + # second entity, and so forth. The entities identified by all prefixes of + # the path are called the element's _ancestors_. + # + # A path can never be empty, and a path can have at most 100 elements. + class Key + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A (kind, ID/name) pair used to construct a key path. + # + # If either name or ID is set, the element is complete. + # If neither is set, the element is incomplete. + # @!attribute [rw] kind + # @return [::String] + # The kind of the entity. + # A kind matching regex `__.*__` is reserved/read-only. + # A kind must not contain more than 1500 bytes when UTF-8 encoded. + # Cannot be `""`. + # @!attribute [rw] id + # @return [::Integer] + # The auto-allocated ID of the entity. + # Never equal to zero. Values less than zero are discouraged and may not + # be supported in the future. + # + # Note: The following fields are mutually exclusive: `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # The name of the entity. + # A name matching regex `__.*__` is reserved/read-only. + # A name must not be more than 1500 bytes when UTF-8 encoded. + # Cannot be `""`. + # + # Note: The following fields are mutually exclusive: `name`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PathElement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for a unique key indicating a record that contains a finding. + # @!attribute [rw] datastore_key + # @return [::Google::Cloud::Dlp::V2::DatastoreKey] + # BigQuery key + # + # Note: The following fields are mutually exclusive: `datastore_key`, `big_query_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] big_query_key + # @return [::Google::Cloud::Dlp::V2::BigQueryKey] + # Datastore key + # + # Note: The following fields are mutually exclusive: `big_query_key`, `datastore_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id_values + # @return [::Array<::String>] + # Values of identifying columns in the given row. Order of values matches + # the order of `identifying_fields` specified in the scanning request. + class RecordKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message defining the location of a BigQuery table. A table is uniquely + # identified by its project_id, dataset_id, and table_name. Within a query + # a table is often referenced with a string in the format of: + # `:.` or + # `..`. + # @!attribute [rw] project_id + # @return [::String] + # The Google Cloud project ID of the project containing the table. + # If omitted, project ID is inferred from the API call. + # @!attribute [rw] dataset_id + # @return [::String] + # Dataset ID of the table. + # @!attribute [rw] table_id + # @return [::String] + # Name of the table. + class BigQueryTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message defining the location of a BigQuery table with the projectId inferred + # from the parent project. + # @!attribute [rw] dataset_id + # @return [::String] + # Dataset ID of the table. + # @!attribute [rw] table_id + # @return [::String] + # Name of the table. + # @!attribute [rw] project_id + # @return [::String] + # The Google Cloud project ID of the project containing the table. + # If omitted, the project ID is inferred from the parent project. This field + # is required if the parent resource is an organization. + class TableReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message defining a field of a BigQuery table. + # @!attribute [rw] table + # @return [::Google::Cloud::Dlp::V2::BigQueryTable] + # Source table of the field. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Designated field in the BigQuery table. + class BigQueryField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entity in a dataset is a field or set of fields that correspond to a + # single person. For example, in medical records the `EntityId` might be a + # patient identifier, or for financial records it might be an account + # identifier. This message is used when generalizations or analysis must take + # into account that multiple rows correspond to the same entity. + # @!attribute [rw] field + # @return [::Google::Cloud::Dlp::V2::FieldId] + # Composite key indicating which field contains the entity identifier. + class EntityId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Instructions regarding the table content being inspected. + # @!attribute [rw] identifying_fields + # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] + # The columns that are the primary keys for table objects included in + # ContentItem. A copy of this cell's value will stored alongside alongside + # each finding so that the finding can be traced to the specific row it came + # from. No more than 3 may be provided. + class TableOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Coarse-grained confidence level of how well a particular finding + # satisfies the criteria to match a particular infoType. + # + # Likelihood is calculated based on the number of signals a + # finding has that implies that the finding matches the infoType. For + # example, a string that has an '@' and a '.com' is more likely to be a + # match for an email address than a string that only has an '@'. + # + # In general, the highest likelihood level has the strongest signals that + # indicate a match. That is, a finding with a high likelihood has a low chance + # of being a false positive. + # + # For more information about each likelihood level + # and how likelihood works, see [Match + # likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). + module Likelihood + # Default value; same as POSSIBLE. + LIKELIHOOD_UNSPECIFIED = 0 + + # Highest chance of a false positive. + VERY_UNLIKELY = 1 + + # High chance of a false positive. + UNLIKELY = 2 + + # Some matching signals. The default value. + POSSIBLE = 3 + + # Low chance of a false positive. + LIKELY = 4 + + # Confidence level is high. Lowest chance of a false positive. + VERY_LIKELY = 5 + end + + # Definitions of file type groups to scan. New types will be added to this + # list. + module FileType + # Includes all files. + FILE_TYPE_UNSPECIFIED = 0 + + # Includes all file extensions not covered by another entry. Binary + # scanning attempts to convert the content of the file to utf_8 to scan + # the file. + # If you wish to avoid this fall back, specify one or more of the other + # file types in your storage scan. + BINARY_FILE = 1 + + # Included file extensions: + # asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, + # dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, + # mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, + # properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, + # shtml, shtm, xhtml, lhs, ics, ini, java, js, json, jsonl, kix, kml, + # ocaml, md, txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, + # yml, yaml. + TEXT_FILE = 2 + + # Included file extensions: + # bmp, gif, jpg, jpeg, jpe, png. Setting + # {::Google::Cloud::Dlp::V2::CloudStorageOptions#bytes_limit_per_file bytes_limit_per_file} + # or + # {::Google::Cloud::Dlp::V2::CloudStorageOptions#bytes_limit_per_file bytes_limit_per_file_percent} + # has no effect on image files. Image inspection is restricted to the + # `global`, `us`, `asia`, and `europe` regions. + IMAGE = 3 + + # Microsoft Word files larger than 30 MB will be scanned as binary files. + # Included file extensions: + # docx, dotx, docm, dotm. Setting `bytes_limit_per_file` or + # `bytes_limit_per_file_percent` has no effect on Word files. + WORD = 5 + + # PDF files larger than 30 MB will be scanned as binary files. + # Included file extensions: + # pdf. Setting `bytes_limit_per_file` or `bytes_limit_per_file_percent` + # has no effect on PDF files. + PDF = 6 + + # Included file extensions: + # avro + AVRO = 7 + + # Included file extensions: + # csv + CSV = 8 + + # Included file extensions: + # tsv + TSV = 9 + + # Microsoft PowerPoint files larger than 30 MB will be scanned as binary + # files. Included file extensions: + # pptx, pptm, potx, potm, pot. Setting `bytes_limit_per_file` or + # `bytes_limit_per_file_percent` has no effect on PowerPoint files. + POWERPOINT = 11 + + # Microsoft Excel files larger than 30 MB will be scanned as binary files. + # Included file extensions: + # xlsx, xlsm, xltx, xltm. Setting `bytes_limit_per_file` or + # `bytes_limit_per_file_percent` has no effect on Excel files. + EXCEL = 12 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..7de2b93f3556 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values. + # * A month and day, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * {::Google::Type::TimeOfDay google.type.TimeOfDay} + # * [google.type.DateTime][google.type.DateTime] + # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..e59ba755b43a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are {::Google::Type::Date google.type.Date} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of a day in 24 hour format. Must be greater than or equal to 0 and + # typically must be less than or equal to 23. An API may choose to allow the + # value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of an hour. Must be greater than or equal to 0 and less than or + # equal to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of a minute. Must be greater than or equal to 0 and typically must + # be less than or equal to 59. An API may allow the value 60 if it allows + # leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 + # and less than or equal to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile new file mode 100644 index 000000000000..bd1f42b5f28e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-dlp-v2", path: "../" +else + gem "google-cloud-dlp-v2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb new file mode 100644 index 000000000000..2692dec794bd --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ActivateJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the activate_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger. +# +def activate_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new + + # Call the activate_job_trigger method. + result = client.activate_job_trigger request + + # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + p result +end +# [END dlp_v2_generated_DlpService_ActivateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb new file mode 100644 index 000000000000..8be1e65384e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CancelDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the cancel_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job. +# +def cancel_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new + + # Call the cancel_dlp_job method. + result = client.cancel_dlp_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_CancelDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb new file mode 100644 index 000000000000..73ba06dd0cc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateConnection_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_connection call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_connection. +# +def create_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new + + # Call the create_connection method. + result = client.create_connection request + + # The returned object is of type Google::Cloud::Dlp::V2::Connection. + p result +end +# [END dlp_v2_generated_DlpService_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb new file mode 100644 index 000000000000..75aff544d5d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_deidentify_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template. +# +def create_deidentify_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new + + # Call the create_deidentify_template method. + result = client.create_deidentify_template request + + # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + p result +end +# [END dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb new file mode 100644 index 000000000000..f078dc705ce4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_discovery_config call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config. +# +def create_discovery_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new + + # Call the create_discovery_config method. + result = client.create_discovery_config request + + # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + p result +end +# [END dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb new file mode 100644 index 000000000000..3e0525b876ab --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job. +# +def create_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new + + # Call the create_dlp_job method. + result = client.create_dlp_job request + + # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + p result +end +# [END dlp_v2_generated_DlpService_CreateDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb new file mode 100644 index 000000000000..4856fb08e07d --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateInspectTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_inspect_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template. +# +def create_inspect_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new + + # Call the create_inspect_template method. + result = client.create_inspect_template request + + # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + p result +end +# [END dlp_v2_generated_DlpService_CreateInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb new file mode 100644 index 000000000000..0800a195a632 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger. +# +def create_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new + + # Call the create_job_trigger method. + result = client.create_job_trigger request + + # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + p result +end +# [END dlp_v2_generated_DlpService_CreateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb new file mode 100644 index 000000000000..ea9521915d0c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_CreateStoredInfoType_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the create_stored_info_type call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type. +# +def create_stored_info_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new + + # Call the create_stored_info_type method. + result = client.create_stored_info_type request + + # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + p result +end +# [END dlp_v2_generated_DlpService_CreateStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb new file mode 100644 index 000000000000..9b97dd7a447c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeidentifyContent_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the deidentify_content call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content. +# +def deidentify_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new + + # Call the deidentify_content method. + result = client.deidentify_content request + + # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. + p result +end +# [END dlp_v2_generated_DlpService_DeidentifyContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb new file mode 100644 index 000000000000..0cad49395d7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteConnection_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_connection call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_connection. +# +def delete_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new + + # Call the delete_connection method. + result = client.delete_connection request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb new file mode 100644 index 000000000000..6ab8eba2977b --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_deidentify_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template. +# +def delete_deidentify_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new + + # Call the delete_deidentify_template method. + result = client.delete_deidentify_template request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb new file mode 100644 index 000000000000..dcc3b3e28568 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_discovery_config call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config. +# +def delete_discovery_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new + + # Call the delete_discovery_config method. + result = client.delete_discovery_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb new file mode 100644 index 000000000000..1d049fb6a72e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job. +# +def delete_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new + + # Call the delete_dlp_job method. + result = client.delete_dlp_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb new file mode 100644 index 000000000000..8e9aaf210e92 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_file_store_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile. +# +def delete_file_store_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new + + # Call the delete_file_store_data_profile method. + result = client.delete_file_store_data_profile request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb new file mode 100644 index 000000000000..8f2cbfd05b3e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_inspect_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template. +# +def delete_inspect_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new + + # Call the delete_inspect_template method. + result = client.delete_inspect_template request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb new file mode 100644 index 000000000000..72b26189767f --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger. +# +def delete_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new + + # Call the delete_job_trigger method. + result = client.delete_job_trigger request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb new file mode 100644 index 000000000000..5a558ef94d89 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_stored_info_type call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type. +# +def delete_stored_info_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new + + # Call the delete_stored_info_type method. + result = client.delete_stored_info_type request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb new file mode 100644 index 000000000000..832880d44397 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_DeleteTableDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the delete_table_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile. +# +def delete_table_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new + + # Call the delete_table_data_profile method. + result = client.delete_table_data_profile request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_DeleteTableDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb new file mode 100644 index 000000000000..17484a7d9f1f --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_FinishDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the finish_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job. +# +def finish_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new + + # Call the finish_dlp_job method. + result = client.finish_dlp_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dlp_v2_generated_DlpService_FinishDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb new file mode 100644 index 000000000000..4e9c58b96e2e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetColumnDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_column_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile. +# +def get_column_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new + + # Call the get_column_data_profile method. + result = client.get_column_data_profile request + + # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. + p result +end +# [END dlp_v2_generated_DlpService_GetColumnDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb new file mode 100644 index 000000000000..79434735c48e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetConnection_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_connection call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_connection. +# +def get_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetConnectionRequest.new + + # Call the get_connection method. + result = client.get_connection request + + # The returned object is of type Google::Cloud::Dlp::V2::Connection. + p result +end +# [END dlp_v2_generated_DlpService_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb new file mode 100644 index 000000000000..b3f654a73543 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_deidentify_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template. +# +def get_deidentify_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new + + # Call the get_deidentify_template method. + result = client.get_deidentify_template request + + # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + p result +end +# [END dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb new file mode 100644 index 000000000000..21fdd04b0f01 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetDiscoveryConfig_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_discovery_config call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config. +# +def get_discovery_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new + + # Call the get_discovery_config method. + result = client.get_discovery_config request + + # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + p result +end +# [END dlp_v2_generated_DlpService_GetDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb new file mode 100644 index 000000000000..ce7e98999fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job. +# +def get_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new + + # Call the get_dlp_job method. + result = client.get_dlp_job request + + # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. + p result +end +# [END dlp_v2_generated_DlpService_GetDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb new file mode 100644 index 000000000000..95de62c509e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_file_store_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile. +# +def get_file_store_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new + + # Call the get_file_store_data_profile method. + result = client.get_file_store_data_profile request + + # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. + p result +end +# [END dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb new file mode 100644 index 000000000000..5bbd10c8c46c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetInspectTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_inspect_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template. +# +def get_inspect_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new + + # Call the get_inspect_template method. + result = client.get_inspect_template request + + # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + p result +end +# [END dlp_v2_generated_DlpService_GetInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb new file mode 100644 index 000000000000..c1118339ad67 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger. +# +def get_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new + + # Call the get_job_trigger method. + result = client.get_job_trigger request + + # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + p result +end +# [END dlp_v2_generated_DlpService_GetJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb new file mode 100644 index 000000000000..a05dedb75e84 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetProjectDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_project_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile. +# +def get_project_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new + + # Call the get_project_data_profile method. + result = client.get_project_data_profile request + + # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. + p result +end +# [END dlp_v2_generated_DlpService_GetProjectDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb new file mode 100644 index 000000000000..546ada73e8f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetStoredInfoType_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_stored_info_type call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type. +# +def get_stored_info_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new + + # Call the get_stored_info_type method. + result = client.get_stored_info_type request + + # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + p result +end +# [END dlp_v2_generated_DlpService_GetStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb new file mode 100644 index 000000000000..6f41463e955e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_GetTableDataProfile_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the get_table_data_profile call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile. +# +def get_table_data_profile + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new + + # Call the get_table_data_profile method. + result = client.get_table_data_profile request + + # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. + p result +end +# [END dlp_v2_generated_DlpService_GetTableDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb new file mode 100644 index 000000000000..8b9a334e084e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the hybrid_inspect_dlp_job call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job. +# +def hybrid_inspect_dlp_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new + + # Call the hybrid_inspect_dlp_job method. + result = client.hybrid_inspect_dlp_job request + + # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + p result +end +# [END dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb new file mode 100644 index 000000000000..4c6f60064a05 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the hybrid_inspect_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger. +# +def hybrid_inspect_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new + + # Call the hybrid_inspect_job_trigger method. + result = client.hybrid_inspect_job_trigger request + + # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. + p result +end +# [END dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb new file mode 100644 index 000000000000..7ac975280cf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_InspectContent_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the inspect_content call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#inspect_content. +# +def inspect_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::InspectContentRequest.new + + # Call the inspect_content method. + result = client.inspect_content request + + # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. + p result +end +# [END dlp_v2_generated_DlpService_InspectContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb new file mode 100644 index 000000000000..637bd65e246a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListColumnDataProfiles_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_column_data_profiles call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles. +# +def list_column_data_profiles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new + + # Call the list_column_data_profiles method. + result = client.list_column_data_profiles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. + p item + end +end +# [END dlp_v2_generated_DlpService_ListColumnDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb new file mode 100644 index 000000000000..a34c00ba3328 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListConnections_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_connections call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_connections. +# +def list_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new + + # Call the list_connections method. + result = client.list_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + p item + end +end +# [END dlp_v2_generated_DlpService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb new file mode 100644 index 000000000000..c017f821fb6a --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_deidentify_templates call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates. +# +def list_deidentify_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new + + # Call the list_deidentify_templates method. + result = client.list_deidentify_templates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. + p item + end +end +# [END dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb new file mode 100644 index 000000000000..1a372d54c8b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_discovery_configs call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs. +# +def list_discovery_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new + + # Call the list_discovery_configs method. + result = client.list_discovery_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. + p item + end +end +# [END dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb new file mode 100644 index 000000000000..fd785e93e367 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListDlpJobs_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_dlp_jobs call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs. +# +def list_dlp_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new + + # Call the list_dlp_jobs method. + result = client.list_dlp_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. + p item + end +end +# [END dlp_v2_generated_DlpService_ListDlpJobs_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb new file mode 100644 index 000000000000..aa5a8526fba6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_file_store_data_profiles call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles. +# +def list_file_store_data_profiles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new + + # Call the list_file_store_data_profiles method. + result = client.list_file_store_data_profiles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. + p item + end +end +# [END dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb new file mode 100644 index 000000000000..b0c6d42efe6e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListInfoTypes_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_info_types call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_info_types. +# +def list_info_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new + + # Call the list_info_types method. + result = client.list_info_types request + + # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. + p result +end +# [END dlp_v2_generated_DlpService_ListInfoTypes_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb new file mode 100644 index 000000000000..2be75a31f47b --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListInspectTemplates_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_inspect_templates call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates. +# +def list_inspect_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new + + # Call the list_inspect_templates method. + result = client.list_inspect_templates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. + p item + end +end +# [END dlp_v2_generated_DlpService_ListInspectTemplates_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb new file mode 100644 index 000000000000..5ebbce52ee34 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListJobTriggers_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_job_triggers call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers. +# +def list_job_triggers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new + + # Call the list_job_triggers method. + result = client.list_job_triggers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. + p item + end +end +# [END dlp_v2_generated_DlpService_ListJobTriggers_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb new file mode 100644 index 000000000000..58f447296c52 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListProjectDataProfiles_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_project_data_profiles call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles. +# +def list_project_data_profiles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new + + # Call the list_project_data_profiles method. + result = client.list_project_data_profiles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. + p item + end +end +# [END dlp_v2_generated_DlpService_ListProjectDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb new file mode 100644 index 000000000000..6eda6d1cdf95 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_stored_info_types call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types. +# +def list_stored_info_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new + + # Call the list_stored_info_types method. + result = client.list_stored_info_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. + p item + end +end +# [END dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb new file mode 100644 index 000000000000..4739158df40e --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ListTableDataProfiles_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the list_table_data_profiles call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles. +# +def list_table_data_profiles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new + + # Call the list_table_data_profiles method. + result = client.list_table_data_profiles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. + p item + end +end +# [END dlp_v2_generated_DlpService_ListTableDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb new file mode 100644 index 000000000000..5e3f17a73fab --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_RedactImage_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the redact_image call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#redact_image. +# +def redact_image + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::RedactImageRequest.new + + # Call the redact_image method. + result = client.redact_image request + + # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. + p result +end +# [END dlp_v2_generated_DlpService_RedactImage_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb new file mode 100644 index 000000000000..c2f066a9a83f --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_ReidentifyContent_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the reidentify_content call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content. +# +def reidentify_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new + + # Call the reidentify_content method. + result = client.reidentify_content request + + # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. + p result +end +# [END dlp_v2_generated_DlpService_ReidentifyContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb new file mode 100644 index 000000000000..cd3861f3f87c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_SearchConnections_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the search_connections call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#search_connections. +# +def search_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new + + # Call the search_connections method. + result = client.search_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dlp::V2::Connection. + p item + end +end +# [END dlp_v2_generated_DlpService_SearchConnections_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb new file mode 100644 index 000000000000..2813c373cf69 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateConnection_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_connection call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_connection. +# +def update_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new + + # Call the update_connection method. + result = client.update_connection request + + # The returned object is of type Google::Cloud::Dlp::V2::Connection. + p result +end +# [END dlp_v2_generated_DlpService_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb new file mode 100644 index 000000000000..d2b58b4a427c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_deidentify_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template. +# +def update_deidentify_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new + + # Call the update_deidentify_template method. + result = client.update_deidentify_template request + + # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. + p result +end +# [END dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb new file mode 100644 index 000000000000..deec072ba831 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_discovery_config call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config. +# +def update_discovery_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new + + # Call the update_discovery_config method. + result = client.update_discovery_config request + + # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. + p result +end +# [END dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb new file mode 100644 index 000000000000..76ba6abd45b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_inspect_template call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template. +# +def update_inspect_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new + + # Call the update_inspect_template method. + result = client.update_inspect_template request + + # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. + p result +end +# [END dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb new file mode 100644 index 000000000000..031f02e5aca2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateJobTrigger_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_job_trigger call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger. +# +def update_job_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new + + # Call the update_job_trigger method. + result = client.update_job_trigger request + + # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. + p result +end +# [END dlp_v2_generated_DlpService_UpdateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb new file mode 100644 index 000000000000..393fa91feb1f --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] +require "google/cloud/dlp/v2" + +## +# Snippet for the update_stored_info_type call in the DlpService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type. +# +def update_stored_info_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dlp::V2::DlpService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new + + # Call the update_stored_info_type method. + result = client.update_stored_info_type request + + # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. + p result +end +# [END dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json b/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json new file mode 100644 index 000000000000..92df99e10d9d --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json @@ -0,0 +1,2215 @@ +{ + "client_library": { + "name": "google-cloud-dlp-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.privacy.dlp.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "dlp_v2_generated_DlpService_InspectContent_sync", + "title": "Snippet for the inspect_content call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#inspect_content.", + "file": "dlp_service/inspect_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "inspect_content", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#inspect_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::InspectContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::InspectContentResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "InspectContent", + "full_name": "google.privacy.dlp.v2.DlpService.InspectContent", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_RedactImage_sync", + "title": "Snippet for the redact_image call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#redact_image.", + "file": "dlp_service/redact_image.rb", + "language": "RUBY", + "client_method": { + "short_name": "redact_image", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#redact_image", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::RedactImageRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::RedactImageResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "RedactImage", + "full_name": "google.privacy.dlp.v2.DlpService.RedactImage", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeidentifyContent_sync", + "title": "Snippet for the deidentify_content call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content.", + "file": "dlp_service/deidentify_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "deidentify_content", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeidentifyContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DeidentifyContentResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeidentifyContent", + "full_name": "google.privacy.dlp.v2.DlpService.DeidentifyContent", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ReidentifyContent_sync", + "title": "Snippet for the reidentify_content call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content.", + "file": "dlp_service/reidentify_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "reidentify_content", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ReidentifyContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ReidentifyContentResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ReidentifyContent", + "full_name": "google.privacy.dlp.v2.DlpService.ReidentifyContent", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListInfoTypes_sync", + "title": "Snippet for the list_info_types call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_info_types.", + "file": "dlp_service/list_info_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_info_types", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_info_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListInfoTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListInfoTypesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListInfoTypes", + "full_name": "google.privacy.dlp.v2.DlpService.ListInfoTypes", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateInspectTemplate_sync", + "title": "Snippet for the create_inspect_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template.", + "file": "dlp_service/create_inspect_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_inspect_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateInspectTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.CreateInspectTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateInspectTemplate_sync", + "title": "Snippet for the update_inspect_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template.", + "file": "dlp_service/update_inspect_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_inspect_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateInspectTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateInspectTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetInspectTemplate_sync", + "title": "Snippet for the get_inspect_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template.", + "file": "dlp_service/get_inspect_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_inspect_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetInspectTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetInspectTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.GetInspectTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListInspectTemplates_sync", + "title": "Snippet for the list_inspect_templates call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates.", + "file": "dlp_service/list_inspect_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_inspect_templates", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListInspectTemplates", + "full_name": "google.privacy.dlp.v2.DlpService.ListInspectTemplates", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteInspectTemplate_sync", + "title": "Snippet for the delete_inspect_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template.", + "file": "dlp_service/delete_inspect_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_inspect_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteInspectTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteInspectTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync", + "title": "Snippet for the create_deidentify_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template.", + "file": "dlp_service/create_deidentify_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_deidentify_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateDeidentifyTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync", + "title": "Snippet for the update_deidentify_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template.", + "file": "dlp_service/update_deidentify_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_deidentify_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateDeidentifyTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync", + "title": "Snippet for the get_deidentify_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template.", + "file": "dlp_service/get_deidentify_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_deidentify_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetDeidentifyTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.GetDeidentifyTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync", + "title": "Snippet for the list_deidentify_templates call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates.", + "file": "dlp_service/list_deidentify_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deidentify_templates", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListDeidentifyTemplates", + "full_name": "google.privacy.dlp.v2.DlpService.ListDeidentifyTemplates", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync", + "title": "Snippet for the delete_deidentify_template call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template.", + "file": "dlp_service/delete_deidentify_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_deidentify_template", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteDeidentifyTemplate", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplate", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateJobTrigger_sync", + "title": "Snippet for the create_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger.", + "file": "dlp_service/create_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.CreateJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateJobTrigger_sync", + "title": "Snippet for the update_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger.", + "file": "dlp_service/update_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync", + "title": "Snippet for the hybrid_inspect_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger.", + "file": "dlp_service/hybrid_inspect_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "hybrid_inspect_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::HybridInspectResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "HybridInspectJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.HybridInspectJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetJobTrigger_sync", + "title": "Snippet for the get_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger.", + "file": "dlp_service/get_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.GetJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListJobTriggers_sync", + "title": "Snippet for the list_job_triggers call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers.", + "file": "dlp_service/list_job_triggers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_job_triggers", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListJobTriggersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListJobTriggersResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListJobTriggers", + "full_name": "google.privacy.dlp.v2.DlpService.ListJobTriggers", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteJobTrigger_sync", + "title": "Snippet for the delete_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger.", + "file": "dlp_service/delete_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ActivateJobTrigger_sync", + "title": "Snippet for the activate_job_trigger call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger.", + "file": "dlp_service/activate_job_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "activate_job_trigger", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DlpJob", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ActivateJobTrigger", + "full_name": "google.privacy.dlp.v2.DlpService.ActivateJobTrigger", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync", + "title": "Snippet for the create_discovery_config call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config.", + "file": "dlp_service/create_discovery_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_discovery_config", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateDiscoveryConfig", + "full_name": "google.privacy.dlp.v2.DlpService.CreateDiscoveryConfig", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync", + "title": "Snippet for the update_discovery_config call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config.", + "file": "dlp_service/update_discovery_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_discovery_config", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateDiscoveryConfig", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateDiscoveryConfig", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetDiscoveryConfig_sync", + "title": "Snippet for the get_discovery_config call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config.", + "file": "dlp_service/get_discovery_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_discovery_config", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetDiscoveryConfig", + "full_name": "google.privacy.dlp.v2.DlpService.GetDiscoveryConfig", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync", + "title": "Snippet for the list_discovery_configs call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs.", + "file": "dlp_service/list_discovery_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_discovery_configs", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListDiscoveryConfigs", + "full_name": "google.privacy.dlp.v2.DlpService.ListDiscoveryConfigs", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync", + "title": "Snippet for the delete_discovery_config call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config.", + "file": "dlp_service/delete_discovery_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_discovery_config", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteDiscoveryConfig", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteDiscoveryConfig", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateDlpJob_sync", + "title": "Snippet for the create_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job.", + "file": "dlp_service/create_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DlpJob", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.CreateDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListDlpJobs_sync", + "title": "Snippet for the list_dlp_jobs call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs.", + "file": "dlp_service/list_dlp_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_dlp_jobs", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListDlpJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListDlpJobsResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListDlpJobs", + "full_name": "google.privacy.dlp.v2.DlpService.ListDlpJobs", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetDlpJob_sync", + "title": "Snippet for the get_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job.", + "file": "dlp_service/get_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::DlpJob", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.GetDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteDlpJob_sync", + "title": "Snippet for the delete_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job.", + "file": "dlp_service/delete_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CancelDlpJob_sync", + "title": "Snippet for the cancel_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job.", + "file": "dlp_service/cancel_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CancelDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CancelDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.CancelDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateStoredInfoType_sync", + "title": "Snippet for the create_stored_info_type call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type.", + "file": "dlp_service/create_stored_info_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_stored_info_type", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateStoredInfoType", + "full_name": "google.privacy.dlp.v2.DlpService.CreateStoredInfoType", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateStoredInfoType_sync", + "title": "Snippet for the update_stored_info_type call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type.", + "file": "dlp_service/update_stored_info_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_stored_info_type", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateStoredInfoType", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateStoredInfoType", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetStoredInfoType_sync", + "title": "Snippet for the get_stored_info_type call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type.", + "file": "dlp_service/get_stored_info_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_stored_info_type", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetStoredInfoType", + "full_name": "google.privacy.dlp.v2.DlpService.GetStoredInfoType", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListStoredInfoTypes_sync", + "title": "Snippet for the list_stored_info_types call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types.", + "file": "dlp_service/list_stored_info_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_stored_info_types", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListStoredInfoTypes", + "full_name": "google.privacy.dlp.v2.DlpService.ListStoredInfoTypes", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteStoredInfoType_sync", + "title": "Snippet for the delete_stored_info_type call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type.", + "file": "dlp_service/delete_stored_info_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_stored_info_type", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteStoredInfoType", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteStoredInfoType", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListProjectDataProfiles_sync", + "title": "Snippet for the list_project_data_profiles call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles.", + "file": "dlp_service/list_project_data_profiles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_project_data_profiles", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListProjectDataProfiles", + "full_name": "google.privacy.dlp.v2.DlpService.ListProjectDataProfiles", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListTableDataProfiles_sync", + "title": "Snippet for the list_table_data_profiles call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles.", + "file": "dlp_service/list_table_data_profiles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_table_data_profiles", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListTableDataProfiles", + "full_name": "google.privacy.dlp.v2.DlpService.ListTableDataProfiles", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListColumnDataProfiles_sync", + "title": "Snippet for the list_column_data_profiles call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles.", + "file": "dlp_service/list_column_data_profiles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_column_data_profiles", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListColumnDataProfiles", + "full_name": "google.privacy.dlp.v2.DlpService.ListColumnDataProfiles", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetProjectDataProfile_sync", + "title": "Snippet for the get_project_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile.", + "file": "dlp_service/get_project_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ProjectDataProfile", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetProjectDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.GetProjectDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync", + "title": "Snippet for the list_file_store_data_profiles call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles.", + "file": "dlp_service/list_file_store_data_profiles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_file_store_data_profiles", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListFileStoreDataProfiles", + "full_name": "google.privacy.dlp.v2.DlpService.ListFileStoreDataProfiles", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync", + "title": "Snippet for the get_file_store_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile.", + "file": "dlp_service/get_file_store_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_file_store_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::FileStoreDataProfile", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetFileStoreDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.GetFileStoreDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync", + "title": "Snippet for the delete_file_store_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile.", + "file": "dlp_service/delete_file_store_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_file_store_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteFileStoreDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteFileStoreDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetTableDataProfile_sync", + "title": "Snippet for the get_table_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile.", + "file": "dlp_service/get_table_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_table_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetTableDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::TableDataProfile", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetTableDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.GetTableDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetColumnDataProfile_sync", + "title": "Snippet for the get_column_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile.", + "file": "dlp_service/get_column_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_column_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ColumnDataProfile", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetColumnDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.GetColumnDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteTableDataProfile_sync", + "title": "Snippet for the delete_table_data_profile call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile.", + "file": "dlp_service/delete_table_data_profile.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_table_data_profile", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteTableDataProfile", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteTableDataProfile", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_HybridInspectDlpJob_sync", + "title": "Snippet for the hybrid_inspect_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job.", + "file": "dlp_service/hybrid_inspect_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "hybrid_inspect_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::HybridInspectResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "HybridInspectDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.HybridInspectDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_FinishDlpJob_sync", + "title": "Snippet for the finish_dlp_job call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job.", + "file": "dlp_service/finish_dlp_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "finish_dlp_job", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::FinishDlpJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "FinishDlpJob", + "full_name": "google.privacy.dlp.v2.DlpService.FinishDlpJob", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_CreateConnection_sync", + "title": "Snippet for the create_connection call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_connection.", + "file": "dlp_service/create_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connection", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::CreateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::Connection", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "CreateConnection", + "full_name": "google.privacy.dlp.v2.DlpService.CreateConnection", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_GetConnection_sync", + "title": "Snippet for the get_connection call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_connection.", + "file": "dlp_service/get_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connection", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::GetConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::Connection", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "GetConnection", + "full_name": "google.privacy.dlp.v2.DlpService.GetConnection", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_ListConnections_sync", + "title": "Snippet for the list_connections call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_connections.", + "file": "dlp_service/list_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connections", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::ListConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::ListConnectionsResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "ListConnections", + "full_name": "google.privacy.dlp.v2.DlpService.ListConnections", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_SearchConnections_sync", + "title": "Snippet for the search_connections call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#search_connections.", + "file": "dlp_service/search_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_connections", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#search_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::SearchConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::SearchConnectionsResponse", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "SearchConnections", + "full_name": "google.privacy.dlp.v2.DlpService.SearchConnections", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_DeleteConnection_sync", + "title": "Snippet for the delete_connection call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_connection.", + "file": "dlp_service/delete_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connection", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::DeleteConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "DeleteConnection", + "full_name": "google.privacy.dlp.v2.DlpService.DeleteConnection", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dlp_v2_generated_DlpService_UpdateConnection_sync", + "title": "Snippet for the update_connection call in the DlpService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_connection.", + "file": "dlp_service/update_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_connection", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dlp::V2::UpdateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dlp::V2::Connection", + "client": { + "short_name": "DlpService::Client", + "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" + }, + "method": { + "short_name": "UpdateConnection", + "full_name": "google.privacy.dlp.v2.DlpService.UpdateConnection", + "service": { + "short_name": "DlpService", + "full_name": "google.privacy.dlp.v2.DlpService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb new file mode 100644 index 000000000000..fb06b253390c --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb @@ -0,0 +1,271 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dlp/v2/dlp_service" + +class ::Google::Cloud::Dlp::V2::DlpService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_column_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.column_data_profile_path organization: "value0", location: "value1", column_data_profile: "value2" + assert_equal "organizations/value0/locations/value1/columnDataProfiles/value2", path + + path = client.column_data_profile_path project: "value0", location: "value1", column_data_profile: "value2" + assert_equal "projects/value0/locations/value1/columnDataProfiles/value2", path + end + end + + def test_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connection_path project: "value0", location: "value1", connection: "value2" + assert_equal "projects/value0/locations/value1/connections/value2", path + + path = client.connection_path organization: "value0", location: "value1", connection: "value2" + assert_equal "organizations/value0/locations/value1/connections/value2", path + end + end + + def test_deidentify_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deidentify_template_path organization: "value0", deidentify_template: "value1" + assert_equal "organizations/value0/deidentifyTemplates/value1", path + + path = client.deidentify_template_path project: "value0", deidentify_template: "value1" + assert_equal "projects/value0/deidentifyTemplates/value1", path + + path = client.deidentify_template_path organization: "value0", location: "value1", deidentify_template: "value2" + assert_equal "organizations/value0/locations/value1/deidentifyTemplates/value2", path + + path = client.deidentify_template_path project: "value0", location: "value1", deidentify_template: "value2" + assert_equal "projects/value0/locations/value1/deidentifyTemplates/value2", path + end + end + + def test_discovery_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.discovery_config_path project: "value0", location: "value1", discovery_config: "value2" + assert_equal "projects/value0/locations/value1/discoveryConfigs/value2", path + end + end + + def test_dlp_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dlp_job_path project: "value0", dlp_job: "value1" + assert_equal "projects/value0/dlpJobs/value1", path + + path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" + assert_equal "projects/value0/locations/value1/dlpJobs/value2", path + end + end + + def test_file_store_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.file_store_data_profile_path organization: "value0", location: "value1", file_store_data_profile: "value2" + assert_equal "organizations/value0/locations/value1/fileStoreDataProfiles/value2", path + + path = client.file_store_data_profile_path project: "value0", location: "value1", file_store_data_profile: "value2" + assert_equal "projects/value0/locations/value1/fileStoreDataProfiles/value2", path + end + end + + def test_inspect_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.inspect_template_path organization: "value0", inspect_template: "value1" + assert_equal "organizations/value0/inspectTemplates/value1", path + + path = client.inspect_template_path project: "value0", inspect_template: "value1" + assert_equal "projects/value0/inspectTemplates/value1", path + + path = client.inspect_template_path organization: "value0", location: "value1", inspect_template: "value2" + assert_equal "organizations/value0/locations/value1/inspectTemplates/value2", path + + path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" + assert_equal "projects/value0/locations/value1/inspectTemplates/value2", path + end + end + + def test_job_trigger_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_trigger_path project: "value0", job_trigger: "value1" + assert_equal "projects/value0/jobTriggers/value1", path + + path = client.job_trigger_path project: "value0", location: "value1", job_trigger: "value2" + assert_equal "projects/value0/locations/value1/jobTriggers/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_project_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_data_profile_path organization: "value0", location: "value1", project_data_profile: "value2" + assert_equal "organizations/value0/locations/value1/projectDataProfiles/value2", path + + path = client.project_data_profile_path project: "value0", location: "value1", project_data_profile: "value2" + assert_equal "projects/value0/locations/value1/projectDataProfiles/value2", path + end + end + + def test_stored_info_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.stored_info_type_path organization: "value0", stored_info_type: "value1" + assert_equal "organizations/value0/storedInfoTypes/value1", path + + path = client.stored_info_type_path project: "value0", stored_info_type: "value1" + assert_equal "projects/value0/storedInfoTypes/value1", path + + path = client.stored_info_type_path organization: "value0", location: "value1", stored_info_type: "value2" + assert_equal "organizations/value0/locations/value1/storedInfoTypes/value2", path + + path = client.stored_info_type_path project: "value0", location: "value1", stored_info_type: "value2" + assert_equal "projects/value0/locations/value1/storedInfoTypes/value2", path + end + end + + def test_table_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_data_profile_path organization: "value0", location: "value1", table_data_profile: "value2" + assert_equal "organizations/value0/locations/value1/tableDataProfiles/value2", path + + path = client.table_data_profile_path project: "value0", location: "value1", table_data_profile: "value2" + assert_equal "projects/value0/locations/value1/tableDataProfiles/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb new file mode 100644 index 000000000000..a67f69527aba --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb @@ -0,0 +1,3176 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/privacy/dlp/v2/dlp_pb" +require "google/cloud/dlp/v2/dlp_service/rest" + + +class ::Google::Cloud::Dlp::V2::DlpService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_inspect_content + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::InspectContentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_config = {} + item = {} + inspect_template_name = "hello world" + location_id = "hello world" + + inspect_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_inspect_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, inspect_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.inspect_content parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.inspect_content ::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.inspect_content(::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, inspect_content_client_stub.call_count + end + end + end + + def test_redact_image + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::RedactImageResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + location_id = "hello world" + inspect_config = {} + image_redaction_configs = [{}] + include_findings = true + byte_item = {} + inspect_template = "hello world" + deidentify_template = "hello world" + + redact_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_redact_image_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, redact_image_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.redact_image parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.redact_image ::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.redact_image(::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, redact_image_client_stub.call_count + end + end + end + + def test_deidentify_content + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deidentify_config = {} + inspect_config = {} + item = {} + inspect_template_name = "hello world" + deidentify_template_name = "hello world" + location_id = "hello world" + + deidentify_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_deidentify_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deidentify_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.deidentify_content parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.deidentify_content ::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.deidentify_content(::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deidentify_content_client_stub.call_count + end + end + end + + def test_reidentify_content + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reidentify_config = {} + inspect_config = {} + item = {} + inspect_template_name = "hello world" + reidentify_template_name = "hello world" + location_id = "hello world" + + reidentify_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_reidentify_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reidentify_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reidentify_content parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reidentify_content ::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reidentify_content(::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reidentify_content_client_stub.call_count + end + end + end + + def test_list_info_types + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + language_code = "hello world" + filter = "hello world" + location_id = "hello world" + + list_info_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_info_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_info_types_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_info_types parent: parent, language_code: language_code, filter: filter, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_info_types ::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_info_types(::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_info_types_client_stub.call_count + end + end + end + + def test_create_inspect_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_template = {} + template_id = "hello world" + location_id = "hello world" + + create_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_inspect_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_inspect_template parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_inspect_template ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_inspect_template(::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_inspect_template_client_stub.call_count + end + end + end + + def test_update_inspect_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + inspect_template = {} + update_mask = {} + + update_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_inspect_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_inspect_template name: name, inspect_template: inspect_template, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_inspect_template ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_inspect_template(::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_inspect_template_client_stub.call_count + end + end + end + + def test_get_inspect_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_inspect_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_inspect_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_inspect_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_inspect_template ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_inspect_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_inspect_template(::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_inspect_template_client_stub.call_count + end + end + end + + def test_list_inspect_templates + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_inspect_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_inspect_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_inspect_templates_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_inspect_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_inspect_templates ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_inspect_templates(::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_inspect_templates_client_stub.call_count + end + end + end + + def test_delete_inspect_template + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_inspect_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_inspect_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_inspect_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_inspect_template ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_inspect_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_inspect_template(::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_inspect_template_client_stub.call_count + end + end + end + + def test_create_deidentify_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deidentify_template = {} + template_id = "hello world" + location_id = "hello world" + + create_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_deidentify_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_deidentify_template parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_deidentify_template ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_deidentify_template(::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_deidentify_template_client_stub.call_count + end + end + end + + def test_update_deidentify_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + deidentify_template = {} + update_mask = {} + + update_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_deidentify_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_deidentify_template name: name, deidentify_template: deidentify_template, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_deidentify_template ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_deidentify_template(::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_deidentify_template_client_stub.call_count + end + end + end + + def test_get_deidentify_template + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_deidentify_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_deidentify_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_deidentify_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_deidentify_template ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_deidentify_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_deidentify_template(::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_deidentify_template_client_stub.call_count + end + end + end + + def test_list_deidentify_templates + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_deidentify_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_deidentify_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deidentify_templates_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_deidentify_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_deidentify_templates ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_deidentify_templates(::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_deidentify_templates_client_stub.call_count + end + end + end + + def test_delete_deidentify_template + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_deidentify_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_deidentify_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_deidentify_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_deidentify_template ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_deidentify_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_deidentify_template(::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_deidentify_template_client_stub.call_count + end + end + end + + def test_create_job_trigger + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_trigger = {} + trigger_id = "hello world" + location_id = "hello world" + + create_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_job_trigger parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_job_trigger ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_job_trigger(::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_job_trigger_client_stub.call_count + end + end + end + + def test_update_job_trigger + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + job_trigger = {} + update_mask = {} + + update_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_job_trigger name: name, job_trigger: job_trigger, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_job_trigger ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_job_trigger(::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_job_trigger_client_stub.call_count + end + end + end + + def test_hybrid_inspect_job_trigger + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + hybrid_item = {} + + hybrid_inspect_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_hybrid_inspect_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, hybrid_inspect_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.hybrid_inspect_job_trigger name: name, hybrid_item: hybrid_item do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.hybrid_inspect_job_trigger ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.hybrid_inspect_job_trigger(::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, hybrid_inspect_job_trigger_client_stub.call_count + end + end + end + + def test_get_job_trigger + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job_trigger({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job_trigger name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job_trigger ::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job_trigger({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job_trigger(::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_trigger_client_stub.call_count + end + end + end + + def test_list_job_triggers + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + type = :DLP_JOB_TYPE_UNSPECIFIED + location_id = "hello world" + + list_job_triggers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_job_triggers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_job_triggers_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_job_triggers parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_job_triggers ::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_job_triggers(::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_job_triggers_client_stub.call_count + end + end + end + + def test_delete_job_trigger + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_job_trigger({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_job_trigger name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_job_trigger ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_job_trigger({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_job_trigger(::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_job_trigger_client_stub.call_count + end + end + end + + def test_activate_job_trigger + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DlpJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + activate_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_activate_job_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, activate_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.activate_job_trigger({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.activate_job_trigger name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.activate_job_trigger ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.activate_job_trigger({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.activate_job_trigger(::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, activate_job_trigger_client_stub.call_count + end + end + end + + def test_create_discovery_config + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + discovery_config = {} + config_id = "hello world" + + create_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_discovery_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_discovery_config parent: parent, discovery_config: discovery_config, config_id: config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_discovery_config ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_discovery_config(::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_discovery_config_client_stub.call_count + end + end + end + + def test_update_discovery_config + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + discovery_config = {} + update_mask = {} + + update_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_discovery_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_discovery_config name: name, discovery_config: discovery_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_discovery_config ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_discovery_config(::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_discovery_config_client_stub.call_count + end + end + end + + def test_get_discovery_config + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_discovery_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_discovery_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_discovery_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_discovery_config ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_discovery_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_discovery_config(::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_discovery_config_client_stub.call_count + end + end + end + + def test_list_discovery_configs + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_discovery_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_discovery_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_discovery_configs_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_discovery_configs parent: parent, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_discovery_configs ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_discovery_configs(::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_discovery_configs_client_stub.call_count + end + end + end + + def test_delete_discovery_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_discovery_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_discovery_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_discovery_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_discovery_config ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_discovery_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_discovery_config(::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_discovery_config_client_stub.call_count + end + end + end + + def test_create_dlp_job + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DlpJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_job = {} + job_id = "hello world" + location_id = "hello world" + + create_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dlp_job parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dlp_job ::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dlp_job(::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dlp_job_client_stub.call_count + end + end + end + + def test_list_dlp_jobs + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + type = :DLP_JOB_TYPE_UNSPECIFIED + order_by = "hello world" + location_id = "hello world" + + list_dlp_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_dlp_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_dlp_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_dlp_jobs parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_dlp_jobs ::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_dlp_jobs(::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_dlp_jobs_client_stub.call_count + end + end + end + + def test_get_dlp_job + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::DlpJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dlp_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dlp_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dlp_job ::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dlp_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dlp_job(::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dlp_job_client_stub.call_count + end + end + end + + def test_delete_dlp_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dlp_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dlp_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dlp_job ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dlp_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dlp_job(::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dlp_job_client_stub.call_count + end + end + end + + def test_cancel_dlp_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_cancel_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_dlp_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_dlp_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_dlp_job ::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_dlp_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_dlp_job(::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_dlp_job_client_stub.call_count + end + end + end + + def test_create_stored_info_type + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config = {} + stored_info_type_id = "hello world" + location_id = "hello world" + + create_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_stored_info_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_stored_info_type parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_stored_info_type ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_stored_info_type(::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_stored_info_type_client_stub.call_count + end + end + end + + def test_update_stored_info_type + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + config = {} + update_mask = {} + + update_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_stored_info_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_stored_info_type name: name, config: config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_stored_info_type ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_stored_info_type(::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_stored_info_type_client_stub.call_count + end + end + end + + def test_get_stored_info_type + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_stored_info_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_stored_info_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_stored_info_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_stored_info_type ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_stored_info_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_stored_info_type(::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_stored_info_type_client_stub.call_count + end + end + end + + def test_list_stored_info_types + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_stored_info_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_stored_info_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_stored_info_types_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_stored_info_types parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_stored_info_types ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_stored_info_types(::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_stored_info_types_client_stub.call_count + end + end + end + + def test_delete_stored_info_type + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_stored_info_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_stored_info_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_stored_info_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_stored_info_type ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_stored_info_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_stored_info_type(::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_stored_info_type_client_stub.call_count + end + end + end + + def test_list_project_data_profiles + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_project_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_project_data_profiles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_project_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_project_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_project_data_profiles ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_project_data_profiles(::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_project_data_profiles_client_stub.call_count + end + end + end + + def test_list_table_data_profiles + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_table_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_table_data_profiles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_table_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_table_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_table_data_profiles ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_table_data_profiles(::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_table_data_profiles_client_stub.call_count + end + end + end + + def test_list_column_data_profiles + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_column_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_column_data_profiles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_column_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_column_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_column_data_profiles ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_column_data_profiles(::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_column_data_profiles_client_stub.call_count + end + end + end + + def test_get_project_data_profile + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ProjectDataProfile.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_project_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_project_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_project_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_project_data_profile ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_project_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_project_data_profile(::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_data_profile_client_stub.call_count + end + end + end + + def test_list_file_store_data_profiles + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_file_store_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_file_store_data_profiles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_file_store_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_file_store_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_file_store_data_profiles ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_file_store_data_profiles(::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_file_store_data_profiles_client_stub.call_count + end + end + end + + def test_get_file_store_data_profile + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_store_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_file_store_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_file_store_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_file_store_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_file_store_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_file_store_data_profile ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_file_store_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_file_store_data_profile(::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_file_store_data_profile_client_stub.call_count + end + end + end + + def test_delete_file_store_data_profile + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_file_store_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_file_store_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_file_store_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_file_store_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_file_store_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_file_store_data_profile ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_file_store_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_file_store_data_profile(::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_file_store_data_profile_client_stub.call_count + end + end + end + + def test_get_table_data_profile + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::TableDataProfile.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_table_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_table_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_table_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_table_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_table_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_table_data_profile ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_table_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_table_data_profile(::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_table_data_profile_client_stub.call_count + end + end + end + + def test_get_column_data_profile + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ColumnDataProfile.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_column_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_column_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_column_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_column_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_column_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_column_data_profile ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_column_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_column_data_profile(::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_column_data_profile_client_stub.call_count + end + end + end + + def test_delete_table_data_profile + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_table_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_table_data_profile_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_table_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_table_data_profile({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_table_data_profile name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_table_data_profile ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_table_data_profile({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_table_data_profile(::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_table_data_profile_client_stub.call_count + end + end + end + + def test_hybrid_inspect_dlp_job + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + hybrid_item = {} + + hybrid_inspect_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_hybrid_inspect_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, hybrid_inspect_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.hybrid_inspect_dlp_job name: name, hybrid_item: hybrid_item do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.hybrid_inspect_dlp_job ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.hybrid_inspect_dlp_job(::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, hybrid_inspect_dlp_job_client_stub.call_count + end + end + end + + def test_finish_dlp_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + finish_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_finish_dlp_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, finish_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.finish_dlp_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.finish_dlp_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.finish_dlp_job ::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.finish_dlp_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.finish_dlp_job(::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, finish_dlp_job_client_stub.call_count + end + end + end + + def test_create_connection + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection = {} + + create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_connection({ parent: parent, connection: connection }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_connection parent: parent, connection: connection do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_connection ::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_connection({ parent: parent, connection: connection }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_count + end + end + end + + def test_get_connection + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_connection ::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_count + end + end + end + + def test_list_connections + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_connections ::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_connections_client_stub.call_count + end + end + end + + def test_search_connections + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + search_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_search_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_connections_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_connections ::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_connections(::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_connections_client_stub.call_count + end + end + end + + def test_delete_connection + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_connection_client_stub.call_count + end + end + end + + def test_update_connection + # Create test objects. + client_result = ::Google::Cloud::Dlp::V2::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + connection = {} + update_mask = {} + + update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_connection name: name, connection: connection, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_connection ::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_connection({ name: name, connection: connection, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_connection_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb new file mode 100644 index 000000000000..cffc58e83501 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb @@ -0,0 +1,3569 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/privacy/dlp/v2/dlp_pb" +require "google/cloud/dlp/v2/dlp_service" + +class ::Google::Cloud::Dlp::V2::DlpService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_inspect_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::InspectContentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_config = {} + item = {} + inspect_template_name = "hello world" + location_id = "hello world" + + inspect_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :inspect_content, name + assert_kind_of ::Google::Cloud::Dlp::V2::InspectContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] + assert_equal "hello world", request["inspect_template_name"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, inspect_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.inspect_content parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.inspect_content ::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.inspect_content(::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, inspect_content_client_stub.call_rpc_count + end + end + + def test_redact_image + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::RedactImageResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + location_id = "hello world" + inspect_config = {} + image_redaction_configs = [{}] + include_findings = true + byte_item = {} + inspect_template = "hello world" + deidentify_template = "hello world" + + redact_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :redact_image, name + assert_kind_of ::Google::Cloud::Dlp::V2::RedactImageRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["location_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] + assert_kind_of ::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, request["image_redaction_configs"].first + assert_equal true, request["include_findings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ByteContentItem), request["byte_item"] + assert_equal "hello world", request["inspect_template"] + assert_equal "hello world", request["deidentify_template"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, redact_image_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.redact_image parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.redact_image ::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.redact_image(::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, redact_image_client_stub.call_rpc_count + end + end + + def test_deidentify_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deidentify_config = {} + inspect_config = {} + item = {} + inspect_template_name = "hello world" + deidentify_template_name = "hello world" + location_id = "hello world" + + deidentify_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deidentify_content, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeidentifyContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyConfig), request["deidentify_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] + assert_equal "hello world", request["inspect_template_name"] + assert_equal "hello world", request["deidentify_template_name"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deidentify_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.deidentify_content parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.deidentify_content ::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.deidentify_content(::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, deidentify_content_client_stub.call_rpc_count + end + end + + def test_reidentify_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reidentify_config = {} + inspect_config = {} + item = {} + inspect_template_name = "hello world" + reidentify_template_name = "hello world" + location_id = "hello world" + + reidentify_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reidentify_content, name + assert_kind_of ::Google::Cloud::Dlp::V2::ReidentifyContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyConfig), request["reidentify_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] + assert_equal "hello world", request["inspect_template_name"] + assert_equal "hello world", request["reidentify_template_name"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reidentify_content_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reidentify_content parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reidentify_content ::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reidentify_content(::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reidentify_content_client_stub.call_rpc_count + end + end + + def test_list_info_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + language_code = "hello world" + filter = "hello world" + location_id = "hello world" + + list_info_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_info_types, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListInfoTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_info_types_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_info_types parent: parent, language_code: language_code, filter: filter, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_info_types ::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_info_types(::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_info_types_client_stub.call_rpc_count + end + end + + def test_create_inspect_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_template = {} + template_id = "hello world" + location_id = "hello world" + + create_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_inspect_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectTemplate), request["inspect_template"] + assert_equal "hello world", request["template_id"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_inspect_template parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_inspect_template ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_inspect_template(::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_inspect_template_client_stub.call_rpc_count + end + end + + def test_update_inspect_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + inspect_template = {} + update_mask = {} + + update_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_inspect_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectTemplate), request["inspect_template"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_inspect_template name: name, inspect_template: inspect_template, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_inspect_template ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_inspect_template(::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_inspect_template_client_stub.call_rpc_count + end + end + + def test_get_inspect_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_inspect_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_inspect_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_inspect_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_inspect_template ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_inspect_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_inspect_template(::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_inspect_template_client_stub.call_rpc_count + end + end + + def test_list_inspect_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_inspect_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_inspect_templates, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_inspect_templates_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_inspect_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_inspect_templates ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_inspect_templates(::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_inspect_templates_client_stub.call_rpc_count + end + end + + def test_delete_inspect_template + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_inspect_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_inspect_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_inspect_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_inspect_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_inspect_template ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_inspect_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_inspect_template(::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_inspect_template_client_stub.call_rpc_count + end + end + + def test_create_deidentify_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + deidentify_template = {} + template_id = "hello world" + location_id = "hello world" + + create_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_deidentify_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyTemplate), request["deidentify_template"] + assert_equal "hello world", request["template_id"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_deidentify_template parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_deidentify_template ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_deidentify_template(::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_deidentify_template_client_stub.call_rpc_count + end + end + + def test_update_deidentify_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + deidentify_template = {} + update_mask = {} + + update_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_deidentify_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyTemplate), request["deidentify_template"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_deidentify_template name: name, deidentify_template: deidentify_template, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_deidentify_template ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_deidentify_template(::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_deidentify_template_client_stub.call_rpc_count + end + end + + def test_get_deidentify_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_deidentify_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_deidentify_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_deidentify_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_deidentify_template ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_deidentify_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_deidentify_template(::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_deidentify_template_client_stub.call_rpc_count + end + end + + def test_list_deidentify_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_deidentify_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deidentify_templates, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_deidentify_templates_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_deidentify_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_deidentify_templates ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_deidentify_templates(::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_deidentify_templates_client_stub.call_rpc_count + end + end + + def test_delete_deidentify_template + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_deidentify_template, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_deidentify_template_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_deidentify_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_deidentify_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_deidentify_template ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_deidentify_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_deidentify_template(::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_deidentify_template_client_stub.call_rpc_count + end + end + + def test_create_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + job_trigger = {} + trigger_id = "hello world" + location_id = "hello world" + + create_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::JobTrigger), request["job_trigger"] + assert_equal "hello world", request["trigger_id"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_job_trigger parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_job_trigger ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_job_trigger(::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_job_trigger_client_stub.call_rpc_count + end + end + + def test_update_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + job_trigger = {} + update_mask = {} + + update_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::JobTrigger), request["job_trigger"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_job_trigger name: name, job_trigger: job_trigger, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_job_trigger ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_job_trigger(::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_job_trigger_client_stub.call_rpc_count + end + end + + def test_hybrid_inspect_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + hybrid_item = {} + + hybrid_inspect_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :hybrid_inspect_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::HybridContentItem), request["hybrid_item"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, hybrid_inspect_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.hybrid_inspect_job_trigger name: name, hybrid_item: hybrid_item do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.hybrid_inspect_job_trigger ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.hybrid_inspect_job_trigger(::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, hybrid_inspect_job_trigger_client_stub.call_rpc_count + end + end + + def test_get_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetJobTriggerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job_trigger({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job_trigger name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job_trigger ::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job_trigger({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job_trigger(::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_trigger_client_stub.call_rpc_count + end + end + + def test_list_job_triggers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + type = :DLP_JOB_TYPE_UNSPECIFIED + location_id = "hello world" + + list_job_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_job_triggers, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListJobTriggersRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + assert_equal :DLP_JOB_TYPE_UNSPECIFIED, request["type"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_job_triggers_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_job_triggers parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_job_triggers ::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_job_triggers(::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_job_triggers_client_stub.call_rpc_count + end + end + + def test_delete_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_job_trigger({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_job_trigger name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_job_trigger ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_job_trigger({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_job_trigger(::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_job_trigger_client_stub.call_rpc_count + end + end + + def test_activate_job_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + activate_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :activate_job_trigger, name + assert_kind_of ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, activate_job_trigger_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.activate_job_trigger({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.activate_job_trigger name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.activate_job_trigger ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.activate_job_trigger({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.activate_job_trigger(::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, activate_job_trigger_client_stub.call_rpc_count + end + end + + def test_create_discovery_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + discovery_config = {} + config_id = "hello world" + + create_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_discovery_config, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DiscoveryConfig), request["discovery_config"] + assert_equal "hello world", request["config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_discovery_config parent: parent, discovery_config: discovery_config, config_id: config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_discovery_config ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_discovery_config(::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_discovery_config_client_stub.call_rpc_count + end + end + + def test_update_discovery_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + discovery_config = {} + update_mask = {} + + update_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_discovery_config, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DiscoveryConfig), request["discovery_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_discovery_config name: name, discovery_config: discovery_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_discovery_config ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_discovery_config(::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_discovery_config_client_stub.call_rpc_count + end + end + + def test_get_discovery_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_discovery_config, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_discovery_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_discovery_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_discovery_config ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_discovery_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_discovery_config(::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_discovery_config_client_stub.call_rpc_count + end + end + + def test_list_discovery_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_discovery_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_discovery_configs, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_discovery_configs_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_discovery_configs parent: parent, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_discovery_configs ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_discovery_configs(::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_discovery_configs_client_stub.call_rpc_count + end + end + + def test_delete_discovery_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_discovery_config, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_discovery_config_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_discovery_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_discovery_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_discovery_config ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_discovery_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_discovery_config(::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_discovery_config_client_stub.call_rpc_count + end + end + + def test_create_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + inspect_job = {} + job_id = "hello world" + location_id = "hello world" + + create_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateDlpJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectJobConfig), request["inspect_job"] + assert_equal :inspect_job, request.job + assert_equal "hello world", request["job_id"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_dlp_job parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_dlp_job ::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_dlp_job(::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_dlp_job_client_stub.call_rpc_count + end + end + + def test_list_dlp_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + type = :DLP_JOB_TYPE_UNSPECIFIED + order_by = "hello world" + location_id = "hello world" + + list_dlp_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_dlp_jobs, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListDlpJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :DLP_JOB_TYPE_UNSPECIFIED, request["type"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_dlp_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_dlp_jobs parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_dlp_jobs ::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_dlp_jobs(::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_dlp_jobs_client_stub.call_rpc_count + end + end + + def test_get_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetDlpJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dlp_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dlp_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dlp_job ::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dlp_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dlp_job(::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_dlp_job_client_stub.call_rpc_count + end + end + + def test_delete_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dlp_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_dlp_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_dlp_job ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_dlp_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_dlp_job(::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_dlp_job_client_stub.call_rpc_count + end + end + + def test_cancel_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::CancelDlpJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_dlp_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_dlp_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_dlp_job ::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_dlp_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_dlp_job(::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_dlp_job_client_stub.call_rpc_count + end + end + + def test_create_stored_info_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config = {} + stored_info_type_id = "hello world" + location_id = "hello world" + + create_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_stored_info_type, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::StoredInfoTypeConfig), request["config"] + assert_equal "hello world", request["stored_info_type_id"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_stored_info_type parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_stored_info_type ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_stored_info_type(::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_stored_info_type_client_stub.call_rpc_count + end + end + + def test_update_stored_info_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + config = {} + update_mask = {} + + update_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_stored_info_type, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::StoredInfoTypeConfig), request["config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_stored_info_type name: name, config: config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_stored_info_type ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_stored_info_type(::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_stored_info_type_client_stub.call_rpc_count + end + end + + def test_get_stored_info_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_stored_info_type, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_stored_info_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_stored_info_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_stored_info_type ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_stored_info_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_stored_info_type(::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_stored_info_type_client_stub.call_rpc_count + end + end + + def test_list_stored_info_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + location_id = "hello world" + + list_stored_info_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_stored_info_types, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["location_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_stored_info_types_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_stored_info_types parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_stored_info_types ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_stored_info_types(::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_stored_info_types_client_stub.call_rpc_count + end + end + + def test_delete_stored_info_type + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_stored_info_type, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_stored_info_type_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_stored_info_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_stored_info_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_stored_info_type ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_stored_info_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_stored_info_type(::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_stored_info_type_client_stub.call_rpc_count + end + end + + def test_list_project_data_profiles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_project_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_project_data_profiles, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_project_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_project_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_project_data_profiles ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_project_data_profiles(::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_project_data_profiles_client_stub.call_rpc_count + end + end + + def test_list_table_data_profiles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_table_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_table_data_profiles, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_table_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_table_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_table_data_profiles ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_table_data_profiles(::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_table_data_profiles_client_stub.call_rpc_count + end + end + + def test_list_column_data_profiles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_column_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_column_data_profiles, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_column_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_column_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_column_data_profiles ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_column_data_profiles(::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_column_data_profiles_client_stub.call_rpc_count + end + end + + def test_get_project_data_profile + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ProjectDataProfile.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_project_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_project_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_project_data_profile ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_project_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_project_data_profile(::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_project_data_profile_client_stub.call_rpc_count + end + end + + def test_list_file_store_data_profiles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + filter = "hello world" + + list_file_store_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_file_store_data_profiles, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_file_store_data_profiles_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_file_store_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_file_store_data_profiles ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_file_store_data_profiles(::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_file_store_data_profiles_client_stub.call_rpc_count + end + end + + def test_get_file_store_data_profile + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_file_store_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_file_store_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_file_store_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_file_store_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_file_store_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_file_store_data_profile ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_file_store_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_file_store_data_profile(::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_file_store_data_profile_client_stub.call_rpc_count + end + end + + def test_delete_file_store_data_profile + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_file_store_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_file_store_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_file_store_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_file_store_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_file_store_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_file_store_data_profile ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_file_store_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_file_store_data_profile(::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_file_store_data_profile_client_stub.call_rpc_count + end + end + + def test_get_table_data_profile + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::TableDataProfile.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_table_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_table_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_table_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_table_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_table_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_table_data_profile ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_table_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_table_data_profile(::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_table_data_profile_client_stub.call_rpc_count + end + end + + def test_get_column_data_profile + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ColumnDataProfile.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_column_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_column_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_column_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_column_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_column_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_column_data_profile ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_column_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_column_data_profile(::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_column_data_profile_client_stub.call_rpc_count + end + end + + def test_delete_table_data_profile + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_table_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_table_data_profile, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_table_data_profile_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_table_data_profile({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_table_data_profile name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_table_data_profile ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_table_data_profile({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_table_data_profile(::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_table_data_profile_client_stub.call_rpc_count + end + end + + def test_hybrid_inspect_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + hybrid_item = {} + + hybrid_inspect_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :hybrid_inspect_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::HybridContentItem), request["hybrid_item"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, hybrid_inspect_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.hybrid_inspect_dlp_job name: name, hybrid_item: hybrid_item do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.hybrid_inspect_dlp_job ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.hybrid_inspect_dlp_job(::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, hybrid_inspect_dlp_job_client_stub.call_rpc_count + end + end + + def test_finish_dlp_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + finish_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :finish_dlp_job, name + assert_kind_of ::Google::Cloud::Dlp::V2::FinishDlpJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, finish_dlp_job_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.finish_dlp_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.finish_dlp_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.finish_dlp_job ::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.finish_dlp_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.finish_dlp_job(::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, finish_dlp_job_client_stub.call_rpc_count + end + end + + def test_create_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection = {} + + create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connection, name + assert_kind_of ::Google::Cloud::Dlp::V2::CreateConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::Connection), request["connection"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connection({ parent: parent, connection: connection }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_connection parent: parent, connection: connection do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_connection ::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_connection({ parent: parent, connection: connection }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_rpc_count + end + end + + def test_get_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connection, name + assert_kind_of ::Google::Cloud::Dlp::V2::GetConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connection ::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_rpc_count + end + end + + def test_list_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connections, name + assert_kind_of ::Google::Cloud::Dlp::V2::ListConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_connections ::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_connections_client_stub.call_rpc_count + end + end + + def test_search_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + search_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_connections, name + assert_kind_of ::Google::Cloud::Dlp::V2::SearchConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_connections_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_connections ::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_connections(::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_connections_client_stub.call_rpc_count + end + end + + def test_delete_connection + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connection, name + assert_kind_of ::Google::Cloud::Dlp::V2::DeleteConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_connection_client_stub.call_rpc_count + end + end + + def test_update_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dlp::V2::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + connection = {} + update_mask = {} + + update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_connection, name + assert_kind_of ::Google::Cloud::Dlp::V2::UpdateConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::Connection), request["connection"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_connection name: name, connection: connection, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_connection ::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_connection({ name: name, connection: connection, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_connection_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb b/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From a57b5a06f6eb573bab7f68e65e123e3a4be0cdd1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 6 Apr 2026 05:04:49 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../lib/google/privacy/dlp/v2/dlp_pb.rb | 4 +- .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/privacy/dlp/v2/dlp.rb | 27 + .../google-cloud-dlp-v2/.gitignore | 22 - .../google-cloud-dlp-v2/.repo-metadata.json | 18 - .../google-cloud-dlp-v2/.rubocop.yml | 33 - owl-bot-staging/google-cloud-dlp-v2/.toys.rb | 28 - owl-bot-staging/google-cloud-dlp-v2/.yardopts | 12 - .../google-cloud-dlp-v2/AUTHENTICATION.md | 122 - .../google-cloud-dlp-v2/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-dlp-v2/Gemfile | 14 - .../google-cloud-dlp-v2/LICENSE.md | 201 - owl-bot-staging/google-cloud-dlp-v2/README.md | 154 - owl-bot-staging/google-cloud-dlp-v2/Rakefile | 169 - .../google-cloud-dlp-v2/gapic_metadata.json | 293 - .../google-cloud-dlp-v2.gemspec | 29 - .../lib/google-cloud-dlp-v2.rb | 21 - .../lib/google/cloud/dlp/v2.rb | 45 - .../lib/google/cloud/dlp/v2/dlp_service.rb | 59 - .../google/cloud/dlp/v2/dlp_service/client.rb | 6826 ------------- .../cloud/dlp/v2/dlp_service/credentials.rb | 51 - .../google/cloud/dlp/v2/dlp_service/paths.rb | 618 -- .../google/cloud/dlp/v2/dlp_service/rest.rb | 56 - .../cloud/dlp/v2/dlp_service/rest/client.rb | 6406 ------------ .../dlp/v2/dlp_service/rest/service_stub.rb | 4119 -------- .../lib/google/cloud/dlp/v2/rest.rb | 37 - .../lib/google/cloud/dlp/v2/version.rb | 28 - .../lib/google/privacy/dlp/v2/dlp_pb.rb | 438 - .../google/privacy/dlp/v2/dlp_services_pb.rb | 298 - .../lib/google/privacy/dlp/v2/storage_pb.rb | 65 - .../google-cloud-dlp-v2/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/privacy/dlp/v2/dlp.rb | 8998 ----------------- .../google/privacy/dlp/v2/storage.rb | 1047 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 56 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/timeofday.rb | 49 - .../google-cloud-dlp-v2/snippets/Gemfile | 32 - .../dlp_service/activate_job_trigger.rb | 47 - .../snippets/dlp_service/cancel_dlp_job.rb | 47 - .../snippets/dlp_service/create_connection.rb | 47 - .../dlp_service/create_deidentify_template.rb | 47 - .../dlp_service/create_discovery_config.rb | 47 - .../snippets/dlp_service/create_dlp_job.rb | 47 - .../dlp_service/create_inspect_template.rb | 47 - .../dlp_service/create_job_trigger.rb | 47 - .../dlp_service/create_stored_info_type.rb | 47 - .../dlp_service/deidentify_content.rb | 47 - .../snippets/dlp_service/delete_connection.rb | 47 - .../dlp_service/delete_deidentify_template.rb | 47 - .../dlp_service/delete_discovery_config.rb | 47 - .../snippets/dlp_service/delete_dlp_job.rb | 47 - .../delete_file_store_data_profile.rb | 47 - .../dlp_service/delete_inspect_template.rb | 47 - .../dlp_service/delete_job_trigger.rb | 47 - .../dlp_service/delete_stored_info_type.rb | 47 - .../dlp_service/delete_table_data_profile.rb | 47 - .../snippets/dlp_service/finish_dlp_job.rb | 47 - .../dlp_service/get_column_data_profile.rb | 47 - .../snippets/dlp_service/get_connection.rb | 47 - .../dlp_service/get_deidentify_template.rb | 47 - .../dlp_service/get_discovery_config.rb | 47 - .../snippets/dlp_service/get_dlp_job.rb | 47 - .../get_file_store_data_profile.rb | 47 - .../dlp_service/get_inspect_template.rb | 47 - .../snippets/dlp_service/get_job_trigger.rb | 47 - .../dlp_service/get_project_data_profile.rb | 47 - .../dlp_service/get_stored_info_type.rb | 47 - .../dlp_service/get_table_data_profile.rb | 47 - .../dlp_service/hybrid_inspect_dlp_job.rb | 47 - .../dlp_service/hybrid_inspect_job_trigger.rb | 47 - .../snippets/dlp_service/inspect_content.rb | 47 - .../dlp_service/list_column_data_profiles.rb | 51 - .../snippets/dlp_service/list_connections.rb | 51 - .../dlp_service/list_deidentify_templates.rb | 51 - .../dlp_service/list_discovery_configs.rb | 51 - .../snippets/dlp_service/list_dlp_jobs.rb | 51 - .../list_file_store_data_profiles.rb | 51 - .../snippets/dlp_service/list_info_types.rb | 47 - .../dlp_service/list_inspect_templates.rb | 51 - .../snippets/dlp_service/list_job_triggers.rb | 51 - .../dlp_service/list_project_data_profiles.rb | 51 - .../dlp_service/list_stored_info_types.rb | 51 - .../dlp_service/list_table_data_profiles.rb | 51 - .../snippets/dlp_service/redact_image.rb | 47 - .../dlp_service/reidentify_content.rb | 47 - .../dlp_service/search_connections.rb | 51 - .../snippets/dlp_service/update_connection.rb | 47 - .../dlp_service/update_deidentify_template.rb | 47 - .../dlp_service/update_discovery_config.rb | 47 - .../dlp_service/update_inspect_template.rb | 47 - .../dlp_service/update_job_trigger.rb | 47 - .../dlp_service/update_stored_info_type.rb | 47 - ...nippet_metadata_google.privacy.dlp.v2.json | 2215 ---- .../cloud/dlp/v2/dlp_service_paths_test.rb | 271 - .../cloud/dlp/v2/dlp_service_rest_test.rb | 3176 ------ .../google/cloud/dlp/v2/dlp_service_test.rb | 3569 ------- .../google-cloud-dlp-v2/test/helper.rb | 26 - 107 files changed, 34 insertions(+), 43947 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dlp-v2/test/helper.rb diff --git a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb index 9f847734a880..5d649695bb8b 100644 --- a/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb +++ b/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb @@ -19,7 +19,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\x9a\x01\n\x16\x45xcludeByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12K\n\x16image_containment_type\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xbb\x03\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12R\n\x19\x65xclude_by_image_findings\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.ExcludeByImageFindingsH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xc7\x01\n\x19\x41\x64justByMatchingInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12:\n\rmatching_type\x18\x03 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingType\"\xd4\x01\n\x15\x41\x64justByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12K\n\x16image_containment_type\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xb4\x02\n\x0e\x41\x64justmentRule\x12Y\n\x1d\x61\x64just_by_matching_info_types\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AdjustByMatchingInfoTypesH\x00\x12P\n\x18\x61\x64just_by_image_findings\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.AdjustByImageFindingsH\x00\x12g\n\x15likelihood_adjustment\x18\x02 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x0c\n\nconditions\"\xf3\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x12@\n\x0f\x61\x64justment_rule\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.AdjustmentRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\x97\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x42\x0b\n\tdata_item\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\xe6\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x12P\n\x18key_value_metadata_label\x18\x04 \x01(\x0b\x32,.google.privacy.dlp.v2.KeyValueMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"$\n\x15KeyValueMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xb3\x04\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x12\x18\n\x10inspect_template\x18\t \x01(\t\x12\x1b\n\x13\x64\x65identify_template\x18\n \x01(\t\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xf8\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12?\n\x0cstorage_path\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xdf\x01\n\x0fLocationSupport\x12Z\n\x15regionalization_scope\x18\x01 \x01(\x0e\x32;.google.privacy.dlp.v2.LocationSupport.RegionalizationScope\x12\x11\n\tlocations\x18\x02 \x03(\t\"]\n\x14RegionalizationScope\x12%\n!REGIONALIZATION_SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REGIONAL\x10\x01\x12\x10\n\x0c\x41NY_LOCATION\x10\x02\"\x9b\x05\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12@\n\x10location_support\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.LocationSupport\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\x12V\n\rlaunch_status\x18\r \x01(\x0e\x32?.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus\"\x82\x01\n\x14InfoTypeLaunchStatus\x12\'\n#INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14GENERAL_AVAILABILITY\x10\x01\x12\x12\n\x0ePUBLIC_PREVIEW\x10\x02\x12\x13\n\x0fPRIVATE_PREVIEW\x10\x03\"\x90\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xef\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0b\n\x07\x41USTRIA\x10\x35\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\x82\n\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12u\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogB\x02\x18\x01H\x00\x12n\n$publish_findings_to_dataplex_catalog\x18\n \x01(\x0b\x32>.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\"\n PublishFindingsToDataplexCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"\xa7\x01\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x12<\n\x0cinclude_tags\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.TagFiltersB\x03\xe0\x41\x01\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xc3\x01\n\x14ImageContainmentType\x12\x33\n\x08\x65ncloses\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EnclosesH\x00\x12:\n\x0c\x66ully_inside\x18\x02 \x01(\x0b\x32\".google.privacy.dlp.v2.FullyInsideH\x00\x12\x32\n\x08overlaps\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.OverlapH\x00\x42\x06\n\x04type\"\t\n\x07Overlap\"\n\n\x08\x45ncloses\"\r\n\x0b\x46ullyInside\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x93\x0e\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18/ \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xe8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18\x1b \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"H\n\nTagFilters\x12:\n\x0btag_filters\x18\x01 \x03(\x0b\x32 .google.privacy.dlp.v2.TagFilterB\x03\xe0\x41\x02\"S\n\tTagFilter\x12\x1e\n\x14namespaced_tag_value\x18\x01 \x01(\tH\x00\x12\x1c\n\x12namespaced_tag_key\x18\x02 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"%\n\x0e\x44\x61taSourceType\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xb6\x05\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x12\x66\n\x1a\x64ocument_fallback_location\x18\x02 \x01(\x0b\x32\x42.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\x1a\xd4\x01\n\x18\x44ocumentFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\"K\n\x17SaveToGcsFindingsOutput\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\"\xc6\x02\n\x06\x44omain\x12\x38\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32&.google.privacy.dlp.v2.Domain.Category\x12\x35\n\x07signals\x18\x02 \x03(\x0e\x32$.google.privacy.dlp.v2.Domain.Signal\"6\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41I\x10\x01\x12\x08\n\x04\x43ODE\x10\x02\"\x92\x01\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\t\n\x05MODEL\x10\x01\x12\x12\n\x0eTEXT_EMBEDDING\x10\x02\x12\r\n\tEMBEDDING\x10\x07\x12\x11\n\rVERTEX_PLUGIN\x10\x03\x12\x11\n\rVECTOR_PLUGIN\x10\x04\x12\x0f\n\x0bSOURCE_CODE\x10\x05\x12\x0b\n\x07SERVICE\x10\x06*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\xae\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03\x12\x1f\n\x1bMATCHING_TYPE_RULE_SPECIFIC\x10\x04*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*X\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02\x12\x14\n\x10\x43ONTENT_METADATA\x10\x03*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" +descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\x9a\x01\n\x16\x45xcludeByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12K\n\x16image_containment_type\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xbb\x03\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12R\n\x19\x65xclude_by_image_findings\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.ExcludeByImageFindingsH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xc7\x01\n\x19\x41\x64justByMatchingInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12:\n\rmatching_type\x18\x03 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingType\"\xd4\x01\n\x15\x41\x64justByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12K\n\x16image_containment_type\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xb4\x02\n\x0e\x41\x64justmentRule\x12Y\n\x1d\x61\x64just_by_matching_info_types\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AdjustByMatchingInfoTypesH\x00\x12P\n\x18\x61\x64just_by_image_findings\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.AdjustByImageFindingsH\x00\x12g\n\x15likelihood_adjustment\x18\x02 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x0c\n\nconditions\"\xf3\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x12@\n\x0f\x61\x64justment_rule\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.AdjustmentRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\xd9\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x12@\n\x10\x63ontent_metadata\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.ContentMetadataB\x0b\n\tdata_item\"V\n\x0f\x43ontentMetadata\x12\x43\n\nproperties\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.KeyValueMetadataProperty\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"6\n\x18KeyValueMetadataProperty\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\xe6\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x12P\n\x18key_value_metadata_label\x18\x04 \x01(\x0b\x32,.google.privacy.dlp.v2.KeyValueMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"$\n\x15KeyValueMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xb3\x04\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x12\x18\n\x10inspect_template\x18\t \x01(\t\x12\x1b\n\x13\x64\x65identify_template\x18\n \x01(\t\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xf8\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12?\n\x0cstorage_path\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xdf\x01\n\x0fLocationSupport\x12Z\n\x15regionalization_scope\x18\x01 \x01(\x0e\x32;.google.privacy.dlp.v2.LocationSupport.RegionalizationScope\x12\x11\n\tlocations\x18\x02 \x03(\t\"]\n\x14RegionalizationScope\x12%\n!REGIONALIZATION_SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REGIONAL\x10\x01\x12\x10\n\x0c\x41NY_LOCATION\x10\x02\"\x9b\x05\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12@\n\x10location_support\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.LocationSupport\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\x12V\n\rlaunch_status\x18\r \x01(\x0e\x32?.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus\"\x82\x01\n\x14InfoTypeLaunchStatus\x12\'\n#INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14GENERAL_AVAILABILITY\x10\x01\x12\x12\n\x0ePUBLIC_PREVIEW\x10\x02\x12\x13\n\x0fPRIVATE_PREVIEW\x10\x03\"\x90\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xef\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0b\n\x07\x41USTRIA\x10\x35\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\x82\n\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12u\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogB\x02\x18\x01H\x00\x12n\n$publish_findings_to_dataplex_catalog\x18\n \x01(\x0b\x32>.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\"\n PublishFindingsToDataplexCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"\xa7\x01\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x12<\n\x0cinclude_tags\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.TagFiltersB\x03\xe0\x41\x01\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xc3\x01\n\x14ImageContainmentType\x12\x33\n\x08\x65ncloses\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EnclosesH\x00\x12:\n\x0c\x66ully_inside\x18\x02 \x01(\x0b\x32\".google.privacy.dlp.v2.FullyInsideH\x00\x12\x32\n\x08overlaps\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.OverlapH\x00\x42\x06\n\x04type\"\t\n\x07Overlap\"\n\n\x08\x45ncloses\"\r\n\x0b\x46ullyInside\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x93\x0e\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18/ \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xe8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18\x1b \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"H\n\nTagFilters\x12:\n\x0btag_filters\x18\x01 \x03(\x0b\x32 .google.privacy.dlp.v2.TagFilterB\x03\xe0\x41\x02\"S\n\tTagFilter\x12\x1e\n\x14namespaced_tag_value\x18\x01 \x01(\tH\x00\x12\x1c\n\x12namespaced_tag_key\x18\x02 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"%\n\x0e\x44\x61taSourceType\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xb6\x05\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x12\x66\n\x1a\x64ocument_fallback_location\x18\x02 \x01(\x0b\x32\x42.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\x1a\xd4\x01\n\x18\x44ocumentFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\"K\n\x17SaveToGcsFindingsOutput\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\"\xc6\x02\n\x06\x44omain\x12\x38\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32&.google.privacy.dlp.v2.Domain.Category\x12\x35\n\x07signals\x18\x02 \x03(\x0e\x32$.google.privacy.dlp.v2.Domain.Signal\"6\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41I\x10\x01\x12\x08\n\x04\x43ODE\x10\x02\"\x92\x01\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\t\n\x05MODEL\x10\x01\x12\x12\n\x0eTEXT_EMBEDDING\x10\x02\x12\r\n\tEMBEDDING\x10\x07\x12\x11\n\rVERTEX_PLUGIN\x10\x03\x12\x11\n\rVECTOR_PLUGIN\x10\x04\x12\x0f\n\x0bSOURCE_CODE\x10\x05\x12\x0b\n\x07SERVICE\x10\x06*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\xae\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03\x12\x1f\n\x1bMATCHING_TYPE_RULE_SPECIFIC\x10\x04*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*v\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02\x12\x14\n\x10\x43ONTENT_METADATA\x10\x03\x12\x1c\n\x18\x43LIENT_PROVIDED_METADATA\x10\x04*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -44,8 +44,10 @@ module V2 ByteContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem").msgclass ByteContentItem::BytesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem.BytesType").enummodule ContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentItem").msgclass + ContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentMetadata").msgclass Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table").msgclass Table::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table.Row").msgclass + KeyValueMetadataProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KeyValueMetadataProperty").msgclass InspectResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectResult").msgclass Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Finding").msgclass Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Location").msgclass diff --git a/google-cloud-dlp-v2/proto_docs/google/api/client.rb b/google-cloud-dlp-v2/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-dlp-v2/proto_docs/google/api/client.rb +++ b/google-cloud-dlp-v2/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!attribute [rw] selective_gapic_generation # @return [::Google::Api::SelectiveGapicGeneration] # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. class CommonLanguageSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -441,6 +443,8 @@ class LongRunning # This message is used to configure the generation of a subset of the RPCs in # a service for client libraries. + # + # Note: This feature should not be used in most cases. # @!attribute [rw] methods # @return [::Array<::String>] # An allowlist of the fully qualified names of RPCs that should be included diff --git a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb index 3d49cf883dc6..59b229251dcd 100644 --- a/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb +++ b/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb @@ -488,11 +488,23 @@ module BytesType # Content data to inspect or redact. Replaces `type` and `data`. # # Note: The following fields are mutually exclusive: `byte_item`, `value`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] content_metadata + # @return [::Google::Cloud::Dlp::V2::ContentMetadata] + # User provided metadata for the content. class ContentItem include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # Metadata on content to be scanned. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::Dlp::V2::KeyValueMetadataProperty>] + # User provided key-value pairs of content metadata. + class ContentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Structured content to inspect. Up to 50,000 `Value`s per request allowed. See # https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table # to learn more. @@ -516,6 +528,18 @@ class Row end end + # A key-value pair in the Metadata. + # @!attribute [rw] key + # @return [::String] + # The key of the property. + # @!attribute [rw] value + # @return [::String] + # The value of the property. + class KeyValueMetadataProperty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # All the findings for a single scanned item. # @!attribute [rw] findings # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] @@ -8828,6 +8852,9 @@ module MetadataType # Metadata extracted from the files. CONTENT_METADATA = 3 + + # Metadata provided by the client. + CLIENT_PROVIDED_METADATA = 4 end # Parts of the APIs which use certain infoTypes. diff --git a/owl-bot-staging/google-cloud-dlp-v2/.gitignore b/owl-bot-staging/google-cloud-dlp-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json deleted file mode 100644 index 62037e73a293..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "dlp.googleapis.com", - "api_shortname": "dlp", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest", - "distribution_name": "google-cloud-dlp-v2", - "is_cloud": true, - "language": "ruby", - "name": "dlp", - "name_pretty": "Cloud Data Loss Prevention (DLP) V2 API", - "product_documentation": "https://cloud.google.com/dlp", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. Note that google-cloud-dlp-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dlp instead. See the readme for more details.", - "ruby-cloud-env-prefix": "DLP", - "ruby-cloud-product-url": "https://cloud.google.com/dlp", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml b/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml deleted file mode 100644 index a29f692b0af2..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-dlp-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-dlp-v2.rb" diff --git a/owl-bot-staging/google-cloud-dlp-v2/.toys.rb b/owl-bot-staging/google-cloud-dlp-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/.yardopts b/owl-bot-staging/google-cloud-dlp-v2/.yardopts deleted file mode 100644 index b70bc23263e3..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Data Loss Prevention (DLP) V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md deleted file mode 100644 index 3a45b665dc2a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-dlp-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-dlp-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/dlp/v2" - -client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/dlp/v2" - -::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Dlp::V2::DlpService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-dlp-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/dlp/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Dlp::V2::DlpService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-dlp-v2/Gemfile b/owl-bot-staging/google-cloud-dlp-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md b/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-dlp-v2/README.md b/owl-bot-staging/google-cloud-dlp-v2/README.md deleted file mode 100644 index 2c0634d76a43..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Data Loss Prevention (DLP) V2 API - -Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease. - -Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Data Loss Prevention (DLP) V2 API. Most users should consider using -the main client gem, -[google-cloud-dlp](https://rubygems.org/gems/google-cloud-dlp). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-dlp-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/dlp/v2" - -client = ::Google::Cloud::Dlp::V2::DlpService::Client.new -request = ::Google::Cloud::Dlp::V2::InspectContentRequest.new # (request fields as keyword arguments...) -response = client.inspect_content request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/dlp) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/dlp/v2" -require "logger" - -client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-dlp`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-dlp-v2`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-dlp`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-dlp-v2`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dlp-v2/Rakefile b/owl-bot-staging/google-cloud-dlp-v2/Rakefile deleted file mode 100644 index 4b3dae5465af..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-dlp-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["DLP_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["DLP_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["DLP_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or DLP_TEST_PROJECT=test123 DLP_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/dlp/v2/dlp_service/credentials" - ::Google::Cloud::Dlp::V2::DlpService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["DLP_PROJECT"] = project - ENV["DLP_TEST_PROJECT"] = project - ENV["DLP_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-dlp-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dlp-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dlp-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-dlp-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-dlp-v2" - header "google-cloud-dlp-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-dlp-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-dlp-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-dlp-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-dlp-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json deleted file mode 100644 index 2d460b34261e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/gapic_metadata.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.privacy.dlp.v2", - "libraryPackage": "::Google::Cloud::Dlp::V2", - "services": { - "DlpService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dlp::V2::DlpService::Client", - "rpcs": { - "InspectContent": { - "methods": [ - "inspect_content" - ] - }, - "RedactImage": { - "methods": [ - "redact_image" - ] - }, - "DeidentifyContent": { - "methods": [ - "deidentify_content" - ] - }, - "ReidentifyContent": { - "methods": [ - "reidentify_content" - ] - }, - "ListInfoTypes": { - "methods": [ - "list_info_types" - ] - }, - "CreateInspectTemplate": { - "methods": [ - "create_inspect_template" - ] - }, - "UpdateInspectTemplate": { - "methods": [ - "update_inspect_template" - ] - }, - "GetInspectTemplate": { - "methods": [ - "get_inspect_template" - ] - }, - "ListInspectTemplates": { - "methods": [ - "list_inspect_templates" - ] - }, - "DeleteInspectTemplate": { - "methods": [ - "delete_inspect_template" - ] - }, - "CreateDeidentifyTemplate": { - "methods": [ - "create_deidentify_template" - ] - }, - "UpdateDeidentifyTemplate": { - "methods": [ - "update_deidentify_template" - ] - }, - "GetDeidentifyTemplate": { - "methods": [ - "get_deidentify_template" - ] - }, - "ListDeidentifyTemplates": { - "methods": [ - "list_deidentify_templates" - ] - }, - "DeleteDeidentifyTemplate": { - "methods": [ - "delete_deidentify_template" - ] - }, - "CreateJobTrigger": { - "methods": [ - "create_job_trigger" - ] - }, - "UpdateJobTrigger": { - "methods": [ - "update_job_trigger" - ] - }, - "HybridInspectJobTrigger": { - "methods": [ - "hybrid_inspect_job_trigger" - ] - }, - "GetJobTrigger": { - "methods": [ - "get_job_trigger" - ] - }, - "ListJobTriggers": { - "methods": [ - "list_job_triggers" - ] - }, - "DeleteJobTrigger": { - "methods": [ - "delete_job_trigger" - ] - }, - "ActivateJobTrigger": { - "methods": [ - "activate_job_trigger" - ] - }, - "CreateDiscoveryConfig": { - "methods": [ - "create_discovery_config" - ] - }, - "UpdateDiscoveryConfig": { - "methods": [ - "update_discovery_config" - ] - }, - "GetDiscoveryConfig": { - "methods": [ - "get_discovery_config" - ] - }, - "ListDiscoveryConfigs": { - "methods": [ - "list_discovery_configs" - ] - }, - "DeleteDiscoveryConfig": { - "methods": [ - "delete_discovery_config" - ] - }, - "CreateDlpJob": { - "methods": [ - "create_dlp_job" - ] - }, - "ListDlpJobs": { - "methods": [ - "list_dlp_jobs" - ] - }, - "GetDlpJob": { - "methods": [ - "get_dlp_job" - ] - }, - "DeleteDlpJob": { - "methods": [ - "delete_dlp_job" - ] - }, - "CancelDlpJob": { - "methods": [ - "cancel_dlp_job" - ] - }, - "CreateStoredInfoType": { - "methods": [ - "create_stored_info_type" - ] - }, - "UpdateStoredInfoType": { - "methods": [ - "update_stored_info_type" - ] - }, - "GetStoredInfoType": { - "methods": [ - "get_stored_info_type" - ] - }, - "ListStoredInfoTypes": { - "methods": [ - "list_stored_info_types" - ] - }, - "DeleteStoredInfoType": { - "methods": [ - "delete_stored_info_type" - ] - }, - "ListProjectDataProfiles": { - "methods": [ - "list_project_data_profiles" - ] - }, - "ListTableDataProfiles": { - "methods": [ - "list_table_data_profiles" - ] - }, - "ListColumnDataProfiles": { - "methods": [ - "list_column_data_profiles" - ] - }, - "GetProjectDataProfile": { - "methods": [ - "get_project_data_profile" - ] - }, - "ListFileStoreDataProfiles": { - "methods": [ - "list_file_store_data_profiles" - ] - }, - "GetFileStoreDataProfile": { - "methods": [ - "get_file_store_data_profile" - ] - }, - "DeleteFileStoreDataProfile": { - "methods": [ - "delete_file_store_data_profile" - ] - }, - "GetTableDataProfile": { - "methods": [ - "get_table_data_profile" - ] - }, - "GetColumnDataProfile": { - "methods": [ - "get_column_data_profile" - ] - }, - "DeleteTableDataProfile": { - "methods": [ - "delete_table_data_profile" - ] - }, - "HybridInspectDlpJob": { - "methods": [ - "hybrid_inspect_dlp_job" - ] - }, - "FinishDlpJob": { - "methods": [ - "finish_dlp_job" - ] - }, - "CreateConnection": { - "methods": [ - "create_connection" - ] - }, - "GetConnection": { - "methods": [ - "get_connection" - ] - }, - "ListConnections": { - "methods": [ - "list_connections" - ] - }, - "SearchConnections": { - "methods": [ - "search_connections" - ] - }, - "DeleteConnection": { - "methods": [ - "delete_connection" - ] - }, - "UpdateConnection": { - "methods": [ - "update_connection" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec b/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec deleted file mode 100644 index 055e491d135e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/google-cloud-dlp-v2.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/dlp/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-dlp-v2" - gem.version = Google::Cloud::Dlp::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. Note that google-cloud-dlp-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dlp instead. See the readme for more details." - gem.summary = "Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb deleted file mode 100644 index 3d5140ab8826..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google-cloud-dlp-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/dlp/v2" diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb deleted file mode 100644 index 56f661164443..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dlp/v2/dlp_service" -require "google/cloud/dlp/v2/version" - -module Google - module Cloud - module Dlp - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/dlp/v2" - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/dlp/v2" - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/dlp/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb deleted file mode 100644 index ccaa5a19eba2..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dlp/v2/version" - -require "google/cloud/dlp/v2/dlp_service/credentials" -require "google/cloud/dlp/v2/dlp_service/paths" -require "google/cloud/dlp/v2/dlp_service/client" -require "google/cloud/dlp/v2/dlp_service/rest" - -module Google - module Cloud - module Dlp - module V2 - ## - # Sensitive Data Protection provides access to a powerful sensitive data - # inspection, classification, and de-identification platform that works - # on text, images, and Google Cloud storage repositories. - # To learn more about concepts and find how-to guides see - # https://cloud.google.com/sensitive-data-protection/docs/. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dlp/v2/dlp_service" - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dlp/v2/dlp_service/rest" - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - module DlpService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dlp_service", "helpers.rb" -require "google/cloud/dlp/v2/dlp_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb deleted file mode 100644 index b0937c8d57ec..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/client.rb +++ /dev/null @@ -1,6826 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/privacy/dlp/v2/dlp_pb" -require "google/cloud/location" - -module Google - module Cloud - module Dlp - module V2 - module DlpService - ## - # Client for the DlpService service. - # - # Sensitive Data Protection provides access to a powerful sensitive data - # inspection, classification, and de-identification platform that works - # on text, images, and Google Cloud storage repositories. - # To learn more about concepts and find how-to guides see - # https://cloud.google.com/sensitive-data-protection/docs/. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dlp_service_stub - - ## - # Configure the DlpService Client class. - # - # See {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DlpService clients - # ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dlp", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.inspect_content.timeout = 300.0 - default_config.rpcs.inspect_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.redact_image.timeout = 300.0 - default_config.rpcs.redact_image.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deidentify_content.timeout = 300.0 - default_config.rpcs.deidentify_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.reidentify_content.timeout = 300.0 - default_config.rpcs.reidentify_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_info_types.timeout = 300.0 - default_config.rpcs.list_info_types.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_inspect_template.timeout = 300.0 - - default_config.rpcs.update_inspect_template.timeout = 300.0 - - default_config.rpcs.get_inspect_template.timeout = 300.0 - default_config.rpcs.get_inspect_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_inspect_templates.timeout = 300.0 - default_config.rpcs.list_inspect_templates.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_inspect_template.timeout = 300.0 - default_config.rpcs.delete_inspect_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_deidentify_template.timeout = 300.0 - - default_config.rpcs.update_deidentify_template.timeout = 300.0 - - default_config.rpcs.get_deidentify_template.timeout = 300.0 - default_config.rpcs.get_deidentify_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_deidentify_templates.timeout = 300.0 - default_config.rpcs.list_deidentify_templates.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_deidentify_template.timeout = 300.0 - default_config.rpcs.delete_deidentify_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_job_trigger.timeout = 300.0 - - default_config.rpcs.update_job_trigger.timeout = 300.0 - - default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0 - - default_config.rpcs.get_job_trigger.timeout = 300.0 - default_config.rpcs.get_job_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_job_triggers.timeout = 300.0 - default_config.rpcs.list_job_triggers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_job_trigger.timeout = 300.0 - default_config.rpcs.delete_job_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.activate_job_trigger.timeout = 300.0 - - default_config.rpcs.create_discovery_config.timeout = 300.0 - - default_config.rpcs.update_discovery_config.timeout = 300.0 - - default_config.rpcs.get_discovery_config.timeout = 300.0 - default_config.rpcs.get_discovery_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_discovery_configs.timeout = 300.0 - default_config.rpcs.list_discovery_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_discovery_config.timeout = 300.0 - default_config.rpcs.delete_discovery_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_dlp_job.timeout = 300.0 - - default_config.rpcs.list_dlp_jobs.timeout = 300.0 - default_config.rpcs.list_dlp_jobs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_dlp_job.timeout = 300.0 - default_config.rpcs.get_dlp_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_dlp_job.timeout = 300.0 - default_config.rpcs.delete_dlp_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.cancel_dlp_job.timeout = 300.0 - - default_config.rpcs.create_stored_info_type.timeout = 300.0 - - default_config.rpcs.update_stored_info_type.timeout = 300.0 - - default_config.rpcs.get_stored_info_type.timeout = 300.0 - default_config.rpcs.get_stored_info_type.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_stored_info_types.timeout = 300.0 - default_config.rpcs.list_stored_info_types.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_stored_info_type.timeout = 300.0 - default_config.rpcs.delete_stored_info_type.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_project_data_profiles.timeout = 300.0 - default_config.rpcs.list_project_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_data_profiles.timeout = 300.0 - default_config.rpcs.list_table_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_data_profiles.timeout = 300.0 - default_config.rpcs.list_column_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_project_data_profile.timeout = 300.0 - default_config.rpcs.get_project_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_file_store_data_profiles.timeout = 300.0 - default_config.rpcs.list_file_store_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_file_store_data_profile.timeout = 300.0 - default_config.rpcs.get_file_store_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_file_store_data_profile.timeout = 300.0 - default_config.rpcs.delete_file_store_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_data_profile.timeout = 300.0 - default_config.rpcs.get_table_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_column_data_profile.timeout = 300.0 - default_config.rpcs.get_column_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0 - - default_config.rpcs.finish_dlp_job.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DlpService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dlp_service_stub.universe_domain - end - - ## - # Create a new DlpService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DlpService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/privacy/dlp/v2/dlp_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @dlp_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dlp::V2::DlpService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @dlp_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dlp_service_stub.endpoint - config.universe_domain = @dlp_service_stub.universe_domain - config.logger = @dlp_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dlp_service_stub.logger - end - - # Service calls - - ## - # Finds potentially sensitive info in content. - # This method has limits on input size, processing time, and output size. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # For how to guides, see - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images - # and - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, - # - # @overload inspect_content(request, options = nil) - # Pass arguments to `inspect_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::InspectContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) - # Pass arguments to `inspect_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. What specified here will override - # the template referenced by the inspect_template_name argument. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to inspect. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::InspectContentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::InspectContentRequest.new - # - # # Call the inspect_content method. - # result = client.inspect_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. - # p result - # - def inspect_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::InspectContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.inspect_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.inspect_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.inspect_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :inspect_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Redacts potentially sensitive info from an image. - # This method has limits on input size, processing time, and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # Only the first frame of each multiframe image is redacted. Metadata and - # other frames are omitted in the response. - # - # @overload redact_image(request, options = nil) - # Pass arguments to `redact_image` via a request object, either of type - # {::Google::Cloud::Dlp::V2::RedactImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::RedactImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, inspect_template: nil, deidentify_template: nil) - # Pass arguments to `redact_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param location_id [::String] - # Deprecated. This field has no effect. - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # @param image_redaction_configs [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, ::Hash>] - # The configuration for specifying what content to redact from images. - # @param include_findings [::Boolean] - # Whether the response should include findings along with the redacted - # image. - # @param byte_item [::Google::Cloud::Dlp::V2::ByteContentItem, ::Hash] - # The content must be PNG, JPEG, SVG or BMP. - # @param inspect_template [::String] - # The full resource name of the inspection template to use. Settings in the - # main `inspect_config` field override the corresponding settings in this - # inspection template. - # - # The merge behavior is as follows: - # - # - Singular field: The main field's value replaces the value of the - # corresponding field in the template. - # - Repeated fields: The field values are appended to the list defined in - # the template. - # - Sub-messages and groups: The fields are recursively merged. - # @param deidentify_template [::String] - # The full resource name of the de-identification template to use. Settings - # in the main `image_redaction_configs` field override the corresponding - # settings in this de-identification template. The request fails if the - # type of the template's deidentify_config is not image_transformations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::RedactImageResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::RedactImageRequest.new - # - # # Call the redact_image method. - # result = client.redact_image request - # - # # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. - # p result - # - def redact_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::RedactImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.redact_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.redact_image.timeout, - metadata: metadata, - retry_policy: @config.rpcs.redact_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :redact_image, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # De-identifies potentially sensitive info from a ContentItem. - # This method has limits on input size and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # @overload deidentify_content(request, options = nil) - # Pass arguments to `deidentify_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) - # Pass arguments to `deidentify_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param deidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] - # Configuration for the de-identification of the content item. - # Items specified here will override the template referenced by the - # deidentify_template_name argument. - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # Items specified here will override the template referenced by the - # inspect_template_name argument. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to de-identify. Will be treated as text. - # - # This value must be of type - # {::Google::Cloud::Dlp::V2::Table Table} if your - # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} - # is a - # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} - # object. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param deidentify_template_name [::String] - # Template to use. Any configuration directly specified in - # deidentify_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new - # - # # Call the deidentify_content method. - # result = client.deidentify_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. - # p result - # - def deidentify_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeidentifyContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deidentify_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deidentify_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :deidentify_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-identifies content that has been de-identified. - # See - # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example - # to learn more. - # - # @overload reidentify_content(request, options = nil) - # Pass arguments to `reidentify_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ReidentifyContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil) - # Pass arguments to `reidentify_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param reidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] - # Configuration for the re-identification of the content item. - # This field shares the same proto message type that is used for - # de-identification, however its usage here is for the reversal of the - # previous de-identification. Re-identification is performed by examining - # the transformations used to de-identify the items and executing the - # reverse. This requires that only reversible transformations - # be provided here. The reversible transformations are: - # - # - `CryptoDeterministicConfig` - # - `CryptoReplaceFfxFpeConfig` - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to re-identify. Will be treated as text. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # `inspect_config` will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param reidentify_template_name [::String] - # Template to use. References an instance of `DeidentifyTemplate`. - # Any configuration directly specified in `reidentify_config` or - # `inspect_config` will override those set in the template. The - # `DeidentifyTemplate` used must include only reversible transformations. - # Singular fields that are set in this request will replace their - # corresponding fields in the template. Repeated fields are appended. - # Singular sub-messages and groups are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new - # - # # Call the reidentify_content method. - # result = client.reidentify_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. - # p result - # - def reidentify_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ReidentifyContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reidentify_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reidentify_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :reidentify_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of the sensitive information types that the DLP API - # supports. See - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # to learn more. - # - # @overload list_info_types(request, options = nil) - # Pass arguments to `list_info_types` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListInfoTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) - # Pass arguments to `list_info_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The parent resource name. - # - # The format of this value is as follows: - # - # `locations/{location_id}` - # @param language_code [::String] - # BCP-47 language code for localized infoType friendly - # names. If omitted, or if localized strings are not available, - # en-US strings will be returned. - # @param filter [::String] - # filter to only return infoTypes supported by certain parts of the - # API. Defaults to supported_by=INSPECT. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new - # - # # Call the list_info_types method. - # result = client.list_info_types request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. - # p result - # - def list_info_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInfoTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_info_types.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_info_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_info_types, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an InspectTemplate for reusing frequently used configuration - # for inspecting content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload create_inspect_template(request, options = nil) - # Pass arguments to `create_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) - # Pass arguments to `create_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] - # Required. The InspectTemplate to create. - # @param template_id [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new - # - # # Call the create_inspect_template method. - # result = client.create_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def create_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_inspect_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload update_inspect_template(request, options = nil) - # Pass arguments to `update_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) - # Pass arguments to `update_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and inspectTemplate to be updated, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] - # New InspectTemplate value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new - # - # # Call the update_inspect_template method. - # result = client.update_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def update_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_inspect_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload get_inspect_template(request, options = nil) - # Pass arguments to `get_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_inspect_template(name: nil) - # Pass arguments to `get_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and inspectTemplate to be read, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new - # - # # Call the get_inspect_template method. - # result = client.get_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def get_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_inspect_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists InspectTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload list_inspect_templates(request, options = nil) - # Pass arguments to `list_inspect_templates` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_inspect_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListInspectTemplates`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new - # - # # Call the list_inspect_templates method. - # result = client.list_inspect_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. - # p item - # end - # - def list_inspect_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_inspect_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_inspect_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_inspect_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload delete_inspect_template(request, options = nil) - # Pass arguments to `delete_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_inspect_template(name: nil) - # Pass arguments to `delete_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and inspectTemplate to be - # deleted, for example `organizations/433245324/inspectTemplates/432452342` - # or projects/project-id/inspectTemplates/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new - # - # # Call the delete_inspect_template method. - # result = client.delete_inspect_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_inspect_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a DeidentifyTemplate for reusing frequently used configuration - # for de-identifying content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload create_deidentify_template(request, options = nil) - # Pass arguments to `create_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) - # Pass arguments to `create_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] - # Required. The DeidentifyTemplate to create. - # @param template_id [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new - # - # # Call the create_deidentify_template method. - # result = client.create_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def create_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_deidentify_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload update_deidentify_template(request, options = nil) - # Pass arguments to `update_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) - # Pass arguments to `update_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and deidentify template to be - # updated, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] - # New DeidentifyTemplate value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new - # - # # Call the update_deidentify_template method. - # result = client.update_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def update_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_deidentify_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload get_deidentify_template(request, options = nil) - # Pass arguments to `get_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_deidentify_template(name: nil) - # Pass arguments to `get_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and deidentify template to be - # read, for example `organizations/433245324/deidentifyTemplates/432452342` - # or projects/project-id/deidentifyTemplates/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new - # - # # Call the get_deidentify_template method. - # result = client.get_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def get_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_deidentify_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DeidentifyTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload list_deidentify_templates(request, options = nil) - # Pass arguments to `list_deidentify_templates` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_deidentify_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListDeidentifyTemplates`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new - # - # # Call the list_deidentify_templates method. - # result = client.list_deidentify_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p item - # end - # - def list_deidentify_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_deidentify_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_deidentify_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_deidentify_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload delete_deidentify_template(request, options = nil) - # Pass arguments to `delete_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_deidentify_template(name: nil) - # Pass arguments to `delete_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and deidentify template to be - # deleted, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new - # - # # Call the delete_deidentify_template method. - # result = client.delete_deidentify_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_deidentify_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a job trigger to run DLP actions such as scanning storage for - # sensitive information on a set schedule. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload create_job_trigger(request, options = nil) - # Pass arguments to `create_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) - # Pass arguments to `create_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] - # Required. The JobTrigger to create. - # @param trigger_id [::String] - # The trigger id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new - # - # # Call the create_job_trigger method. - # result = client.create_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def create_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload update_job_trigger(request, options = nil) - # Pass arguments to `update_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) - # Pass arguments to `update_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] - # New JobTrigger value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new - # - # # Call the update_job_trigger method. - # result = client.update_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def update_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inspect hybrid content and store findings to a trigger. The inspection - # will be processed asynchronously. To review the findings monitor the - # jobs within the trigger. - # - # @overload hybrid_inspect_job_trigger(request, options = nil) - # Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) - # Pass arguments to `hybrid_inspect_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the trigger to execute a hybrid inspect on, for - # example `projects/dlp-test-project/jobTriggers/53234423`. - # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] - # The item to inspect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new - # - # # Call the hybrid_inspect_job_trigger method. - # result = client.hybrid_inspect_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - # p result - # - def hybrid_inspect_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :hybrid_inspect_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload get_job_trigger(request, options = nil) - # Pass arguments to `get_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job_trigger(name: nil) - # Pass arguments to `get_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new - # - # # Call the get_job_trigger method. - # result = client.get_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def get_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists job triggers. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload list_job_triggers(request, options = nil) - # Pass arguments to `list_job_triggers` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListJobTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil) - # Pass arguments to `list_job_triggers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListJobTriggers. `order_by` field must not - # change for subsequent calls. - # @param page_size [::Integer] - # Size of the page. This value can be limited by a server. - # @param order_by [::String] - # Comma-separated list of triggeredJob fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the JobTrigger was created. - # - `update_time`: corresponds to the time the JobTrigger was last updated. - # - `last_run_time`: corresponds to the last time the JobTrigger ran. - # - `name`: corresponds to the JobTrigger's name. - # - `display_name`: corresponds to the JobTrigger's display name. - # - `status`: corresponds to JobTrigger's status. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect triggers: - # - `status` - HEALTHY|PAUSED|CANCELLED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by - # quotation marks. Nanoseconds are ignored. - # - 'error_count' - Number of errors that have occurred while running. - # * The operator must be `=` or `!=` for status and inspected_storage. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND status = HEALTHY - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) - # * last_run_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @param type [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of jobs. Will use `DlpJobType.INSPECT` if not set. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new - # - # # Call the list_job_triggers method. - # result = client.list_job_triggers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. - # p item - # end - # - def list_job_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListJobTriggersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_job_triggers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_job_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_job_triggers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload delete_job_trigger(request, options = nil) - # Pass arguments to `delete_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_job_trigger(name: nil) - # Pass arguments to `delete_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new - # - # # Call the delete_job_trigger method. - # result = client.delete_job_trigger request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a job trigger. Causes the immediate execute of a trigger - # instead of waiting on the trigger event to occur. - # - # @overload activate_job_trigger(request, options = nil) - # Pass arguments to `activate_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload activate_job_trigger(name: nil) - # Pass arguments to `activate_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the trigger to activate, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new - # - # # Call the activate_job_trigger method. - # result = client.activate_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def activate_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.activate_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.activate_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :activate_job_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a config for discovery to scan and profile storage. - # - # @overload create_discovery_config(request, options = nil) - # Pass arguments to `create_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) - # Pass arguments to `create_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] - # Required. The DiscoveryConfig to create. - # @param config_id [::String] - # The config ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new - # - # # Call the create_discovery_config method. - # result = client.create_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def create_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_discovery_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a discovery configuration. - # - # @overload update_discovery_config(request, options = nil) - # Pass arguments to `update_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) - # Pass arguments to `update_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] - # Required. New DiscoveryConfig value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new - # - # # Call the update_discovery_config method. - # result = client.update_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def update_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_discovery_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a discovery configuration. - # - # @overload get_discovery_config(request, options = nil) - # Pass arguments to `get_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_discovery_config(name: nil) - # Pass arguments to `get_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new - # - # # Call the get_discovery_config method. - # result = client.get_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def get_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_discovery_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists discovery configurations. - # - # @overload list_discovery_configs(request, options = nil) - # Pass arguments to `list_discovery_configs` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_discovery_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value is as follows: - # `projects/{project_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListDiscoveryConfigs. `order_by` field must not - # change for subsequent calls. - # @param page_size [::Integer] - # Size of the page. This value can be limited by a server. - # @param order_by [::String] - # Comma-separated list of config fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - # - `name`: corresponds to the DiscoveryConfig's name. - # - `status`: corresponds to DiscoveryConfig's status. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new - # - # # Call the list_discovery_configs method. - # result = client.list_discovery_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. - # p item - # end - # - def list_discovery_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_discovery_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_discovery_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_discovery_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a discovery configuration. - # - # @overload delete_discovery_config(request, options = nil) - # Pass arguments to `delete_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_discovery_config(name: nil) - # Pass arguments to `delete_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the config, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new - # - # # Call the delete_discovery_config method. - # result = client.delete_discovery_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_discovery_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new job to inspect storage or calculate risk metrics. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # @overload create_dlp_job(request, options = nil) - # Pass arguments to `create_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) - # Pass arguments to `create_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] - # An inspection job scans a storage repository for InfoTypes. - # - # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] - # A risk analysis job calculates re-identification risk metrics for a - # BigQuery table. - # - # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param job_id [::String] - # The job id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new - # - # # Call the create_dlp_job method. - # result = client.create_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def create_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DlpJobs that match the specified filter in the request. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload list_dlp_jobs(request, options = nil) - # Pass arguments to `list_dlp_jobs` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDlpJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_dlp_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect jobs: - # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - `trigger_name` - The name of the trigger that created the job. - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * Supported fields for risk analysis jobs: - # - `state` - RUNNING|CANCELED|FINISHED|FAILED - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * The operator must be `=` or `!=`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND state = done - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = done OR state = canceled) - # * end_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param type [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of job. Defaults to `DlpJobType.INSPECT` - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, end_time asc, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the job was created. - # - `end_time`: corresponds to the time the job ended. - # - `name`: corresponds to the job's name. - # - `state`: corresponds to `state` - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new - # - # # Call the list_dlp_jobs method. - # result = client.list_dlp_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. - # p item - # end - # - def list_dlp_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDlpJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_dlp_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_dlp_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_dlp_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running DlpJob. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload get_dlp_job(request, options = nil) - # Pass arguments to `get_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dlp_job(name: nil) - # Pass arguments to `get_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new - # - # # Call the get_dlp_job method. - # result = client.get_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def get_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running DlpJob. This method indicates that the client is - # no longer interested in the DlpJob result. The job will be canceled if - # possible. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload delete_dlp_job(request, options = nil) - # Pass arguments to `delete_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dlp_job(name: nil) - # Pass arguments to `delete_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new - # - # # Call the delete_dlp_job method. - # result = client.delete_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running DlpJob. The server - # makes a best effort to cancel the DlpJob, but success is not - # guaranteed. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload cancel_dlp_job(request, options = nil) - # Pass arguments to `cancel_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CancelDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_dlp_job(name: nil) - # Pass arguments to `cancel_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new - # - # # Call the cancel_dlp_job method. - # result = client.cancel_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CancelDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :cancel_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pre-built stored infoType to be used for inspection. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload create_stored_info_type(request, options = nil) - # Pass arguments to `create_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) - # Pass arguments to `create_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] - # Required. Configuration of the storedInfoType to create. - # @param stored_info_type_id [::String] - # The storedInfoType ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new - # - # # Call the create_stored_info_type method. - # result = client.create_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def create_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_stored_info_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the stored infoType by creating a new version. The existing version - # will continue to be used until the new version is ready. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload update_stored_info_type(request, options = nil) - # Pass arguments to `update_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_stored_info_type(name: nil, config: nil, update_mask: nil) - # Pass arguments to `update_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and storedInfoType to be updated, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] - # Updated configuration for the storedInfoType. If not provided, a new - # version of the storedInfoType will be created with the existing - # configuration. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new - # - # # Call the update_stored_info_type method. - # result = client.update_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def update_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_stored_info_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload get_stored_info_type(request, options = nil) - # Pass arguments to `get_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_stored_info_type(name: nil) - # Pass arguments to `get_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and storedInfoType to be read, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new - # - # # Call the get_stored_info_type method. - # result = client.get_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def get_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_stored_info_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists stored infoTypes. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload list_stored_info_types(request, options = nil) - # Pass arguments to `list_stored_info_types` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_stored_info_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListStoredInfoTypes`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, display_name, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the most recent version of the - # resource was created. - # - `state`: corresponds to the state of the resource. - # - `name`: corresponds to resource name. - # - `display_name`: corresponds to info type's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new - # - # # Call the list_stored_info_types method. - # result = client.list_stored_info_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. - # p item - # end - # - def list_stored_info_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_stored_info_types.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_stored_info_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_stored_info_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload delete_stored_info_type(request, options = nil) - # Pass arguments to `delete_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_stored_info_type(name: nil) - # Pass arguments to `delete_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and storedInfoType to be - # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new - # - # # Call the delete_stored_info_type method. - # result = client.delete_stored_info_type request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_stored_info_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists project data profiles for an organization. - # - # @overload list_project_data_profiles(request, options = nil) - # Pass arguments to `list_project_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_project_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_project_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. organizations/\\{org_id}/locations/\\{loc_id} - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id` - # * `sensitivity_level desc` - # - # Supported fields: - # - # - `project_id`: Google Cloud project ID - # - `sensitivity_level`: How sensitive the data in a project is, at most - # - `data_risk_level`: How much risk is associated with this data - # - `profile_last_generated`: Date and time (in epoch seconds) the profile - # was last generated - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: the Google Cloud project ID - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new - # - # # Call the list_project_data_profiles method. - # result = client.list_project_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. - # p item - # end - # - def list_project_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_project_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_project_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_project_data_profiles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table data profiles for an organization. - # - # @overload list_table_data_profiles(request, options = nil) - # Pass arguments to `list_table_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_table_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_table_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `row_count`: Number of rows in this resource. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `dataset_id`: The BigQuery dataset ID - # - `table_id`: The ID of the BigQuery table - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new - # - # # Call the list_table_data_profiles method. - # result = client.list_table_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. - # p item - # end - # - def list_table_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_table_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_table_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_table_data_profiles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column data profiles for an organization. - # - # @overload list_column_data_profiles(request, options = nil) - # Pass arguments to `list_column_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_column_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a column is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `table_data_profile_name`: The name of the related table data - # profile - # - `project_id`: The Google Cloud project ID (REQUIRED) - # - `dataset_id`: The BigQuery dataset ID (REQUIRED) - # - `table_id`: The BigQuery table ID (REQUIRED) - # - `field_id`: The ID of the BigQuery field - # - `info_type`: The infotype detected in the resource - # - `sensitivity_level`: HIGH|MEDIUM|LOW - # - `data_risk_level`: How much risk is associated with this data - # - `status_code`: An RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` for project_id, dataset_id, and table_id. Other - # filters also support `!=`. The `profile_last_generated` filter also - # supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * project_id = 12345 AND status_code = 1 - # * project_id = 12345 AND sensitivity_level = HIGH - # * project_id = 12345 AND info_type = STREET_ADDRESS - # * profile_last_generated < "2025-01-01T00:00:00.000Z" - # - # The length of this field should be no more than 500 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new - # - # # Call the list_column_data_profiles method. - # result = client.list_column_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. - # p item - # end - # - def list_column_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_column_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_column_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_column_data_profiles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a project data profile. - # - # @overload get_project_data_profile(request, options = nil) - # Pass arguments to `get_project_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_project_data_profile(name: nil) - # Pass arguments to `get_project_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/projectDataProfiles/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new - # - # # Call the get_project_data_profile method. - # result = client.get_project_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. - # p result - # - def get_project_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_project_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_project_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists file store data profiles for an organization. - # - # @overload list_file_store_data_profiles(request, options = nil) - # Pass arguments to `list_file_store_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_file_store_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_file_store_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Optional. Page token to continue retrieval. - # @param page_size [::Integer] - # Optional. Size of the page. This value can be limited by the server. If - # zero, server returns a page of max size 100. - # @param order_by [::String] - # Optional. Comma-separated list of fields to order by, followed by `asc` or - # `desc` postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `name` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `name`: The name of the profile. - # - `create_time`: The time the file store was first created. - # @param filter [::String] - # Optional. Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `account_id`: The AWS account ID - # - `file_store_path`: The path like "gs://bucket" - # - `data_source_type`: The profile's data source type, like - # "google/storage/bucket" - # - `data_storage_location`: The location where the file store's data is - # stored, like "us-central1" - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `file_store_path = "gs://mybucket"` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new - # - # # Call the list_file_store_data_profiles method. - # result = client.list_file_store_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. - # p item - # end - # - def list_file_store_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_file_store_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_file_store_data_profiles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_file_store_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_file_store_data_profiles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_file_store_data_profiles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file store data profile. - # - # @overload get_file_store_data_profile(request, options = nil) - # Pass arguments to `get_file_store_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_file_store_data_profile(name: nil) - # Pass arguments to `get_file_store_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new - # - # # Call the get_file_store_data_profile method. - # result = client.get_file_store_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. - # p result - # - def get_file_store_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_file_store_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_file_store_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_file_store_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_file_store_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a FileStoreDataProfile. Will not prevent the profile from being - # regenerated if the resource is still included in a discovery configuration. - # - # @overload delete_file_store_data_profile(request, options = nil) - # Pass arguments to `delete_file_store_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_file_store_data_profile(name: nil) - # Pass arguments to `delete_file_store_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the file store data profile. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new - # - # # Call the delete_file_store_data_profile method. - # result = client.delete_file_store_data_profile request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_file_store_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_file_store_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_file_store_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_file_store_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_file_store_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table data profile. - # - # @overload get_table_data_profile(request, options = nil) - # Pass arguments to `get_table_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetTableDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_table_data_profile(name: nil) - # Pass arguments to `get_table_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/tableDataProfiles/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::TableDataProfile] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::TableDataProfile] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new - # - # # Call the get_table_data_profile method. - # result = client.get_table_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. - # p result - # - def get_table_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_table_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_table_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_table_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column data profile. - # - # @overload get_column_data_profile(request, options = nil) - # Pass arguments to `get_column_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_column_data_profile(name: nil) - # Pass arguments to `get_column_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/columnDataProfiles/53234423`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new - # - # # Call the get_column_data_profile method. - # result = client.get_column_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. - # p result - # - def get_column_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_column_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_column_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_column_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a TableDataProfile. Will not prevent the profile from being - # regenerated if the table is still included in a discovery configuration. - # - # @overload delete_table_data_profile(request, options = nil) - # Pass arguments to `delete_table_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_table_data_profile(name: nil) - # Pass arguments to `delete_table_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the table data profile. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new - # - # # Call the delete_table_data_profile method. - # result = client.delete_table_data_profile request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_table_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_table_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_table_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_table_data_profile, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inspect hybrid content and store findings to a job. - # To review the findings, inspect the job. Inspection will occur - # asynchronously. - # - # @overload hybrid_inspect_dlp_job(request, options = nil) - # Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) - # Pass arguments to `hybrid_inspect_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the job to execute a hybrid inspect on, for - # example `projects/dlp-test-project/dlpJob/53234423`. - # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] - # The item to inspect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new - # - # # Call the hybrid_inspect_dlp_job method. - # result = client.hybrid_inspect_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - # p result - # - def hybrid_inspect_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :hybrid_inspect_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Finish a running hybrid DlpJob. Triggers the finalization steps and running - # of any enabled actions that have not yet run. - # - # @overload finish_dlp_job(request, options = nil) - # Pass arguments to `finish_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::FinishDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload finish_dlp_job(name: nil) - # Pass arguments to `finish_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be finished. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new - # - # # Call the finish_dlp_job method. - # result = client.finish_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def finish_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::FinishDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.finish_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.finish_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :finish_dlp_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a Connection to an external data source. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_connection(parent: nil, connection: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] - # Required. The connection resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :create_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a Connection by name. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :get_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Connections in a parent. Use SearchConnections to see all connections - # within an organization. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example, `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_size [::Integer] - # Optional. Number of results per page, max 1000. - # @param page_token [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @param filter [::String] - # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :list_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for Connections in a parent. - # - # @overload search_connections(request, options = nil) - # Pass arguments to `search_connections` via a request object, either of type - # {::Google::Cloud::Dlp::V2::SearchConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project with a wildcard - # location, for example, `organizations/433245324/locations/-` or - # `projects/project-id/locations/-`. - # @param page_size [::Integer] - # Optional. Number of results per page, max 1000. - # @param page_token [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @param filter [::String] - # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new - # - # # Call the search_connections method. - # result = client.search_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - # p item - # end - # - def search_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :search_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :search_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a Connection. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_connection(name: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Connection to be deleted, in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :delete_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a Connection. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_connection(name: nil, connection: nil, update_mask: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] - # Required. The connection with new values for the relevant fields. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask to control which fields get updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.call_rpc :update_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DlpService API. - # - # This class represents the configuration for DlpService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dlp::V2::DlpService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # inspect_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dlp::V2::DlpService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.inspect_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.inspect_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dlp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DlpService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `inspect_content` - # @return [::Gapic::Config::Method] - # - attr_reader :inspect_content - ## - # RPC-specific configuration for `redact_image` - # @return [::Gapic::Config::Method] - # - attr_reader :redact_image - ## - # RPC-specific configuration for `deidentify_content` - # @return [::Gapic::Config::Method] - # - attr_reader :deidentify_content - ## - # RPC-specific configuration for `reidentify_content` - # @return [::Gapic::Config::Method] - # - attr_reader :reidentify_content - ## - # RPC-specific configuration for `list_info_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_info_types - ## - # RPC-specific configuration for `create_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_inspect_template - ## - # RPC-specific configuration for `update_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_inspect_template - ## - # RPC-specific configuration for `get_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_inspect_template - ## - # RPC-specific configuration for `list_inspect_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_inspect_templates - ## - # RPC-specific configuration for `delete_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_inspect_template - ## - # RPC-specific configuration for `create_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deidentify_template - ## - # RPC-specific configuration for `update_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deidentify_template - ## - # RPC-specific configuration for `get_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deidentify_template - ## - # RPC-specific configuration for `list_deidentify_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deidentify_templates - ## - # RPC-specific configuration for `delete_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_deidentify_template - ## - # RPC-specific configuration for `create_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job_trigger - ## - # RPC-specific configuration for `update_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_job_trigger - ## - # RPC-specific configuration for `hybrid_inspect_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :hybrid_inspect_job_trigger - ## - # RPC-specific configuration for `get_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job_trigger - ## - # RPC-specific configuration for `list_job_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_job_triggers - ## - # RPC-specific configuration for `delete_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job_trigger - ## - # RPC-specific configuration for `activate_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_job_trigger - ## - # RPC-specific configuration for `create_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_discovery_config - ## - # RPC-specific configuration for `update_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_discovery_config - ## - # RPC-specific configuration for `get_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovery_config - ## - # RPC-specific configuration for `list_discovery_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovery_configs - ## - # RPC-specific configuration for `delete_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_discovery_config - ## - # RPC-specific configuration for `create_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dlp_job - ## - # RPC-specific configuration for `list_dlp_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dlp_jobs - ## - # RPC-specific configuration for `get_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dlp_job - ## - # RPC-specific configuration for `delete_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dlp_job - ## - # RPC-specific configuration for `cancel_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_dlp_job - ## - # RPC-specific configuration for `create_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_stored_info_type - ## - # RPC-specific configuration for `update_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_stored_info_type - ## - # RPC-specific configuration for `get_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_stored_info_type - ## - # RPC-specific configuration for `list_stored_info_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_stored_info_types - ## - # RPC-specific configuration for `delete_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_stored_info_type - ## - # RPC-specific configuration for `list_project_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_project_data_profiles - ## - # RPC-specific configuration for `list_table_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_data_profiles - ## - # RPC-specific configuration for `list_column_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_data_profiles - ## - # RPC-specific configuration for `get_project_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_data_profile - ## - # RPC-specific configuration for `list_file_store_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_file_store_data_profiles - ## - # RPC-specific configuration for `get_file_store_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_store_data_profile - ## - # RPC-specific configuration for `delete_file_store_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file_store_data_profile - ## - # RPC-specific configuration for `get_table_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_data_profile - ## - # RPC-specific configuration for `get_column_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_data_profile - ## - # RPC-specific configuration for `delete_table_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_table_data_profile - ## - # RPC-specific configuration for `hybrid_inspect_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :hybrid_inspect_dlp_job - ## - # RPC-specific configuration for `finish_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :finish_dlp_job - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `search_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :search_connections - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - - # @private - def initialize parent_rpcs = nil - inspect_content_config = parent_rpcs.inspect_content if parent_rpcs.respond_to? :inspect_content - @inspect_content = ::Gapic::Config::Method.new inspect_content_config - redact_image_config = parent_rpcs.redact_image if parent_rpcs.respond_to? :redact_image - @redact_image = ::Gapic::Config::Method.new redact_image_config - deidentify_content_config = parent_rpcs.deidentify_content if parent_rpcs.respond_to? :deidentify_content - @deidentify_content = ::Gapic::Config::Method.new deidentify_content_config - reidentify_content_config = parent_rpcs.reidentify_content if parent_rpcs.respond_to? :reidentify_content - @reidentify_content = ::Gapic::Config::Method.new reidentify_content_config - list_info_types_config = parent_rpcs.list_info_types if parent_rpcs.respond_to? :list_info_types - @list_info_types = ::Gapic::Config::Method.new list_info_types_config - create_inspect_template_config = parent_rpcs.create_inspect_template if parent_rpcs.respond_to? :create_inspect_template - @create_inspect_template = ::Gapic::Config::Method.new create_inspect_template_config - update_inspect_template_config = parent_rpcs.update_inspect_template if parent_rpcs.respond_to? :update_inspect_template - @update_inspect_template = ::Gapic::Config::Method.new update_inspect_template_config - get_inspect_template_config = parent_rpcs.get_inspect_template if parent_rpcs.respond_to? :get_inspect_template - @get_inspect_template = ::Gapic::Config::Method.new get_inspect_template_config - list_inspect_templates_config = parent_rpcs.list_inspect_templates if parent_rpcs.respond_to? :list_inspect_templates - @list_inspect_templates = ::Gapic::Config::Method.new list_inspect_templates_config - delete_inspect_template_config = parent_rpcs.delete_inspect_template if parent_rpcs.respond_to? :delete_inspect_template - @delete_inspect_template = ::Gapic::Config::Method.new delete_inspect_template_config - create_deidentify_template_config = parent_rpcs.create_deidentify_template if parent_rpcs.respond_to? :create_deidentify_template - @create_deidentify_template = ::Gapic::Config::Method.new create_deidentify_template_config - update_deidentify_template_config = parent_rpcs.update_deidentify_template if parent_rpcs.respond_to? :update_deidentify_template - @update_deidentify_template = ::Gapic::Config::Method.new update_deidentify_template_config - get_deidentify_template_config = parent_rpcs.get_deidentify_template if parent_rpcs.respond_to? :get_deidentify_template - @get_deidentify_template = ::Gapic::Config::Method.new get_deidentify_template_config - list_deidentify_templates_config = parent_rpcs.list_deidentify_templates if parent_rpcs.respond_to? :list_deidentify_templates - @list_deidentify_templates = ::Gapic::Config::Method.new list_deidentify_templates_config - delete_deidentify_template_config = parent_rpcs.delete_deidentify_template if parent_rpcs.respond_to? :delete_deidentify_template - @delete_deidentify_template = ::Gapic::Config::Method.new delete_deidentify_template_config - create_job_trigger_config = parent_rpcs.create_job_trigger if parent_rpcs.respond_to? :create_job_trigger - @create_job_trigger = ::Gapic::Config::Method.new create_job_trigger_config - update_job_trigger_config = parent_rpcs.update_job_trigger if parent_rpcs.respond_to? :update_job_trigger - @update_job_trigger = ::Gapic::Config::Method.new update_job_trigger_config - hybrid_inspect_job_trigger_config = parent_rpcs.hybrid_inspect_job_trigger if parent_rpcs.respond_to? :hybrid_inspect_job_trigger - @hybrid_inspect_job_trigger = ::Gapic::Config::Method.new hybrid_inspect_job_trigger_config - get_job_trigger_config = parent_rpcs.get_job_trigger if parent_rpcs.respond_to? :get_job_trigger - @get_job_trigger = ::Gapic::Config::Method.new get_job_trigger_config - list_job_triggers_config = parent_rpcs.list_job_triggers if parent_rpcs.respond_to? :list_job_triggers - @list_job_triggers = ::Gapic::Config::Method.new list_job_triggers_config - delete_job_trigger_config = parent_rpcs.delete_job_trigger if parent_rpcs.respond_to? :delete_job_trigger - @delete_job_trigger = ::Gapic::Config::Method.new delete_job_trigger_config - activate_job_trigger_config = parent_rpcs.activate_job_trigger if parent_rpcs.respond_to? :activate_job_trigger - @activate_job_trigger = ::Gapic::Config::Method.new activate_job_trigger_config - create_discovery_config_config = parent_rpcs.create_discovery_config if parent_rpcs.respond_to? :create_discovery_config - @create_discovery_config = ::Gapic::Config::Method.new create_discovery_config_config - update_discovery_config_config = parent_rpcs.update_discovery_config if parent_rpcs.respond_to? :update_discovery_config - @update_discovery_config = ::Gapic::Config::Method.new update_discovery_config_config - get_discovery_config_config = parent_rpcs.get_discovery_config if parent_rpcs.respond_to? :get_discovery_config - @get_discovery_config = ::Gapic::Config::Method.new get_discovery_config_config - list_discovery_configs_config = parent_rpcs.list_discovery_configs if parent_rpcs.respond_to? :list_discovery_configs - @list_discovery_configs = ::Gapic::Config::Method.new list_discovery_configs_config - delete_discovery_config_config = parent_rpcs.delete_discovery_config if parent_rpcs.respond_to? :delete_discovery_config - @delete_discovery_config = ::Gapic::Config::Method.new delete_discovery_config_config - create_dlp_job_config = parent_rpcs.create_dlp_job if parent_rpcs.respond_to? :create_dlp_job - @create_dlp_job = ::Gapic::Config::Method.new create_dlp_job_config - list_dlp_jobs_config = parent_rpcs.list_dlp_jobs if parent_rpcs.respond_to? :list_dlp_jobs - @list_dlp_jobs = ::Gapic::Config::Method.new list_dlp_jobs_config - get_dlp_job_config = parent_rpcs.get_dlp_job if parent_rpcs.respond_to? :get_dlp_job - @get_dlp_job = ::Gapic::Config::Method.new get_dlp_job_config - delete_dlp_job_config = parent_rpcs.delete_dlp_job if parent_rpcs.respond_to? :delete_dlp_job - @delete_dlp_job = ::Gapic::Config::Method.new delete_dlp_job_config - cancel_dlp_job_config = parent_rpcs.cancel_dlp_job if parent_rpcs.respond_to? :cancel_dlp_job - @cancel_dlp_job = ::Gapic::Config::Method.new cancel_dlp_job_config - create_stored_info_type_config = parent_rpcs.create_stored_info_type if parent_rpcs.respond_to? :create_stored_info_type - @create_stored_info_type = ::Gapic::Config::Method.new create_stored_info_type_config - update_stored_info_type_config = parent_rpcs.update_stored_info_type if parent_rpcs.respond_to? :update_stored_info_type - @update_stored_info_type = ::Gapic::Config::Method.new update_stored_info_type_config - get_stored_info_type_config = parent_rpcs.get_stored_info_type if parent_rpcs.respond_to? :get_stored_info_type - @get_stored_info_type = ::Gapic::Config::Method.new get_stored_info_type_config - list_stored_info_types_config = parent_rpcs.list_stored_info_types if parent_rpcs.respond_to? :list_stored_info_types - @list_stored_info_types = ::Gapic::Config::Method.new list_stored_info_types_config - delete_stored_info_type_config = parent_rpcs.delete_stored_info_type if parent_rpcs.respond_to? :delete_stored_info_type - @delete_stored_info_type = ::Gapic::Config::Method.new delete_stored_info_type_config - list_project_data_profiles_config = parent_rpcs.list_project_data_profiles if parent_rpcs.respond_to? :list_project_data_profiles - @list_project_data_profiles = ::Gapic::Config::Method.new list_project_data_profiles_config - list_table_data_profiles_config = parent_rpcs.list_table_data_profiles if parent_rpcs.respond_to? :list_table_data_profiles - @list_table_data_profiles = ::Gapic::Config::Method.new list_table_data_profiles_config - list_column_data_profiles_config = parent_rpcs.list_column_data_profiles if parent_rpcs.respond_to? :list_column_data_profiles - @list_column_data_profiles = ::Gapic::Config::Method.new list_column_data_profiles_config - get_project_data_profile_config = parent_rpcs.get_project_data_profile if parent_rpcs.respond_to? :get_project_data_profile - @get_project_data_profile = ::Gapic::Config::Method.new get_project_data_profile_config - list_file_store_data_profiles_config = parent_rpcs.list_file_store_data_profiles if parent_rpcs.respond_to? :list_file_store_data_profiles - @list_file_store_data_profiles = ::Gapic::Config::Method.new list_file_store_data_profiles_config - get_file_store_data_profile_config = parent_rpcs.get_file_store_data_profile if parent_rpcs.respond_to? :get_file_store_data_profile - @get_file_store_data_profile = ::Gapic::Config::Method.new get_file_store_data_profile_config - delete_file_store_data_profile_config = parent_rpcs.delete_file_store_data_profile if parent_rpcs.respond_to? :delete_file_store_data_profile - @delete_file_store_data_profile = ::Gapic::Config::Method.new delete_file_store_data_profile_config - get_table_data_profile_config = parent_rpcs.get_table_data_profile if parent_rpcs.respond_to? :get_table_data_profile - @get_table_data_profile = ::Gapic::Config::Method.new get_table_data_profile_config - get_column_data_profile_config = parent_rpcs.get_column_data_profile if parent_rpcs.respond_to? :get_column_data_profile - @get_column_data_profile = ::Gapic::Config::Method.new get_column_data_profile_config - delete_table_data_profile_config = parent_rpcs.delete_table_data_profile if parent_rpcs.respond_to? :delete_table_data_profile - @delete_table_data_profile = ::Gapic::Config::Method.new delete_table_data_profile_config - hybrid_inspect_dlp_job_config = parent_rpcs.hybrid_inspect_dlp_job if parent_rpcs.respond_to? :hybrid_inspect_dlp_job - @hybrid_inspect_dlp_job = ::Gapic::Config::Method.new hybrid_inspect_dlp_job_config - finish_dlp_job_config = parent_rpcs.finish_dlp_job if parent_rpcs.respond_to? :finish_dlp_job - @finish_dlp_job = ::Gapic::Config::Method.new finish_dlp_job_config - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - search_connections_config = parent_rpcs.search_connections if parent_rpcs.respond_to? :search_connections - @search_connections = ::Gapic::Config::Method.new search_connections_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb deleted file mode 100644 index 38405b75a14a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dlp - module V2 - module DlpService - # Credentials for the DlpService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "DLP_CREDENTIALS", - "DLP_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "DLP_CREDENTIALS_JSON", - "DLP_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb deleted file mode 100644 index 4c148d8109b7..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/paths.rb +++ /dev/null @@ -1,618 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dlp - module V2 - module DlpService - # Path helper methods for the DlpService API. - module Paths - ## - # Create a fully-qualified ColumnDataProfile resource string. - # - # @overload column_data_profile_path(organization:, location:, column_data_profile:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}` - # - # @param organization [String] - # @param location [String] - # @param column_data_profile [String] - # - # @overload column_data_profile_path(project:, location:, column_data_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}` - # - # @param project [String] - # @param location [String] - # @param column_data_profile [String] - # - # @return [::String] - def column_data_profile_path **args - resources = { - "column_data_profile:location:organization" => (proc do |organization:, location:, column_data_profile:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/columnDataProfiles/#{column_data_profile}" - end), - "column_data_profile:location:project" => (proc do |project:, location:, column_data_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/columnDataProfiles/#{column_data_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Connection resource string. - # - # @overload connection_path(project:, location:, connection:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # - # @overload connection_path(organization:, location:, connection:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/connections/{connection}` - # - # @param organization [String] - # @param location [String] - # @param connection [String] - # - # @return [::String] - def connection_path **args - resources = { - "connection:location:project" => (proc do |project:, location:, connection:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}" - end), - "connection:location:organization" => (proc do |organization:, location:, connection:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/connections/#{connection}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified DeidentifyTemplate resource string. - # - # @overload deidentify_template_path(organization:, deidentify_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/deidentifyTemplates/{deidentify_template}` - # - # @param organization [String] - # @param deidentify_template [String] - # - # @overload deidentify_template_path(project:, deidentify_template:) - # The resource will be in the following format: - # - # `projects/{project}/deidentifyTemplates/{deidentify_template}` - # - # @param project [String] - # @param deidentify_template [String] - # - # @overload deidentify_template_path(organization:, location:, deidentify_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}` - # - # @param organization [String] - # @param location [String] - # @param deidentify_template [String] - # - # @overload deidentify_template_path(project:, location:, deidentify_template:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}` - # - # @param project [String] - # @param location [String] - # @param deidentify_template [String] - # - # @return [::String] - def deidentify_template_path **args - resources = { - "deidentify_template:organization" => (proc do |organization:, deidentify_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/deidentifyTemplates/#{deidentify_template}" - end), - "deidentify_template:project" => (proc do |project:, deidentify_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/deidentifyTemplates/#{deidentify_template}" - end), - "deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" - end), - "deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified DiscoveryConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}` - # - # @param project [String] - # @param location [String] - # @param discovery_config [String] - # - # @return [::String] - def discovery_config_path project:, location:, discovery_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/discoveryConfigs/#{discovery_config}" - end - - ## - # Create a fully-qualified DlpJob resource string. - # - # @overload dlp_job_path(project:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param dlp_job [String] - # - # @overload dlp_job_path(project:, location:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param location [String] - # @param dlp_job [String] - # - # @return [::String] - def dlp_job_path **args - resources = { - "dlp_job:project" => (proc do |project:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dlpJobs/#{dlp_job}" - end), - "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FileStoreDataProfile resource string. - # - # @overload file_store_data_profile_path(organization:, location:, file_store_data_profile:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}` - # - # @param organization [String] - # @param location [String] - # @param file_store_data_profile [String] - # - # @overload file_store_data_profile_path(project:, location:, file_store_data_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}` - # - # @param project [String] - # @param location [String] - # @param file_store_data_profile [String] - # - # @return [::String] - def file_store_data_profile_path **args - resources = { - "file_store_data_profile:location:organization" => (proc do |organization:, location:, file_store_data_profile:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/fileStoreDataProfiles/#{file_store_data_profile}" - end), - "file_store_data_profile:location:project" => (proc do |project:, location:, file_store_data_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/fileStoreDataProfiles/#{file_store_data_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified InspectTemplate resource string. - # - # @overload inspect_template_path(organization:, inspect_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/inspectTemplates/{inspect_template}` - # - # @param organization [String] - # @param inspect_template [String] - # - # @overload inspect_template_path(project:, inspect_template:) - # The resource will be in the following format: - # - # `projects/{project}/inspectTemplates/{inspect_template}` - # - # @param project [String] - # @param inspect_template [String] - # - # @overload inspect_template_path(organization:, location:, inspect_template:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}` - # - # @param organization [String] - # @param location [String] - # @param inspect_template [String] - # - # @overload inspect_template_path(project:, location:, inspect_template:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` - # - # @param project [String] - # @param location [String] - # @param inspect_template [String] - # - # @return [::String] - def inspect_template_path **args - resources = { - "inspect_template:organization" => (proc do |organization:, inspect_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/inspectTemplates/#{inspect_template}" - end), - "inspect_template:project" => (proc do |project:, inspect_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/inspectTemplates/#{inspect_template}" - end), - "inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}" - end), - "inspect_template:location:project" => (proc do |project:, location:, inspect_template:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified JobTrigger resource string. - # - # @overload job_trigger_path(project:, job_trigger:) - # The resource will be in the following format: - # - # `projects/{project}/jobTriggers/{job_trigger}` - # - # @param project [String] - # @param job_trigger [String] - # - # @overload job_trigger_path(project:, location:, job_trigger:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/jobTriggers/{job_trigger}` - # - # @param project [String] - # @param location [String] - # @param job_trigger [String] - # - # @return [::String] - def job_trigger_path **args - resources = { - "job_trigger:project" => (proc do |project:, job_trigger:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/jobTriggers/#{job_trigger}" - end), - "job_trigger:location:project" => (proc do |project:, location:, job_trigger:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/jobTriggers/#{job_trigger}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ProjectDataProfile resource string. - # - # @overload project_data_profile_path(organization:, location:, project_data_profile:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}` - # - # @param organization [String] - # @param location [String] - # @param project_data_profile [String] - # - # @overload project_data_profile_path(project:, location:, project_data_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}` - # - # @param project [String] - # @param location [String] - # @param project_data_profile [String] - # - # @return [::String] - def project_data_profile_path **args - resources = { - "location:organization:project_data_profile" => (proc do |organization:, location:, project_data_profile:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/projectDataProfiles/#{project_data_profile}" - end), - "location:project:project_data_profile" => (proc do |project:, location:, project_data_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/projectDataProfiles/#{project_data_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified StoredInfoType resource string. - # - # @overload stored_info_type_path(organization:, stored_info_type:) - # The resource will be in the following format: - # - # `organizations/{organization}/storedInfoTypes/{stored_info_type}` - # - # @param organization [String] - # @param stored_info_type [String] - # - # @overload stored_info_type_path(project:, stored_info_type:) - # The resource will be in the following format: - # - # `projects/{project}/storedInfoTypes/{stored_info_type}` - # - # @param project [String] - # @param stored_info_type [String] - # - # @overload stored_info_type_path(organization:, location:, stored_info_type:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}` - # - # @param organization [String] - # @param location [String] - # @param stored_info_type [String] - # - # @overload stored_info_type_path(project:, location:, stored_info_type:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}` - # - # @param project [String] - # @param location [String] - # @param stored_info_type [String] - # - # @return [::String] - def stored_info_type_path **args - resources = { - "organization:stored_info_type" => (proc do |organization:, stored_info_type:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/storedInfoTypes/#{stored_info_type}" - end), - "project:stored_info_type" => (proc do |project:, stored_info_type:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/storedInfoTypes/#{stored_info_type}" - end), - "location:organization:stored_info_type" => (proc do |organization:, location:, stored_info_type:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/storedInfoTypes/#{stored_info_type}" - end), - "location:project:stored_info_type" => (proc do |project:, location:, stored_info_type:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/storedInfoTypes/#{stored_info_type}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified TableDataProfile resource string. - # - # @overload table_data_profile_path(organization:, location:, table_data_profile:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}` - # - # @param organization [String] - # @param location [String] - # @param table_data_profile [String] - # - # @overload table_data_profile_path(project:, location:, table_data_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}` - # - # @param project [String] - # @param location [String] - # @param table_data_profile [String] - # - # @return [::String] - def table_data_profile_path **args - resources = { - "location:organization:table_data_profile" => (proc do |organization:, location:, table_data_profile:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/tableDataProfiles/#{table_data_profile}" - end), - "location:project:table_data_profile" => (proc do |project:, location:, table_data_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tableDataProfiles/#{table_data_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb deleted file mode 100644 index df7b88e14adc..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dlp/v2/version" - -require "google/cloud/dlp/v2/dlp_service/credentials" -require "google/cloud/dlp/v2/dlp_service/paths" -require "google/cloud/dlp/v2/dlp_service/rest/client" - -module Google - module Cloud - module Dlp - module V2 - ## - # Sensitive Data Protection provides access to a powerful sensitive data - # inspection, classification, and de-identification platform that works - # on text, images, and Google Cloud storage repositories. - # To learn more about concepts and find how-to guides see - # https://cloud.google.com/sensitive-data-protection/docs/. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dlp/v2/dlp_service/rest" - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - module DlpService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dlp/v2/dlp_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb deleted file mode 100644 index 2974c4c7d908..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +++ /dev/null @@ -1,6406 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/privacy/dlp/v2/dlp_pb" -require "google/cloud/dlp/v2/dlp_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Dlp - module V2 - module DlpService - module Rest - ## - # REST client for the DlpService service. - # - # Sensitive Data Protection provides access to a powerful sensitive data - # inspection, classification, and de-identification platform that works - # on text, images, and Google Cloud storage repositories. - # To learn more about concepts and find how-to guides see - # https://cloud.google.com/sensitive-data-protection/docs/. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dlp_service_stub - - ## - # Configure the DlpService Client class. - # - # See {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DlpService clients - # ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dlp", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.inspect_content.timeout = 300.0 - default_config.rpcs.inspect_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.redact_image.timeout = 300.0 - default_config.rpcs.redact_image.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deidentify_content.timeout = 300.0 - default_config.rpcs.deidentify_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.reidentify_content.timeout = 300.0 - default_config.rpcs.reidentify_content.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_info_types.timeout = 300.0 - default_config.rpcs.list_info_types.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_inspect_template.timeout = 300.0 - - default_config.rpcs.update_inspect_template.timeout = 300.0 - - default_config.rpcs.get_inspect_template.timeout = 300.0 - default_config.rpcs.get_inspect_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_inspect_templates.timeout = 300.0 - default_config.rpcs.list_inspect_templates.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_inspect_template.timeout = 300.0 - default_config.rpcs.delete_inspect_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_deidentify_template.timeout = 300.0 - - default_config.rpcs.update_deidentify_template.timeout = 300.0 - - default_config.rpcs.get_deidentify_template.timeout = 300.0 - default_config.rpcs.get_deidentify_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_deidentify_templates.timeout = 300.0 - default_config.rpcs.list_deidentify_templates.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_deidentify_template.timeout = 300.0 - default_config.rpcs.delete_deidentify_template.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_job_trigger.timeout = 300.0 - - default_config.rpcs.update_job_trigger.timeout = 300.0 - - default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0 - - default_config.rpcs.get_job_trigger.timeout = 300.0 - default_config.rpcs.get_job_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_job_triggers.timeout = 300.0 - default_config.rpcs.list_job_triggers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_job_trigger.timeout = 300.0 - default_config.rpcs.delete_job_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.activate_job_trigger.timeout = 300.0 - - default_config.rpcs.create_discovery_config.timeout = 300.0 - - default_config.rpcs.update_discovery_config.timeout = 300.0 - - default_config.rpcs.get_discovery_config.timeout = 300.0 - default_config.rpcs.get_discovery_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_discovery_configs.timeout = 300.0 - default_config.rpcs.list_discovery_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_discovery_config.timeout = 300.0 - default_config.rpcs.delete_discovery_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_dlp_job.timeout = 300.0 - - default_config.rpcs.list_dlp_jobs.timeout = 300.0 - default_config.rpcs.list_dlp_jobs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_dlp_job.timeout = 300.0 - default_config.rpcs.get_dlp_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_dlp_job.timeout = 300.0 - default_config.rpcs.delete_dlp_job.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.cancel_dlp_job.timeout = 300.0 - - default_config.rpcs.create_stored_info_type.timeout = 300.0 - - default_config.rpcs.update_stored_info_type.timeout = 300.0 - - default_config.rpcs.get_stored_info_type.timeout = 300.0 - default_config.rpcs.get_stored_info_type.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_stored_info_types.timeout = 300.0 - default_config.rpcs.list_stored_info_types.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_stored_info_type.timeout = 300.0 - default_config.rpcs.delete_stored_info_type.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_project_data_profiles.timeout = 300.0 - default_config.rpcs.list_project_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_data_profiles.timeout = 300.0 - default_config.rpcs.list_table_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_data_profiles.timeout = 300.0 - default_config.rpcs.list_column_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_project_data_profile.timeout = 300.0 - default_config.rpcs.get_project_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_file_store_data_profiles.timeout = 300.0 - default_config.rpcs.list_file_store_data_profiles.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_file_store_data_profile.timeout = 300.0 - default_config.rpcs.get_file_store_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_file_store_data_profile.timeout = 300.0 - default_config.rpcs.delete_file_store_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_data_profile.timeout = 300.0 - default_config.rpcs.get_table_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_column_data_profile.timeout = 300.0 - default_config.rpcs.get_column_data_profile.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0 - - default_config.rpcs.finish_dlp_job.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DlpService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dlp_service_stub.universe_domain - end - - ## - # Create a new DlpService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DlpService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @dlp_service_stub = ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dlp_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dlp_service_stub.endpoint - config.universe_domain = @dlp_service_stub.universe_domain - config.logger = @dlp_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dlp_service_stub.logger - end - - # Service calls - - ## - # Finds potentially sensitive info in content. - # This method has limits on input size, processing time, and output size. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # For how to guides, see - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images - # and - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, - # - # @overload inspect_content(request, options = nil) - # Pass arguments to `inspect_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::InspectContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) - # Pass arguments to `inspect_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. What specified here will override - # the template referenced by the inspect_template_name argument. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to inspect. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::InspectContentRequest.new - # - # # Call the inspect_content method. - # result = client.inspect_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. - # p result - # - def inspect_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::InspectContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.inspect_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.inspect_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.inspect_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.inspect_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Redacts potentially sensitive info from an image. - # This method has limits on input size, processing time, and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # Only the first frame of each multiframe image is redacted. Metadata and - # other frames are omitted in the response. - # - # @overload redact_image(request, options = nil) - # Pass arguments to `redact_image` via a request object, either of type - # {::Google::Cloud::Dlp::V2::RedactImageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::RedactImageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, inspect_template: nil, deidentify_template: nil) - # Pass arguments to `redact_image` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param location_id [::String] - # Deprecated. This field has no effect. - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # @param image_redaction_configs [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, ::Hash>] - # The configuration for specifying what content to redact from images. - # @param include_findings [::Boolean] - # Whether the response should include findings along with the redacted - # image. - # @param byte_item [::Google::Cloud::Dlp::V2::ByteContentItem, ::Hash] - # The content must be PNG, JPEG, SVG or BMP. - # @param inspect_template [::String] - # The full resource name of the inspection template to use. Settings in the - # main `inspect_config` field override the corresponding settings in this - # inspection template. - # - # The merge behavior is as follows: - # - # - Singular field: The main field's value replaces the value of the - # corresponding field in the template. - # - Repeated fields: The field values are appended to the list defined in - # the template. - # - Sub-messages and groups: The fields are recursively merged. - # @param deidentify_template [::String] - # The full resource name of the de-identification template to use. Settings - # in the main `image_redaction_configs` field override the corresponding - # settings in this de-identification template. The request fails if the - # type of the template's deidentify_config is not image_transformations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::RedactImageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::RedactImageRequest.new - # - # # Call the redact_image method. - # result = client.redact_image request - # - # # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. - # p result - # - def redact_image request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::RedactImageRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.redact_image.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.redact_image.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.redact_image.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.redact_image request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # De-identifies potentially sensitive info from a ContentItem. - # This method has limits on input size and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # @overload deidentify_content(request, options = nil) - # Pass arguments to `deidentify_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) - # Pass arguments to `deidentify_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param deidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] - # Configuration for the de-identification of the content item. - # Items specified here will override the template referenced by the - # deidentify_template_name argument. - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # Items specified here will override the template referenced by the - # inspect_template_name argument. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to de-identify. Will be treated as text. - # - # This value must be of type - # {::Google::Cloud::Dlp::V2::Table Table} if your - # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} - # is a - # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} - # object. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param deidentify_template_name [::String] - # Template to use. Any configuration directly specified in - # deidentify_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new - # - # # Call the deidentify_content method. - # result = client.deidentify_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. - # p result - # - def deidentify_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeidentifyContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deidentify_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.deidentify_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deidentify_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.deidentify_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Re-identifies content that has been de-identified. - # See - # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example - # to learn more. - # - # @overload reidentify_content(request, options = nil) - # Pass arguments to `reidentify_content` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ReidentifyContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil) - # Pass arguments to `reidentify_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param reidentify_config [::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash] - # Configuration for the re-identification of the content item. - # This field shares the same proto message type that is used for - # de-identification, however its usage here is for the reversal of the - # previous de-identification. Re-identification is performed by examining - # the transformations used to de-identify the items and executing the - # reverse. This requires that only reversible transformations - # be provided here. The reversible transformations are: - # - # - `CryptoDeterministicConfig` - # - `CryptoReplaceFfxFpeConfig` - # @param inspect_config [::Google::Cloud::Dlp::V2::InspectConfig, ::Hash] - # Configuration for the inspector. - # @param item [::Google::Cloud::Dlp::V2::ContentItem, ::Hash] - # The item to re-identify. Will be treated as text. - # @param inspect_template_name [::String] - # Template to use. Any configuration directly specified in - # `inspect_config` will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @param reidentify_template_name [::String] - # Template to use. References an instance of `DeidentifyTemplate`. - # Any configuration directly specified in `reidentify_config` or - # `inspect_config` will override those set in the template. The - # `DeidentifyTemplate` used must include only reversible transformations. - # Singular fields that are set in this request will replace their - # corresponding fields in the template. Repeated fields are appended. - # Singular sub-messages and groups are recursively merged. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new - # - # # Call the reidentify_content method. - # result = client.reidentify_content request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. - # p result - # - def reidentify_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ReidentifyContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.reidentify_content.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.reidentify_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reidentify_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.reidentify_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of the sensitive information types that the DLP API - # supports. See - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # to learn more. - # - # @overload list_info_types(request, options = nil) - # Pass arguments to `list_info_types` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListInfoTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) - # Pass arguments to `list_info_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The parent resource name. - # - # The format of this value is as follows: - # - # `locations/{location_id}` - # @param language_code [::String] - # BCP-47 language code for localized infoType friendly - # names. If omitted, or if localized strings are not available, - # en-US strings will be returned. - # @param filter [::String] - # filter to only return infoTypes supported by certain parts of the - # API. Defaults to supported_by=INSPECT. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new - # - # # Call the list_info_types method. - # result = client.list_info_types request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. - # p result - # - def list_info_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInfoTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_info_types.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_info_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_info_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_info_types request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an InspectTemplate for reusing frequently used configuration - # for inspecting content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload create_inspect_template(request, options = nil) - # Pass arguments to `create_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) - # Pass arguments to `create_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] - # Required. The InspectTemplate to create. - # @param template_id [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new - # - # # Call the create_inspect_template method. - # result = client.create_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def create_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_inspect_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload update_inspect_template(request, options = nil) - # Pass arguments to `update_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) - # Pass arguments to `update_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and inspectTemplate to be updated, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - # @param inspect_template [::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash] - # New InspectTemplate value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new - # - # # Call the update_inspect_template method. - # result = client.update_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def update_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_inspect_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload get_inspect_template(request, options = nil) - # Pass arguments to `get_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_inspect_template(name: nil) - # Pass arguments to `get_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and inspectTemplate to be read, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new - # - # # Call the get_inspect_template method. - # result = client.get_inspect_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - # p result - # - def get_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_inspect_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists InspectTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload list_inspect_templates(request, options = nil) - # Pass arguments to `list_inspect_templates` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_inspect_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListInspectTemplates`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new - # - # # Call the list_inspect_templates method. - # result = client.list_inspect_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. - # p item - # end - # - def list_inspect_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_inspect_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_inspect_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_inspect_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, "inspect_templates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - # - # @overload delete_inspect_template(request, options = nil) - # Pass arguments to `delete_inspect_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_inspect_template(name: nil) - # Pass arguments to `delete_inspect_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and inspectTemplate to be - # deleted, for example `organizations/433245324/inspectTemplates/432452342` - # or projects/project-id/inspectTemplates/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new - # - # # Call the delete_inspect_template method. - # result = client.delete_inspect_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_inspect_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_inspect_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_inspect_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_inspect_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a DeidentifyTemplate for reusing frequently used configuration - # for de-identifying content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload create_deidentify_template(request, options = nil) - # Pass arguments to `create_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) - # Pass arguments to `create_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] - # Required. The DeidentifyTemplate to create. - # @param template_id [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new - # - # # Call the create_deidentify_template method. - # result = client.create_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def create_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_deidentify_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload update_deidentify_template(request, options = nil) - # Pass arguments to `update_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) - # Pass arguments to `update_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and deidentify template to be - # updated, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - # @param deidentify_template [::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash] - # New DeidentifyTemplate value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new - # - # # Call the update_deidentify_template method. - # result = client.update_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def update_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_deidentify_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload get_deidentify_template(request, options = nil) - # Pass arguments to `get_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_deidentify_template(name: nil) - # Pass arguments to `get_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and deidentify template to be - # read, for example `organizations/433245324/deidentifyTemplates/432452342` - # or projects/project-id/deidentifyTemplates/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new - # - # # Call the get_deidentify_template method. - # result = client.get_deidentify_template request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p result - # - def get_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_deidentify_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DeidentifyTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload list_deidentify_templates(request, options = nil) - # Pass arguments to `list_deidentify_templates` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_deidentify_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListDeidentifyTemplates`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new - # - # # Call the list_deidentify_templates method. - # result = client.list_deidentify_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. - # p item - # end - # - def list_deidentify_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_deidentify_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_deidentify_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_deidentify_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, "deidentify_templates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - # - # @overload delete_deidentify_template(request, options = nil) - # Pass arguments to `delete_deidentify_template` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_deidentify_template(name: nil) - # Pass arguments to `delete_deidentify_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and deidentify template to be - # deleted, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new - # - # # Call the delete_deidentify_template method. - # result = client.delete_deidentify_template request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_deidentify_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_deidentify_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_deidentify_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_deidentify_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a job trigger to run DLP actions such as scanning storage for - # sensitive information on a set schedule. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload create_job_trigger(request, options = nil) - # Pass arguments to `create_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) - # Pass arguments to `create_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] - # Required. The JobTrigger to create. - # @param trigger_id [::String] - # The trigger id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new - # - # # Call the create_job_trigger method. - # result = client.create_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def create_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload update_job_trigger(request, options = nil) - # Pass arguments to `update_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) - # Pass arguments to `update_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @param job_trigger [::Google::Cloud::Dlp::V2::JobTrigger, ::Hash] - # New JobTrigger value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new - # - # # Call the update_job_trigger method. - # result = client.update_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def update_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inspect hybrid content and store findings to a trigger. The inspection - # will be processed asynchronously. To review the findings monitor the - # jobs within the trigger. - # - # @overload hybrid_inspect_job_trigger(request, options = nil) - # Pass arguments to `hybrid_inspect_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) - # Pass arguments to `hybrid_inspect_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the trigger to execute a hybrid inspect on, for - # example `projects/dlp-test-project/jobTriggers/53234423`. - # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] - # The item to inspect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new - # - # # Call the hybrid_inspect_job_trigger method. - # result = client.hybrid_inspect_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - # p result - # - def hybrid_inspect_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.hybrid_inspect_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload get_job_trigger(request, options = nil) - # Pass arguments to `get_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job_trigger(name: nil) - # Pass arguments to `get_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new - # - # # Call the get_job_trigger method. - # result = client.get_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - # p result - # - def get_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists job triggers. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload list_job_triggers(request, options = nil) - # Pass arguments to `list_job_triggers` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListJobTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil) - # Pass arguments to `list_job_triggers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListJobTriggers. `order_by` field must not - # change for subsequent calls. - # @param page_size [::Integer] - # Size of the page. This value can be limited by a server. - # @param order_by [::String] - # Comma-separated list of triggeredJob fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the JobTrigger was created. - # - `update_time`: corresponds to the time the JobTrigger was last updated. - # - `last_run_time`: corresponds to the last time the JobTrigger ran. - # - `name`: corresponds to the JobTrigger's name. - # - `display_name`: corresponds to the JobTrigger's display name. - # - `status`: corresponds to JobTrigger's status. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect triggers: - # - `status` - HEALTHY|PAUSED|CANCELLED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by - # quotation marks. Nanoseconds are ignored. - # - 'error_count' - Number of errors that have occurred while running. - # * The operator must be `=` or `!=` for status and inspected_storage. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND status = HEALTHY - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) - # * last_run_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @param type [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of jobs. Will use `DlpJobType.INSPECT` if not set. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new - # - # # Call the list_job_triggers method. - # result = client.list_job_triggers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. - # p item - # end - # - def list_job_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListJobTriggersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_job_triggers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_job_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_job_triggers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, "job_triggers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - # - # @overload delete_job_trigger(request, options = nil) - # Pass arguments to `delete_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_job_trigger(name: nil) - # Pass arguments to `delete_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new - # - # # Call the delete_job_trigger method. - # result = client.delete_job_trigger request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a job trigger. Causes the immediate execute of a trigger - # instead of waiting on the trigger event to occur. - # - # @overload activate_job_trigger(request, options = nil) - # Pass arguments to `activate_job_trigger` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload activate_job_trigger(name: nil) - # Pass arguments to `activate_job_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the trigger to activate, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new - # - # # Call the activate_job_trigger method. - # result = client.activate_job_trigger request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def activate_job_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.activate_job_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.activate_job_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.activate_job_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a config for discovery to scan and profile storage. - # - # @overload create_discovery_config(request, options = nil) - # Pass arguments to `create_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) - # Pass arguments to `create_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] - # Required. The DiscoveryConfig to create. - # @param config_id [::String] - # The config ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new - # - # # Call the create_discovery_config method. - # result = client.create_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def create_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_discovery_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a discovery configuration. - # - # @overload update_discovery_config(request, options = nil) - # Pass arguments to `update_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) - # Pass arguments to `update_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # @param discovery_config [::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash] - # Required. New DiscoveryConfig value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new - # - # # Call the update_discovery_config method. - # result = client.update_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def update_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_discovery_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a discovery configuration. - # - # @overload get_discovery_config(request, options = nil) - # Pass arguments to `get_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_discovery_config(name: nil) - # Pass arguments to `get_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new - # - # # Call the get_discovery_config method. - # result = client.get_discovery_config request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - # p result - # - def get_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_discovery_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists discovery configurations. - # - # @overload list_discovery_configs(request, options = nil) - # Pass arguments to `list_discovery_configs` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_discovery_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value is as follows: - # `projects/{project_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListDiscoveryConfigs. `order_by` field must not - # change for subsequent calls. - # @param page_size [::Integer] - # Size of the page. This value can be limited by a server. - # @param order_by [::String] - # Comma-separated list of config fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - # - `name`: corresponds to the DiscoveryConfig's name. - # - `status`: corresponds to DiscoveryConfig's status. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new - # - # # Call the list_discovery_configs method. - # result = client.list_discovery_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. - # p item - # end - # - def list_discovery_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_discovery_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_discovery_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_discovery_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, "discovery_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a discovery configuration. - # - # @overload delete_discovery_config(request, options = nil) - # Pass arguments to `delete_discovery_config` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_discovery_config(name: nil) - # Pass arguments to `delete_discovery_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the project and the config, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new - # - # # Call the delete_discovery_config method. - # result = client.delete_discovery_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_discovery_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_discovery_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_discovery_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_discovery_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new job to inspect storage or calculate risk metrics. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # @overload create_dlp_job(request, options = nil) - # Pass arguments to `create_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) - # Pass arguments to `create_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param inspect_job [::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash] - # An inspection job scans a storage repository for InfoTypes. - # - # Note: The following parameters are mutually exclusive: `inspect_job`, `risk_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param risk_job [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash] - # A risk analysis job calculates re-identification risk metrics for a - # BigQuery table. - # - # Note: The following parameters are mutually exclusive: `risk_job`, `inspect_job`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param job_id [::String] - # The job id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new - # - # # Call the create_dlp_job method. - # result = client.create_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def create_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DlpJobs that match the specified filter in the request. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload list_dlp_jobs(request, options = nil) - # Pass arguments to `list_dlp_jobs` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListDlpJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_dlp_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect jobs: - # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - `trigger_name` - The name of the trigger that created the job. - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * Supported fields for risk analysis jobs: - # - `state` - RUNNING|CANCELED|FINISHED|FAILED - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * The operator must be `=` or `!=`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND state = done - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = done OR state = canceled) - # * end_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param type [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of job. Defaults to `DlpJobType.INSPECT` - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, end_time asc, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the job was created. - # - `end_time`: corresponds to the time the job ended. - # - `name`: corresponds to the job's name. - # - `state`: corresponds to `state` - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new - # - # # Call the list_dlp_jobs method. - # result = client.list_dlp_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. - # p item - # end - # - def list_dlp_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDlpJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_dlp_jobs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_dlp_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_dlp_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running DlpJob. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload get_dlp_job(request, options = nil) - # Pass arguments to `get_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dlp_job(name: nil) - # Pass arguments to `get_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new - # - # # Call the get_dlp_job method. - # result = client.get_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - # p result - # - def get_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running DlpJob. This method indicates that the client is - # no longer interested in the DlpJob result. The job will be canceled if - # possible. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload delete_dlp_job(request, options = nil) - # Pass arguments to `delete_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dlp_job(name: nil) - # Pass arguments to `delete_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new - # - # # Call the delete_dlp_job method. - # result = client.delete_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running DlpJob. The server - # makes a best effort to cancel the DlpJob, but success is not - # guaranteed. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # @overload cancel_dlp_job(request, options = nil) - # Pass arguments to `cancel_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CancelDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_dlp_job(name: nil) - # Pass arguments to `cancel_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new - # - # # Call the cancel_dlp_job method. - # result = client.cancel_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CancelDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.cancel_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pre-built stored infoType to be used for inspection. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload create_stored_info_type(request, options = nil) - # Pass arguments to `create_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) - # Pass arguments to `create_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] - # Required. Configuration of the storedInfoType to create. - # @param stored_info_type_id [::String] - # The storedInfoType ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new - # - # # Call the create_stored_info_type method. - # result = client.create_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def create_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_stored_info_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the stored infoType by creating a new version. The existing version - # will continue to be used until the new version is ready. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload update_stored_info_type(request, options = nil) - # Pass arguments to `update_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_stored_info_type(name: nil, config: nil, update_mask: nil) - # Pass arguments to `update_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of organization and storedInfoType to be updated, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # @param config [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash] - # Updated configuration for the storedInfoType. If not provided, a new - # version of the storedInfoType will be created with the existing - # configuration. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new - # - # # Call the update_stored_info_type method. - # result = client.update_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def update_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_stored_info_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload get_stored_info_type(request, options = nil) - # Pass arguments to `get_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_stored_info_type(name: nil) - # Pass arguments to `get_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and storedInfoType to be read, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new - # - # # Call the get_stored_info_type method. - # result = client.get_stored_info_type request - # - # # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - # p result - # - def get_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_stored_info_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists stored infoTypes. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload list_stored_info_types(request, options = nil) - # Pass arguments to `list_stored_info_types` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) - # Pass arguments to `list_stored_info_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @param page_token [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListStoredInfoTypes`. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, display_name, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the most recent version of the - # resource was created. - # - `state`: corresponds to the state of the resource. - # - `name`: corresponds to resource name. - # - `display_name`: corresponds to info type's display name. - # @param location_id [::String] - # Deprecated. This field has no effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new - # - # # Call the list_stored_info_types method. - # result = client.list_stored_info_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. - # p item - # end - # - def list_stored_info_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_stored_info_types.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_stored_info_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_stored_info_types request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, "stored_info_types", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - # - # @overload delete_stored_info_type(request, options = nil) - # Pass arguments to `delete_stored_info_type` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_stored_info_type(name: nil) - # Pass arguments to `delete_stored_info_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the organization and storedInfoType to be - # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new - # - # # Call the delete_stored_info_type method. - # result = client.delete_stored_info_type request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_stored_info_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_stored_info_type.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_stored_info_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_stored_info_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists project data profiles for an organization. - # - # @overload list_project_data_profiles(request, options = nil) - # Pass arguments to `list_project_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_project_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_project_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. organizations/\\{org_id}/locations/\\{loc_id} - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id` - # * `sensitivity_level desc` - # - # Supported fields: - # - # - `project_id`: Google Cloud project ID - # - `sensitivity_level`: How sensitive the data in a project is, at most - # - `data_risk_level`: How much risk is associated with this data - # - `profile_last_generated`: Date and time (in epoch seconds) the profile - # was last generated - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: the Google Cloud project ID - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new - # - # # Call the list_project_data_profiles method. - # result = client.list_project_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. - # p item - # end - # - def list_project_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_project_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_project_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_project_data_profiles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, "project_data_profiles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table data profiles for an organization. - # - # @overload list_table_data_profiles(request, options = nil) - # Pass arguments to `list_table_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_table_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_table_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `row_count`: Number of rows in this resource. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `dataset_id`: The BigQuery dataset ID - # - `table_id`: The ID of the BigQuery table - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new - # - # # Call the list_table_data_profiles method. - # result = client.list_table_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. - # p item - # end - # - def list_table_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_table_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_table_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_table_data_profiles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, "table_data_profiles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column data profiles for an organization. - # - # @overload list_column_data_profiles(request, options = nil) - # Pass arguments to `list_column_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_column_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Page token to continue retrieval. - # @param page_size [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @param order_by [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a column is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # @param filter [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `table_data_profile_name`: The name of the related table data - # profile - # - `project_id`: The Google Cloud project ID (REQUIRED) - # - `dataset_id`: The BigQuery dataset ID (REQUIRED) - # - `table_id`: The BigQuery table ID (REQUIRED) - # - `field_id`: The ID of the BigQuery field - # - `info_type`: The infotype detected in the resource - # - `sensitivity_level`: HIGH|MEDIUM|LOW - # - `data_risk_level`: How much risk is associated with this data - # - `status_code`: An RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` for project_id, dataset_id, and table_id. Other - # filters also support `!=`. The `profile_last_generated` filter also - # supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * project_id = 12345 AND status_code = 1 - # * project_id = 12345 AND sensitivity_level = HIGH - # * project_id = 12345 AND info_type = STREET_ADDRESS - # * profile_last_generated < "2025-01-01T00:00:00.000Z" - # - # The length of this field should be no more than 500 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new - # - # # Call the list_column_data_profiles method. - # result = client.list_column_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. - # p item - # end - # - def list_column_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_column_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_column_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_column_data_profiles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, "column_data_profiles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a project data profile. - # - # @overload get_project_data_profile(request, options = nil) - # Pass arguments to `get_project_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_project_data_profile(name: nil) - # Pass arguments to `get_project_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/projectDataProfiles/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new - # - # # Call the get_project_data_profile method. - # result = client.get_project_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. - # p result - # - def get_project_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_project_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_project_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists file store data profiles for an organization. - # - # @overload list_file_store_data_profiles(request, options = nil) - # Pass arguments to `list_file_store_data_profiles` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_file_store_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) - # Pass arguments to `list_file_store_data_profiles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_token [::String] - # Optional. Page token to continue retrieval. - # @param page_size [::Integer] - # Optional. Size of the page. This value can be limited by the server. If - # zero, server returns a page of max size 100. - # @param order_by [::String] - # Optional. Comma-separated list of fields to order by, followed by `asc` or - # `desc` postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `name` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `name`: The name of the profile. - # - `create_time`: The time the file store was first created. - # @param filter [::String] - # Optional. Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `account_id`: The AWS account ID - # - `file_store_path`: The path like "gs://bucket" - # - `data_source_type`: The profile's data source type, like - # "google/storage/bucket" - # - `data_storage_location`: The location where the file store's data is - # stored, like "us-central1" - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `file_store_path = "gs://mybucket"` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new - # - # # Call the list_file_store_data_profiles method. - # result = client.list_file_store_data_profiles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. - # p item - # end - # - def list_file_store_data_profiles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_file_store_data_profiles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_file_store_data_profiles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_file_store_data_profiles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_file_store_data_profiles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_file_store_data_profiles, "file_store_data_profiles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a file store data profile. - # - # @overload get_file_store_data_profile(request, options = nil) - # Pass arguments to `get_file_store_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_file_store_data_profile(name: nil) - # Pass arguments to `get_file_store_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new - # - # # Call the get_file_store_data_profile method. - # result = client.get_file_store_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. - # p result - # - def get_file_store_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_file_store_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_file_store_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_file_store_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_file_store_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a FileStoreDataProfile. Will not prevent the profile from being - # regenerated if the resource is still included in a discovery configuration. - # - # @overload delete_file_store_data_profile(request, options = nil) - # Pass arguments to `delete_file_store_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_file_store_data_profile(name: nil) - # Pass arguments to `delete_file_store_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the file store data profile. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new - # - # # Call the delete_file_store_data_profile method. - # result = client.delete_file_store_data_profile request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_file_store_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_file_store_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_file_store_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_file_store_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_file_store_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table data profile. - # - # @overload get_table_data_profile(request, options = nil) - # Pass arguments to `get_table_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetTableDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_table_data_profile(name: nil) - # Pass arguments to `get_table_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/tableDataProfiles/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::TableDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::TableDataProfile] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new - # - # # Call the get_table_data_profile method. - # result = client.get_table_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. - # p result - # - def get_table_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_table_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_table_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_table_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column data profile. - # - # @overload get_column_data_profile(request, options = nil) - # Pass arguments to `get_column_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_column_data_profile(name: nil) - # Pass arguments to `get_column_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/columnDataProfiles/53234423`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new - # - # # Call the get_column_data_profile method. - # result = client.get_column_data_profile request - # - # # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. - # p result - # - def get_column_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_column_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_column_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_column_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a TableDataProfile. Will not prevent the profile from being - # regenerated if the table is still included in a discovery configuration. - # - # @overload delete_table_data_profile(request, options = nil) - # Pass arguments to `delete_table_data_profile` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_table_data_profile(name: nil) - # Pass arguments to `delete_table_data_profile` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the table data profile. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new - # - # # Call the delete_table_data_profile method. - # result = client.delete_table_data_profile request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_table_data_profile request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_table_data_profile.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_table_data_profile.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_table_data_profile request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Inspect hybrid content and store findings to a job. - # To review the findings, inspect the job. Inspection will occur - # asynchronously. - # - # @overload hybrid_inspect_dlp_job(request, options = nil) - # Pass arguments to `hybrid_inspect_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) - # Pass arguments to `hybrid_inspect_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the job to execute a hybrid inspect on, for - # example `projects/dlp-test-project/dlpJob/53234423`. - # @param hybrid_item [::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash] - # The item to inspect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new - # - # # Call the hybrid_inspect_dlp_job method. - # result = client.hybrid_inspect_dlp_job request - # - # # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - # p result - # - def hybrid_inspect_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.hybrid_inspect_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Finish a running hybrid DlpJob. Triggers the finalization steps and running - # of any enabled actions that have not yet run. - # - # @overload finish_dlp_job(request, options = nil) - # Pass arguments to `finish_dlp_job` via a request object, either of type - # {::Google::Cloud::Dlp::V2::FinishDlpJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload finish_dlp_job(name: nil) - # Pass arguments to `finish_dlp_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the DlpJob resource to be finished. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new - # - # # Call the finish_dlp_job method. - # result = client.finish_dlp_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def finish_dlp_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::FinishDlpJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.finish_dlp_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.finish_dlp_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.finish_dlp_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a Connection to an external data source. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_connection(parent: nil, connection: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] - # Required. The connection resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.create_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a Connection by name. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.get_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Connections in a parent. Use SearchConnections to see all connections - # within an organization. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::Dlp::V2::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project, for - # example, `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @param page_size [::Integer] - # Optional. Number of results per page, max 1000. - # @param page_token [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @param filter [::String] - # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.list_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_connections, "connections", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for Connections in a parent. - # - # @overload search_connections(request, options = nil) - # Pass arguments to `search_connections` via a request object, either of type - # {::Google::Cloud::Dlp::V2::SearchConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `search_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the organization or project with a wildcard - # location, for example, `organizations/433245324/locations/-` or - # `projects/project-id/locations/-`. - # @param page_size [::Integer] - # Optional. Number of results per page, max 1000. - # @param page_token [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @param filter [::String] - # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new - # - # # Call the search_connections method. - # result = client.search_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - # p item - # end - # - def search_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.search_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :search_connections, "connections", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a Connection. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_connection(name: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the Connection to be deleted, in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.delete_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a Connection. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::Dlp::V2::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_connection(name: nil, connection: nil, update_mask: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash] - # Required. The connection with new values for the relevant fields. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask to control which fields get updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dlp/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Google::Cloud::Dlp::V2::Connection. - # p result - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dlp::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dlp_service_stub.update_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DlpService REST API. - # - # This class represents the configuration for DlpService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # inspect_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.inspect_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.inspect_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dlp.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DlpService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `inspect_content` - # @return [::Gapic::Config::Method] - # - attr_reader :inspect_content - ## - # RPC-specific configuration for `redact_image` - # @return [::Gapic::Config::Method] - # - attr_reader :redact_image - ## - # RPC-specific configuration for `deidentify_content` - # @return [::Gapic::Config::Method] - # - attr_reader :deidentify_content - ## - # RPC-specific configuration for `reidentify_content` - # @return [::Gapic::Config::Method] - # - attr_reader :reidentify_content - ## - # RPC-specific configuration for `list_info_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_info_types - ## - # RPC-specific configuration for `create_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_inspect_template - ## - # RPC-specific configuration for `update_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_inspect_template - ## - # RPC-specific configuration for `get_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_inspect_template - ## - # RPC-specific configuration for `list_inspect_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_inspect_templates - ## - # RPC-specific configuration for `delete_inspect_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_inspect_template - ## - # RPC-specific configuration for `create_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_deidentify_template - ## - # RPC-specific configuration for `update_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_deidentify_template - ## - # RPC-specific configuration for `get_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deidentify_template - ## - # RPC-specific configuration for `list_deidentify_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deidentify_templates - ## - # RPC-specific configuration for `delete_deidentify_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_deidentify_template - ## - # RPC-specific configuration for `create_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_job_trigger - ## - # RPC-specific configuration for `update_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_job_trigger - ## - # RPC-specific configuration for `hybrid_inspect_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :hybrid_inspect_job_trigger - ## - # RPC-specific configuration for `get_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job_trigger - ## - # RPC-specific configuration for `list_job_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_job_triggers - ## - # RPC-specific configuration for `delete_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_job_trigger - ## - # RPC-specific configuration for `activate_job_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_job_trigger - ## - # RPC-specific configuration for `create_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_discovery_config - ## - # RPC-specific configuration for `update_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_discovery_config - ## - # RPC-specific configuration for `get_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_discovery_config - ## - # RPC-specific configuration for `list_discovery_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_discovery_configs - ## - # RPC-specific configuration for `delete_discovery_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_discovery_config - ## - # RPC-specific configuration for `create_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dlp_job - ## - # RPC-specific configuration for `list_dlp_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dlp_jobs - ## - # RPC-specific configuration for `get_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dlp_job - ## - # RPC-specific configuration for `delete_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dlp_job - ## - # RPC-specific configuration for `cancel_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_dlp_job - ## - # RPC-specific configuration for `create_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_stored_info_type - ## - # RPC-specific configuration for `update_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_stored_info_type - ## - # RPC-specific configuration for `get_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_stored_info_type - ## - # RPC-specific configuration for `list_stored_info_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_stored_info_types - ## - # RPC-specific configuration for `delete_stored_info_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_stored_info_type - ## - # RPC-specific configuration for `list_project_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_project_data_profiles - ## - # RPC-specific configuration for `list_table_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_data_profiles - ## - # RPC-specific configuration for `list_column_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_data_profiles - ## - # RPC-specific configuration for `get_project_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_data_profile - ## - # RPC-specific configuration for `list_file_store_data_profiles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_file_store_data_profiles - ## - # RPC-specific configuration for `get_file_store_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_file_store_data_profile - ## - # RPC-specific configuration for `delete_file_store_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_file_store_data_profile - ## - # RPC-specific configuration for `get_table_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_data_profile - ## - # RPC-specific configuration for `get_column_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_data_profile - ## - # RPC-specific configuration for `delete_table_data_profile` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_table_data_profile - ## - # RPC-specific configuration for `hybrid_inspect_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :hybrid_inspect_dlp_job - ## - # RPC-specific configuration for `finish_dlp_job` - # @return [::Gapic::Config::Method] - # - attr_reader :finish_dlp_job - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `search_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :search_connections - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - - # @private - def initialize parent_rpcs = nil - inspect_content_config = parent_rpcs.inspect_content if parent_rpcs.respond_to? :inspect_content - @inspect_content = ::Gapic::Config::Method.new inspect_content_config - redact_image_config = parent_rpcs.redact_image if parent_rpcs.respond_to? :redact_image - @redact_image = ::Gapic::Config::Method.new redact_image_config - deidentify_content_config = parent_rpcs.deidentify_content if parent_rpcs.respond_to? :deidentify_content - @deidentify_content = ::Gapic::Config::Method.new deidentify_content_config - reidentify_content_config = parent_rpcs.reidentify_content if parent_rpcs.respond_to? :reidentify_content - @reidentify_content = ::Gapic::Config::Method.new reidentify_content_config - list_info_types_config = parent_rpcs.list_info_types if parent_rpcs.respond_to? :list_info_types - @list_info_types = ::Gapic::Config::Method.new list_info_types_config - create_inspect_template_config = parent_rpcs.create_inspect_template if parent_rpcs.respond_to? :create_inspect_template - @create_inspect_template = ::Gapic::Config::Method.new create_inspect_template_config - update_inspect_template_config = parent_rpcs.update_inspect_template if parent_rpcs.respond_to? :update_inspect_template - @update_inspect_template = ::Gapic::Config::Method.new update_inspect_template_config - get_inspect_template_config = parent_rpcs.get_inspect_template if parent_rpcs.respond_to? :get_inspect_template - @get_inspect_template = ::Gapic::Config::Method.new get_inspect_template_config - list_inspect_templates_config = parent_rpcs.list_inspect_templates if parent_rpcs.respond_to? :list_inspect_templates - @list_inspect_templates = ::Gapic::Config::Method.new list_inspect_templates_config - delete_inspect_template_config = parent_rpcs.delete_inspect_template if parent_rpcs.respond_to? :delete_inspect_template - @delete_inspect_template = ::Gapic::Config::Method.new delete_inspect_template_config - create_deidentify_template_config = parent_rpcs.create_deidentify_template if parent_rpcs.respond_to? :create_deidentify_template - @create_deidentify_template = ::Gapic::Config::Method.new create_deidentify_template_config - update_deidentify_template_config = parent_rpcs.update_deidentify_template if parent_rpcs.respond_to? :update_deidentify_template - @update_deidentify_template = ::Gapic::Config::Method.new update_deidentify_template_config - get_deidentify_template_config = parent_rpcs.get_deidentify_template if parent_rpcs.respond_to? :get_deidentify_template - @get_deidentify_template = ::Gapic::Config::Method.new get_deidentify_template_config - list_deidentify_templates_config = parent_rpcs.list_deidentify_templates if parent_rpcs.respond_to? :list_deidentify_templates - @list_deidentify_templates = ::Gapic::Config::Method.new list_deidentify_templates_config - delete_deidentify_template_config = parent_rpcs.delete_deidentify_template if parent_rpcs.respond_to? :delete_deidentify_template - @delete_deidentify_template = ::Gapic::Config::Method.new delete_deidentify_template_config - create_job_trigger_config = parent_rpcs.create_job_trigger if parent_rpcs.respond_to? :create_job_trigger - @create_job_trigger = ::Gapic::Config::Method.new create_job_trigger_config - update_job_trigger_config = parent_rpcs.update_job_trigger if parent_rpcs.respond_to? :update_job_trigger - @update_job_trigger = ::Gapic::Config::Method.new update_job_trigger_config - hybrid_inspect_job_trigger_config = parent_rpcs.hybrid_inspect_job_trigger if parent_rpcs.respond_to? :hybrid_inspect_job_trigger - @hybrid_inspect_job_trigger = ::Gapic::Config::Method.new hybrid_inspect_job_trigger_config - get_job_trigger_config = parent_rpcs.get_job_trigger if parent_rpcs.respond_to? :get_job_trigger - @get_job_trigger = ::Gapic::Config::Method.new get_job_trigger_config - list_job_triggers_config = parent_rpcs.list_job_triggers if parent_rpcs.respond_to? :list_job_triggers - @list_job_triggers = ::Gapic::Config::Method.new list_job_triggers_config - delete_job_trigger_config = parent_rpcs.delete_job_trigger if parent_rpcs.respond_to? :delete_job_trigger - @delete_job_trigger = ::Gapic::Config::Method.new delete_job_trigger_config - activate_job_trigger_config = parent_rpcs.activate_job_trigger if parent_rpcs.respond_to? :activate_job_trigger - @activate_job_trigger = ::Gapic::Config::Method.new activate_job_trigger_config - create_discovery_config_config = parent_rpcs.create_discovery_config if parent_rpcs.respond_to? :create_discovery_config - @create_discovery_config = ::Gapic::Config::Method.new create_discovery_config_config - update_discovery_config_config = parent_rpcs.update_discovery_config if parent_rpcs.respond_to? :update_discovery_config - @update_discovery_config = ::Gapic::Config::Method.new update_discovery_config_config - get_discovery_config_config = parent_rpcs.get_discovery_config if parent_rpcs.respond_to? :get_discovery_config - @get_discovery_config = ::Gapic::Config::Method.new get_discovery_config_config - list_discovery_configs_config = parent_rpcs.list_discovery_configs if parent_rpcs.respond_to? :list_discovery_configs - @list_discovery_configs = ::Gapic::Config::Method.new list_discovery_configs_config - delete_discovery_config_config = parent_rpcs.delete_discovery_config if parent_rpcs.respond_to? :delete_discovery_config - @delete_discovery_config = ::Gapic::Config::Method.new delete_discovery_config_config - create_dlp_job_config = parent_rpcs.create_dlp_job if parent_rpcs.respond_to? :create_dlp_job - @create_dlp_job = ::Gapic::Config::Method.new create_dlp_job_config - list_dlp_jobs_config = parent_rpcs.list_dlp_jobs if parent_rpcs.respond_to? :list_dlp_jobs - @list_dlp_jobs = ::Gapic::Config::Method.new list_dlp_jobs_config - get_dlp_job_config = parent_rpcs.get_dlp_job if parent_rpcs.respond_to? :get_dlp_job - @get_dlp_job = ::Gapic::Config::Method.new get_dlp_job_config - delete_dlp_job_config = parent_rpcs.delete_dlp_job if parent_rpcs.respond_to? :delete_dlp_job - @delete_dlp_job = ::Gapic::Config::Method.new delete_dlp_job_config - cancel_dlp_job_config = parent_rpcs.cancel_dlp_job if parent_rpcs.respond_to? :cancel_dlp_job - @cancel_dlp_job = ::Gapic::Config::Method.new cancel_dlp_job_config - create_stored_info_type_config = parent_rpcs.create_stored_info_type if parent_rpcs.respond_to? :create_stored_info_type - @create_stored_info_type = ::Gapic::Config::Method.new create_stored_info_type_config - update_stored_info_type_config = parent_rpcs.update_stored_info_type if parent_rpcs.respond_to? :update_stored_info_type - @update_stored_info_type = ::Gapic::Config::Method.new update_stored_info_type_config - get_stored_info_type_config = parent_rpcs.get_stored_info_type if parent_rpcs.respond_to? :get_stored_info_type - @get_stored_info_type = ::Gapic::Config::Method.new get_stored_info_type_config - list_stored_info_types_config = parent_rpcs.list_stored_info_types if parent_rpcs.respond_to? :list_stored_info_types - @list_stored_info_types = ::Gapic::Config::Method.new list_stored_info_types_config - delete_stored_info_type_config = parent_rpcs.delete_stored_info_type if parent_rpcs.respond_to? :delete_stored_info_type - @delete_stored_info_type = ::Gapic::Config::Method.new delete_stored_info_type_config - list_project_data_profiles_config = parent_rpcs.list_project_data_profiles if parent_rpcs.respond_to? :list_project_data_profiles - @list_project_data_profiles = ::Gapic::Config::Method.new list_project_data_profiles_config - list_table_data_profiles_config = parent_rpcs.list_table_data_profiles if parent_rpcs.respond_to? :list_table_data_profiles - @list_table_data_profiles = ::Gapic::Config::Method.new list_table_data_profiles_config - list_column_data_profiles_config = parent_rpcs.list_column_data_profiles if parent_rpcs.respond_to? :list_column_data_profiles - @list_column_data_profiles = ::Gapic::Config::Method.new list_column_data_profiles_config - get_project_data_profile_config = parent_rpcs.get_project_data_profile if parent_rpcs.respond_to? :get_project_data_profile - @get_project_data_profile = ::Gapic::Config::Method.new get_project_data_profile_config - list_file_store_data_profiles_config = parent_rpcs.list_file_store_data_profiles if parent_rpcs.respond_to? :list_file_store_data_profiles - @list_file_store_data_profiles = ::Gapic::Config::Method.new list_file_store_data_profiles_config - get_file_store_data_profile_config = parent_rpcs.get_file_store_data_profile if parent_rpcs.respond_to? :get_file_store_data_profile - @get_file_store_data_profile = ::Gapic::Config::Method.new get_file_store_data_profile_config - delete_file_store_data_profile_config = parent_rpcs.delete_file_store_data_profile if parent_rpcs.respond_to? :delete_file_store_data_profile - @delete_file_store_data_profile = ::Gapic::Config::Method.new delete_file_store_data_profile_config - get_table_data_profile_config = parent_rpcs.get_table_data_profile if parent_rpcs.respond_to? :get_table_data_profile - @get_table_data_profile = ::Gapic::Config::Method.new get_table_data_profile_config - get_column_data_profile_config = parent_rpcs.get_column_data_profile if parent_rpcs.respond_to? :get_column_data_profile - @get_column_data_profile = ::Gapic::Config::Method.new get_column_data_profile_config - delete_table_data_profile_config = parent_rpcs.delete_table_data_profile if parent_rpcs.respond_to? :delete_table_data_profile - @delete_table_data_profile = ::Gapic::Config::Method.new delete_table_data_profile_config - hybrid_inspect_dlp_job_config = parent_rpcs.hybrid_inspect_dlp_job if parent_rpcs.respond_to? :hybrid_inspect_dlp_job - @hybrid_inspect_dlp_job = ::Gapic::Config::Method.new hybrid_inspect_dlp_job_config - finish_dlp_job_config = parent_rpcs.finish_dlp_job if parent_rpcs.respond_to? :finish_dlp_job - @finish_dlp_job = ::Gapic::Config::Method.new finish_dlp_job_config - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - search_connections_config = parent_rpcs.search_connections if parent_rpcs.respond_to? :search_connections - @search_connections = ::Gapic::Config::Method.new search_connections_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb deleted file mode 100644 index 4e03e7d64795..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +++ /dev/null @@ -1,4119 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/privacy/dlp/v2/dlp_pb" - -module Google - module Cloud - module Dlp - module V2 - module DlpService - module Rest - ## - # REST service stub for the DlpService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the inspect_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::InspectContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectContentResponse] - # A result object deserialized from the server's reply - def inspect_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_inspect_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "inspect_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::InspectContentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the redact_image REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::RedactImageRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::RedactImageResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::RedactImageResponse] - # A result object deserialized from the server's reply - def redact_image request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_redact_image_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "redact_image", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::RedactImageResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deidentify_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeidentifyContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyContentResponse] - # A result object deserialized from the server's reply - def deidentify_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deidentify_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deidentify_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the reidentify_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ReidentifyContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ReidentifyContentResponse] - # A result object deserialized from the server's reply - def reidentify_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reidentify_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "reidentify_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_info_types REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListInfoTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListInfoTypesResponse] - # A result object deserialized from the server's reply - def list_info_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_info_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_info_types", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # A result object deserialized from the server's reply - def create_inspect_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_inspect_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_inspect_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # A result object deserialized from the server's reply - def update_inspect_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_inspect_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_inspect_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::InspectTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # A result object deserialized from the server's reply - def get_inspect_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_inspect_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_inspect_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::InspectTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_inspect_templates REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse] - # A result object deserialized from the server's reply - def list_inspect_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_inspect_templates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_inspect_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_inspect_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_inspect_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_inspect_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # A result object deserialized from the server's reply - def create_deidentify_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_deidentify_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_deidentify_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # A result object deserialized from the server's reply - def update_deidentify_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_deidentify_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_deidentify_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # A result object deserialized from the server's reply - def get_deidentify_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_deidentify_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_deidentify_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_deidentify_templates REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse] - # A result object deserialized from the server's reply - def list_deidentify_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_deidentify_templates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_deidentify_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_deidentify_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_deidentify_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_deidentify_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # A result object deserialized from the server's reply - def create_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # A result object deserialized from the server's reply - def update_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the hybrid_inspect_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # A result object deserialized from the server's reply - def hybrid_inspect_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_hybrid_inspect_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "hybrid_inspect_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::JobTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # A result object deserialized from the server's reply - def get_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::JobTrigger.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_job_triggers REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListJobTriggersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListJobTriggersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListJobTriggersResponse] - # A result object deserialized from the server's reply - def list_job_triggers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_job_triggers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_job_triggers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the activate_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # A result object deserialized from the server's reply - def activate_job_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_activate_job_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "activate_job_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # A result object deserialized from the server's reply - def create_discovery_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_discovery_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_discovery_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # A result object deserialized from the server's reply - def update_discovery_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_discovery_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_discovery_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # A result object deserialized from the server's reply - def get_discovery_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_discovery_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_discovery_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_discovery_configs REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse] - # A result object deserialized from the server's reply - def list_discovery_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_discovery_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_discovery_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_discovery_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_discovery_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_discovery_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # A result object deserialized from the server's reply - def create_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_dlp_jobs REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDlpJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListDlpJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListDlpJobsResponse] - # A result object deserialized from the server's reply - def list_dlp_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_dlp_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_dlp_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::DlpJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::DlpJob] - # A result object deserialized from the server's reply - def get_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::DlpJob.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CancelDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # A result object deserialized from the server's reply - def create_stored_info_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_stored_info_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_stored_info_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # A result object deserialized from the server's reply - def update_stored_info_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_stored_info_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_stored_info_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::StoredInfoType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::StoredInfoType] - # A result object deserialized from the server's reply - def get_stored_info_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_stored_info_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_stored_info_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::StoredInfoType.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_stored_info_types REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse] - # A result object deserialized from the server's reply - def list_stored_info_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_stored_info_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_stored_info_types", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_stored_info_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_stored_info_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_stored_info_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_project_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse] - # A result object deserialized from the server's reply - def list_project_data_profiles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_project_data_profiles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_project_data_profiles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_table_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse] - # A result object deserialized from the server's reply - def list_table_data_profiles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_table_data_profiles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_table_data_profiles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_column_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse] - # A result object deserialized from the server's reply - def list_column_data_profiles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_column_data_profiles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_column_data_profiles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_project_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile] - # A result object deserialized from the server's reply - def get_project_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_project_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ProjectDataProfile.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_file_store_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse] - # A result object deserialized from the server's reply - def list_file_store_data_profiles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_file_store_data_profiles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_file_store_data_profiles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_file_store_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # A result object deserialized from the server's reply - def get_file_store_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_file_store_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_file_store_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_file_store_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_file_store_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_file_store_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_file_store_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_table_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::TableDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::TableDataProfile] - # A result object deserialized from the server's reply - def get_table_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_table_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_table_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::TableDataProfile.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_column_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # A result object deserialized from the server's reply - def get_column_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_column_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_column_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ColumnDataProfile.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_table_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_table_data_profile request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_table_data_profile_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_table_data_profile", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the hybrid_inspect_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::HybridInspectResponse] - # A result object deserialized from the server's reply - def hybrid_inspect_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_hybrid_inspect_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "hybrid_inspect_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the finish_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::FinishDlpJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def finish_dlp_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_finish_dlp_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "finish_dlp_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # A result object deserialized from the server's reply - def create_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # A result object deserialized from the server's reply - def get_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_connections REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::ListConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::ListConnectionsResponse] - # A result object deserialized from the server's reply - def list_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_connections REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::SearchConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::SearchConnectionsResponse] - # A result object deserialized from the server's reply - def search_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dlp::V2::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dlp::V2::Connection] - # A result object deserialized from the server's reply - def update_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the inspect_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::InspectContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_inspect_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:inspect", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:inspect", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the redact_image REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::RedactImageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_redact_image_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/image:redact", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/image:redact", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deidentify_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeidentifyContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deidentify_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:deidentify", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:deidentify", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reidentify_content REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ReidentifyContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reidentify_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:reidentify", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/content:reidentify", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_info_types REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListInfoTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_info_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/infoTypes", - matches: [] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/infoTypes", - matches: [ - ["parent", %r{^locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/infoTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/infoTypes", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_inspect_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/inspectTemplates", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/inspectTemplates", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/inspectTemplates", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/inspectTemplates", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_inspect_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_inspect_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_inspect_templates REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_inspect_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/inspectTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/inspectTemplates", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/inspectTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/inspectTemplates", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_inspect_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_inspect_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/inspectTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_deidentify_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/deidentifyTemplates", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/deidentifyTemplates", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/deidentifyTemplates", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/deidentifyTemplates", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_deidentify_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_deidentify_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_deidentify_templates REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_deidentify_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/deidentifyTemplates", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/deidentifyTemplates", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/deidentifyTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/deidentifyTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_deidentify_template REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_deidentify_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/jobTriggers", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/jobTriggers", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/jobTriggers", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the hybrid_inspect_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_hybrid_inspect_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:hybridInspect", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_job_triggers REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListJobTriggersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_job_triggers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/jobTriggers", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/jobTriggers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/jobTriggers", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the activate_job_trigger REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_activate_job_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:activate", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:activate", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_discovery_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/discoveryConfigs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/discoveryConfigs", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_discovery_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_discovery_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_discovery_configs REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_discovery_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/discoveryConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/discoveryConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_discovery_config REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_discovery_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/dlpJobs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/dlpJobs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_dlp_jobs REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListDlpJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_dlp_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/dlpJobs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/dlpJobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/dlpJobs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CancelDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_stored_info_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/storedInfoTypes", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/storedInfoTypes", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/storedInfoTypes", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/storedInfoTypes", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_stored_info_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_stored_info_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_stored_info_types REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_stored_info_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/storedInfoTypes", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/storedInfoTypes", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/storedInfoTypes", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/storedInfoTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_stored_info_type REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_stored_info_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_project_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_project_data_profiles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/projectDataProfiles", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/projectDataProfiles", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_table_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_table_data_profiles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/tableDataProfiles", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/tableDataProfiles", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_column_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_column_data_profiles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/columnDataProfiles", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/columnDataProfiles", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_project_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_file_store_data_profiles REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_file_store_data_profiles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/fileStoreDataProfiles", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/fileStoreDataProfiles", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_file_store_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_file_store_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_file_store_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_file_store_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/fileStoreDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_table_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_table_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_column_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_column_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_table_data_profile REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_table_data_profile_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the hybrid_inspect_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_hybrid_inspect_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:hybridInspect", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the finish_dlp_job REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::FinishDlpJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_finish_dlp_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:finish", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/connections", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/connections", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_connections REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/connections", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/connections", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_connections REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/connections:search", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/connections:search", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_connection REST call - # - # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{name}", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb deleted file mode 100644 index e40a840c77f0..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dlp/v2/dlp_service/rest" -require "google/cloud/dlp/v2/version" - -module Google - module Cloud - module Dlp - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/dlp/v2/rest" - # client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb deleted file mode 100644 index 1ba616120eaa..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/cloud/dlp/v2/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dlp - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb deleted file mode 100644 index 5d649695bb8b..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_pb.rb +++ /dev/null @@ -1,438 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/privacy/dlp/v2/dlp.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/privacy/dlp/v2/storage_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/type/date_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n\x1fgoogle/privacy/dlp/v2/dlp.proto\x12\x15google.privacy.dlp.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/privacy/dlp/v2/storage.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"G\n\x10\x45xcludeInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xa8\x01\n\x10\x45xcludeByHotword\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\"\x9a\x01\n\x16\x45xcludeByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12K\n\x16image_containment_type\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xbb\x03\n\rExclusionRule\x12\x46\n\ndictionary\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12\x45\n\x12\x65xclude_info_types\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeInfoTypesH\x00\x12\x45\n\x12\x65xclude_by_hotword\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.ExcludeByHotwordH\x00\x12R\n\x19\x65xclude_by_image_findings\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.ExcludeByImageFindingsH\x00\x12:\n\rmatching_type\x18\x04 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingTypeB\x06\n\x04type\"\xc7\x01\n\x19\x41\x64justByMatchingInfoTypes\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12:\n\rmatching_type\x18\x03 \x01(\x0e\x32#.google.privacy.dlp.v2.MatchingType\"\xd4\x01\n\x15\x41\x64justByImageFindings\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12K\n\x16image_containment_type\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageContainmentType\"\xb4\x02\n\x0e\x41\x64justmentRule\x12Y\n\x1d\x61\x64just_by_matching_info_types\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AdjustByMatchingInfoTypesH\x00\x12P\n\x18\x61\x64just_by_image_findings\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.AdjustByImageFindingsH\x00\x12g\n\x15likelihood_adjustment\x18\x02 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x0c\n\nconditions\"\xf3\x01\n\x0eInspectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x12>\n\x0e\x65xclusion_rule\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.ExclusionRuleH\x00\x12@\n\x0f\x61\x64justment_rule\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.AdjustmentRuleH\x00\x42\x06\n\x04type\"~\n\x11InspectionRuleSet\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\x05rules\x18\x02 \x03(\x0b\x32%.google.privacy.dlp.v2.InspectionRule\"\xac\x07\n\rInspectConfig\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12]\n\x1cmin_likelihood_per_info_type\x18\x0b \x03(\x0b\x32\x37.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood\x12\x42\n\x06limits\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.InspectConfig.FindingLimits\x12\x15\n\rinclude_quote\x18\x04 \x01(\x08\x12\x1a\n\x12\x65xclude_info_types\x18\x05 \x01(\x08\x12@\n\x11\x63ustom_info_types\x18\x06 \x03(\x0b\x32%.google.privacy.dlp.v2.CustomInfoType\x12=\n\x0f\x63ontent_options\x18\x08 \x03(\x0e\x32$.google.privacy.dlp.v2.ContentOption\x12:\n\x08rule_set\x18\n \x03(\x0b\x32(.google.privacy.dlp.v2.InspectionRuleSet\x1a\x83\x01\n\x12InfoTypeLikelihood\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x39\n\x0emin_likelihood\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x1a\x91\x02\n\rFindingLimits\x12\x1d\n\x15max_findings_per_item\x18\x01 \x01(\x05\x12 \n\x18max_findings_per_request\x18\x02 \x01(\x05\x12\x64\n\x1amax_findings_per_info_type\x18\x03 \x03(\x0b\x32@.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit\x1aY\n\rInfoTypeLimit\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x14\n\x0cmax_findings\x18\x02 \x01(\x05\"\xf9\x02\n\x0f\x42yteContentItem\x12>\n\x04type\x18\x01 \x01(\x0e\x32\x30.google.privacy.dlp.v2.ByteContentItem.BytesType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x97\x02\n\tBytesType\x12\x1a\n\x16\x42YTES_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05IMAGE\x10\x06\x12\x0e\n\nIMAGE_JPEG\x10\x01\x12\r\n\tIMAGE_BMP\x10\x02\x12\r\n\tIMAGE_PNG\x10\x03\x12\r\n\tIMAGE_SVG\x10\x04\x12\r\n\tTEXT_UTF8\x10\x05\x12\x11\n\rWORD_DOCUMENT\x10\x07\x12\x07\n\x03PDF\x10\x08\x12\x17\n\x13POWERPOINT_DOCUMENT\x10\t\x12\x12\n\x0e\x45XCEL_DOCUMENT\x10\n\x12\x08\n\x04\x41VRO\x10\x0b\x12\x07\n\x03\x43SV\x10\x0c\x12\x07\n\x03TSV\x10\r\x12\t\n\x05\x41UDIO\x10\x0f\x12\t\n\x05VIDEO\x10\x10\x12\x0e\n\nEXECUTABLE\x10\x11\x12\x0c\n\x08\x41I_MODEL\x10\x12\"\xd9\x01\n\x0b\x43ontentItem\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12-\n\x05table\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.TableH\x00\x12;\n\tbyte_item\x18\x05 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItemH\x00\x12@\n\x10\x63ontent_metadata\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.ContentMetadataB\x0b\n\tdata_item\"V\n\x0f\x43ontentMetadata\x12\x43\n\nproperties\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.KeyValueMetadataProperty\"\x9d\x01\n\x05Table\x12/\n\x07headers\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12.\n\x04rows\x18\x02 \x03(\x0b\x32 .google.privacy.dlp.v2.Table.Row\x1a\x33\n\x03Row\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"6\n\x18KeyValueMetadataProperty\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"]\n\rInspectResult\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\x12\x1a\n\x12\x66indings_truncated\x18\x02 \x01(\x08\"\xdf\x05\n\x07\x46inding\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x32\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x03 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x31\n\x08location\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.Location\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nquote_info\x18\x07 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\x35\n\rresource_name\x18\x08 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x38\n\x0ctrigger_name\x18\t \x01(\tB\"\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12:\n\x06labels\x18\n \x03(\x0b\x32*.google.privacy.dlp.v2.Finding.LabelsEntry\x12\x33\n\x0fjob_create_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x08job_name\x18\r \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x12\n\nfinding_id\x18\x0f \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:[\xea\x41X\n\x1a\x64lp.googleapis.com/Finding\x12:projects/{project}/locations/{location}/findings/{finding}\"\xeb\x01\n\x08Location\x12\x30\n\nbyte_range\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x35\n\x0f\x63odepoint_range\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Range\x12\x41\n\x11\x63ontent_locations\x18\x07 \x03(\x0b\x32&.google.privacy.dlp.v2.ContentLocation\x12\x33\n\tcontainer\x18\x08 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\"\x97\x03\n\x0f\x43ontentLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12@\n\x0frecord_location\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.RecordLocationH\x00\x12>\n\x0eimage_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.ImageLocationH\x00\x12\x44\n\x11\x64ocument_location\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.DocumentLocationH\x00\x12\x44\n\x11metadata_location\x18\x08 \x01(\x0b\x32\'.google.privacy.dlp.v2.MetadataLocationH\x00\x12\x37\n\x13\x63ontainer_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x07 \x01(\tB\n\n\x08location\"\xe6\x01\n\x10MetadataLocation\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.google.privacy.dlp.v2.MetadataType\x12\x44\n\rstorage_label\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.StorageMetadataLabelH\x00\x12P\n\x18key_value_metadata_label\x18\x04 \x01(\x0b\x32,.google.privacy.dlp.v2.KeyValueMetadataLabelH\x00\x42\x07\n\x05label\"#\n\x14StorageMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"$\n\x15KeyValueMetadataLabel\x12\x0b\n\x03key\x18\x01 \x01(\t\"\'\n\x10\x44ocumentLocation\x12\x13\n\x0b\x66ile_offset\x18\x01 \x01(\x03\"\xb6\x01\n\x0eRecordLocation\x12\x34\n\nrecord_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.RecordKey\x12\x30\n\x08\x66ield_id\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12<\n\x0etable_location\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.TableLocation\"\"\n\rTableLocation\x12\x11\n\trow_index\x18\x01 \x01(\x03\"\xac\x01\n\tContainer\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x11\n\tfull_path\x18\x03 \x01(\t\x12\x11\n\troot_path\x18\x04 \x01(\t\x12\x15\n\rrelative_path\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"#\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"K\n\rImageLocation\x12:\n\x0e\x62ounding_boxes\x18\x01 \x03(\x0b\x32\".google.privacy.dlp.v2.BoundingBox\"G\n\x0b\x42oundingBox\x12\x0b\n\x03top\x18\x01 \x01(\x05\x12\x0c\n\x04left\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xb3\x04\n\x12RedactImageRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x13\n\x0blocation_id\x18\x08 \x01(\t\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12_\n\x17image_redaction_configs\x18\x05 \x03(\x0b\x32>.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig\x12\x18\n\x10include_findings\x18\x06 \x01(\x08\x12\x39\n\tbyte_item\x18\x07 \x01(\x0b\x32&.google.privacy.dlp.v2.ByteContentItem\x12\x18\n\x10inspect_template\x18\t \x01(\t\x12\x1b\n\x13\x64\x65identify_template\x18\n \x01(\t\x1a\xa8\x01\n\x14ImageRedactionConfig\x12\x34\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x19\n\x0fredact_all_text\x18\x02 \x01(\x08H\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ColorB\x08\n\x06target\"1\n\x05\x43olor\x12\x0b\n\x03red\x18\x01 \x01(\x02\x12\r\n\x05green\x18\x02 \x01(\x02\x12\x0c\n\x04\x62lue\x18\x03 \x01(\x02\"\x83\x01\n\x13RedactImageResponse\x12\x16\n\x0eredacted_image\x18\x01 \x01(\x0c\x12\x16\n\x0e\x65xtracted_text\x18\x02 \x01(\t\x12<\n\x0einspect_result\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xd8\x02\n\x18\x44\x65identifyContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11\x64\x65identify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18\x64\x65identify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19\x44\x65identifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xdb\x02\n\x18ReidentifyContentRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12\x42\n\x11reidentify_config\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig\x12<\n\x0einspect_config\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x04 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12 \n\x18reidentify_template_name\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"\x8e\x01\n\x19ReidentifyContentResponse\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12?\n\x08overview\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationOverview\"\xef\x01\n\x15InspectContentRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/DlpContent\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x30\n\x04item\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x1d\n\x15inspect_template_name\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"N\n\x16InspectContentResponse\x12\x34\n\x06result\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectResult\"\xf8\x02\n\x13OutputStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x12?\n\x0cstorage_path\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x12N\n\routput_schema\x18\x03 \x01(\x0e\x32\x37.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema\"\x90\x01\n\x0cOutputSchema\x12\x1d\n\x19OUTPUT_SCHEMA_UNSPECIFIED\x10\x00\x12\x11\n\rBASIC_COLUMNS\x10\x01\x12\x0f\n\x0bGCS_COLUMNS\x10\x02\x12\x15\n\x11\x44\x41TASTORE_COLUMNS\x10\x03\x12\x15\n\x11\x42IG_QUERY_COLUMNS\x10\x04\x12\x0f\n\x0b\x41LL_COLUMNS\x10\x05\x42\x06\n\x04type\"R\n\rInfoTypeStats\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc0\x04\n\x18InspectDataSourceDetails\x12[\n\x11requested_options\x18\x02 \x01(\x0b\x32@.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions\x12\x46\n\x06result\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.InspectDataSourceDetails.Result\x1a\x9a\x01\n\x10RequestedOptions\x12I\n\x19snapshot_inspect_template\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12;\n\njob_config\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfig\x1a\xe1\x01\n\x06Result\x12\x17\n\x0fprocessed_bytes\x18\x01 \x01(\x03\x12\x1d\n\x15total_estimated_bytes\x18\x02 \x01(\x03\x12=\n\x0finfo_type_stats\x18\x03 \x03(\x0b\x32$.google.privacy.dlp.v2.InfoTypeStats\x12\x1a\n\x12num_rows_processed\x18\x05 \x01(\x03\x12\x44\n\x0chybrid_stats\x18\x07 \x01(\x0b\x32..google.privacy.dlp.v2.HybridInspectStatistics\"\xff\x01\n\x1c\x44\x61taProfileBigQueryRowSchema\x12@\n\rtable_profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfileH\x00\x12\x42\n\x0e\x63olumn_profile\x18\x02 \x01(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfileH\x00\x12I\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfileH\x00\x42\x0e\n\x0c\x64\x61ta_profile\"`\n\x17HybridInspectStatistics\x12\x17\n\x0fprocessed_count\x18\x01 \x01(\x03\x12\x15\n\raborted_count\x18\x02 \x01(\x03\x12\x15\n\rpending_count\x18\x03 \x01(\x03\"l\n\rActionDetails\x12P\n\x12\x64\x65identify_details\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DeidentifyDataSourceDetailsH\x00\x42\t\n\x07\x64\x65tails\"x\n\x19\x44\x65identifyDataSourceStats\x12\x19\n\x11transformed_bytes\x18\x01 \x01(\x03\x12\x1c\n\x14transformation_count\x18\x02 \x01(\x03\x12\"\n\x1atransformation_error_count\x18\x03 \x01(\x03\"\xf2\x03\n\x1b\x44\x65identifyDataSourceDetails\x12h\n\x11requested_options\x18\x01 \x01(\x0b\x32M.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions\x12J\n\x10\x64\x65identify_stats\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DeidentifyDataSourceStats\x1a\x9c\x02\n\x1aRequestedDeidentifyOptions\x12O\n\x1csnapshot_deidentify_template\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Z\n\'snapshot_structured_deidentify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12Q\n\x1esnapshot_image_redact_template\x18\x03 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\"\xdf\x01\n\x0fLocationSupport\x12Z\n\x15regionalization_scope\x18\x01 \x01(\x0e\x32;.google.privacy.dlp.v2.LocationSupport.RegionalizationScope\x12\x11\n\tlocations\x18\x02 \x03(\t\"]\n\x14RegionalizationScope\x12%\n!REGIONALIZATION_SCOPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REGIONAL\x10\x01\x12\x10\n\x0c\x41NY_LOCATION\x10\x02\"\x9b\x05\n\x13InfoTypeDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12@\n\x0csupported_by\x18\x03 \x03(\x0e\x32*.google.privacy.dlp.v2.InfoTypeSupportedBy\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12@\n\x10location_support\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.LocationSupport\x12\x0f\n\x07\x65xample\x18\x08 \x01(\t\x12;\n\x08versions\x18\t \x03(\x0b\x32).google.privacy.dlp.v2.VersionDescription\x12;\n\ncategories\x18\n \x03(\x0b\x32\'.google.privacy.dlp.v2.InfoTypeCategory\x12\x42\n\x11sensitivity_score\x18\x0b \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12\x1b\n\x13specific_info_types\x18\x0c \x03(\t\x12V\n\rlaunch_status\x18\r \x01(\x0e\x32?.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus\"\x82\x01\n\x14InfoTypeLaunchStatus\x12\'\n#INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14GENERAL_AVAILABILITY\x10\x01\x12\x12\n\x0ePUBLIC_PREVIEW\x10\x02\x12\x13\n\x0fPRIVATE_PREVIEW\x10\x03\"\x90\n\n\x10InfoTypeCategory\x12U\n\x11location_category\x18\x01 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.LocationCategoryH\x00\x12U\n\x11industry_category\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategoryH\x00\x12M\n\rtype_category\x18\x03 \x01(\x0e\x32\x34.google.privacy.dlp.v2.InfoTypeCategory.TypeCategoryH\x00\"\xef\x05\n\x10LocationCategory\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\r\n\tARGENTINA\x10\x02\x12\x0b\n\x07\x41RMENIA\x10\x33\x12\r\n\tAUSTRALIA\x10\x03\x12\x0b\n\x07\x41USTRIA\x10\x35\x12\x0e\n\nAZERBAIJAN\x10\x30\x12\x0b\n\x07\x42\x45LARUS\x10\x32\x12\x0b\n\x07\x42\x45LGIUM\x10\x04\x12\n\n\x06\x42RAZIL\x10\x05\x12\n\n\x06\x43\x41NADA\x10\x06\x12\t\n\x05\x43HILE\x10\x07\x12\t\n\x05\x43HINA\x10\x08\x12\x0c\n\x08\x43OLOMBIA\x10\t\x12\x0b\n\x07\x43ROATIA\x10*\x12\x0b\n\x07\x43ZECHIA\x10\x34\x12\x0b\n\x07\x44\x45NMARK\x10\n\x12\n\n\x06\x46RANCE\x10\x0b\x12\x0b\n\x07\x46INLAND\x10\x0c\x12\x0b\n\x07GERMANY\x10\r\x12\r\n\tHONG_KONG\x10\x0e\x12\t\n\x05INDIA\x10\x0f\x12\r\n\tINDONESIA\x10\x10\x12\x0b\n\x07IRELAND\x10\x11\x12\n\n\x06ISRAEL\x10\x12\x12\t\n\x05ITALY\x10\x13\x12\t\n\x05JAPAN\x10\x14\x12\x0e\n\nKAZAKHSTAN\x10/\x12\t\n\x05KOREA\x10\x15\x12\n\n\x06MEXICO\x10\x16\x12\x13\n\x0fTHE_NETHERLANDS\x10\x17\x12\x0f\n\x0bNEW_ZEALAND\x10)\x12\n\n\x06NORWAY\x10\x18\x12\x0c\n\x08PARAGUAY\x10\x19\x12\x08\n\x04PERU\x10\x1a\x12\n\n\x06POLAND\x10\x1b\x12\x0c\n\x08PORTUGAL\x10\x1c\x12\n\n\x06RUSSIA\x10,\x12\r\n\tSINGAPORE\x10\x1d\x12\x10\n\x0cSOUTH_AFRICA\x10\x1e\x12\t\n\x05SPAIN\x10\x1f\x12\n\n\x06SWEDEN\x10 \x12\x0f\n\x0bSWITZERLAND\x10+\x12\n\n\x06TAIWAN\x10!\x12\x0c\n\x08THAILAND\x10\"\x12\n\n\x06TURKEY\x10#\x12\x0b\n\x07UKRAINE\x10-\x12\x12\n\x0eUNITED_KINGDOM\x10$\x12\x11\n\rUNITED_STATES\x10%\x12\x0b\n\x07URUGUAY\x10&\x12\x0e\n\nUZBEKISTAN\x10.\x12\r\n\tVENEZUELA\x10\'\x12\x0c\n\x08INTERNAL\x10(\"]\n\x10IndustryCategory\x12\x18\n\x14INDUSTRY_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\n\n\x06HEALTH\x10\x02\x12\x16\n\x12TELECOMMUNICATIONS\x10\x03\"\xa1\x01\n\x0cTypeCategory\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03PII\x10\x01\x12\x08\n\x04SPII\x10\x02\x12\x0f\n\x0b\x44\x45MOGRAPHIC\x10\x03\x12\x0e\n\nCREDENTIAL\x10\x04\x12\x11\n\rGOVERNMENT_ID\x10\x05\x12\x0c\n\x08\x44OCUMENT\x10\x06\x12\x1a\n\x16\x43ONTEXTUAL_INFORMATION\x10\x07\x12\n\n\x06\x43USTOM\x10\x08\x42\n\n\x08\x63\x61tegory\":\n\x12VersionDescription\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"b\n\x14ListInfoTypesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x13\n\x0blocation_id\x18\x03 \x01(\t\"W\n\x15ListInfoTypesResponse\x12>\n\ninfo_types\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.InfoTypeDescription\"\xc1\x01\n\x15RiskAnalysisJobConfig\x12<\n\x0eprivacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12:\n\x0csource_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12.\n\x07\x61\x63tions\x18\x03 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xbc\x01\n\x07QuasiId\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\"\xbe\x02\n\x10StatisticalTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12T\n\tquasi_ids\x18\x01 \x03(\x0b\x32<.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aY\n\x14QuasiIdentifierField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\"\x93\x0f\n\rPrivacyMetric\x12[\n\x16numerical_stats_config\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigH\x00\x12_\n\x18\x63\x61tegorical_stats_config\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigH\x00\x12S\n\x12k_anonymity_config\x18\x03 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigH\x00\x12S\n\x12l_diversity_config\x18\x04 \x01(\x0b\x32\x35.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigH\x00\x12\\\n\x17k_map_estimation_config\x18\x05 \x01(\x0b\x32\x39.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigH\x00\x12n\n delta_presence_estimation_config\x18\x06 \x01(\x0b\x32\x42.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigH\x00\x1a\x45\n\x14NumericalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1aG\n\x16\x43\x61tegoricalStatsConfig\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1ay\n\x10KAnonymityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x32\n\tentity_id\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EntityId\x1a\x82\x01\n\x10LDiversityConfig\x12\x31\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12;\n\x13sensitive_attribute\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x1a\x81\x06\n\x14KMapEstimationConfig\x12]\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x62\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32H.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable\x1a\xc0\x01\n\x0bTaggedField\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x34\n\tinfo_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeH\x00\x12\x14\n\ncustom_tag\x18\x03 \x01(\tH\x00\x12*\n\x08inferred\x18\x04 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x05\n\x03tag\x1a\xcd\x02\n\x0e\x41uxiliaryTable\x12\x38\n\x05table\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableB\x03\xe0\x41\x02\x12m\n\tquasi_ids\x18\x01 \x03(\x0b\x32U.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldB\x03\xe0\x41\x02\x12?\n\x12relative_frequency\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x1aQ\n\x0cQuasiIdField\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\ncustom_tag\x18\x02 \x01(\t\x1a\xaf\x01\n\x1d\x44\x65ltaPresenceEstimationConfig\x12\x36\n\tquasi_ids\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.QuasiIdB\x03\xe0\x41\x02\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x41\n\x10\x61uxiliary_tables\x18\x03 \x03(\x0b\x32\'.google.privacy.dlp.v2.StatisticalTableB\x06\n\x04type\"\xc1\x1f\n\x1c\x41nalyzeDataSourceRiskDetails\x12\x46\n\x18requested_privacy_metric\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.PrivacyMetric\x12\x44\n\x16requested_source_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12j\n\x16numerical_stats_result\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultH\x00\x12n\n\x18\x63\x61tegorical_stats_result\x18\x04 \x01(\x0b\x32J.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultH\x00\x12\x62\n\x12k_anonymity_result\x18\x05 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultH\x00\x12\x62\n\x12l_diversity_result\x18\x06 \x01(\x0b\x32\x44.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultH\x00\x12k\n\x17k_map_estimation_result\x18\x07 \x01(\x0b\x32H.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultH\x00\x12}\n delta_presence_estimation_result\x18\t \x01(\x0b\x32Q.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultH\x00\x12k\n\x11requested_options\x18\n \x01(\x0b\x32P.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions\x1a\xaf\x01\n\x14NumericalStatsResult\x12/\n\tmin_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12/\n\tmax_value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x35\n\x0fquantile_values\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1a\x8d\x03\n\x16\x43\x61tegoricalStatsResult\x12\x95\x01\n!value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32j.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket\x1a\xda\x01\n\x1f\x43\x61tegoricalStatsHistogramBucket\x12#\n\x1bvalue_frequency_lower_bound\x18\x01 \x01(\x03\x12#\n\x1bvalue_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12<\n\rbucket_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb5\x04\n\x10KAnonymityResult\x12\x8b\x01\n#equivalence_class_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket\x1at\n\x1aKAnonymityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x1a\x9c\x02\n\x19KAnonymityHistogramBucket\x12*\n\"equivalence_class_size_lower_bound\x18\x01 \x01(\x03\x12*\n\"equivalence_class_size_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\xb0\x05\n\x10LDiversityResult\x12\x93\x01\n+sensitive_value_frequency_histogram_buckets\x18\x05 \x03(\x0b\x32^.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket\x1a\xe0\x01\n\x1aLDiversityEquivalenceClass\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1e\n\x16\x65quivalence_class_size\x18\x02 \x01(\x03\x12%\n\x1dnum_distinct_sensitive_values\x18\x03 \x01(\x03\x12\x43\n\x14top_sensitive_values\x18\x04 \x03(\x0b\x32%.google.privacy.dlp.v2.ValueFrequency\x1a\xa2\x02\n\x19LDiversityHistogramBucket\x12-\n%sensitive_value_frequency_lower_bound\x18\x01 \x01(\x03\x12-\n%sensitive_value_frequency_upper_bound\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x03 \x01(\x03\x12v\n\rbucket_values\x18\x04 \x03(\x0b\x32_.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass\x12\x1a\n\x12\x62ucket_value_count\x18\x05 \x01(\x03\x1a\x95\x04\n\x14KMapEstimationResult\x12\x8a\x01\n\x1ak_map_estimation_histogram\x18\x01 \x03(\x0b\x32\x66.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket\x1ar\n\x1bKMapEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1b\n\x13\x65stimated_anonymity\x18\x02 \x01(\x03\x1a\xfb\x01\n\x1dKMapEstimationHistogramBucket\x12\x15\n\rmin_anonymity\x18\x01 \x01(\x03\x12\x15\n\rmax_anonymity\x18\x02 \x01(\x03\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12{\n\rbucket_values\x18\x06 \x03(\x0b\x32\x64.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a\xe4\x04\n\x1d\x44\x65ltaPresenceEstimationResult\x12\xa5\x01\n#delta_presence_estimation_histogram\x18\x01 \x03(\x0b\x32x.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket\x1a}\n$DeltaPresenceEstimationQuasiIdValues\x12\x36\n\x10quasi_ids_values\x18\x01 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\x1d\n\x15\x65stimated_probability\x18\x02 \x01(\x01\x1a\x9b\x02\n&DeltaPresenceEstimationHistogramBucket\x12\x17\n\x0fmin_probability\x18\x01 \x01(\x01\x12\x17\n\x0fmax_probability\x18\x02 \x01(\x01\x12\x13\n\x0b\x62ucket_size\x18\x05 \x01(\x03\x12\x8d\x01\n\rbucket_values\x18\x06 \x03(\x0b\x32v.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues\x12\x1a\n\x12\x62ucket_value_count\x18\x07 \x01(\x03\x1a`\n\x1cRequestedRiskAnalysisOptions\x12@\n\njob_config\x18\x01 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigB\x08\n\x06result\"L\n\x0eValueFrequency\x12+\n\x05value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xb3\x02\n\x05Value\x12\x17\n\rinteger_value\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x17\n\rboolean_value\x18\x04 \x01(\x08H\x00\x12\x35\n\x0ftimestamp_value\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12,\n\ntime_value\x18\x06 \x01(\x0b\x32\x16.google.type.TimeOfDayH\x00\x12\'\n\ndate_value\x18\x07 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x33\n\x11\x64\x61y_of_week_value\x18\x08 \x01(\x0e\x32\x16.google.type.DayOfWeekH\x00\x42\x06\n\x04type\"Q\n\tQuoteInfo\x12\x34\n\tdate_time\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DateTimeH\x00\x42\x0e\n\x0cparsed_quote\"\xdf\x01\n\x08\x44\x61teTime\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x0b\x64\x61y_of_week\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeek\x12$\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDay\x12;\n\ttime_zone\x18\x04 \x01(\x0b\x32(.google.privacy.dlp.v2.DateTime.TimeZone\x1a\"\n\x08TimeZone\x12\x16\n\x0eoffset_minutes\x18\x01 \x01(\x05\"\xf2\x02\n\x10\x44\x65identifyConfig\x12S\n\x19info_type_transformations\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x12N\n\x16record_transformations\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.RecordTransformationsH\x00\x12L\n\x15image_transformations\x18\x04 \x01(\x0b\x32+.google.privacy.dlp.v2.ImageTransformationsH\x00\x12Y\n\x1dtransformation_error_handling\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.TransformationErrorHandlingB\x10\n\x0etransformation\"\xe5\x04\n\x14ImageTransformations\x12S\n\ntransforms\x18\x02 \x03(\x0b\x32?.google.privacy.dlp.v2.ImageTransformations.ImageTransformation\x1a\xf7\x03\n\x13ImageTransformation\x12p\n\x13selected_info_types\x18\x04 \x01(\x0b\x32Q.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesH\x00\x12\x66\n\x0e\x61ll_info_types\x18\x05 \x01(\x0b\x32L.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesH\x00\x12[\n\x08\x61ll_text\x18\x06 \x01(\x0b\x32G.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextH\x00\x12\x35\n\x0fredaction_color\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Color\x1aM\n\x11SelectedInfoTypes\x12\x38\n\ninfo_types\x18\x05 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoTypeB\x03\xe0\x41\x02\x1a\x0e\n\x0c\x41llInfoTypes\x1a\t\n\x07\x41llTextB\x08\n\x06target\"\x85\x02\n\x1bTransformationErrorHandling\x12T\n\x0bthrow_error\x18\x01 \x01(\x0b\x32=.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorH\x00\x12\x64\n\x13leave_untransformed\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedH\x00\x1a\x0c\n\nThrowError\x1a\x14\n\x12LeaveUntransformedB\x06\n\x04mode\"\xca\x07\n\x17PrimitiveTransformation\x12\x43\n\x0ereplace_config\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.ReplaceValueConfigH\x00\x12<\n\rredact_config\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.RedactConfigH\x00\x12K\n\x15\x63haracter_mask_config\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CharacterMaskConfigH\x00\x12Y\n\x1d\x63rypto_replace_ffx_fpe_config\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigH\x00\x12V\n\x1b\x66ixed_size_bucketing_config\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.FixedSizeBucketingConfigH\x00\x12\x42\n\x10\x62ucketing_config\x18\x06 \x01(\x0b\x32&.google.privacy.dlp.v2.BucketingConfigH\x00\x12Y\n\x1dreplace_with_info_type_config\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigH\x00\x12\x41\n\x10time_part_config\x18\x08 \x01(\x0b\x32%.google.privacy.dlp.v2.TimePartConfigH\x00\x12\x45\n\x12\x63rypto_hash_config\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.CryptoHashConfigH\x00\x12\x43\n\x11\x64\x61te_shift_config\x18\x0b \x01(\x0b\x32&.google.privacy.dlp.v2.DateShiftConfigH\x00\x12W\n\x1b\x63rypto_deterministic_config\x18\x0c \x01(\x0b\x32\x30.google.privacy.dlp.v2.CryptoDeterministicConfigH\x00\x12S\n\x19replace_dictionary_config\x18\r \x01(\x0b\x32..google.privacy.dlp.v2.ReplaceDictionaryConfigH\x00\x42\x10\n\x0etransformation\"\xdc\x01\n\x0eTimePartConfig\x12G\n\x0fpart_to_extract\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.TimePartConfig.TimePart\"\x80\x01\n\x08TimePart\x12\x19\n\x15TIME_PART_UNSPECIFIED\x10\x00\x12\x08\n\x04YEAR\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x10\n\x0c\x44\x41Y_OF_MONTH\x10\x03\x12\x0f\n\x0b\x44\x41Y_OF_WEEK\x10\x04\x12\x10\n\x0cWEEK_OF_YEAR\x10\x05\x12\x0f\n\x0bHOUR_OF_DAY\x10\x06\"H\n\x10\x43ryptoHashConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\"\xc0\x01\n\x19\x43ryptoDeterministicConfig\x12\x34\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKey\x12<\n\x13surrogate_info_type\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"E\n\x12ReplaceValueConfig\x12/\n\tnew_value\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\"q\n\x17ReplaceDictionaryConfig\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x42\x06\n\x04type\"\x1b\n\x19ReplaceWithInfoTypeConfig\"\x0e\n\x0cRedactConfig\"\xb6\x02\n\rCharsToIgnore\x12\x1c\n\x12\x63haracters_to_skip\x18\x01 \x01(\tH\x00\x12_\n\x1b\x63ommon_characters_to_ignore\x18\x02 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnoreH\x00\"\x97\x01\n\x13\x43ommonCharsToIgnore\x12&\n\"COMMON_CHARS_TO_IGNORE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x14\n\x10\x41LPHA_UPPER_CASE\x10\x02\x12\x14\n\x10\x41LPHA_LOWER_CASE\x10\x03\x12\x0f\n\x0bPUNCTUATION\x10\x04\x12\x0e\n\nWHITESPACE\x10\x05\x42\x0c\n\ncharacters\"\xa3\x01\n\x13\x43haracterMaskConfig\x12\x19\n\x11masking_character\x18\x01 \x01(\t\x12\x16\n\x0enumber_to_mask\x18\x02 \x01(\x05\x12\x15\n\rreverse_order\x18\x03 \x01(\x08\x12\x42\n\x14\x63haracters_to_ignore\x18\x04 \x03(\x0b\x32$.google.privacy.dlp.v2.CharsToIgnore\"\xa4\x01\n\x18\x46ixedSizeBucketingConfig\x12\x36\n\x0blower_bound\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x36\n\x0bupper_bound\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_size\x18\x03 \x01(\x01\x42\x03\xe0\x41\x02\"\xf0\x01\n\x0f\x42ucketingConfig\x12>\n\x07\x62uckets\x18\x01 \x03(\x0b\x32-.google.privacy.dlp.v2.BucketingConfig.Bucket\x1a\x9c\x01\n\x06\x42ucket\x12)\n\x03min\x18\x01 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12)\n\x03max\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x12<\n\x11replacement_value\x18\x03 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.ValueB\x03\xe0\x41\x02\"\xf9\x03\n\x19\x43ryptoReplaceFfxFpeConfig\x12\x39\n\ncrypto_key\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyB\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x63\n\x0f\x63ommon_alphabet\x18\x04 \x01(\x0e\x32H.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabetH\x00\x12\x19\n\x0f\x63ustom_alphabet\x18\x05 \x01(\tH\x00\x12\x0f\n\x05radix\x18\x06 \x01(\x05H\x00\x12<\n\x13surrogate_info_type\x18\x08 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\x94\x01\n\x17\x46\x66xCommonNativeAlphabet\x12*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED\x10\x00\x12\x0b\n\x07NUMERIC\x10\x01\x12\x0f\n\x0bHEXADECIMAL\x10\x02\x12\x1c\n\x18UPPER_CASE_ALPHA_NUMERIC\x10\x03\x12\x11\n\rALPHA_NUMERIC\x10\x04\x42\n\n\x08\x61lphabet\"\xd8\x01\n\tCryptoKey\x12>\n\ttransient\x18\x01 \x01(\x0b\x32).google.privacy.dlp.v2.TransientCryptoKeyH\x00\x12>\n\tunwrapped\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.UnwrappedCryptoKeyH\x00\x12\x41\n\x0bkms_wrapped\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.KmsWrappedCryptoKeyH\x00\x42\x08\n\x06source\"\'\n\x12TransientCryptoKey\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"&\n\x12UnwrappedCryptoKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\"M\n\x13KmsWrappedCryptoKey\x12\x18\n\x0bwrapped_key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x1c\n\x0f\x63rypto_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc2\x01\n\x0f\x44\x61teShiftConfig\x12\x1d\n\x10upper_bound_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1d\n\x10lower_bound_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12/\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x36\n\ncrypto_key\x18\x04 \x01(\x0b\x32 .google.privacy.dlp.v2.CryptoKeyH\x00\x42\x08\n\x06method\"\xa5\x02\n\x17InfoTypeTransformations\x12\x63\n\x0ftransformations\x18\x01 \x03(\x0b\x32\x45.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationB\x03\xe0\x41\x02\x1a\xa4\x01\n\x16InfoTypeTransformation\x12\x33\n\ninfo_types\x18\x01 \x03(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12U\n\x18primitive_transformation\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationB\x03\xe0\x41\x02\"\xc0\x02\n\x13\x46ieldTransformation\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12\x39\n\tcondition\x18\x03 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\x12R\n\x18primitive_transformation\x18\x04 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformationH\x00\x12S\n\x19info_type_transformations\x18\x05 \x01(\x0b\x32..google.privacy.dlp.v2.InfoTypeTransformationsH\x00\x42\x10\n\x0etransformation\"\xa9\x01\n\x15RecordTransformations\x12I\n\x15\x66ield_transformations\x18\x01 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x45\n\x13record_suppressions\x18\x02 \x03(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\"N\n\x11RecordSuppression\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.RecordCondition\"\xdc\x04\n\x0fRecordCondition\x12G\n\x0b\x65xpressions\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.RecordCondition.Expressions\x1a\xae\x01\n\tCondition\x12\x32\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldIdB\x03\xe0\x41\x02\x12@\n\x08operator\x18\x03 \x01(\x0e\x32).google.privacy.dlp.v2.RelationalOperatorB\x03\xe0\x41\x02\x12+\n\x05value\x18\x04 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value\x1aR\n\nConditions\x12\x44\n\nconditions\x18\x01 \x03(\x0b\x32\x30.google.privacy.dlp.v2.RecordCondition.Condition\x1a\xfa\x01\n\x0b\x45xpressions\x12\\\n\x10logical_operator\x18\x01 \x01(\x0e\x32\x42.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator\x12G\n\nconditions\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.RecordCondition.ConditionsH\x00\"<\n\x0fLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x42\x06\n\x04type\"\x83\x01\n\x16TransformationOverview\x12\x19\n\x11transformed_bytes\x18\x02 \x01(\x03\x12N\n\x18transformation_summaries\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.TransformationSummary\"\x9f\x05\n\x15TransformationSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x46\n\x0etransformation\x18\x03 \x01(\x0b\x32..google.privacy.dlp.v2.PrimitiveTransformation\x12I\n\x15\x66ield_transformations\x18\x05 \x03(\x0b\x32*.google.privacy.dlp.v2.FieldTransformation\x12\x41\n\x0frecord_suppress\x18\x06 \x01(\x0b\x32(.google.privacy.dlp.v2.RecordSuppression\x12K\n\x07results\x18\x04 \x03(\x0b\x32:.google.privacy.dlp.v2.TransformationSummary.SummaryResult\x12\x19\n\x11transformed_bytes\x18\x07 \x01(\x03\x1a\x84\x01\n\rSummaryResult\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12S\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x45.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"^\n\x18TransformationResultCode\x12*\n&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xb0\x01\n\x19TransformationDescription\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.privacy.dlp.v2.TransformationType\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x11\n\tcondition\x18\x03 \x01(\t\x12\x32\n\tinfo_type\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"\xc6\x02\n\x15TransformationDetails\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x02 \x01(\t\x12H\n\x0etransformation\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.TransformationDescription\x12I\n\x0estatus_details\x18\x04 \x01(\x0b\x32\x31.google.privacy.dlp.v2.TransformationResultStatus\x12\x19\n\x11transformed_bytes\x18\x05 \x01(\x03\x12N\n\x17transformation_location\x18\x06 \x01(\x0b\x32-.google.privacy.dlp.v2.TransformationLocation\"\xd9\x01\n\x16TransformationLocation\x12\x14\n\nfinding_id\x18\x01 \x01(\tH\x00\x12L\n\x15record_transformation\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.RecordTransformationH\x00\x12J\n\x0e\x63ontainer_type\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.TransformationContainerTypeB\x0f\n\rlocation_type\"\x9c\x01\n\x14RecordTransformation\x12\x30\n\x08\x66ield_id\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x13\x63ontainer_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x63ontainer_version\x18\x03 \x01(\t\"\x94\x01\n\x1aTransformationResultStatus\x12Q\n\x12result_status_type\x18\x01 \x01(\x0e\x32\x35.google.privacy.dlp.v2.TransformationResultStatusType\x12#\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\"TransformationDetailsStorageConfig\x12\x35\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTableH\x00\x42\x06\n\x04type\"U\n\x08Schedule\x12?\n\x1arecurrence_period_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x42\x08\n\x06option\"\x08\n\x06Manual\"\xc2\x04\n\x0fInspectTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x0einspect_config\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig:\xc6\x02\xea\x41\xc2\x02\n\"dlp.googleapis.com/InspectTemplate\x12@organizations/{organization}/inspectTemplates/{inspect_template}\x12\x36projects/{project}/inspectTemplates/{inspect_template}\x12Uorganizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}\"\xe6\x04\n\x12\x44\x65identifyTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x11\x64\x65identify_config\x18\x06 \x01(\x0b\x32\'.google.privacy.dlp.v2.DeidentifyConfig:\xe1\x02\xea\x41\xdd\x02\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46organizations/{organization}/deidentifyTemplates/{deidentify_template}\x12\n\x0binspect_job\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12;\n\x08triggers\x18\x05 \x03(\x0b\x32).google.privacy.dlp.v2.JobTrigger.Trigger\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x06status\x18\n \x01(\x0e\x32(.google.privacy.dlp.v2.JobTrigger.StatusB\x03\xe0\x41\x02\x1az\n\x07Trigger\x12\x33\n\x08schedule\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.ScheduleH\x00\x12/\n\x06manual\x18\x02 \x01(\x0b\x32\x1d.google.privacy.dlp.v2.ManualH\x00\x42\t\n\x07trigger\"H\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07HEALTHY\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\r\n\tCANCELLED\x10\x03:\x94\x01\xea\x41\x90\x01\n\x1d\x64lp.googleapis.com/JobTrigger\x12,projects/{project}/jobTriggers/{job_trigger}\x12\x41projects/{project}/locations/{location}/jobTriggers/{job_trigger}B\x05\n\x03job\"\x82\n\n\x06\x41\x63tion\x12\x43\n\rsave_findings\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.Action.SaveFindingsH\x00\x12@\n\x07pub_sub\x18\x02 \x01(\x0b\x32-.google.privacy.dlp.v2.Action.PublishToPubSubH\x00\x12U\n\x17publish_summary_to_cscc\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishSummaryToCsccH\x00\x12u\n&publish_findings_to_cloud_data_catalog\x18\x05 \x01(\x0b\x32?.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogB\x02\x18\x01H\x00\x12n\n$publish_findings_to_dataplex_catalog\x18\n \x01(\x0b\x32>.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalogH\x00\x12>\n\ndeidentify\x18\x07 \x01(\x0b\x32(.google.privacy.dlp.v2.Action.DeidentifyH\x00\x12V\n\x17job_notification_emails\x18\x08 \x01(\x0b\x32\x33.google.privacy.dlp.v2.Action.JobNotificationEmailsH\x00\x12T\n\x16publish_to_stackdriver\x18\t \x01(\x0b\x32\x32.google.privacy.dlp.v2.Action.PublishToStackdriverH\x00\x1aQ\n\x0cSaveFindings\x12\x41\n\routput_config\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.OutputStorageConfig\x1a \n\x0fPublishToPubSub\x12\r\n\x05topic\x18\x01 \x01(\t\x1a\x16\n\x14PublishSummaryToCscc\x1a#\n!PublishFindingsToCloudDataCatalog\x1a\"\n PublishFindingsToDataplexCatalog\x1a\xb3\x02\n\nDeidentify\x12J\n\x15transformation_config\x18\x07 \x01(\x0b\x32+.google.privacy.dlp.v2.TransformationConfig\x12h\n%transformation_details_storage_config\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.TransformationDetailsStorageConfig\x12#\n\x14\x63loud_storage_output\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12@\n\x17\x66ile_types_to_transform\x18\x08 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileTypeB\x08\n\x06output\x1a\x17\n\x15JobNotificationEmails\x1a\x16\n\x14PublishToStackdriverB\x08\n\x06\x61\x63tion\"z\n\x14TransformationConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12&\n\x1estructured_deidentify_template\x18\x02 \x01(\t\x12\x1d\n\x15image_redact_template\x18\x04 \x01(\t\"\xcb\x01\n\x1c\x43reateInspectTemplateRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x45\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xcb\x01\n\x1cUpdateInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\x12@\n\x10inspect_template\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xa7\x01\n\x1bListInspectTemplatesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/InspectTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"z\n\x1cListInspectTemplatesResponse\x12\x41\n\x11inspect_templates\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.InspectTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteInspectTemplateRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/InspectTemplate\"\xb6\x01\n\x17\x43reateJobTriggerRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12;\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTriggerB\x03\xe0\x41\x02\x12\x12\n\ntrigger_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"P\n\x19\x41\x63tivateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb7\x01\n\x17UpdateJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12\x36\n\x0bjob_trigger\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14GetJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xb4\x01\n\x1c\x43reateDiscoveryConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12\x11\n\tconfig_id\x18\x03 \x01(\t\"\xd0\x01\n\x1cUpdateDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\x12\x45\n\x10\x64iscovery_config\x18\x02 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x19GetDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\x92\x01\n\x1bListDiscoveryConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"dlp.googleapis.com/DiscoveryConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\"z\n\x1cListDiscoveryConfigsResponse\x12\x41\n\x11\x64iscovery_configs\x18\x01 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x1c\x44\x65leteDiscoveryConfigRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dlp.googleapis.com/DiscoveryConfig\"\xf6\x01\n\x13\x43reateDlpJobRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12>\n\x0binspect_job\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.InspectJobConfigH\x00\x12@\n\x08risk_job\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.RiskAnalysisJobConfigH\x00\x12\x0e\n\x06job_id\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\tB\x05\n\x03job\"\xde\x01\n\x16ListJobTriggersRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/JobTrigger\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12/\n\x04type\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"k\n\x17ListJobTriggersResponse\x12\x37\n\x0cjob_triggers\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.JobTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x17\x44\x65leteJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\"\xdd\x01\n\x10InspectJobConfig\x12<\n\x0estorage_config\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.StorageConfig\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12\x1d\n\x15inspect_template_name\x18\x03 \x01(\t\x12.\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Action\"\xf2\r\n\x11\x44\x61taProfileAction\x12\x46\n\x0b\x65xport_data\x18\x01 \x01(\x0b\x32/.google.privacy.dlp.v2.DataProfileAction.ExportH\x00\x12[\n\x14pub_sub_notification\x18\x02 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationH\x00\x12[\n\x14publish_to_chronicle\x18\x03 \x01(\x0b\x32;.google.privacy.dlp.v2.DataProfileAction.PublishToChronicleH\x00\x12\x61\n\x0epublish_to_scc\x18\x04 \x01(\x0b\x32G.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenterH\x00\x12N\n\rtag_resources\x18\x08 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DataProfileAction.TagResourcesH\x00\x12h\n\x1bpublish_to_dataplex_catalog\x18\t \x01(\x0b\x32\x41.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalogH\x00\x1a\x8a\x01\n\x06\x45xport\x12;\n\rprofile_table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x43\n\x15sample_findings_table\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x1a\x82\x03\n\x12PubSubNotification\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\x12K\n\x10pubsub_condition\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfilePubSubCondition\x12\x62\n\x11\x64\x65tail_of_message\x18\x04 \x01(\x0e\x32G.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel\"i\n\x0b\x44\x65tailLevel\x12\x1c\n\x18\x44\x45TAIL_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rTABLE_PROFILE\x10\x01\x12\x11\n\rRESOURCE_NAME\x10\x02\x12\x16\n\x12\x46ILE_STORE_PROFILE\x10\x03\x1a\x14\n\x12PublishToChronicle\x1a \n\x1ePublishToSecurityCommandCenter\x1a:\n\x18PublishToDataplexCatalog\x12\x1e\n\x16lower_data_risk_to_low\x18\x01 \x01(\x08\x1a\xb6\x03\n\x0cTagResources\x12Z\n\x0etag_conditions\x18\x01 \x03(\x0b\x32\x42.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition\x12L\n\x1aprofile_generations_to_tag\x18\x02 \x03(\x0e\x32(.google.privacy.dlp.v2.ProfileGeneration\x12\x1e\n\x16lower_data_risk_to_low\x18\x03 \x01(\x08\x1a\xa9\x01\n\x0cTagCondition\x12K\n\x03tag\x18\x01 \x01(\x0b\x32>.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue\x12\x44\n\x11sensitivity_score\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScoreH\x00\x42\x06\n\x04type\x1a\x30\n\x08TagValue\x12\x1a\n\x10namespaced_value\x18\x01 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"u\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_PROFILE\x10\x01\x12\x13\n\x0f\x43HANGED_PROFILE\x10\x02\x12\x13\n\x0fSCORE_INCREASED\x10\x03\x12\x11\n\rERROR_CHANGED\x10\x04\x42\x08\n\x06\x61\x63tion\"\xdd\x03\n\x12\x44\x61taProfileFinding\x12\r\n\x05quote\x18\x01 \x01(\t\x12\x31\n\x08infotype\x18\x02 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x34\n\nquote_info\x18\x03 \x01(\x0b\x32 .google.privacy.dlp.v2.QuoteInfo\x12\"\n\x1a\x64\x61ta_profile_resource_name\x18\x04 \x01(\t\x12\x12\n\nfinding_id\x18\x05 \x01(\t\x12-\n\ttimestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x08location\x18\x07 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DataProfileFindingLocation\x12\x46\n\x13resource_visibility\x18\x08 \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x1a\n\x12\x66ull_resource_name\x18\t \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\n \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\"\xb7\x01\n\x1a\x44\x61taProfileFindingLocation\x12\x16\n\x0e\x63ontainer_name\x18\x01 \x01(\t\x12g\n$data_profile_finding_record_location\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DataProfileFindingRecordLocationH\x00\x42\x18\n\x16location_extra_details\"Q\n DataProfileFindingRecordLocation\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"\xae\x02\n\x14\x44\x61taProfileJobConfig\x12<\n\x08location\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.DataProfileLocation\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x61\n\x1dother_cloud_starting_location\x18\x08 \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x07 \x03(\t\x12\x46\n\x14\x64\x61ta_profile_actions\x18\x06 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\"[\n\rBigQueryRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x18\n\x10\x64\x61taset_id_regex\x18\x02 \x01(\t\x12\x16\n\x0etable_id_regex\x18\x03 \x01(\t\"I\n\x0f\x42igQueryRegexes\x12\x36\n\x08patterns\x18\x01 \x03(\x0b\x32$.google.privacy.dlp.v2.BigQueryRegex\"M\n\x12\x42igQueryTableTypes\x12\x37\n\x05types\x18\x01 \x03(\x0e\x32(.google.privacy.dlp.v2.BigQueryTableType\"\n\n\x08\x44isabled\"Q\n\x13\x44\x61taProfileLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\xeb\x07\n\x0f\x44iscoveryConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0b \x01(\t\x12\x44\n\norg_config\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig\x12\x61\n\x1dother_cloud_starting_location\x18\x0c \x01(\x0b\x32:.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation\x12\x19\n\x11inspect_templates\x18\x03 \x03(\t\x12\x39\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32(.google.privacy.dlp.v2.DataProfileAction\x12\x37\n\x07targets\x18\x05 \x03(\x0b\x32&.google.privacy.dlp.v2.DiscoveryTarget\x12\x31\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rlast_run_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06status\x18\n \x01(\x0e\x32-.google.privacy.dlp.v2.DiscoveryConfig.StatusB\x03\xe0\x41\x02\x12K\n\x13processing_location\x18\r \x01(\x0b\x32).google.privacy.dlp.v2.ProcessingLocationB\x03\xe0\x41\x01\x1a\x63\n\tOrgConfig\x12\x42\n\x08location\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryStartingLocation\x12\x12\n\nproject_id\x18\x02 \x01(\t\"9\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02:t\xea\x41q\n\"dlp.googleapis.com/DiscoveryConfig\x12Kprojects/{project}/locations/{location}/discoveryConfigs/{discovery_config}\"\xf6\x03\n\x0f\x44iscoveryTarget\x12J\n\x10\x62ig_query_target\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryDiscoveryTargetH\x00\x12J\n\x10\x63loud_sql_target\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.CloudSqlDiscoveryTargetH\x00\x12G\n\x0esecrets_target\x18\x03 \x01(\x0b\x32-.google.privacy.dlp.v2.SecretsDiscoveryTargetH\x00\x12R\n\x14\x63loud_storage_target\x18\x04 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageDiscoveryTargetH\x00\x12N\n\x12other_cloud_target\x18\x05 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudDiscoveryTargetH\x00\x12T\n\x15vertex_dataset_target\x18\x07 \x01(\x0b\x32\x33.google.privacy.dlp.v2.VertexDatasetDiscoveryTargetH\x00\x42\x08\n\x06target\"\xae\x02\n\x17\x42igQueryDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryBigQueryFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryBigQueryConditions\x12\x44\n\x07\x63\x61\x64\x65nce\x18\x03 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DiscoveryGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\x0b\n\tfrequency\"\xa0\x02\n\x17\x44iscoveryBigQueryFilter\x12@\n\x06tables\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.BigQueryTableCollectionH\x00\x12]\n\x0cother_tables\x18\x02 \x01(\x0b\x32\x45.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTablesH\x00\x12@\n\x0ftable_reference\x18\x03 \x01(\x0b\x32%.google.privacy.dlp.v2.TableReferenceH\x00\x1a\x18\n\x16\x41llOtherBigQueryTablesB\x08\n\x06\x66ilter\"g\n\x17\x42igQueryTableCollection\x12\x41\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryRegexesH\x00\x42\t\n\x07pattern\"\x98\x03\n\x1b\x44iscoveryBigQueryConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x05types\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.BigQueryTableTypesH\x00\x12M\n\x0ftype_collection\x18\x03 \x01(\x0e\x32\x32.google.privacy.dlp.v2.BigQueryTableTypeCollectionH\x00\x12V\n\ror_conditions\x18\x04 \x01(\x0b\x32?.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions\x1aQ\n\x0cOrConditions\x12\x15\n\rmin_row_count\x18\x01 \x01(\x05\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\n\x0eincluded_types\"\x83\x03\n\x1a\x44iscoveryGenerationCadence\x12V\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32\x35.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence\x12T\n\x16table_modified_cadence\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryTableModifiedCadence\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x12L\n\x11refresh_frequency\x18\x04 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa6\x01\n\x1d\x44iscoveryTableModifiedCadence\x12?\n\x05types\x18\x01 \x03(\x0e\x32\x30.google.privacy.dlp.v2.BigQueryTableModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xa8\x01\n\x1e\x44iscoverySchemaModifiedCadence\x12@\n\x05types\x18\x01 \x03(\x0e\x32\x31.google.privacy.dlp.v2.BigQuerySchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"o\n\'DiscoveryInspectTemplateModifiedCadence\x12\x44\n\tfrequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"\xbf\x02\n\x17\x43loudSqlDiscoveryTarget\x12\x43\n\x06\x66ilter\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DiscoveryCloudSqlFilterB\x03\xe0\x41\x02\x12\x46\n\nconditions\x18\x02 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudSqlConditions\x12W\n\x12generation_cadence\x18\x03 \x01(\x0b\x32\x39.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x89\x02\n\x17\x44iscoveryCloudSqlFilter\x12G\n\ncollection\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.DatabaseResourceCollectionH\x00\x12\x42\n\x06others\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.AllOtherDatabaseResourcesH\x00\x12W\n\x1b\x64\x61tabase_resource_reference\x18\x03 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DatabaseResourceReferenceH\x00\x42\x08\n\x06\x66ilter\"r\n\x1a\x44\x61tabaseResourceCollection\x12I\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.DatabaseResourceRegexesH\x00\x42\t\n\x07pattern\"Y\n\x17\x44\x61tabaseResourceRegexes\x12>\n\x08patterns\x18\x01 \x03(\x0b\x32,.google.privacy.dlp.v2.DatabaseResourceRegex\"\x87\x01\n\x15\x44\x61tabaseResourceRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\x12\x16\n\x0einstance_regex\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x61tabase_regex\x18\x03 \x01(\t\x12$\n\x1c\x64\x61tabase_resource_name_regex\x18\x04 \x01(\t\"\x1b\n\x19\x41llOtherDatabaseResources\"\x82\x01\n\x19\x44\x61tabaseResourceReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64\x61tabase\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x64\x61tabase_resource\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xda\x03\n\x1b\x44iscoveryCloudSqlConditions\x12`\n\x10\x64\x61tabase_engines\x18\x01 \x03(\x0e\x32\x41.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngineB\x03\xe0\x41\x01\x12V\n\x05types\x18\x03 \x03(\x0e\x32G.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType\"n\n\x0e\x44\x61tabaseEngine\x12\x1f\n\x1b\x44\x41TABASE_ENGINE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x41LL_SUPPORTED_DATABASE_ENGINES\x10\x01\x12\t\n\x05MYSQL\x10\x02\x12\x0c\n\x08POSTGRES\x10\x03\"\x90\x01\n\x14\x44\x61tabaseResourceType\x12&\n\"DATABASE_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12.\n*DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES\x10\x01\x12 \n\x1c\x44\x41TABASE_RESOURCE_TYPE_TABLE\x10\x02\"\x97\x05\n\"DiscoveryCloudSqlGenerationCadence\x12p\n\x17schema_modified_cadence\x18\x01 \x01(\x0b\x32O.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence\x12L\n\x11refresh_frequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\x1a\xc5\x02\n\x15SchemaModifiedCadence\x12y\n\x05types\x18\x01 \x03(\x0e\x32j.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification\x12\x44\n\tfrequency\x18\x02 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\"k\n\x1a\x43loudSqlSchemaModification\x12\'\n#SQL_SCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_COLUMNS\x10\x01\x12\x13\n\x0fREMOVED_COLUMNS\x10\x02\"\x18\n\x16SecretsDiscoveryTarget\"\xdb\x02\n\x1b\x43loudStorageDiscoveryTarget\x12G\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.DiscoveryCloudStorageFilterB\x03\xe0\x41\x02\x12L\n\nconditions\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryFileStoreConditionsB\x03\xe0\x41\x01\x12`\n\x12generation_cadence\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadenceB\x03\xe0\x41\x01H\x00\x12\x38\n\x08\x64isabled\x18\x03 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x96\x02\n\x1b\x44iscoveryCloudStorageFilter\x12\x45\n\ncollection\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.FileStoreCollectionB\x03\xe0\x41\x01H\x00\x12\x65\n cloud_storage_resource_reference\x18\x02 \x01(\x0b\x32\x34.google.privacy.dlp.v2.CloudStorageResourceReferenceB\x03\xe0\x41\x01H\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"\xa7\x01\n\x13\x46ileStoreCollection\x12G\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.FileStoreRegexesB\x03\xe0\x41\x01H\x00\x12<\n\x0cinclude_tags\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.TagFiltersB\x03\xe0\x41\x01\x42\t\n\x07pattern\"P\n\x10\x46ileStoreRegexes\x12<\n\x08patterns\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.FileStoreRegexB\x03\xe0\x41\x02\"p\n\x0e\x46ileStoreRegex\x12L\n\x13\x63loud_storage_regex\x18\x01 \x01(\x0b\x32(.google.privacy.dlp.v2.CloudStorageRegexB\x03\xe0\x41\x01H\x00\x42\x10\n\x0eresource_regex\"R\n\x11\x43loudStorageRegex\x12\x1d\n\x10project_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"R\n\x1d\x43loudStorageResourceReference\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xeb\x01\n&DiscoveryCloudStorageGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"\x9b\x05\n\x1f\x44iscoveryCloudStorageConditions\x12{\n\x1aincluded_object_attributes\x18\x01 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttributeB\x03\xe0\x41\x02\x12{\n\x1aincluded_bucket_attributes\x18\x02 \x03(\x0e\x32R.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttributeB\x03\xe0\x41\x02\"\xe3\x01\n\x1b\x43loudStorageObjectAttribute\x12.\n*CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_OBJECTS\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x0c\n\x08NEARLINE\x10\x03\x12\x0c\n\x08\x43OLDLINE\x10\x04\x12\x0b\n\x07\x41RCHIVE\x10\x05\x12\x0c\n\x08REGIONAL\x10\x06\x12\x12\n\x0eMULTI_REGIONAL\x10\x07\x12 \n\x1c\x44URABLE_REDUCED_AVAILABILITY\x10\x08\"\x97\x01\n\x1b\x43loudStorageBucketAttribute\x12.\n*CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_BUCKETS\x10\x01\x12\x16\n\x12\x41UTOCLASS_DISABLED\x10\x02\x12\x15\n\x11\x41UTOCLASS_ENABLED\x10\x03\"\xf6\x01\n\x1c\x44iscoveryFileStoreConditions\x12\x36\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12/\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12_\n\x18\x63loud_storage_conditions\x18\x03 \x01(\x0b\x32\x36.google.privacy.dlp.v2.DiscoveryCloudStorageConditionsB\x03\xe0\x41\x01H\x00\x42\x0c\n\nconditions\"\x92\x03\n\x19OtherCloudDiscoveryTarget\x12\x44\n\x10\x64\x61ta_source_type\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceTypeB\x03\xe0\x41\x02\x12\x45\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DiscoveryOtherCloudFilterB\x03\xe0\x41\x02\x12M\n\nconditions\x18\x03 \x01(\x0b\x32\x34.google.privacy.dlp.v2.DiscoveryOtherCloudConditionsB\x03\xe0\x41\x01\x12Y\n\x12generation_cadence\x18\x04 \x01(\x0b\x32;.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x05 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x86\x02\n\x19\x44iscoveryOtherCloudFilter\x12I\n\ncollection\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.OtherCloudResourceCollectionH\x00\x12S\n\x0fsingle_resource\x18\x02 \x01(\x0b\x32\x38.google.privacy.dlp.v2.OtherCloudSingleResourceReferenceH\x00\x12?\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesB\x03\xe0\x41\x01H\x00\x42\x08\n\x06\x66ilter\"v\n\x1cOtherCloudResourceCollection\x12K\n\x0finclude_regexes\x18\x01 \x01(\x0b\x32\x30.google.privacy.dlp.v2.OtherCloudResourceRegexesH\x00\x42\t\n\x07pattern\"]\n\x19OtherCloudResourceRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32..google.privacy.dlp.v2.OtherCloudResourceRegex\"y\n\x17OtherCloudResourceRegex\x12L\n\x16\x61mazon_s3_bucket_regex\x18\x01 \x01(\x0b\x32*.google.privacy.dlp.v2.AmazonS3BucketRegexH\x00\x42\x10\n\x0eresource_regex\"0\n\x0f\x41wsAccountRegex\x12\x1d\n\x10\x61\x63\x63ount_id_regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\"x\n\x13\x41mazonS3BucketRegex\x12\x41\n\x11\x61ws_account_regex\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.AwsAccountRegex\x12\x1e\n\x11\x62ucket_name_regex\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n!OtherCloudSingleResourceReference\x12\x41\n\x10\x61mazon_s3_bucket\x18\x01 \x01(\x0b\x32%.google.privacy.dlp.v2.AmazonS3BucketH\x00\x42\n\n\x08resource\"%\n\nAwsAccount\x12\x17\n\naccount_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"b\n\x0e\x41mazonS3Bucket\x12\x36\n\x0b\x61ws_account\x18\x01 \x01(\x0b\x32!.google.privacy.dlp.v2.AwsAccount\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x1d\x44iscoveryOtherCloudConditions\x12*\n\x07min_age\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12V\n\x1b\x61mazon_s3_bucket_conditions\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.AmazonS3BucketConditionsH\x00\x42\x0c\n\nconditions\"\xd9\x03\n\x18\x41mazonS3BucketConditions\x12U\n\x0c\x62ucket_types\x18\x01 \x03(\x0e\x32:.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketTypeB\x03\xe0\x41\x01\x12g\n\x16object_storage_classes\x18\x02 \x03(\x0e\x32\x42.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClassB\x03\xe0\x41\x01\"T\n\nBucketType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12TYPE_ALL_SUPPORTED\x10\x01\x12\x18\n\x14TYPE_GENERAL_PURPOSE\x10\x02\"\xa6\x01\n\x12ObjectStorageClass\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x19\n\x15\x41LL_SUPPORTED_CLASSES\x10\x01\x12\x0c\n\x08STANDARD\x10\x02\x12\x1e\n\x1aSTANDARD_INFREQUENT_ACCESS\x10\x04\x12\x1d\n\x19GLACIER_INSTANT_RETRIEVAL\x10\x06\x12\x17\n\x13INTELLIGENT_TIERING\x10\x07\"\xe9\x01\n$DiscoveryOtherCloudGenerationCadence\x12Q\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequencyB\x03\xe0\x41\x01\x12n\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadenceB\x03\xe0\x41\x01\"W\n\x19\x44iscoveryStartingLocation\x12\x19\n\x0forganization_id\x18\x01 \x01(\x03H\x00\x12\x13\n\tfolder_id\x18\x02 \x01(\x03H\x00\x42\n\n\x08location\"\x87\x02\n#OtherCloudDiscoveryStartingLocation\x12o\n\x0c\x61ws_location\x18\x01 \x01(\x0b\x32W.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocationH\x00\x1a\x63\n\x1c\x41wsDiscoveryStartingLocation\x12\x14\n\naccount_id\x18\x02 \x01(\tH\x00\x12$\n\x1a\x61ll_asset_inventory_assets\x18\x03 \x01(\x08H\x00\x42\x07\n\x05scopeB\n\n\x08location\"\x13\n\x11\x41llOtherResources\"\xd3\x02\n\x1cVertexDatasetDiscoveryTarget\x12H\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x33.google.privacy.dlp.v2.DiscoveryVertexDatasetFilterB\x03\xe0\x41\x02\x12K\n\nconditions\x18\x02 \x01(\x0b\x32\x37.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions\x12\\\n\x12generation_cadence\x18\x03 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadenceH\x00\x12\x33\n\x08\x64isabled\x18\x04 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.DisabledH\x00\x42\t\n\x07\x63\x61\x64\x65nce\"\x8e\x02\n\x1c\x44iscoveryVertexDatasetFilter\x12\x44\n\ncollection\x18\x01 \x01(\x0b\x32..google.privacy.dlp.v2.VertexDatasetCollectionH\x00\x12\x62\n!vertex_dataset_resource_reference\x18\x02 \x01(\x0b\x32\x35.google.privacy.dlp.v2.VertexDatasetResourceReferenceH\x00\x12:\n\x06others\x18\x64 \x01(\x0b\x32(.google.privacy.dlp.v2.AllOtherResourcesH\x00\x42\x08\n\x06\x66ilter\"s\n\x17VertexDatasetCollection\x12M\n\x16vertex_dataset_regexes\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.VertexDatasetRegexesH\x00\x42\t\n\x07pattern\"X\n\x14VertexDatasetRegexes\x12@\n\x08patterns\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.VertexDatasetRegexB\x03\xe0\x41\x02\".\n\x12VertexDatasetRegex\x12\x18\n\x10project_id_regex\x18\x01 \x01(\t\"D\n\x1eVertexDatasetResourceReference\x12\"\n\x15\x64\x61taset_resource_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n DiscoveryVertexDatasetConditions\x12\x31\n\rcreated_after\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07min_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe2\x01\n\'DiscoveryVertexDatasetGenerationCadence\x12L\n\x11refresh_frequency\x18\x01 \x01(\x0e\x32\x31.google.privacy.dlp.v2.DataProfileUpdateFrequency\x12i\n!inspect_template_modified_cadence\x18\x02 \x01(\x0b\x32>.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence\"\xdc\x06\n\x06\x44lpJob\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.privacy.dlp.v2.DlpJob.JobState\x12K\n\x0crisk_details\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsH\x00\x12J\n\x0finspect_details\x18\x05 \x01(\x0b\x32/.google.privacy.dlp.v2.InspectDataSourceDetailsH\x00\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_modified\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10job_trigger_name\x18\n \x01(\t\x12,\n\x06\x65rrors\x18\x0b \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12<\n\x0e\x61\x63tion_details\x18\x0c \x03(\x0b\x32$.google.privacy.dlp.v2.ActionDetails\"o\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\n\n\x06\x41\x43TIVE\x10\x06:\x7f\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}B\t\n\x07\x64\x65tails\"C\n\x10GetDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd6\x01\n\x12ListDlpJobsRequest\x12\x31\n\x06parent\x18\x04 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\x12\x19\x64lp.googleapis.com/DlpJob\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\x04type\x18\x05 \x01(\x0e\x32!.google.privacy.dlp.v2.DlpJobType\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x13\n\x0blocation_id\x18\x07 \x01(\t\"[\n\x13ListDlpJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.privacy.dlp.v2.DlpJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x13\x43\x61ncelDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x46inishDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"F\n\x13\x44\x65leteDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\"\xd7\x01\n\x1f\x43reateDeidentifyTemplateRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12K\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplateB\x03\xe0\x41\x02\x12\x13\n\x0btemplate_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xd7\x01\n\x1fUpdateDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\x12\x46\n\x13\x64\x65identify_template\x18\x02 \x01(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x1cGetDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xad\x01\n\x1eListDeidentifyTemplatesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/DeidentifyTemplate\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"\x83\x01\n\x1fListDeidentifyTemplatesResponse\x12G\n\x14\x64\x65identify_templates\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.DeidentifyTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x1f\x44\x65leteDeidentifyTemplateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/DeidentifyTemplate\"\xf4\x01\n\x1bLargeCustomDictionaryConfig\x12<\n\x0boutput_path\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePath\x12L\n\x16\x63loud_storage_file_set\x18\x02 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageFileSetH\x00\x12?\n\x0f\x62ig_query_field\x18\x03 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryFieldH\x00\x42\x08\n\x06source\"8\n\x1aLargeCustomDictionaryStats\x12\x1a\n\x12\x61pprox_num_phrases\x18\x01 \x01(\x03\"\xa6\x02\n\x14StoredInfoTypeConfig\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\x17large_custom_dictionary\x18\x03 \x01(\x0b\x32\x32.google.privacy.dlp.v2.LargeCustomDictionaryConfigH\x00\x12\x46\n\ndictionary\x18\x04 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x05 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x42\x06\n\x04type\"s\n\x13StoredInfoTypeStats\x12T\n\x17large_custom_dictionary\x18\x01 \x01(\x0b\x32\x31.google.privacy.dlp.v2.LargeCustomDictionaryStatsH\x00\x42\x06\n\x04type\"\xa9\x02\n\x15StoredInfoTypeVersion\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.google.privacy.dlp.v2.StoredInfoTypeState\x12,\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12\x39\n\x05stats\x18\x05 \x01(\x0b\x32*.google.privacy.dlp.v2.StoredInfoTypeStats\"\xf1\x03\n\x0eStoredInfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0f\x63urrent_version\x18\x02 \x01(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion\x12\x46\n\x10pending_versions\x18\x03 \x03(\x0b\x32,.google.privacy.dlp.v2.StoredInfoTypeVersion:\xc1\x02\xea\x41\xbd\x02\n!dlp.googleapis.com/StoredInfoType\x12?organizations/{organization}/storedInfoTypes/{stored_info_type}\x12\x35projects/{project}/storedInfoTypes/{stored_info_type}\x12Torganizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}\x12Jprojects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}\"\xcc\x01\n\x1b\x43reateStoredInfoTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfigB\x03\xe0\x41\x02\x12\x1b\n\x13stored_info_type_id\x18\x03 \x01(\t\x12\x13\n\x0blocation_id\x18\x04 \x01(\t\"\xc4\x01\n\x1bUpdateStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\x12;\n\x06\x63onfig\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.StoredInfoTypeConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x18GetStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\xa5\x01\n\x1aListStoredInfoTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dlp.googleapis.com/StoredInfoType\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\t\"x\n\x1bListStoredInfoTypesResponse\x12@\n\x11stored_info_types\x18\x01 \x03(\x0b\x32%.google.privacy.dlp.v2.StoredInfoType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x1b\x44\x65leteStoredInfoTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dlp.googleapis.com/StoredInfoType\"\x94\x01\n\x1eHybridInspectJobTriggerRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/JobTrigger\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8c\x01\n\x1aHybridInspectDlpJobRequest\x12/\n\x04name\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12=\n\x0bhybrid_item\x18\x03 \x01(\x0b\x32(.google.privacy.dlp.v2.HybridContentItem\"\x8b\x01\n\x11HybridContentItem\x12\x30\n\x04item\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.ContentItem\x12\x44\n\x0f\x66inding_details\x18\x02 \x01(\x0b\x32+.google.privacy.dlp.v2.HybridFindingDetails\"\xb0\x02\n\x14HybridFindingDetails\x12;\n\x11\x63ontainer_details\x18\x01 \x01(\x0b\x32 .google.privacy.dlp.v2.Container\x12\x13\n\x0b\x66ile_offset\x18\x02 \x01(\x03\x12\x12\n\nrow_offset\x18\x03 \x01(\x03\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x12G\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.privacy.dlp.v2.HybridFindingDetails.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x17\n\x15HybridInspectResponse\"\xc3\x01\n\x14ImageContainmentType\x12\x33\n\x08\x65ncloses\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.EnclosesH\x00\x12:\n\x0c\x66ully_inside\x18\x02 \x01(\x0b\x32\".google.privacy.dlp.v2.FullyInsideH\x00\x12\x32\n\x08overlaps\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.OverlapH\x00\x42\x06\n\x04type\"\t\n\x07Overlap\"\n\n\x08\x45ncloses\"\r\n\x0b\x46ullyInside\"\xa8\x01\n\x1eListProjectDataProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dlp.googleapis.com/ProjectDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x84\x01\n\x1fListProjectDataProfilesResponse\x12H\n\x15project_data_profiles\x18\x01 \x03(\x0b\x32).google.privacy.dlp.v2.ProjectDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n\x1cListTableDataProfilesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#dlp.googleapis.com/TableDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"~\n\x1dListTableDataProfilesResponse\x12\x44\n\x13table_data_profiles\x18\x01 \x03(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa6\x01\n\x1dListColumnDataProfilesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dlp.googleapis.com/ColumnDataProfile\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\x81\x01\n\x1eListColumnDataProfilesResponse\x12\x46\n\x14\x63olumn_data_profiles\x18\x01 \x03(\x0b\x32(.google.privacy.dlp.v2.ColumnDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n\rDataRiskLevel\x12\x46\n\x05score\x18\x01 \x01(\x0e\x32\x37.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore\"r\n\x12\x44\x61taRiskLevelScore\x12\x1a\n\x16RISK_SCORE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RISK_LOW\x10\n\x12\x10\n\x0cRISK_UNKNOWN\x10\x0c\x12\x11\n\rRISK_MODERATE\x10\x14\x12\r\n\tRISK_HIGH\x10\x1e\"\xdc\x04\n\x12ProjectDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x11sensitivity_score\x18\x04 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x05 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12<\n\x0eprofile_status\x18\x07 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12 \n\x18table_data_profile_count\x18\t \x01(\x03\x12%\n\x1d\x66ile_store_data_profile_count\x18\n \x01(\x03:\xdd\x01\xea\x41\xd9\x01\n%dlp.googleapis.com/ProjectDataProfile\x12\\organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}\x12Rprojects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}\"\xc9\x02\n\x19\x44\x61taProfileConfigSnapshot\x12<\n\x0einspect_config\x18\x02 \x01(\x0b\x32$.google.privacy.dlp.v2.InspectConfig\x12I\n\x10\x64\x61ta_profile_job\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.DataProfileJobConfigB\x02\x18\x01\x12@\n\x10\x64iscovery_config\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.DiscoveryConfig\x12\x1d\n\x15inspect_template_name\x18\x05 \x01(\t\x12\x42\n\x1einspect_template_modified_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x93\x0e\n\x10TableDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18$ \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x02 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x18 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x1d \x01(\t\x12\x12\n\ndataset_id\x18\x19 \x01(\t\x12\x10\n\x08table_id\x18\x1a \x01(\t\x12\x15\n\rfull_resource\x18\x03 \x01(\t\x12<\n\x0eprofile_status\x18\x15 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12<\n\x05state\x18\x16 \x01(\x0e\x32-.google.privacy.dlp.v2.TableDataProfile.State\x12\x42\n\x11sensitivity_score\x18\x05 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x06 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12\x44\n\x14predicted_info_types\x18\x1b \x03(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x45\n\x10other_info_types\x18\x1c \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14scanned_column_count\x18\n \x01(\x03\x12\x1b\n\x13\x66\x61iled_column_count\x18\x0b \x01(\x03\x12\x18\n\x10table_size_bytes\x18\x0c \x01(\x03\x12\x11\n\trow_count\x18\r \x01(\x03\x12\x42\n\x11\x65ncryption_status\x18\x0e \x01(\x0e\x32\'.google.privacy.dlp.v2.EncryptionStatus\x12\x46\n\x13resource_visibility\x18\x0f \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12:\n\x16profile_last_generated\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fresource_labels\x18\x11 \x03(\x0b\x32;.google.privacy.dlp.v2.TableDataProfile.ResourceLabelsEntry\x12/\n\x0b\x63reate_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x15sample_findings_table\x18% \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12(\n\x04tags\x18\' \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18) \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18/ \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xd3\x01\xea\x41\xcf\x01\n#dlp.googleapis.com/TableDataProfile\x12Xorganizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}\x12Nprojects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}\"b\n\rProfileStatus\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"g\n\x0fInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12 \n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x42\x02\x18\x01\"\x88\x01\n\x14OtherInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x1c\n\x14\x65stimated_prevalence\x18\x02 \x01(\x05\x12\x1e\n\x16\x65xcluded_from_analysis\x18\x03 \x01(\x08\"\xc9\r\n\x11\x43olumnDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x0eprofile_status\x18\x11 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12=\n\x05state\x18\x12 \x01(\x0e\x32..google.privacy.dlp.v2.ColumnDataProfile.State\x12:\n\x16profile_last_generated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12table_data_profile\x18\x04 \x01(\t\x12\x1b\n\x13table_full_resource\x18\x05 \x01(\t\x12\x1a\n\x12\x64\x61taset_project_id\x18\x13 \x01(\t\x12\x18\n\x10\x64\x61taset_location\x18\x14 \x01(\t\x12\x12\n\ndataset_id\x18\x15 \x01(\t\x12\x10\n\x08table_id\x18\x16 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x06 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x07 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12@\n\x10\x63olumn_info_type\x18\t \x01(\x0b\x32&.google.privacy.dlp.v2.InfoTypeSummary\x12\x42\n\rother_matches\x18\n \x03(\x0b\x32+.google.privacy.dlp.v2.OtherInfoTypeSummary\x12M\n\x19\x65stimated_null_percentage\x18\x17 \x01(\x0e\x32*.google.privacy.dlp.v2.NullPercentageLevel\x12O\n\x1a\x65stimated_uniqueness_score\x18\x18 \x01(\x0e\x32+.google.privacy.dlp.v2.UniquenessScoreLevel\x12\x17\n\x0f\x66ree_text_score\x18\r \x01(\x01\x12L\n\x0b\x63olumn_type\x18\x0e \x01(\x0e\x32\x37.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType\x12P\n\x0cpolicy_state\x18\x0f \x01(\x0e\x32:.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\"\xff\x02\n\x0e\x43olumnDataType\x12 \n\x1c\x43OLUMN_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTYPE_INT64\x10\x01\x12\r\n\tTYPE_BOOL\x10\x02\x12\x10\n\x0cTYPE_FLOAT64\x10\x03\x12\x0f\n\x0bTYPE_STRING\x10\x04\x12\x0e\n\nTYPE_BYTES\x10\x05\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x06\x12\r\n\tTYPE_DATE\x10\x07\x12\r\n\tTYPE_TIME\x10\x08\x12\x11\n\rTYPE_DATETIME\x10\t\x12\x12\n\x0eTYPE_GEOGRAPHY\x10\n\x12\x10\n\x0cTYPE_NUMERIC\x10\x0b\x12\x0f\n\x0bTYPE_RECORD\x10\x0c\x12\x13\n\x0fTYPE_BIGNUMERIC\x10\r\x12\r\n\tTYPE_JSON\x10\x0e\x12\x11\n\rTYPE_INTERVAL\x10\x0f\x12\x13\n\x0fTYPE_RANGE_DATE\x10\x10\x12\x17\n\x13TYPE_RANGE_DATETIME\x10\x11\x12\x18\n\x14TYPE_RANGE_TIMESTAMP\x10\x12\"R\n\x11\x43olumnPolicyState\x12#\n\x1f\x43OLUMN_POLICY_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x43OLUMN_POLICY_TAGGED\x10\x01:\xd8\x01\xea\x41\xd4\x01\n$dlp.googleapis.com/ColumnDataProfile\x12Zorganizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}\x12Pprojects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}\"\xe8\x0e\n\x14\x46ileStoreDataProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x10\x64\x61ta_source_type\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.DataSourceType\x12\x1c\n\x14project_data_profile\x18\x03 \x01(\t\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x1b\n\x13\x66ile_store_location\x18\x05 \x01(\t\x12\x1e\n\x16\x64\x61ta_storage_locations\x18\x13 \x03(\t\x12\x15\n\rlocation_type\x18\x14 \x01(\t\x12\x17\n\x0f\x66ile_store_path\x18\x06 \x01(\t\x12\x15\n\rfull_resource\x18\x18 \x01(\t\x12I\n\x0f\x63onfig_snapshot\x18\x07 \x01(\x0b\x32\x30.google.privacy.dlp.v2.DataProfileConfigSnapshot\x12<\n\x0eprofile_status\x18\x08 \x01(\x0b\x32$.google.privacy.dlp.v2.ProfileStatus\x12@\n\x05state\x18\t \x01(\x0e\x32\x31.google.privacy.dlp.v2.FileStoreDataProfile.State\x12:\n\x16profile_last_generated\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x13resource_visibility\x18\x0b \x01(\x0e\x32).google.privacy.dlp.v2.ResourceVisibility\x12\x42\n\x11sensitivity_score\x18\x0c \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\r \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x16\x66ile_cluster_summaries\x18\x10 \x03(\x0b\x32).google.privacy.dlp.v2.FileClusterSummary\x12`\n\x13resource_attributes\x18\x11 \x03(\x0b\x32\x43.google.privacy.dlp.v2.FileStoreDataProfile.ResourceAttributesEntry\x12X\n\x0fresource_labels\x18\x12 \x03(\x0b\x32?.google.privacy.dlp.v2.FileStoreDataProfile.ResourceLabelsEntry\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x15 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x43\n\x15sample_findings_table\x18\x16 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x1b\n\x13\x66ile_store_is_empty\x18\x17 \x01(\x08\x12(\n\x04tags\x18\x19 \x03(\x0b\x32\x1a.google.privacy.dlp.v2.Tag\x12\x41\n\x11related_resources\x18\x1a \x03(\x0b\x32&.google.privacy.dlp.v2.RelatedResource\x12.\n\x07\x64omains\x18\x1b \x03(\x0b\x32\x1d.google.privacy.dlp.v2.Domain\x1aW\n\x17ResourceAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.google.privacy.dlp.v2.Value:\x02\x38\x01\x1a\x35\n\x13ResourceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02:\xe9\x01\xea\x41\xe5\x01\n\'dlp.googleapis.com/FileStoreDataProfile\x12\x61organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\x12Wprojects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}\"?\n\x03Tag\x12\x1c\n\x14namespaced_tag_value\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"H\n\nTagFilters\x12:\n\x0btag_filters\x18\x01 \x03(\x0b\x32 .google.privacy.dlp.v2.TagFilterB\x03\xe0\x41\x02\"S\n\tTagFilter\x12\x1e\n\x14namespaced_tag_value\x18\x01 \x01(\tH\x00\x12\x1c\n\x12namespaced_tag_key\x18\x02 \x01(\tH\x00\x42\x08\n\x06\x66ormat\"(\n\x0fRelatedResource\x12\x15\n\rfull_resource\x18\x01 \x01(\t\"N\n\x18\x46ileStoreInfoTypeSummary\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\"+\n\x11\x46ileExtensionInfo\x12\x16\n\x0e\x66ile_extension\x18\x01 \x01(\t\"\x8c\x04\n\x12\x46ileClusterSummary\x12\x41\n\x11\x66ile_cluster_type\x18\x01 \x01(\x0b\x32&.google.privacy.dlp.v2.FileClusterType\x12W\n\x1e\x66ile_store_info_type_summaries\x18\x02 \x03(\x0b\x32/.google.privacy.dlp.v2.FileStoreInfoTypeSummary\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x12=\n\x0f\x64\x61ta_risk_level\x18\x04 \x01(\x0b\x32$.google.privacy.dlp.v2.DataRiskLevel\x12,\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.Error\x12I\n\x17\x66ile_extensions_scanned\x18\x07 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x46\n\x14\x66ile_extensions_seen\x18\x08 \x03(\x0b\x32(.google.privacy.dlp.v2.FileExtensionInfo\x12\x16\n\x0eno_files_exist\x18\t \x01(\x08\"[\n\x1cGetProjectDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"]\n\x1eGetFileStoreDataProfileRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dlp.googleapis.com/ProjectDataProfile\"\xc0\x01\n ListFileStoreDataProfilesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dlp.googleapis.com/FileStoreDataProfile\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8b\x01\n!ListFileStoreDataProfilesResponse\x12M\n\x18\x66ile_store_data_profiles\x18\x01 \x03(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n!DeleteFileStoreDataProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dlp.googleapis.com/FileStoreDataProfile\"W\n\x1aGetTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"Y\n\x1bGetColumnDataProfileRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dlp.googleapis.com/ColumnDataProfile\"\xea\x05\n\x1a\x44\x61taProfilePubSubCondition\x12X\n\x0b\x65xpressions\x18\x01 \x01(\x0b\x32\x43.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions\x1a\xe9\x01\n\x0fPubSubCondition\x12\x62\n\x12minimum_risk_score\x18\x01 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x12i\n\x19minimum_sensitivity_score\x18\x02 \x01(\x0e\x32\x44.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucketH\x00\x42\x07\n\x05value\x1a\xab\x02\n\x11PubSubExpressions\x12s\n\x10logical_operator\x18\x01 \x01(\x0e\x32Y.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator\x12U\n\nconditions\x18\x02 \x03(\x0b\x32\x41.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition\"J\n\x15PubSubLogicalOperator\x12 \n\x1cLOGICAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x06\n\x02OR\x10\x01\x12\x07\n\x03\x41ND\x10\x02\"X\n\x12ProfileScoreBucket\x12$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\x12\n\x0eMEDIUM_OR_HIGH\x10\x02\"\xe0\x01\n\x18\x44\x61taProfilePubSubMessage\x12\x38\n\x07profile\x18\x01 \x01(\x0b\x32\'.google.privacy.dlp.v2.TableDataProfile\x12G\n\x12\x66ile_store_profile\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.FileStoreDataProfile\x12\x41\n\x05\x65vent\x18\x02 \x01(\x0e\x32\x32.google.privacy.dlp.v2.DataProfileAction.EventType\"\x8c\x01\n\x17\x43reateConnectionRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\"K\n\x14GetConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x95\x01\n\x16ListConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n\x18SearchConnectionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x64lp.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x17ListConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x19SearchConnectionsResponse\x12\x36\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32!.google.privacy.dlp.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x01\n\x17UpdateConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\x12:\n\nconnection\x18\x02 \x01(\x0b\x32!.google.privacy.dlp.v2.ConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x17\x44\x65leteConnectionRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64lp.googleapis.com/Connection\"\x90\x03\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.google.privacy.dlp.v2.ConnectionStateB\x03\xe0\x41\x02\x12\x31\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1c.google.privacy.dlp.v2.ErrorB\x03\xe0\x41\x03\x12>\n\tcloud_sql\x18\x04 \x01(\x0b\x32).google.privacy.dlp.v2.CloudSqlPropertiesH\x00:\xb1\x01\xea\x41\xad\x01\n\x1d\x64lp.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}\x12Jorganizations/{organization}/locations/{location}/connections/{connection}B\x0c\n\nproperties\"[\n\x17SecretManagerCredential\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12)\n\x1cpassword_secret_version_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x43loudSqlIamCredential\"\xb5\x03\n\x12\x43loudSqlProperties\x12\x1f\n\x0f\x63onnection_name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x01\x12K\n\x11username_password\x18\x02 \x01(\x0b\x32..google.privacy.dlp.v2.SecretManagerCredentialH\x00\x12\x45\n\rcloud_sql_iam\x18\x03 \x01(\x0b\x32,.google.privacy.dlp.v2.CloudSqlIamCredentialH\x00\x12\x1c\n\x0fmax_connections\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12V\n\x0f\x64\x61tabase_engine\x18\x07 \x01(\x0e\x32\x38.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngineB\x03\xe0\x41\x02\"f\n\x0e\x44\x61tabaseEngine\x12\x1b\n\x17\x44\x41TABASE_ENGINE_UNKNOWN\x10\x00\x12\x19\n\x15\x44\x41TABASE_ENGINE_MYSQL\x10\x01\x12\x1c\n\x18\x44\x41TABASE_ENGINE_POSTGRES\x10\x02\x42\x0c\n\ncredential\"Z\n\x1d\x44\x65leteTableDataProfileRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\"%\n\x0e\x44\x61taSourceType\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\"\xf4\x02\n\x0f\x46ileClusterType\x12\x41\n\x07\x63luster\x18\x01 \x01(\x0e\x32..google.privacy.dlp.v2.FileClusterType.ClusterH\x00\"\x88\x02\n\x07\x43luster\x12\x17\n\x13\x43LUSTER_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_UNKNOWN\x10\x01\x12\x10\n\x0c\x43LUSTER_TEXT\x10\x02\x12\x1b\n\x17\x43LUSTER_STRUCTURED_DATA\x10\x03\x12\x17\n\x13\x43LUSTER_SOURCE_CODE\x10\x04\x12\x19\n\x15\x43LUSTER_RICH_DOCUMENT\x10\x05\x12\x11\n\rCLUSTER_IMAGE\x10\x06\x12\x13\n\x0f\x43LUSTER_ARCHIVE\x10\x07\x12\x16\n\x12\x43LUSTER_MULTIMEDIA\x10\x08\x12\x16\n\x12\x43LUSTER_EXECUTABLE\x10\t\x12\x14\n\x10\x43LUSTER_AI_MODEL\x10\nB\x13\n\x11\x66ile_cluster_type\"\xb6\x05\n\x12ProcessingLocation\x12`\n\x17image_fallback_location\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation\x12\x66\n\x1a\x64ocument_fallback_location\x18\x02 \x01(\x0b\x32\x42.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation\x1a\x17\n\x15MultiRegionProcessing\x1a\x12\n\x10GlobalProcessing\x1a\xd1\x01\n\x15ImageFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\x1a\xd4\x01\n\x18\x44ocumentFallbackLocation\x12`\n\x17multi_region_processing\x18\x64 \x01(\x0b\x32?.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing\x12V\n\x11global_processing\x18\xc8\x01 \x01(\x0b\x32:.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing\"K\n\x17SaveToGcsFindingsOutput\x12\x30\n\x08\x66indings\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.Finding\"\xc6\x02\n\x06\x44omain\x12\x38\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32&.google.privacy.dlp.v2.Domain.Category\x12\x35\n\x07signals\x18\x02 \x03(\x0e\x32$.google.privacy.dlp.v2.Domain.Signal\"6\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41I\x10\x01\x12\x08\n\x04\x43ODE\x10\x02\"\x92\x01\n\x06Signal\x12\x16\n\x12SIGNAL_UNSPECIFIED\x10\x00\x12\t\n\x05MODEL\x10\x01\x12\x12\n\x0eTEXT_EMBEDDING\x10\x02\x12\r\n\tEMBEDDING\x10\x07\x12\x11\n\rVERTEX_PLUGIN\x10\x03\x12\x11\n\rVECTOR_PLUGIN\x10\x04\x12\x0f\n\x0bSOURCE_CODE\x10\x05\x12\x0b\n\x07SERVICE\x10\x06*\xa0\x01\n\x1eTransformationResultStatusType\x12\x1a\n\x16STATE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11INVALID_TRANSFORM\x10\x01\x12\"\n\x1e\x42IGQUERY_MAX_ROW_SIZE_EXCEEDED\x10\x02\x12\x1a\n\x16METADATA_UNRETRIEVABLE\x10\x03\x12\x0b\n\x07SUCCESS\x10\x04*\x7f\n\x1bTransformationContainerType\x12\x1f\n\x1bTRANSFORM_UNKNOWN_CONTAINER\x10\x00\x12\x12\n\x0eTRANSFORM_BODY\x10\x01\x12\x16\n\x12TRANSFORM_METADATA\x10\x02\x12\x13\n\x0fTRANSFORM_TABLE\x10\x03*\xe0\x02\n\x12TransformationType\x12#\n\x1fTRANSFORMATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_SUPPRESSION\x10\x01\x12\x11\n\rREPLACE_VALUE\x10\x02\x12\x16\n\x12REPLACE_DICTIONARY\x10\x0f\x12\n\n\x06REDACT\x10\x03\x12\x12\n\x0e\x43HARACTER_MASK\x10\x04\x12\x1a\n\x16\x43RYPTO_REPLACE_FFX_FPE\x10\x05\x12\x18\n\x14\x46IXED_SIZE_BUCKETING\x10\x06\x12\r\n\tBUCKETING\x10\x07\x12\x1a\n\x16REPLACE_WITH_INFO_TYPE\x10\x08\x12\r\n\tTIME_PART\x10\t\x12\x0f\n\x0b\x43RYPTO_HASH\x10\n\x12\x0e\n\nDATE_SHIFT\x10\x0c\x12\x1f\n\x1b\x43RYPTO_DETERMINISTIC_CONFIG\x10\r\x12\x10\n\x0cREDACT_IMAGE\x10\x0e*r\n\x11ProfileGeneration\x12\"\n\x1ePROFILE_GENERATION_UNSPECIFIED\x10\x00\x12\x1a\n\x16PROFILE_GENERATION_NEW\x10\x01\x12\x1d\n\x19PROFILE_GENERATION_UPDATE\x10\x02*\x96\x01\n\x1b\x42igQueryTableTypeCollection\x12$\n BIG_QUERY_COLLECTION_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_COLLECTION_ALL_TYPES\x10\x01\x12-\n)BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES\x10\x02*\xa8\x01\n\x11\x42igQueryTableType\x12$\n BIG_QUERY_TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x42IG_QUERY_TABLE_TYPE_TABLE\x10\x01\x12*\n&BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE\x10\x02\x12!\n\x1d\x42IG_QUERY_TABLE_TYPE_SNAPSHOT\x10\x03*\x94\x01\n\x1a\x44\x61taProfileUpdateFrequency\x12 \n\x1cUPDATE_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPDATE_FREQUENCY_NEVER\x10\x01\x12\x1a\n\x16UPDATE_FREQUENCY_DAILY\x10\x02\x12\x1c\n\x18UPDATE_FREQUENCY_MONTHLY\x10\x04*]\n\x19\x42igQueryTableModification\x12\"\n\x1eTABLE_MODIFICATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18TABLE_MODIFIED_TIMESTAMP\x10\x01*u\n\x1a\x42igQuerySchemaModification\x12#\n\x1fSCHEMA_MODIFICATION_UNSPECIFIED\x10\x00\x12\x16\n\x12SCHEMA_NEW_COLUMNS\x10\x01\x12\x1a\n\x16SCHEMA_REMOVED_COLUMNS\x10\x02*\xbb\x01\n\x12RelationalOperator\x12#\n\x1fRELATIONAL_OPERATOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45QUAL_TO\x10\x01\x12\x10\n\x0cNOT_EQUAL_TO\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x05\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x06\x12\n\n\x06\x45XISTS\x10\x07*\xae\x01\n\x0cMatchingType\x12\x1d\n\x19MATCHING_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18MATCHING_TYPE_FULL_MATCH\x10\x01\x12\x1f\n\x1bMATCHING_TYPE_PARTIAL_MATCH\x10\x02\x12\x1f\n\x1bMATCHING_TYPE_INVERSE_MATCH\x10\x03\x12\x1f\n\x1bMATCHING_TYPE_RULE_SPECIFIC\x10\x04*M\n\rContentOption\x12\x17\n\x13\x43ONTENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONTENT_TEXT\x10\x01\x12\x11\n\rCONTENT_IMAGE\x10\x02*v\n\x0cMetadataType\x12\x1c\n\x18METADATATYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STORAGE_METADATA\x10\x02\x12\x14\n\x10\x43ONTENT_METADATA\x10\x03\x12\x1c\n\x18\x43LIENT_PROVIDED_METADATA\x10\x04*P\n\x13InfoTypeSupportedBy\x12\x19\n\x15\x45NUM_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INSPECT\x10\x01\x12\x11\n\rRISK_ANALYSIS\x10\x02*R\n\nDlpJobType\x12\x1c\n\x18\x44LP_JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINSPECT_JOB\x10\x01\x12\x15\n\x11RISK_ANALYSIS_JOB\x10\x02*n\n\x13StoredInfoTypeState\x12&\n\"STORED_INFO_TYPE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07INVALID\x10\x04*\xa3\x01\n\x12ResourceVisibility\x12#\n\x1fRESOURCE_VISIBILITY_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_VISIBILITY_PUBLIC\x10\n\x12$\n RESOURCE_VISIBILITY_INCONCLUSIVE\x10\x0f\x12\"\n\x1eRESOURCE_VISIBILITY_RESTRICTED\x10\x14*u\n\x10\x45ncryptionStatus\x12!\n\x1d\x45NCRYPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x45NCRYPTION_GOOGLE_MANAGED\x10\x01\x12\x1f\n\x1b\x45NCRYPTION_CUSTOMER_MANAGED\x10\x02*\xa9\x01\n\x13NullPercentageLevel\x12%\n!NULL_PERCENTAGE_LEVEL_UNSPECIFIED\x10\x00\x12\x1c\n\x18NULL_PERCENTAGE_VERY_LOW\x10\x01\x12\x17\n\x13NULL_PERCENTAGE_LOW\x10\x02\x12\x1a\n\x16NULL_PERCENTAGE_MEDIUM\x10\x03\x12\x18\n\x14NULL_PERCENTAGE_HIGH\x10\x04*\x90\x01\n\x14UniquenessScoreLevel\x12&\n\"UNIQUENESS_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x18\n\x14UNIQUENESS_SCORE_LOW\x10\x01\x12\x1b\n\x17UNIQUENESS_SCORE_MEDIUM\x10\x02\x12\x19\n\x15UNIQUENESS_SCORE_HIGH\x10\x03*f\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13MISSING_CREDENTIALS\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\xddv\n\nDlpService\x12\xdb\x01\n\x0eInspectContent\x12,.google.privacy.dlp.v2.InspectContentRequest\x1a-.google.privacy.dlp.v2.InspectContentResponse\"l\x82\xd3\xe4\x93\x02\x66\"\'/v2/{parent=projects/*}/content:inspect:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/content:inspect:\x01*\x12\xcc\x01\n\x0bRedactImage\x12).google.privacy.dlp.v2.RedactImageRequest\x1a*.google.privacy.dlp.v2.RedactImageResponse\"f\x82\xd3\xe4\x93\x02`\"$/v2/{parent=projects/*}/image:redact:\x01*Z5\"0/v2/{parent=projects/*/locations/*}/image:redact:\x01*\x12\xea\x01\n\x11\x44\x65identifyContent\x12/.google.privacy.dlp.v2.DeidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.DeidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:deidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:deidentify:\x01*\x12\xea\x01\n\x11ReidentifyContent\x12/.google.privacy.dlp.v2.ReidentifyContentRequest\x1a\x30.google.privacy.dlp.v2.ReidentifyContentResponse\"r\x82\xd3\xe4\x93\x02l\"*/v2/{parent=projects/*}/content:reidentify:\x01*Z;\"6/v2/{parent=projects/*/locations/*}/content:reidentify:\x01*\x12\x99\x02\n\rListInfoTypes\x12+.google.privacy.dlp.v2.ListInfoTypesRequest\x1a,.google.privacy.dlp.v2.ListInfoTypesResponse\"\xac\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9c\x01\x12\r/v2/infoTypesZ$\x12\"/v2/{parent=locations/*}/infoTypesZ/\x12-/v2/{parent=projects/*/locations/*}/infoTypesZ4\x12\x32/v2/{parent=organizations/*/locations/*}/infoTypes\x12\xf4\x02\n\x15\x43reateInspectTemplate\x12\x33.google.privacy.dlp.v2.CreateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xfd\x01\xda\x41\x17parent,inspect_template\x82\xd3\xe4\x93\x02\xdc\x01\"4/v2/{parent=projects/*/locations/*}/inspectTemplates:\x01*Z>\"9/v2/{parent=organizations/*/locations/*}/inspectTemplates:\x01*Z-\"(/v2/{parent=projects/*}/inspectTemplates:\x01*Z2\"-/v2/{parent=organizations/*}/inspectTemplates:\x01*\x12\xfe\x02\n\x15UpdateInspectTemplate\x12\x33.google.privacy.dlp.v2.UpdateInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\x87\x02\xda\x41!name,inspect_template,update_mask\x82\xd3\xe4\x93\x02\xdc\x01\x32\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/inspectTemplates/*}:\x01*Z-2(/v2/{name=projects/*/inspectTemplates/*}:\x01*Z22-/v2/{name=organizations/*/inspectTemplates/*}:\x01*\x12\xcf\x02\n\x12GetInspectTemplate\x12\x30.google.privacy.dlp.v2.GetInspectTemplateRequest\x1a&.google.privacy.dlp.v2.InspectTemplate\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z*\x12(/v2/{name=projects/*/inspectTemplates/*}Z/\x12-/v2/{name=organizations/*/inspectTemplates/*}\x12\xe2\x02\n\x14ListInspectTemplates\x12\x32.google.privacy.dlp.v2.ListInspectTemplatesRequest\x1a\x33.google.privacy.dlp.v2.ListInspectTemplatesResponse\"\xe0\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd0\x01\x12\x34/v2/{parent=projects/*/locations/*}/inspectTemplatesZ;\x12\x39/v2/{parent=organizations/*/locations/*}/inspectTemplatesZ*\x12(/v2/{parent=projects/*}/inspectTemplatesZ/\x12-/v2/{parent=organizations/*}/inspectTemplates\x12\xc5\x02\n\x15\x44\x65leteInspectTemplate\x12\x33.google.privacy.dlp.v2.DeleteInspectTemplateRequest\x1a\x16.google.protobuf.Empty\"\xde\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd0\x01*4/v2/{name=projects/*/locations/*/inspectTemplates/*}Z;*9/v2/{name=organizations/*/locations/*/inspectTemplates/*}Z**(/v2/{name=projects/*/inspectTemplates/*}Z/*-/v2/{name=organizations/*/inspectTemplates/*}\x12\x8c\x03\n\x18\x43reateDeidentifyTemplate\x12\x36.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest\x1a).google.privacy.dlp.v2.DeidentifyTemplate\"\x8c\x02\xda\x41\x1aparent,deidentify_template\x82\xd3\xe4\x93\x02\xe8\x01\"0/v2/{parent=organizations/*}/deidentifyTemplates:\x01*ZA\"\x12\x12*\"9/v2/{parent=organizations/*/locations/*}/discoveryConfigs:\x01*\x12\x9a\x02\n\x15UpdateDiscoveryConfig\x12\x33.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\xa3\x01\xda\x41!name,discovery_config,update_mask\x82\xd3\xe4\x93\x02y24/v2/{name=projects/*/locations/*/discoveryConfigs/*}:\x01*Z>29/v2/{name=organizations/*/locations/*/discoveryConfigs/*}:\x01*\x12\xf1\x01\n\x12GetDiscoveryConfig\x12\x30.google.privacy.dlp.v2.GetDiscoveryConfigRequest\x1a&.google.privacy.dlp.v2.DiscoveryConfig\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s\x12\x34/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;\x12\x39/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\x84\x02\n\x14ListDiscoveryConfigs\x12\x32.google.privacy.dlp.v2.ListDiscoveryConfigsRequest\x1a\x33.google.privacy.dlp.v2.ListDiscoveryConfigsResponse\"\x82\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x34/v2/{parent=projects/*/locations/*}/discoveryConfigsZ;\x12\x39/v2/{parent=organizations/*/locations/*}/discoveryConfigs\x12\xe7\x01\n\x15\x44\x65leteDiscoveryConfig\x12\x33.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest\x1a\x16.google.protobuf.Empty\"\x80\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02s*4/v2/{name=projects/*/locations/*/discoveryConfigs/*}Z;*9/v2/{name=organizations/*/locations/*/discoveryConfigs/*}\x12\xdf\x01\n\x0c\x43reateDlpJob\x12*.google.privacy.dlp.v2.CreateDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"\x83\x01\xda\x41\x12parent,inspect_job\xda\x41\x0fparent,risk_job\x82\xd3\xe4\x93\x02V\"\x1f/v2/{parent=projects/*}/dlpJobs:\x01*Z0\"+/v2/{parent=projects/*/locations/*}/dlpJobs:\x01*\x12\xfb\x01\n\x0bListDlpJobs\x12).google.privacy.dlp.v2.ListDlpJobsRequest\x1a*.google.privacy.dlp.v2.ListDlpJobsResponse\"\x94\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x84\x01\x12\x1f/v2/{parent=projects/*}/dlpJobsZ-\x12+/v2/{parent=projects/*/locations/*}/dlpJobsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/dlpJobs\x12\xb2\x01\n\tGetDlpJob\x12\'.google.privacy.dlp.v2.GetDlpJobRequest\x1a\x1d.google.privacy.dlp.v2.DlpJob\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12\x1f/v2/{name=projects/*/dlpJobs/*}Z-\x12+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xb1\x01\n\x0c\x44\x65leteDlpJob\x12*.google.privacy.dlp.v2.DeleteDlpJobRequest\x1a\x16.google.protobuf.Empty\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P*\x1f/v2/{name=projects/*/dlpJobs/*}Z-*+/v2/{name=projects/*/locations/*/dlpJobs/*}\x12\xbe\x01\n\x0c\x43\x61ncelDlpJob\x12*.google.privacy.dlp.v2.CancelDlpJobRequest\x1a\x16.google.protobuf.Empty\"j\x82\xd3\xe4\x93\x02\x64\"&/v2/{name=projects/*/dlpJobs/*}:cancel:\x01*Z7\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel:\x01*\x12\xe3\x02\n\x14\x43reateStoredInfoType\x12\x32.google.privacy.dlp.v2.CreateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xef\x01\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\xd8\x01\",/v2/{parent=organizations/*}/storedInfoTypes:\x01*Z=\"8/v2/{parent=organizations/*/locations/*}/storedInfoTypes:\x01*Z,\"\'/v2/{parent=projects/*}/storedInfoTypes:\x01*Z8\"3/v2/{parent=projects/*/locations/*}/storedInfoTypes:\x01*\x12\xed\x02\n\x14UpdateStoredInfoType\x12\x32.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xf9\x01\xda\x41\x17name,config,update_mask\x82\xd3\xe4\x93\x02\xd8\x01\x32,/v2/{name=organizations/*/storedInfoTypes/*}:\x01*Z=28/v2/{name=organizations/*/locations/*/storedInfoTypes/*}:\x01*Z,2\'/v2/{name=projects/*/storedInfoTypes/*}:\x01*Z823/v2/{name=projects/*/locations/*/storedInfoTypes/*}:\x01*\x12\xc8\x02\n\x11GetStoredInfoType\x12/.google.privacy.dlp.v2.GetStoredInfoTypeRequest\x1a%.google.privacy.dlp.v2.StoredInfoType\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{name=organizations/*/storedInfoTypes/*}Z:\x12\x38/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)\x12\'/v2/{name=projects/*/storedInfoTypes/*}Z5\x12\x33/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\xdb\x02\n\x13ListStoredInfoTypes\x12\x31.google.privacy.dlp.v2.ListStoredInfoTypesRequest\x1a\x32.google.privacy.dlp.v2.ListStoredInfoTypesResponse\"\xdc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xcc\x01\x12,/v2/{parent=organizations/*}/storedInfoTypesZ:\x12\x38/v2/{parent=organizations/*/locations/*}/storedInfoTypesZ)\x12\'/v2/{parent=projects/*}/storedInfoTypesZ5\x12\x33/v2/{parent=projects/*/locations/*}/storedInfoTypes\x12\xbf\x02\n\x14\x44\x65leteStoredInfoType\x12\x32.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest\x1a\x16.google.protobuf.Empty\"\xda\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xcc\x01*,/v2/{name=organizations/*/storedInfoTypes/*}Z:*8/v2/{name=organizations/*/locations/*/storedInfoTypes/*}Z)*\'/v2/{name=projects/*/storedInfoTypes/*}Z5*3/v2/{name=projects/*/locations/*/storedInfoTypes/*}\x12\x93\x02\n\x17ListProjectDataProfiles\x12\x35.google.privacy.dlp.v2.ListProjectDataProfilesRequest\x1a\x36.google.privacy.dlp.v2.ListProjectDataProfilesResponse\"\x88\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02y\x12/v2/{parent=organizations/*/locations/*}/fileStoreDataProfilesZ;\x12\x39/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles\x12\x8a\x02\n\x17GetFileStoreDataProfile\x12\x35.google.privacy.dlp.v2.GetFileStoreDataProfileRequest\x1a+.google.privacy.dlp.v2.FileStoreDataProfile\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}\x12>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;\x12\x39/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xfb\x01\n\x1a\x44\x65leteFileStoreDataProfile\x12\x38.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x8a\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02}*>/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}Z;*9/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}\x12\xf6\x01\n\x13GetTableDataProfile\x12\x31.google.privacy.dlp.v2.GetTableDataProfileRequest\x1a\'.google.privacy.dlp.v2.TableDataProfile\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u\x12:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7\x12\x35/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xfb\x01\n\x14GetColumnDataProfile\x12\x32.google.privacy.dlp.v2.GetColumnDataProfileRequest\x1a(.google.privacy.dlp.v2.ColumnDataProfile\"\x84\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02w\x12;/v2/{name=organizations/*/locations/*/columnDataProfiles/*}Z8\x12\x36/v2/{name=projects/*/locations/*/columnDataProfiles/*}\x12\xeb\x01\n\x16\x44\x65leteTableDataProfile\x12\x34.google.privacy.dlp.v2.DeleteTableDataProfileRequest\x1a\x16.google.protobuf.Empty\"\x82\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02u*:/v2/{name=organizations/*/locations/*/tableDataProfiles/*}Z7*5/v2/{name=projects/*/locations/*/tableDataProfiles/*}\x12\xc3\x01\n\x13HybridInspectDlpJob\x12\x31.google.privacy.dlp.v2.HybridInspectDlpJobRequest\x1a,.google.privacy.dlp.v2.HybridInspectResponse\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\"9/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect:\x01*\x12\x91\x01\n\x0c\x46inishDlpJob\x12*.google.privacy.dlp.v2.FinishDlpJobRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x37\"2/v2/{name=projects/*/locations/*/dlpJobs/*}:finish:\x01*\x12\xf2\x01\n\x10\x43reateConnection\x12..google.privacy.dlp.v2.CreateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"\x8a\x01\xda\x41\x12parent, connection\x82\xd3\xe4\x93\x02o\"//v2/{parent=projects/*/locations/*}/connections:\x01*Z9\"4/v2/{parent=organizations/*/locations/*}/connections:\x01*\x12\xd7\x01\n\rGetConnection\x12+.google.privacy.dlp.v2.GetConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i\x12//v2/{name=projects/*/locations/*/connections/*}Z6\x12\x34/v2/{name=organizations/*/locations/*/connections/*}\x12\xea\x01\n\x0fListConnections\x12-.google.privacy.dlp.v2.ListConnectionsRequest\x1a..google.privacy.dlp.v2.ListConnectionsResponse\"x\xda\x41\x06parent\x82\xd3\xe4\x93\x02i\x12//v2/{parent=projects/*/locations/*}/connectionsZ6\x12\x34/v2/{parent=organizations/*/locations/*}/connections\x12\xff\x01\n\x11SearchConnections\x12/.google.privacy.dlp.v2.SearchConnectionsRequest\x1a\x30.google.privacy.dlp.v2.SearchConnectionsResponse\"\x86\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02w\x12\x36/v2/{parent=projects/*/locations/*}/connections:searchZ=\x12;/v2/{parent=organizations/*/locations/*}/connections:search\x12\xd2\x01\n\x10\x44\x65leteConnection\x12..google.privacy.dlp.v2.DeleteConnectionRequest\x1a\x16.google.protobuf.Empty\"v\xda\x41\x04name\x82\xd3\xe4\x93\x02i*//v2/{name=projects/*/locations/*/connections/*}Z6*4/v2/{name=organizations/*/locations/*/connections/*}\x12\xe3\x01\n\x10UpdateConnection\x12..google.privacy.dlp.v2.UpdateConnectionRequest\x1a!.google.privacy.dlp.v2.Connection\"|\xda\x41\x04name\x82\xd3\xe4\x93\x02o2//v2/{name=projects/*/locations/*/connections/*}:\x01*Z924/v2/{name=organizations/*/locations/*/connections/*}:\x01*\x1a\x46\xca\x41\x12\x64lp.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x02\n\x19\x63om.google.privacy.dlp.v2B\x08\x44lpProtoP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2\xea\x41r\n\x1d\x64lp.googleapis.com/DlpContent\x12\x1dprojects/{project}/dlpContent\x12\x32projects/{project}/locations/{location}/dlpContent\xea\x41\\\n\'dlp.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dlp - module V2 - ExcludeInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeInfoTypes").msgclass - ExcludeByHotword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeByHotword").msgclass - ExcludeByImageFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExcludeByImageFindings").msgclass - ExclusionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ExclusionRule").msgclass - AdjustByMatchingInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustByMatchingInfoTypes").msgclass - AdjustByImageFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustByImageFindings").msgclass - AdjustmentRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AdjustmentRule").msgclass - InspectionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectionRule").msgclass - InspectionRuleSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectionRuleSet").msgclass - InspectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig").msgclass - InspectConfig::InfoTypeLikelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood").msgclass - InspectConfig::FindingLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.FindingLimits").msgclass - InspectConfig::FindingLimits::InfoTypeLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit").msgclass - ByteContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem").msgclass - ByteContentItem::BytesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ByteContentItem.BytesType").enummodule - ContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentItem").msgclass - ContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentMetadata").msgclass - Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table").msgclass - Table::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Table.Row").msgclass - KeyValueMetadataProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KeyValueMetadataProperty").msgclass - InspectResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectResult").msgclass - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Finding").msgclass - Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Location").msgclass - ContentLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentLocation").msgclass - MetadataLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MetadataLocation").msgclass - StorageMetadataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageMetadataLabel").msgclass - KeyValueMetadataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KeyValueMetadataLabel").msgclass - DocumentLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DocumentLocation").msgclass - RecordLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordLocation").msgclass - TableLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableLocation").msgclass - Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Container").msgclass - Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Range").msgclass - ImageLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageLocation").msgclass - BoundingBox = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BoundingBox").msgclass - RedactImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageRequest").msgclass - RedactImageRequest::ImageRedactionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig").msgclass - Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Color").msgclass - RedactImageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactImageResponse").msgclass - DeidentifyContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyContentRequest").msgclass - DeidentifyContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyContentResponse").msgclass - ReidentifyContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReidentifyContentRequest").msgclass - ReidentifyContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReidentifyContentResponse").msgclass - InspectContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectContentRequest").msgclass - InspectContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectContentResponse").msgclass - OutputStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OutputStorageConfig").msgclass - OutputStorageConfig::OutputSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OutputStorageConfig.OutputSchema").enummodule - InfoTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeStats").msgclass - InspectDataSourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails").msgclass - InspectDataSourceDetails::RequestedOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions").msgclass - InspectDataSourceDetails::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectDataSourceDetails.Result").msgclass - DataProfileBigQueryRowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileBigQueryRowSchema").msgclass - HybridInspectStatistics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectStatistics").msgclass - ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ActionDetails").msgclass - DeidentifyDataSourceStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceStats").msgclass - DeidentifyDataSourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceDetails").msgclass - DeidentifyDataSourceDetails::RequestedDeidentifyOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions").msgclass - LocationSupport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LocationSupport").msgclass - LocationSupport::RegionalizationScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LocationSupport.RegionalizationScope").enummodule - InfoTypeDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeDescription").msgclass - InfoTypeDescription::InfoTypeLaunchStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus").enummodule - InfoTypeCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory").msgclass - InfoTypeCategory::LocationCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.LocationCategory").enummodule - InfoTypeCategory::IndustryCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory").enummodule - InfoTypeCategory::TypeCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeCategory.TypeCategory").enummodule - VersionDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VersionDescription").msgclass - ListInfoTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesRequest").msgclass - ListInfoTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInfoTypesResponse").msgclass - RiskAnalysisJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RiskAnalysisJobConfig").msgclass - QuasiId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuasiId").msgclass - StatisticalTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable").msgclass - StatisticalTable::QuasiIdentifierField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField").msgclass - PrivacyMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric").msgclass - PrivacyMetric::NumericalStatsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig").msgclass - PrivacyMetric::CategoricalStatsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig").msgclass - PrivacyMetric::KAnonymityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig").msgclass - PrivacyMetric::LDiversityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig").msgclass - PrivacyMetric::KMapEstimationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig").msgclass - PrivacyMetric::KMapEstimationConfig::TaggedField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField").msgclass - PrivacyMetric::KMapEstimationConfig::AuxiliaryTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable").msgclass - PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField").msgclass - PrivacyMetric::DeltaPresenceEstimationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig").msgclass - AnalyzeDataSourceRiskDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails").msgclass - AnalyzeDataSourceRiskDetails::NumericalStatsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult").msgclass - AnalyzeDataSourceRiskDetails::CategoricalStatsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult").msgclass - AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket").msgclass - AnalyzeDataSourceRiskDetails::KAnonymityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult").msgclass - AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass").msgclass - AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket").msgclass - AnalyzeDataSourceRiskDetails::LDiversityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult").msgclass - AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass").msgclass - AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket").msgclass - AnalyzeDataSourceRiskDetails::KMapEstimationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult").msgclass - AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues").msgclass - AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket").msgclass - AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult").msgclass - AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues").msgclass - AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket").msgclass - AnalyzeDataSourceRiskDetails::RequestedRiskAnalysisOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions").msgclass - ValueFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ValueFrequency").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Value").msgclass - QuoteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.QuoteInfo").msgclass - DateTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateTime").msgclass - DateTime::TimeZone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateTime.TimeZone").msgclass - DeidentifyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyConfig").msgclass - ImageTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations").msgclass - ImageTransformations::ImageTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation").msgclass - ImageTransformations::ImageTransformation::SelectedInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes").msgclass - ImageTransformations::ImageTransformation::AllInfoTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes").msgclass - ImageTransformations::ImageTransformation::AllText = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText").msgclass - TransformationErrorHandling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling").msgclass - TransformationErrorHandling::ThrowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling.ThrowError").msgclass - TransformationErrorHandling::LeaveUntransformed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed").msgclass - PrimitiveTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PrimitiveTransformation").msgclass - TimePartConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TimePartConfig").msgclass - TimePartConfig::TimePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TimePartConfig.TimePart").enummodule - CryptoHashConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoHashConfig").msgclass - CryptoDeterministicConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoDeterministicConfig").msgclass - ReplaceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceValueConfig").msgclass - ReplaceDictionaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceDictionaryConfig").msgclass - ReplaceWithInfoTypeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ReplaceWithInfoTypeConfig").msgclass - RedactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RedactConfig").msgclass - CharsToIgnore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharsToIgnore").msgclass - CharsToIgnore::CommonCharsToIgnore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore").enummodule - CharacterMaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CharacterMaskConfig").msgclass - FixedSizeBucketingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FixedSizeBucketingConfig").msgclass - BucketingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BucketingConfig").msgclass - BucketingConfig::Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BucketingConfig.Bucket").msgclass - CryptoReplaceFfxFpeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig").msgclass - CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet").enummodule - CryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CryptoKey").msgclass - TransientCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransientCryptoKey").msgclass - UnwrappedCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UnwrappedCryptoKey").msgclass - KmsWrappedCryptoKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KmsWrappedCryptoKey").msgclass - DateShiftConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DateShiftConfig").msgclass - InfoTypeTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeTransformations").msgclass - InfoTypeTransformations::InfoTypeTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation").msgclass - FieldTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FieldTransformation").msgclass - RecordTransformations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordTransformations").msgclass - RecordSuppression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordSuppression").msgclass - RecordCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition").msgclass - RecordCondition::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Condition").msgclass - RecordCondition::Conditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Conditions").msgclass - RecordCondition::Expressions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Expressions").msgclass - RecordCondition::Expressions::LogicalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator").enummodule - TransformationOverview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationOverview").msgclass - TransformationSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary").msgclass - TransformationSummary::SummaryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary.SummaryResult").msgclass - TransformationSummary::TransformationResultCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationSummary.TransformationResultCode").enummodule - TransformationDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDescription").msgclass - TransformationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDetails").msgclass - TransformationLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationLocation").msgclass - RecordTransformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordTransformation").msgclass - TransformationResultStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationResultStatus").msgclass - TransformationDetailsStorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationDetailsStorageConfig").msgclass - Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Schedule").msgclass - Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Manual").msgclass - InspectTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectTemplate").msgclass - DeidentifyTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeidentifyTemplate").msgclass - Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Error").msgclass - Error::ErrorExtraInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Error.ErrorExtraInfo").enummodule - JobTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger").msgclass - JobTrigger::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger.Trigger").msgclass - JobTrigger::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.JobTrigger.Status").enummodule - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action").msgclass - Action::SaveFindings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.SaveFindings").msgclass - Action::PublishToPubSub = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishToPubSub").msgclass - Action::PublishSummaryToCscc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishSummaryToCscc").msgclass - Action::PublishFindingsToCloudDataCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog").msgclass - Action::PublishFindingsToDataplexCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog").msgclass - Action::Deidentify = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.Deidentify").msgclass - Action::JobNotificationEmails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.JobNotificationEmails").msgclass - Action::PublishToStackdriver = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Action.PublishToStackdriver").msgclass - TransformationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationConfig").msgclass - CreateInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateInspectTemplateRequest").msgclass - UpdateInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateInspectTemplateRequest").msgclass - GetInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetInspectTemplateRequest").msgclass - ListInspectTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInspectTemplatesRequest").msgclass - ListInspectTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListInspectTemplatesResponse").msgclass - DeleteInspectTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteInspectTemplateRequest").msgclass - CreateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateJobTriggerRequest").msgclass - ActivateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ActivateJobTriggerRequest").msgclass - UpdateJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateJobTriggerRequest").msgclass - GetJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetJobTriggerRequest").msgclass - CreateDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDiscoveryConfigRequest").msgclass - UpdateDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateDiscoveryConfigRequest").msgclass - GetDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDiscoveryConfigRequest").msgclass - ListDiscoveryConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDiscoveryConfigsRequest").msgclass - ListDiscoveryConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDiscoveryConfigsResponse").msgclass - DeleteDiscoveryConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDiscoveryConfigRequest").msgclass - CreateDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDlpJobRequest").msgclass - ListJobTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListJobTriggersRequest").msgclass - ListJobTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListJobTriggersResponse").msgclass - DeleteJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteJobTriggerRequest").msgclass - InspectJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InspectJobConfig").msgclass - DataProfileAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction").msgclass - DataProfileAction::Export = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.Export").msgclass - DataProfileAction::PubSubNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PubSubNotification").msgclass - DataProfileAction::PubSubNotification::DetailLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel").enummodule - DataProfileAction::PublishToChronicle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToChronicle").msgclass - DataProfileAction::PublishToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter").msgclass - DataProfileAction::PublishToDataplexCatalog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog").msgclass - DataProfileAction::TagResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources").msgclass - DataProfileAction::TagResources::TagCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition").msgclass - DataProfileAction::TagResources::TagValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue").msgclass - DataProfileAction::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileAction.EventType").enummodule - DataProfileFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFinding").msgclass - DataProfileFindingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFindingLocation").msgclass - DataProfileFindingRecordLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileFindingRecordLocation").msgclass - DataProfileJobConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileJobConfig").msgclass - BigQueryRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryRegex").msgclass - BigQueryRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryRegexes").msgclass - BigQueryTableTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableTypes").msgclass - Disabled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Disabled").msgclass - DataProfileLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileLocation").msgclass - DiscoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig").msgclass - DiscoveryConfig::OrgConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig.OrgConfig").msgclass - DiscoveryConfig::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryConfig.Status").enummodule - DiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryTarget").msgclass - BigQueryDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryDiscoveryTarget").msgclass - DiscoveryBigQueryFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryFilter").msgclass - DiscoveryBigQueryFilter::AllOtherBigQueryTables = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables").msgclass - BigQueryTableCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableCollection").msgclass - DiscoveryBigQueryConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryConditions").msgclass - DiscoveryBigQueryConditions::OrConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions").msgclass - DiscoveryGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryGenerationCadence").msgclass - DiscoveryTableModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryTableModifiedCadence").msgclass - DiscoverySchemaModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoverySchemaModifiedCadence").msgclass - DiscoveryInspectTemplateModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence").msgclass - CloudSqlDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlDiscoveryTarget").msgclass - DiscoveryCloudSqlFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlFilter").msgclass - DatabaseResourceCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceCollection").msgclass - DatabaseResourceRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceRegexes").msgclass - DatabaseResourceRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceRegex").msgclass - AllOtherDatabaseResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AllOtherDatabaseResources").msgclass - DatabaseResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatabaseResourceReference").msgclass - DiscoveryCloudSqlConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions").msgclass - DiscoveryCloudSqlConditions::DatabaseEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine").enummodule - DiscoveryCloudSqlConditions::DatabaseResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType").enummodule - DiscoveryCloudSqlGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence").msgclass - DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence").msgclass - DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence::CloudSqlSchemaModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification").enummodule - SecretsDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SecretsDiscoveryTarget").msgclass - CloudStorageDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageDiscoveryTarget").msgclass - DiscoveryCloudStorageFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageFilter").msgclass - FileStoreCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreCollection").msgclass - FileStoreRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreRegexes").msgclass - FileStoreRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreRegex").msgclass - CloudStorageRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageRegex").msgclass - CloudStorageResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageResourceReference").msgclass - DiscoveryCloudStorageGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence").msgclass - DiscoveryCloudStorageConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions").msgclass - DiscoveryCloudStorageConditions::CloudStorageObjectAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute").enummodule - DiscoveryCloudStorageConditions::CloudStorageBucketAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute").enummodule - DiscoveryFileStoreConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryFileStoreConditions").msgclass - OtherCloudDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryTarget").msgclass - DiscoveryOtherCloudFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudFilter").msgclass - OtherCloudResourceCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceCollection").msgclass - OtherCloudResourceRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceRegexes").msgclass - OtherCloudResourceRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudResourceRegex").msgclass - AwsAccountRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AwsAccountRegex").msgclass - AmazonS3BucketRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketRegex").msgclass - OtherCloudSingleResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudSingleResourceReference").msgclass - AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AwsAccount").msgclass - AmazonS3Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3Bucket").msgclass - DiscoveryOtherCloudConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudConditions").msgclass - AmazonS3BucketConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions").msgclass - AmazonS3BucketConditions::BucketType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType").enummodule - AmazonS3BucketConditions::ObjectStorageClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass").enummodule - DiscoveryOtherCloudGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence").msgclass - DiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryStartingLocation").msgclass - OtherCloudDiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation").msgclass - OtherCloudDiscoveryStartingLocation::AwsDiscoveryStartingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation").msgclass - AllOtherResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.AllOtherResources").msgclass - VertexDatasetDiscoveryTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetDiscoveryTarget").msgclass - DiscoveryVertexDatasetFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetFilter").msgclass - VertexDatasetCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetCollection").msgclass - VertexDatasetRegexes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetRegexes").msgclass - VertexDatasetRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetRegex").msgclass - VertexDatasetResourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.VertexDatasetResourceReference").msgclass - DiscoveryVertexDatasetConditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetConditions").msgclass - DiscoveryVertexDatasetGenerationCadence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence").msgclass - DlpJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJob").msgclass - DlpJob::JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJob.JobState").enummodule - GetDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDlpJobRequest").msgclass - ListDlpJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDlpJobsRequest").msgclass - ListDlpJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDlpJobsResponse").msgclass - CancelDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CancelDlpJobRequest").msgclass - FinishDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FinishDlpJobRequest").msgclass - DeleteDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDlpJobRequest").msgclass - CreateDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateDeidentifyTemplateRequest").msgclass - UpdateDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest").msgclass - GetDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetDeidentifyTemplateRequest").msgclass - ListDeidentifyTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesRequest").msgclass - ListDeidentifyTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesResponse").msgclass - DeleteDeidentifyTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest").msgclass - LargeCustomDictionaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LargeCustomDictionaryConfig").msgclass - LargeCustomDictionaryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LargeCustomDictionaryStats").msgclass - StoredInfoTypeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeConfig").msgclass - StoredInfoTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeStats").msgclass - StoredInfoTypeVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeVersion").msgclass - StoredInfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoType").msgclass - CreateStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateStoredInfoTypeRequest").msgclass - UpdateStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateStoredInfoTypeRequest").msgclass - GetStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetStoredInfoTypeRequest").msgclass - ListStoredInfoTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesRequest").msgclass - ListStoredInfoTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesResponse").msgclass - DeleteStoredInfoTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteStoredInfoTypeRequest").msgclass - HybridInspectJobTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectJobTriggerRequest").msgclass - HybridInspectDlpJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectDlpJobRequest").msgclass - HybridContentItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridContentItem").msgclass - HybridFindingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridFindingDetails").msgclass - HybridInspectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridInspectResponse").msgclass - ImageContainmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ImageContainmentType").msgclass - Overlap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Overlap").msgclass - Encloses = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Encloses").msgclass - FullyInside = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FullyInside").msgclass - ListProjectDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListProjectDataProfilesRequest").msgclass - ListProjectDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListProjectDataProfilesResponse").msgclass - ListTableDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListTableDataProfilesRequest").msgclass - ListTableDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListTableDataProfilesResponse").msgclass - ListColumnDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListColumnDataProfilesRequest").msgclass - ListColumnDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListColumnDataProfilesResponse").msgclass - DataRiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataRiskLevel").msgclass - DataRiskLevel::DataRiskLevelScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore").enummodule - ProjectDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProjectDataProfile").msgclass - DataProfileConfigSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileConfigSnapshot").msgclass - TableDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableDataProfile").msgclass - TableDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableDataProfile.State").enummodule - ProfileStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProfileStatus").msgclass - InfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeSummary").msgclass - OtherInfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.OtherInfoTypeSummary").msgclass - ColumnDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile").msgclass - ColumnDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.State").enummodule - ColumnDataProfile::ColumnDataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType").enummodule - ColumnDataProfile::ColumnPolicyState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState").enummodule - FileStoreDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreDataProfile").msgclass - FileStoreDataProfile::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreDataProfile.State").enummodule - Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Tag").msgclass - TagFilters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TagFilters").msgclass - TagFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TagFilter").msgclass - RelatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RelatedResource").msgclass - FileStoreInfoTypeSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileStoreInfoTypeSummary").msgclass - FileExtensionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileExtensionInfo").msgclass - FileClusterSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterSummary").msgclass - GetProjectDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetProjectDataProfileRequest").msgclass - GetFileStoreDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetFileStoreDataProfileRequest").msgclass - ListFileStoreDataProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListFileStoreDataProfilesRequest").msgclass - ListFileStoreDataProfilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListFileStoreDataProfilesResponse").msgclass - DeleteFileStoreDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest").msgclass - GetTableDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetTableDataProfileRequest").msgclass - GetColumnDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetColumnDataProfileRequest").msgclass - DataProfilePubSubCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition").msgclass - DataProfilePubSubCondition::PubSubCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition").msgclass - DataProfilePubSubCondition::PubSubExpressions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions").msgclass - DataProfilePubSubCondition::PubSubExpressions::PubSubLogicalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator").enummodule - DataProfilePubSubCondition::ProfileScoreBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket").enummodule - DataProfilePubSubMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfilePubSubMessage").msgclass - CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateConnectionRequest").msgclass - GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetConnectionRequest").msgclass - ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListConnectionsRequest").msgclass - SearchConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SearchConnectionsRequest").msgclass - ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListConnectionsResponse").msgclass - SearchConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SearchConnectionsResponse").msgclass - UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateConnectionRequest").msgclass - DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteConnectionRequest").msgclass - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Connection").msgclass - SecretManagerCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SecretManagerCredential").msgclass - CloudSqlIamCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlIamCredential").msgclass - CloudSqlProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlProperties").msgclass - CloudSqlProperties::DatabaseEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine").enummodule - DeleteTableDataProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteTableDataProfileRequest").msgclass - DataSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataSourceType").msgclass - FileClusterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterType").msgclass - FileClusterType::Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileClusterType.Cluster").enummodule - ProcessingLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation").msgclass - ProcessingLocation::MultiRegionProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing").msgclass - ProcessingLocation::GlobalProcessing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing").msgclass - ProcessingLocation::ImageFallbackLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation").msgclass - ProcessingLocation::DocumentFallbackLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation").msgclass - SaveToGcsFindingsOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SaveToGcsFindingsOutput").msgclass - Domain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain").msgclass - Domain::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain.Category").enummodule - Domain::Signal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Domain.Signal").enummodule - TransformationResultStatusType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationResultStatusType").enummodule - TransformationContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationContainerType").enummodule - TransformationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TransformationType").enummodule - ProfileGeneration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ProfileGeneration").enummodule - BigQueryTableTypeCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableTypeCollection").enummodule - BigQueryTableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableType").enummodule - DataProfileUpdateFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DataProfileUpdateFrequency").enummodule - BigQueryTableModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTableModification").enummodule - BigQuerySchemaModification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQuerySchemaModification").enummodule - RelationalOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RelationalOperator").enummodule - MatchingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MatchingType").enummodule - ContentOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentOption").enummodule - MetadataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.MetadataType").enummodule - InfoTypeSupportedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeSupportedBy").enummodule - DlpJobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJobType").enummodule - StoredInfoTypeState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeState").enummodule - ResourceVisibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ResourceVisibility").enummodule - EncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.EncryptionStatus").enummodule - NullPercentageLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.NullPercentageLevel").enummodule - UniquenessScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UniquenessScoreLevel").enummodule - ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ConnectionState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb deleted file mode 100644 index 4d81407a5dee..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/dlp_services_pb.rb +++ /dev/null @@ -1,298 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/privacy/dlp/v2/dlp.proto for package 'Google.Cloud.Dlp.V2' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/privacy/dlp/v2/dlp_pb' - -module Google - module Cloud - module Dlp - module V2 - module DlpService - # Sensitive Data Protection provides access to a powerful sensitive data - # inspection, classification, and de-identification platform that works - # on text, images, and Google Cloud storage repositories. - # To learn more about concepts and find how-to guides see - # https://cloud.google.com/sensitive-data-protection/docs/. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.privacy.dlp.v2.DlpService' - - # Finds potentially sensitive info in content. - # This method has limits on input size, processing time, and output size. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # For how to guides, see - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images - # and - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, - rpc :InspectContent, ::Google::Cloud::Dlp::V2::InspectContentRequest, ::Google::Cloud::Dlp::V2::InspectContentResponse - # Redacts potentially sensitive info from an image. - # This method has limits on input size, processing time, and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - # - # Only the first frame of each multiframe image is redacted. Metadata and - # other frames are omitted in the response. - rpc :RedactImage, ::Google::Cloud::Dlp::V2::RedactImageRequest, ::Google::Cloud::Dlp::V2::RedactImageResponse - # De-identifies potentially sensitive info from a ContentItem. - # This method has limits on input size and output size. - # See - # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in this request, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - rpc :DeidentifyContent, ::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Google::Cloud::Dlp::V2::DeidentifyContentResponse - # Re-identifies content that has been de-identified. - # See - # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example - # to learn more. - rpc :ReidentifyContent, ::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Google::Cloud::Dlp::V2::ReidentifyContentResponse - # Returns a list of the sensitive information types that the DLP API - # supports. See - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # to learn more. - rpc :ListInfoTypes, ::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Google::Cloud::Dlp::V2::ListInfoTypesResponse - # Creates an InspectTemplate for reusing frequently used configuration - # for inspecting content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - rpc :CreateInspectTemplate, ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate - # Updates the InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - rpc :UpdateInspectTemplate, ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate - # Gets an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - rpc :GetInspectTemplate, ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Google::Cloud::Dlp::V2::InspectTemplate - # Lists InspectTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - rpc :ListInspectTemplates, ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse - # Deletes an InspectTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates - # to learn more. - rpc :DeleteInspectTemplate, ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Google::Protobuf::Empty - # Creates a DeidentifyTemplate for reusing frequently used configuration - # for de-identifying content, images, and storage. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - rpc :CreateDeidentifyTemplate, ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate - # Updates the DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - rpc :UpdateDeidentifyTemplate, ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate - # Gets a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - rpc :GetDeidentifyTemplate, ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Google::Cloud::Dlp::V2::DeidentifyTemplate - # Lists DeidentifyTemplates. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - rpc :ListDeidentifyTemplates, ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse - # Deletes a DeidentifyTemplate. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid - # to learn more. - rpc :DeleteDeidentifyTemplate, ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Google::Protobuf::Empty - # Creates a job trigger to run DLP actions such as scanning storage for - # sensitive information on a set schedule. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - rpc :CreateJobTrigger, ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger - # Updates a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - rpc :UpdateJobTrigger, ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger - # Inspect hybrid content and store findings to a trigger. The inspection - # will be processed asynchronously. To review the findings monitor the - # jobs within the trigger. - rpc :HybridInspectJobTrigger, ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Google::Cloud::Dlp::V2::HybridInspectResponse - # Gets a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - rpc :GetJobTrigger, ::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Google::Cloud::Dlp::V2::JobTrigger - # Lists job triggers. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - rpc :ListJobTriggers, ::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Google::Cloud::Dlp::V2::ListJobTriggersResponse - # Deletes a job trigger. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers - # to learn more. - rpc :DeleteJobTrigger, ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Google::Protobuf::Empty - # Activate a job trigger. Causes the immediate execute of a trigger - # instead of waiting on the trigger event to occur. - rpc :ActivateJobTrigger, ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Google::Cloud::Dlp::V2::DlpJob - # Creates a config for discovery to scan and profile storage. - rpc :CreateDiscoveryConfig, ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig - # Updates a discovery configuration. - rpc :UpdateDiscoveryConfig, ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig - # Gets a discovery configuration. - rpc :GetDiscoveryConfig, ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Google::Cloud::Dlp::V2::DiscoveryConfig - # Lists discovery configurations. - rpc :ListDiscoveryConfigs, ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse - # Deletes a discovery configuration. - rpc :DeleteDiscoveryConfig, ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Google::Protobuf::Empty - # Creates a new job to inspect storage or calculate risk metrics. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - # - # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the - # system will automatically choose what detectors to run. By default this may - # be all types, but may change over time as detectors are updated. - rpc :CreateDlpJob, ::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Google::Cloud::Dlp::V2::DlpJob - # Lists DlpJobs that match the specified filter in the request. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - rpc :ListDlpJobs, ::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Google::Cloud::Dlp::V2::ListDlpJobsResponse - # Gets the latest state of a long-running DlpJob. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - rpc :GetDlpJob, ::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Google::Cloud::Dlp::V2::DlpJob - # Deletes a long-running DlpJob. This method indicates that the client is - # no longer interested in the DlpJob result. The job will be canceled if - # possible. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - rpc :DeleteDlpJob, ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Google::Protobuf::Empty - # Starts asynchronous cancellation on a long-running DlpJob. The server - # makes a best effort to cancel the DlpJob, but success is not - # guaranteed. - # See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage - # and - # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis - # to learn more. - rpc :CancelDlpJob, ::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Google::Protobuf::Empty - # Creates a pre-built stored infoType to be used for inspection. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - rpc :CreateStoredInfoType, ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType - # Updates the stored infoType by creating a new version. The existing version - # will continue to be used until the new version is ready. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - rpc :UpdateStoredInfoType, ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType - # Gets a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - rpc :GetStoredInfoType, ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Google::Cloud::Dlp::V2::StoredInfoType - # Lists stored infoTypes. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - rpc :ListStoredInfoTypes, ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse - # Deletes a stored infoType. - # See - # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes - # to learn more. - rpc :DeleteStoredInfoType, ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Google::Protobuf::Empty - # Lists project data profiles for an organization. - rpc :ListProjectDataProfiles, ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse - # Lists table data profiles for an organization. - rpc :ListTableDataProfiles, ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse - # Lists column data profiles for an organization. - rpc :ListColumnDataProfiles, ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse - # Gets a project data profile. - rpc :GetProjectDataProfile, ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Google::Cloud::Dlp::V2::ProjectDataProfile - # Lists file store data profiles for an organization. - rpc :ListFileStoreDataProfiles, ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse - # Gets a file store data profile. - rpc :GetFileStoreDataProfile, ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Google::Cloud::Dlp::V2::FileStoreDataProfile - # Delete a FileStoreDataProfile. Will not prevent the profile from being - # regenerated if the resource is still included in a discovery configuration. - rpc :DeleteFileStoreDataProfile, ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Google::Protobuf::Empty - # Gets a table data profile. - rpc :GetTableDataProfile, ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Google::Cloud::Dlp::V2::TableDataProfile - # Gets a column data profile. - rpc :GetColumnDataProfile, ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Google::Cloud::Dlp::V2::ColumnDataProfile - # Delete a TableDataProfile. Will not prevent the profile from being - # regenerated if the table is still included in a discovery configuration. - rpc :DeleteTableDataProfile, ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Google::Protobuf::Empty - # Inspect hybrid content and store findings to a job. - # To review the findings, inspect the job. Inspection will occur - # asynchronously. - rpc :HybridInspectDlpJob, ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Google::Cloud::Dlp::V2::HybridInspectResponse - # Finish a running hybrid DlpJob. Triggers the finalization steps and running - # of any enabled actions that have not yet run. - rpc :FinishDlpJob, ::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Google::Protobuf::Empty - # Create a Connection to an external data source. - rpc :CreateConnection, ::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Google::Cloud::Dlp::V2::Connection - # Get a Connection by name. - rpc :GetConnection, ::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Google::Cloud::Dlp::V2::Connection - # Lists Connections in a parent. Use SearchConnections to see all connections - # within an organization. - rpc :ListConnections, ::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Google::Cloud::Dlp::V2::ListConnectionsResponse - # Searches for Connections in a parent. - rpc :SearchConnections, ::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Google::Cloud::Dlp::V2::SearchConnectionsResponse - # Delete a Connection. - rpc :DeleteConnection, ::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Google::Protobuf::Empty - # Update a Connection. - rpc :UpdateConnection, ::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Google::Cloud::Dlp::V2::Connection - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb b/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb deleted file mode 100644 index 963b76bbd524..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/lib/google/privacy/dlp/v2/storage_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/privacy/dlp/v2/storage.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/privacy/dlp/v2/storage.proto\x12\x15google.privacy.dlp.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x42\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\"\xfb\x01\n\x10SensitivityScore\x12L\n\x05score\x18\x01 \x01(\x0e\x32=.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel\"\x98\x01\n\x15SensitivityScoreLevel\x12!\n\x1dSENSITIVITY_SCORE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\"K\n\nStoredType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbd\r\n\x0e\x43ustomInfoType\x12\x32\n\tinfo_type\x18\x01 \x01(\x0b\x32\x1f.google.privacy.dlp.v2.InfoType\x12\x35\n\nlikelihood\x18\x06 \x01(\x0e\x32!.google.privacy.dlp.v2.Likelihood\x12\x46\n\ndictionary\x18\x02 \x01(\x0b\x32\x30.google.privacy.dlp.v2.CustomInfoType.DictionaryH\x00\x12<\n\x05regex\x18\x03 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.RegexH\x00\x12M\n\x0esurrogate_type\x18\x04 \x01(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeH\x00\x12\x38\n\x0bstored_type\x18\x05 \x01(\x0b\x32!.google.privacy.dlp.v2.StoredTypeH\x00\x12i\n\x1dmetadata_key_value_expression\x18\n \x01(\x0b\x32@.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpressionH\x00\x12L\n\x0f\x64\x65tection_rules\x18\x07 \x03(\x0b\x32\x33.google.privacy.dlp.v2.CustomInfoType.DetectionRule\x12K\n\x0e\x65xclusion_type\x18\x08 \x01(\x0e\x32\x33.google.privacy.dlp.v2.CustomInfoType.ExclusionType\x12\x42\n\x11sensitivity_score\x18\t \x01(\x0b\x32\'.google.privacy.dlp.v2.SensitivityScore\x1a\xc8\x01\n\nDictionary\x12N\n\tword_list\x18\x01 \x01(\x0b\x32\x39.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListH\x00\x12\x45\n\x12\x63loud_storage_path\x18\x03 \x01(\x0b\x32\'.google.privacy.dlp.v2.CloudStoragePathH\x00\x1a\x19\n\x08WordList\x12\r\n\x05words\x18\x01 \x03(\tB\x08\n\x06source\x1a/\n\x05Regex\x12\x0f\n\x07pattern\x18\x01 \x01(\t\x12\x15\n\rgroup_indexes\x18\x02 \x03(\x05\x1a\x0f\n\rSurrogateType\x1a\x44\n\x1aMetadataKeyValueExpression\x12\x11\n\tkey_regex\x18\x01 \x01(\t\x12\x13\n\x0bvalue_regex\x18\x02 \x01(\t\x1a\xbe\x04\n\rDetectionRule\x12W\n\x0chotword_rule\x18\x01 \x01(\x0b\x32?.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleH\x00\x1a\x38\n\tProximity\x12\x15\n\rwindow_before\x18\x01 \x01(\x05\x12\x14\n\x0cwindow_after\x18\x02 \x01(\x05\x1a\x82\x01\n\x14LikelihoodAdjustment\x12=\n\x10\x66ixed_likelihood\x18\x01 \x01(\x0e\x32!.google.privacy.dlp.v2.LikelihoodH\x00\x12\x1d\n\x13relative_likelihood\x18\x02 \x01(\x05H\x00\x42\x0c\n\nadjustment\x1a\x8c\x02\n\x0bHotwordRule\x12\x42\n\rhotword_regex\x18\x01 \x01(\x0b\x32+.google.privacy.dlp.v2.CustomInfoType.Regex\x12P\n\tproximity\x18\x02 \x01(\x0b\x32=.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity\x12g\n\x15likelihood_adjustment\x18\x03 \x01(\x0b\x32H.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentB\x06\n\x04type\"K\n\rExclusionType\x12\x1e\n\x1a\x45XCLUSION_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45XCLUSION_TYPE_EXCLUDE\x10\x01\x42\x06\n\x04type\"\x17\n\x07\x46ieldId\x12\x0c\n\x04name\x18\x01 \x01(\t\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x81\x01\n\x10\x44\x61tastoreOptions\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x33\n\x04kind\x18\x02 \x01(\x0b\x32%.google.privacy.dlp.v2.KindExpression\"]\n\x18\x43loudStorageRegexFileSet\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rinclude_regex\x18\x02 \x03(\t\x12\x15\n\rexclude_regex\x18\x03 \x03(\t\"\xec\x03\n\x13\x43loudStorageOptions\x12\x44\n\x08\x66ile_set\x18\x01 \x01(\x0b\x32\x32.google.privacy.dlp.v2.CloudStorageOptions.FileSet\x12\x1c\n\x14\x62ytes_limit_per_file\x18\x04 \x01(\x03\x12$\n\x1c\x62ytes_limit_per_file_percent\x18\x08 \x01(\x05\x12\x33\n\nfile_types\x18\x05 \x03(\x0e\x32\x1f.google.privacy.dlp.v2.FileType\x12N\n\rsample_method\x18\x06 \x01(\x0e\x32\x37.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod\x12\x1b\n\x13\x66iles_limit_percent\x18\x07 \x01(\x05\x1a_\n\x07\x46ileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\x12G\n\x0eregex_file_set\x18\x02 \x01(\x0b\x32/.google.privacy.dlp.v2.CloudStorageRegexFileSet\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\"\n\x13\x43loudStorageFileSet\x12\x0b\n\x03url\x18\x01 \x01(\t\" \n\x10\x43loudStoragePath\x12\x0c\n\x04path\x18\x01 \x01(\t\"\xc4\x03\n\x0f\x42igQueryOptions\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12:\n\x12identifying_fields\x18\x02 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x12\n\nrows_limit\x18\x03 \x01(\x03\x12\x1a\n\x12rows_limit_percent\x18\x06 \x01(\x05\x12J\n\rsample_method\x18\x04 \x01(\x0e\x32\x33.google.privacy.dlp.v2.BigQueryOptions.SampleMethod\x12\x37\n\x0f\x65xcluded_fields\x18\x05 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x37\n\x0fincluded_fields\x18\x07 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"H\n\x0cSampleMethod\x12\x1d\n\x19SAMPLE_METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03TOP\x10\x01\x12\x10\n\x0cRANDOM_START\x10\x02\"\xda\x04\n\rStorageConfig\x12\x44\n\x11\x64\x61tastore_options\x18\x02 \x01(\x0b\x32\'.google.privacy.dlp.v2.DatastoreOptionsH\x00\x12K\n\x15\x63loud_storage_options\x18\x03 \x01(\x0b\x32*.google.privacy.dlp.v2.CloudStorageOptionsH\x00\x12\x43\n\x11\x62ig_query_options\x18\x04 \x01(\x0b\x32&.google.privacy.dlp.v2.BigQueryOptionsH\x00\x12>\n\x0ehybrid_options\x18\t \x01(\x0b\x32$.google.privacy.dlp.v2.HybridOptionsH\x00\x12L\n\x0ftimespan_config\x18\x06 \x01(\x0b\x32\x33.google.privacy.dlp.v2.StorageConfig.TimespanConfig\x1a\xda\x01\n\x0eTimespanConfig\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0ftimestamp_field\x18\x03 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\x12\x31\n)enable_auto_population_of_timespan_config\x18\x04 \x01(\x08\x42\x06\n\x04type\"\xf6\x01\n\rHybridOptions\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12#\n\x1brequired_finding_label_keys\x18\x02 \x03(\t\x12@\n\x06labels\x18\x03 \x03(\x0b\x32\x30.google.privacy.dlp.v2.HybridOptions.LabelsEntry\x12:\n\rtable_options\x18\x04 \x01(\x0b\x32#.google.privacy.dlp.v2.TableOptions\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0b\x42igQueryKey\x12=\n\x0ftable_reference\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12\x12\n\nrow_number\x18\x02 \x01(\x03\">\n\x0c\x44\x61tastoreKey\x12.\n\nentity_key\x18\x01 \x01(\x0b\x32\x1a.google.privacy.dlp.v2.Key\"\xbb\x01\n\x03Key\x12\x38\n\x0cpartition_id\x18\x01 \x01(\x0b\x32\".google.privacy.dlp.v2.PartitionId\x12\x34\n\x04path\x18\x02 \x03(\x0b\x32&.google.privacy.dlp.v2.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"\xa1\x01\n\tRecordKey\x12<\n\rdatastore_key\x18\x02 \x01(\x0b\x32#.google.privacy.dlp.v2.DatastoreKeyH\x00\x12;\n\rbig_query_key\x18\x03 \x01(\x0b\x32\".google.privacy.dlp.v2.BigQueryKeyH\x00\x12\x11\n\tid_values\x18\x05 \x03(\tB\x06\n\x04type\"I\n\rBigQueryTable\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x10\n\x08table_id\x18\x03 \x01(\t\"J\n\x0eTableReference\x12\x12\n\ndataset_id\x18\x01 \x01(\t\x12\x10\n\x08table_id\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x03 \x01(\t\"s\n\rBigQueryField\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32$.google.privacy.dlp.v2.BigQueryTable\x12-\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"9\n\x08\x45ntityId\x12-\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId\"J\n\x0cTableOptions\x12:\n\x12identifying_fields\x18\x01 \x03(\x0b\x32\x1e.google.privacy.dlp.v2.FieldId*t\n\nLikelihood\x12\x1a\n\x16LIKELIHOOD_UNSPECIFIED\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05*\x9a\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x42INARY_FILE\x10\x01\x12\r\n\tTEXT_FILE\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x08\n\x04WORD\x10\x05\x12\x07\n\x03PDF\x10\x06\x12\x08\n\x04\x41VRO\x10\x07\x12\x07\n\x03\x43SV\x10\x08\x12\x07\n\x03TSV\x10\t\x12\x0e\n\nPOWERPOINT\x10\x0b\x12\t\n\x05\x45XCEL\x10\x0c\x42\x99\x01\n\x19\x63om.google.privacy.dlp.v2B\nDlpStorageP\x01Z)cloud.google.com/go/dlp/apiv2/dlppb;dlppb\xaa\x02\x13Google.Cloud.Dlp.V2\xca\x02\x13Google\\Cloud\\Dlp\\V2\xea\x02\x16Google::Cloud::Dlp::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dlp - module V2 - InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoType").msgclass - SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SensitivityScore").msgclass - SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel").enummodule - StoredType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredType").msgclass - CustomInfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType").msgclass - CustomInfoType::Dictionary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary").msgclass - CustomInfoType::Dictionary::WordList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList").msgclass - CustomInfoType::Regex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Regex").msgclass - CustomInfoType::SurrogateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.SurrogateType").msgclass - CustomInfoType::MetadataKeyValueExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression").msgclass - CustomInfoType::DetectionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule").msgclass - CustomInfoType::DetectionRule::Proximity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity").msgclass - CustomInfoType::DetectionRule::LikelihoodAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment").msgclass - CustomInfoType::DetectionRule::HotwordRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule").msgclass - CustomInfoType::ExclusionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.ExclusionType").enummodule - FieldId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FieldId").msgclass - PartitionId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PartitionId").msgclass - KindExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KindExpression").msgclass - DatastoreOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreOptions").msgclass - CloudStorageRegexFileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageRegexFileSet").msgclass - CloudStorageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass - CloudStorageOptions::FileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass - CloudStorageOptions::SampleMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.SampleMethod").enummodule - CloudStorageFileSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageFileSet").msgclass - CloudStoragePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStoragePath").msgclass - BigQueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions").msgclass - BigQueryOptions::SampleMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions.SampleMethod").enummodule - StorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig").msgclass - StorageConfig::TimespanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig.TimespanConfig").msgclass - HybridOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.HybridOptions").msgclass - BigQueryKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryKey").msgclass - DatastoreKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreKey").msgclass - Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key").msgclass - Key::PathElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key.PathElement").msgclass - RecordKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordKey").msgclass - BigQueryTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTable").msgclass - TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableReference").msgclass - BigQueryField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryField").msgclass - EntityId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.EntityId").msgclass - TableOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.TableOptions").msgclass - Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Likelihood").enummodule - FileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md deleted file mode 100644 index b25c60898c30..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Data Loss Prevention (DLP) V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb deleted file mode 100644 index 87de3faa8676..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/dlp.rb +++ /dev/null @@ -1,8998 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dlp - module V2 - # List of excluded infoTypes. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # InfoType list in ExclusionRule rule drops a finding when it overlaps or - # contained within with a finding of an infoType from this list. For - # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and - # `exclusion_rule` containing `exclude_info_types.info_types` with - # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap - # with EMAIL_ADDRESS finding. - # That leads to "555-222-2222@example.org" to generate only a single - # finding, namely email address. - class ExcludeInfoTypes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule to exclude findings based on a hotword. For record inspection of - # tables, column names are considered hotwords. An example of this is to - # exclude a finding if it belongs to a BigQuery column that matches a specific - # pattern. - # @!attribute [rw] hotword_regex - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] - # Regular expression pattern defining what qualifies as a hotword. - # @!attribute [rw] proximity - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity] - # Range of characters within which the entire hotword must reside. - # The total length of the window cannot exceed 1000 characters. - # The windowBefore property in proximity should be set to 1 if the hotword - # needs to be included in a column header. - class ExcludeByHotword - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule to exclude image findings based on spatial relationships with - # other image findings. For example, exclude an image finding if it overlaps - # with another image finding. - # This rule is silently ignored if the content being inspected is not an image. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # A list of image-supported infoTypes—excluding [document - # infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to - # be used as context for the exclusion rule. A finding is excluded if - # its bounding box has the specified spatial relationship (defined by - # `image_containment_type`) with a finding of an infoType in this list. - # - # For example, if `InspectionRuleSet.info_types` includes - # `OBJECT_TYPE/PERSON` and this `exclusion_rule` specifies `info_types` as - # `OBJECT_TYPE/PERSON/PASSPORT` with `image_containment_type` set to - # `encloses`, then `OBJECT_TYPE/PERSON` findings will be excluded if they - # are fully contained within the bounding box of an - # `OBJECT_TYPE/PERSON/PASSPORT` finding. - # @!attribute [rw] image_containment_type - # @return [::Google::Cloud::Dlp::V2::ImageContainmentType] - # Specifies the required spatial relationship between the bounding boxes - # of the target finding and the context infoType findings. - class ExcludeByImageFindings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule that specifies conditions when findings of infoTypes specified in - # `InspectionRuleSet` are removed from results. - # @!attribute [rw] dictionary - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] - # Dictionary which defines the rule. - # - # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `exclude_info_types`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] - # Regular expression which defines the rule. - # - # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `exclude_info_types`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclude_info_types - # @return [::Google::Cloud::Dlp::V2::ExcludeInfoTypes] - # Set of infoTypes for which findings would affect this rule. - # - # Note: The following fields are mutually exclusive: `exclude_info_types`, `dictionary`, `regex`, `exclude_by_hotword`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclude_by_hotword - # @return [::Google::Cloud::Dlp::V2::ExcludeByHotword] - # Drop if the hotword rule is contained in the proximate context. For - # tabular data, the context includes the column name. - # - # Note: The following fields are mutually exclusive: `exclude_by_hotword`, `dictionary`, `regex`, `exclude_info_types`, `exclude_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclude_by_image_findings - # @return [::Google::Cloud::Dlp::V2::ExcludeByImageFindings] - # Exclude findings based on image containment rules. For example, exclude - # an image finding if it overlaps with another image finding. - # - # Note: The following fields are mutually exclusive: `exclude_by_image_findings`, `dictionary`, `regex`, `exclude_info_types`, `exclude_by_hotword`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] matching_type - # @return [::Google::Cloud::Dlp::V2::MatchingType] - # How the rule is applied, see MatchingType documentation for details. - class ExclusionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AdjustmentRule condition for matching infoTypes. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # Sensitive Data Protection adjusts the likelihood of a finding if that - # finding also matches one of these infoTypes. - # - # For example, you can create a rule to adjust the likelihood of a - # `PHONE_NUMBER` finding if the string is found within a document that is - # classified as `DOCUMENT_TYPE/HR/RESUME`. To configure this, set - # `PHONE_NUMBER` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` - # with an `adjust_by_matching_info_types.info_types` that contains - # `DOCUMENT_TYPE/HR/RESUME`. In this case, the likelihood of the - # `PHONE_NUMBER` finding is adjusted, but the likelihood of the - # `DOCUMENT_TYPE/HR/RESUME` finding is not. - # @!attribute [rw] min_likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Required. Minimum likelihood of the - # `adjust_by_matching_info_types.info_types` finding. If the likelihood is - # lower than this value, Sensitive Data Protection doesn't adjust the - # likelihood of the `InspectionRuleSet.info_types` finding. - # @!attribute [rw] matching_type - # @return [::Google::Cloud::Dlp::V2::MatchingType] - # How the adjustment rule is applied. - # - # Only `MATCHING_TYPE_PARTIAL_MATCH` is supported: - # - # - Partial match: adjusts the findings of infoTypes specified in the - # inspection rule when they have a nonempty intersection with a finding of an - # infoType specified in this adjustment rule. - class AdjustByMatchingInfoTypes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AdjustmentRule condition for image findings. - # This rule is silently ignored if the content being inspected is not an image. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # A list of image-supported infoTypes—excluding [document - # infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to - # be used as context for the adjustment rule. Sensitive Data Protection - # adjusts the likelihood of an image finding if its bounding box has the - # specified spatial relationship (defined by `image_containment_type`) with a - # finding of an infoType in this list. - # - # For example, you can create a rule to adjust the likelihood of a - # `US_PASSPORT` finding if it is enclosed by a finding of - # `OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in - # `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an - # `adjust_by_image_findings.info_types` that contains - # `OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set - # to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is - # adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT` - # finding is not. - # @!attribute [rw] min_likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Required. Minimum likelihood of the - # `adjust_by_image_findings.info_types` finding. If the likelihood is - # lower than this value, Sensitive Data Protection doesn't adjust the - # likelihood of the `InspectionRuleSet.info_types` finding. - # @!attribute [rw] image_containment_type - # @return [::Google::Cloud::Dlp::V2::ImageContainmentType] - # Specifies the required spatial relationship between the bounding boxes - # of the target finding and the context infoType findings. - class AdjustByImageFindings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rule that specifies conditions when a certain infoType's finding details - # should be adjusted. - # @!attribute [rw] adjust_by_matching_info_types - # @return [::Google::Cloud::Dlp::V2::AdjustByMatchingInfoTypes] - # Set of infoTypes for which findings would affect this rule. - # - # Note: The following fields are mutually exclusive: `adjust_by_matching_info_types`, `adjust_by_image_findings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] adjust_by_image_findings - # @return [::Google::Cloud::Dlp::V2::AdjustByImageFindings] - # AdjustmentRule condition for image findings. - # - # Note: The following fields are mutually exclusive: `adjust_by_image_findings`, `adjust_by_matching_info_types`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] likelihood_adjustment - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment] - # Likelihood adjustment to apply to the infoType. - class AdjustmentRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single inspection rule to be applied to infoTypes, specified in - # `InspectionRuleSet`. - # @!attribute [rw] hotword_rule - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule] - # Hotword-based detection rule. - # - # Note: The following fields are mutually exclusive: `hotword_rule`, `exclusion_rule`, `adjustment_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclusion_rule - # @return [::Google::Cloud::Dlp::V2::ExclusionRule] - # Exclusion rule. - # - # Note: The following fields are mutually exclusive: `exclusion_rule`, `hotword_rule`, `adjustment_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] adjustment_rule - # @return [::Google::Cloud::Dlp::V2::AdjustmentRule] - # Adjustment rule. - # - # Note: The following fields are mutually exclusive: `adjustment_rule`, `hotword_rule`, `exclusion_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class InspectionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rule set for modifying a set of infoTypes to alter behavior under certain - # circumstances, depending on the specific details of the rules within the set. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # List of infoTypes this rule set is applied to. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dlp::V2::InspectionRule>] - # Set of rules to be applied to infoTypes. The rules are applied in order. - class InspectionRuleSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration description of the scanning process. - # When used with redactContent only info_types and min_likelihood are currently - # used. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # Restricts what info_types to look for. The values must correspond to - # InfoType values returned by ListInfoTypes or listed at - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. - # - # When no InfoTypes or CustomInfoTypes are specified in a request, the - # system may automatically choose a default list of detectors to run, which - # may change over time. - # - # If you need precise control and predictability as to what detectors are - # run you should specify specific InfoTypes listed in the reference, - # otherwise a default list will be used, which may change over time. - # @!attribute [rw] min_likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Only returns findings equal to or above this threshold. The default is - # POSSIBLE. - # - # In general, the highest likelihood setting yields the fewest findings in - # results and the lowest chance of a false positive. For more information, - # see [Match - # likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). - # @!attribute [rw] min_likelihood_per_info_type - # @return [::Array<::Google::Cloud::Dlp::V2::InspectConfig::InfoTypeLikelihood>] - # Minimum likelihood per infotype. For each infotype, a user can specify a - # minimum likelihood. The system only returns a finding if its likelihood is - # above this threshold. If this field is not set, the system uses the - # InspectConfig min_likelihood. - # @!attribute [rw] limits - # @return [::Google::Cloud::Dlp::V2::InspectConfig::FindingLimits] - # Configuration to control the number of findings returned. - # This is not used for data profiling. - # - # When redacting sensitive data from images, finding limits don't apply. They - # can cause unexpected or inconsistent results, where only some data is - # redacted. Don't include finding limits in - # {::Google::Cloud::Dlp::V2::DlpService::Client#redact_image RedactImage} - # requests. Otherwise, Cloud DLP returns an error. - # - # When set within an - # {::Google::Cloud::Dlp::V2::InspectJobConfig InspectJobConfig}, the specified - # maximum values aren't hard limits. If an inspection job reaches these - # limits, the job ends gradually, not abruptly. Therefore, the actual number - # of findings that Cloud DLP returns can be multiple times higher than these - # maximum values. - # @!attribute [rw] include_quote - # @return [::Boolean] - # When true, a contextual quote from the data that triggered a finding is - # included in the response; see - # {::Google::Cloud::Dlp::V2::Finding#quote Finding.quote}. This is not used for - # data profiling. - # @!attribute [rw] exclude_info_types - # @return [::Boolean] - # When true, excludes type information of the findings. - # This is not used for data profiling. - # @!attribute [rw] custom_info_types - # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType>] - # CustomInfoTypes provided by the user. See - # https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes - # to learn more. - # @!attribute [rw] content_options - # @return [::Array<::Google::Cloud::Dlp::V2::ContentOption>] - # Deprecated and unused. - # @!attribute [rw] rule_set - # @return [::Array<::Google::Cloud::Dlp::V2::InspectionRuleSet>] - # Set of rules to apply to the findings for this InspectConfig. - # Exclusion rules, contained in the set are executed in the end, other - # rules are executed in the order they are specified for each info type. Not - # supported for the `metadata_key_value_expression` CustomInfoType. - class InspectConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for setting a minimum likelihood per infotype. Used to - # customize the minimum likelihood level for specific infotypes in the - # request. For example, use this if you want to lower the precision for - # PERSON_NAME without lowering the precision for the other infotypes in the - # request. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # Type of information the likelihood threshold applies to. Only one - # likelihood per info_type should be provided. If InfoTypeLikelihood does - # not have an info_type, the configuration fails. - # @!attribute [rw] min_likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Only returns findings equal to or above this threshold. This field is - # required or else the configuration fails. - class InfoTypeLikelihood - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration to control the number of findings returned for inspection. - # This is not used for de-identification or data profiling. - # - # When redacting sensitive data from images, finding limits don't apply. They - # can cause unexpected or inconsistent results, where only some data is - # redacted. Don't include finding limits in - # {::Google::Cloud::Dlp::V2::DlpService::Client#redact_image RedactImage} - # requests. Otherwise, Cloud DLP returns an error. - # @!attribute [rw] max_findings_per_item - # @return [::Integer] - # Max number of findings that are returned for each item scanned. - # - # When set within an - # {::Google::Cloud::Dlp::V2::InspectContentRequest InspectContentRequest}, - # this field is ignored. - # - # This value isn't a hard limit. If the number of findings for an item - # reaches this limit, the inspection of that item ends gradually, not - # abruptly. Therefore, the actual number of findings that Cloud DLP returns - # for the item can be multiple times higher than this value. - # @!attribute [rw] max_findings_per_request - # @return [::Integer] - # Max number of findings that are returned per request or job. - # - # If you set this field in an - # {::Google::Cloud::Dlp::V2::InspectContentRequest InspectContentRequest}, the - # resulting maximum value is the value that you set or 3,000, whichever is - # lower. - # - # This value isn't a hard limit. If an inspection reaches this limit, the - # inspection ends gradually, not abruptly. Therefore, the actual number of - # findings that Cloud DLP returns can be multiple times higher than this - # value. - # @!attribute [rw] max_findings_per_info_type - # @return [::Array<::Google::Cloud::Dlp::V2::InspectConfig::FindingLimits::InfoTypeLimit>] - # Configuration of findings limit given for specified infoTypes. - class FindingLimits - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Max findings configuration per infoType, per content item or long - # running DlpJob. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # Type of information the findings limit applies to. Only one limit per - # info_type should be provided. If InfoTypeLimit does not have an - # info_type, the DLP API applies the limit against all info_types that - # are found but not specified in another InfoTypeLimit. - # @!attribute [rw] max_findings - # @return [::Integer] - # Max findings limit for the given infoType. - class InfoTypeLimit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Container for bytes to inspect or redact. - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::ByteContentItem::BytesType] - # The type of data stored in the bytes string. Default will be TEXT_UTF8. - # @!attribute [rw] data - # @return [::String] - # Content data to inspect or redact. - class ByteContentItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of data being sent for inspection. To learn more, see - # [Supported file - # types](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types). - # - # Only the first frame of each multiframe image is inspected. Metadata and - # other frames aren't inspected. - module BytesType - # Unused - BYTES_TYPE_UNSPECIFIED = 0 - - # Any image type. - IMAGE = 6 - - # jpeg - IMAGE_JPEG = 1 - - # bmp - IMAGE_BMP = 2 - - # png - IMAGE_PNG = 3 - - # svg - IMAGE_SVG = 4 - - # plain text - TEXT_UTF8 = 5 - - # docx, docm, dotx, dotm - WORD_DOCUMENT = 7 - - # pdf - PDF = 8 - - # pptx, pptm, potx, potm, pot - POWERPOINT_DOCUMENT = 9 - - # xlsx, xlsm, xltx, xltm - EXCEL_DOCUMENT = 10 - - # avro - AVRO = 11 - - # csv - CSV = 12 - - # tsv - TSV = 13 - - # Audio file types. Only used for profiling. - AUDIO = 15 - - # Video file types. Only used for profiling. - VIDEO = 16 - - # Executable file types. Only used for profiling. - EXECUTABLE = 17 - - # AI model file types. Only used for profiling. - AI_MODEL = 18 - end - end - - # Type of content to inspect. - # @!attribute [rw] value - # @return [::String] - # String data to inspect or redact. - # - # Note: The following fields are mutually exclusive: `value`, `table`, `byte_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::Table] - # Structured content for inspection. See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table - # to learn more. - # - # Note: The following fields are mutually exclusive: `table`, `value`, `byte_item`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] byte_item - # @return [::Google::Cloud::Dlp::V2::ByteContentItem] - # Content data to inspect or redact. Replaces `type` and `data`. - # - # Note: The following fields are mutually exclusive: `byte_item`, `value`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] content_metadata - # @return [::Google::Cloud::Dlp::V2::ContentMetadata] - # User provided metadata for the content. - class ContentItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata on content to be scanned. - # @!attribute [rw] properties - # @return [::Array<::Google::Cloud::Dlp::V2::KeyValueMetadataProperty>] - # User provided key-value pairs of content metadata. - class ContentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured content to inspect. Up to 50,000 `Value`s per request allowed. See - # https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table - # to learn more. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Headers of the table. - # @!attribute [rw] rows - # @return [::Array<::Google::Cloud::Dlp::V2::Table::Row>] - # Rows of the table. - class Table - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Values of the row. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # Individual cells. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A key-value pair in the Metadata. - # @!attribute [rw] key - # @return [::String] - # The key of the property. - # @!attribute [rw] value - # @return [::String] - # The value of the property. - class KeyValueMetadataProperty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # All the findings for a single scanned item. - # @!attribute [rw] findings - # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] - # List of findings for an item. - # @!attribute [rw] findings_truncated - # @return [::Boolean] - # If true, then this item might have more findings than were returned, - # and the findings returned are an arbitrary subset of all findings. - # The findings list might be truncated because the input items were too - # large, or because the server reached the maximum amount of resources - # allowed for a single API call. For best results, divide the input into - # smaller batches. - class InspectResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a piece of potentially sensitive content. - # @!attribute [rw] name - # @return [::String] - # Resource name in format - # projects/\\{project}/locations/\\{location}/findings/\\{finding} Populated only - # when viewing persisted findings. - # @!attribute [rw] quote - # @return [::String] - # The content that was found. Even if the content is not textual, it - # may be converted to a textual representation here. - # Provided if `include_quote` is true and the finding is - # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes - # in length, the quote may be omitted. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The type of content that might have been found. - # Provided if `excluded_types` is false. - # @!attribute [rw] likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Confidence of how likely it is that the `info_type` is correct. - # @!attribute [rw] location - # @return [::Google::Cloud::Dlp::V2::Location] - # Where the content was found. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp when finding was detected. - # @!attribute [rw] quote_info - # @return [::Google::Cloud::Dlp::V2::QuoteInfo] - # Contains data parsed from quotes. Only populated if include_quote was set - # to true and a supported infoType was requested. Currently supported - # infoTypes: DATE, DATE_OF_BIRTH and TIME. - # @!attribute [rw] resource_name - # @return [::String] - # The job that stored the finding. - # @!attribute [rw] trigger_name - # @return [::String] - # Job trigger name, if applicable, for this finding. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels associated with this `Finding`. - # - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - # - # No more than 10 labels can be associated with a given finding. - # - # Examples: - # - # * `"environment" : "production"` - # * `"pipeline" : "etl"` - # @!attribute [rw] job_create_time - # @return [::Google::Protobuf::Timestamp] - # Time the job started that produced this finding. - # @!attribute [rw] job_name - # @return [::String] - # The job that stored the finding. - # @!attribute [rw] finding_id - # @return [::String] - # The unique finding id. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies the location of the finding. - # @!attribute [rw] byte_range - # @return [::Google::Cloud::Dlp::V2::Range] - # Zero-based byte offsets delimiting the finding. - # These are relative to the finding's containing element. - # Note that when the content is not textual, this references - # the UTF-8 encoded textual representation of the content. - # Omitted if content is an image. - # @!attribute [rw] codepoint_range - # @return [::Google::Cloud::Dlp::V2::Range] - # Unicode character offsets delimiting the finding. - # These are relative to the finding's containing element. - # Provided when the content is text. - # @!attribute [rw] content_locations - # @return [::Array<::Google::Cloud::Dlp::V2::ContentLocation>] - # List of nested objects pointing to the precise location of the finding - # within the file or record. - # @!attribute [rw] container - # @return [::Google::Cloud::Dlp::V2::Container] - # Information about the container where this finding occurred, if available. - class Location - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Precise location of the finding within a document, record, image, or metadata - # container. - # @!attribute [rw] container_name - # @return [::String] - # Name of the container where the finding is located. - # The top level name is the source file name or table name. Names of some - # common storage containers are formatted as follows: - # - # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` - # * Cloud Storage files: `gs://{bucket}/{path}` - # * Datastore namespace: \\{namespace} - # - # Nested names could be absent if the embedded object has no string - # identifier (for example, an image contained within a document). - # @!attribute [rw] record_location - # @return [::Google::Cloud::Dlp::V2::RecordLocation] - # Location within a row or record of a database table. - # - # Note: The following fields are mutually exclusive: `record_location`, `image_location`, `document_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_location - # @return [::Google::Cloud::Dlp::V2::ImageLocation] - # Location within an image's pixels. - # - # Note: The following fields are mutually exclusive: `image_location`, `record_location`, `document_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document_location - # @return [::Google::Cloud::Dlp::V2::DocumentLocation] - # Location data for document files. - # - # Note: The following fields are mutually exclusive: `document_location`, `record_location`, `image_location`, `metadata_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] metadata_location - # @return [::Google::Cloud::Dlp::V2::MetadataLocation] - # Location within the metadata for inspected content. - # - # Note: The following fields are mutually exclusive: `metadata_location`, `record_location`, `image_location`, `document_location`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] container_timestamp - # @return [::Google::Protobuf::Timestamp] - # Finding container modification timestamp, if applicable. For Cloud Storage, - # this field contains the last file modification timestamp. For a BigQuery - # table, this field contains the last_modified_time property. For Datastore, - # this field isn't populated. - # @!attribute [rw] container_version - # @return [::String] - # Finding container version, if available - # ("generation" for Cloud Storage). - class ContentLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata Location - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::MetadataType] - # Type of metadata containing the finding. - # @!attribute [rw] storage_label - # @return [::Google::Cloud::Dlp::V2::StorageMetadataLabel] - # Storage metadata. - # - # Note: The following fields are mutually exclusive: `storage_label`, `key_value_metadata_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] key_value_metadata_label - # @return [::Google::Cloud::Dlp::V2::KeyValueMetadataLabel] - # Metadata key that contains the finding. - # - # Note: The following fields are mutually exclusive: `key_value_metadata_label`, `storage_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MetadataLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Storage metadata label to indicate which metadata entry contains findings. - # @!attribute [rw] key - # @return [::String] - # Label name. - class StorageMetadataLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata key that contains a finding. - # @!attribute [rw] key - # @return [::String] - # The metadata key. The format depends on the source of the metadata. - # - # Example: - # - # - `MSIP_Label_122709e3-8f6b-4860-985f-7f722a94f61e_Enabled` (a Microsoft - # Purview Information Protection key example) - class KeyValueMetadataLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of a finding within a document. - # @!attribute [rw] file_offset - # @return [::Integer] - # Offset of the line, from the beginning of the file, where the finding - # is located. - class DocumentLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of a finding within a row or record. - # @!attribute [rw] record_key - # @return [::Google::Cloud::Dlp::V2::RecordKey] - # Key of the finding. - # @!attribute [rw] field_id - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Field id of the field containing the finding. - # @!attribute [rw] table_location - # @return [::Google::Cloud::Dlp::V2::TableLocation] - # Location within a `ContentItem.Table`. - class RecordLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of a finding within a table. - # @!attribute [rw] row_index - # @return [::Integer] - # The zero-based index of the row where the finding is located. Only - # populated for resources that have a natural ordering, not BigQuery. In - # BigQuery, to identify the row a finding came from, populate - # BigQueryOptions.identifying_fields with your primary key column names and - # when you store the findings the value of those columns will be stored - # inside of Finding. - class TableLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a container that may contain DLP findings. - # Examples of a container include a file, table, or database record. - # @!attribute [rw] type - # @return [::String] - # Container type, for example BigQuery or Cloud Storage. - # @!attribute [rw] project_id - # @return [::String] - # Project where the finding was found. - # Can be different from the project that owns the finding. - # @!attribute [rw] full_path - # @return [::String] - # A string representation of the full container name. - # Examples: - # - BigQuery: 'Project:DataSetId.TableId' - # - Cloud Storage: 'gs://Bucket/folders/filename.txt' - # @!attribute [rw] root_path - # @return [::String] - # The root of the container. - # Examples: - # - # - For BigQuery table `project_id:dataset_id.table_id`, the root is - # `dataset_id` - # - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root - # is `gs://bucket` - # @!attribute [rw] relative_path - # @return [::String] - # The rest of the path after the root. - # Examples: - # - # - For BigQuery table `project_id:dataset_id.table_id`, the relative path is - # `table_id` - # - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative - # path is `folder/filename.txt` - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Findings container modification timestamp, if applicable. For Cloud - # Storage, this field contains the last file modification timestamp. For a - # BigQuery table, this field contains the last_modified_time property. For - # Datastore, this field isn't populated. - # @!attribute [rw] version - # @return [::String] - # Findings container version, if available - # ("generation" for Cloud Storage). - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generic half-open interval [start, end) - # @!attribute [rw] start - # @return [::Integer] - # Index of the first character of the range (inclusive). - # @!attribute [rw] end - # @return [::Integer] - # Index of the last character of the range (exclusive). - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the finding within an image. - # @!attribute [rw] bounding_boxes - # @return [::Array<::Google::Cloud::Dlp::V2::BoundingBox>] - # Bounding boxes locating the pixels within the image containing the finding. - class ImageLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box encompassing detected text within an image. - # @!attribute [rw] top - # @return [::Integer] - # Top coordinate of the bounding box. (0,0) is upper left. - # @!attribute [rw] left - # @return [::Integer] - # Left coordinate of the bounding box. (0,0) is upper left. - # @!attribute [rw] width - # @return [::Integer] - # Width of the bounding box in pixels. - # @!attribute [rw] height - # @return [::Integer] - # Height of the bounding box in pixels. - class BoundingBox - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to search for potentially sensitive info in an image and redact it - # by covering it with a colored rectangle. - # @!attribute [rw] parent - # @return [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # Configuration for the inspector. - # @!attribute [rw] image_redaction_configs - # @return [::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig>] - # The configuration for specifying what content to redact from images. - # @!attribute [rw] include_findings - # @return [::Boolean] - # Whether the response should include findings along with the redacted - # image. - # @!attribute [rw] byte_item - # @return [::Google::Cloud::Dlp::V2::ByteContentItem] - # The content must be PNG, JPEG, SVG or BMP. - # @!attribute [rw] inspect_template - # @return [::String] - # The full resource name of the inspection template to use. Settings in the - # main `inspect_config` field override the corresponding settings in this - # inspection template. - # - # The merge behavior is as follows: - # - # - Singular field: The main field's value replaces the value of the - # corresponding field in the template. - # - Repeated fields: The field values are appended to the list defined in - # the template. - # - Sub-messages and groups: The fields are recursively merged. - # @!attribute [rw] deidentify_template - # @return [::String] - # The full resource name of the de-identification template to use. Settings - # in the main `image_redaction_configs` field override the corresponding - # settings in this de-identification template. The request fails if the - # type of the template's deidentify_config is not image_transformations. - class RedactImageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for determining how redaction of images should occur. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # Only one per info_type should be provided per request. If not - # specified, and redact_all_text is false, the DLP API will redact all - # text that it matches against all info_types that are found, but not - # specified in another ImageRedactionConfig. - # - # Note: The following fields are mutually exclusive: `info_type`, `redact_all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redact_all_text - # @return [::Boolean] - # If true, all text found in the image, regardless whether it matches an - # info_type, is redacted. Only one should be provided. - # - # Note: The following fields are mutually exclusive: `redact_all_text`, `info_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redaction_color - # @return [::Google::Cloud::Dlp::V2::Color] - # The color to use when redacting content from an image. If not specified, - # the default is black. - class ImageRedactionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents a color in the RGB color space. - # @!attribute [rw] red - # @return [::Float] - # The amount of red in the color as a value in the interval [0, 1]. - # @!attribute [rw] green - # @return [::Float] - # The amount of green in the color as a value in the interval [0, 1]. - # @!attribute [rw] blue - # @return [::Float] - # The amount of blue in the color as a value in the interval [0, 1]. - class Color - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results of redacting an image. - # @!attribute [rw] redacted_image - # @return [::String] - # The redacted image. The type will be the same as the original image. - # @!attribute [rw] extracted_text - # @return [::String] - # If an image was being inspected and the InspectConfig's include_quote was - # set to true, then this field will include all text, if any, that was found - # in the image. - # @!attribute [rw] inspect_result - # @return [::Google::Cloud::Dlp::V2::InspectResult] - # The findings. Populated when include_findings in the request is true. - class RedactImageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to de-identify a ContentItem. - # @!attribute [rw] parent - # @return [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] deidentify_config - # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] - # Configuration for the de-identification of the content item. - # Items specified here will override the template referenced by the - # deidentify_template_name argument. - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # Configuration for the inspector. - # Items specified here will override the template referenced by the - # inspect_template_name argument. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The item to de-identify. Will be treated as text. - # - # This value must be of type - # {::Google::Cloud::Dlp::V2::Table Table} if your - # {::Google::Cloud::Dlp::V2::DeidentifyContentRequest#deidentify_config deidentify_config} - # is a - # {::Google::Cloud::Dlp::V2::RecordTransformations RecordTransformations} - # object. - # @!attribute [rw] inspect_template_name - # @return [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @!attribute [rw] deidentify_template_name - # @return [::String] - # Template to use. Any configuration directly specified in - # deidentify_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class DeidentifyContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results of de-identifying a ContentItem. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The de-identified item. - # @!attribute [rw] overview - # @return [::Google::Cloud::Dlp::V2::TransformationOverview] - # An overview of the changes that were made on the `item`. - class DeidentifyContentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to re-identify an item. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] reidentify_config - # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] - # Configuration for the re-identification of the content item. - # This field shares the same proto message type that is used for - # de-identification, however its usage here is for the reversal of the - # previous de-identification. Re-identification is performed by examining - # the transformations used to de-identify the items and executing the - # reverse. This requires that only reversible transformations - # be provided here. The reversible transformations are: - # - # - `CryptoDeterministicConfig` - # - `CryptoReplaceFfxFpeConfig` - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # Configuration for the inspector. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The item to re-identify. Will be treated as text. - # @!attribute [rw] inspect_template_name - # @return [::String] - # Template to use. Any configuration directly specified in - # `inspect_config` will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @!attribute [rw] reidentify_template_name - # @return [::String] - # Template to use. References an instance of `DeidentifyTemplate`. - # Any configuration directly specified in `reidentify_config` or - # `inspect_config` will override those set in the template. The - # `DeidentifyTemplate` used must include only reversible transformations. - # Singular fields that are set in this request will replace their - # corresponding fields in the template. Repeated fields are appended. - # Singular sub-messages and groups are recursively merged. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ReidentifyContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results of re-identifying an item. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The re-identified item. - # @!attribute [rw] overview - # @return [::Google::Cloud::Dlp::V2::TransformationOverview] - # An overview of the changes that were made to the `item`. - class ReidentifyContentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to search for potentially sensitive info in a ContentItem. - # @!attribute [rw] parent - # @return [::String] - # Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # Configuration for the inspector. What specified here will override - # the template referenced by the inspect_template_name argument. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The item to inspect. - # @!attribute [rw] inspect_template_name - # @return [::String] - # Template to use. Any configuration directly specified in - # inspect_config will override those set in the template. Singular fields - # that are set in this request will replace their corresponding fields in the - # template. Repeated fields are appended. Singular sub-messages and groups - # are recursively merged. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class InspectContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results of inspecting an item. - # @!attribute [rw] result - # @return [::Google::Cloud::Dlp::V2::InspectResult] - # The findings. - class InspectContentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud repository for storing output. - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Store findings in an existing table or a new table in an existing - # dataset. If table_id is not set a new one will be generated - # for you with the following format: - # dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used - # for generating the date details. - # - # For Inspect, each column in an existing output table must have the same - # name, type, and mode of a field in the `Finding` object. - # - # For Risk, an existing output table should be the output of a previous - # Risk analysis job run on the same source table, with the same privacy - # metric and quasi-identifiers. Risk jobs that analyze the same table but - # compute a different privacy metric, or use different sets of - # quasi-identifiers, cannot store their results in the same table. - # - # Note: The following fields are mutually exclusive: `table`, `storage_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] storage_path - # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] - # Store findings in an existing Cloud Storage bucket. Files will be - # generated with the job ID and file part number as the filename and will - # contain findings in textproto format as - # {::Google::Cloud::Dlp::V2::SaveToGcsFindingsOutput SaveToGcsFindingsOutput}. - # The filename will follow the naming convention `-`. - # Example: `my-job-id-2`. - # - # Supported for {::Google::Cloud::Dlp::V2::InspectJobConfig Inspect jobs}. The - # bucket must not be the same as the bucket being inspected. If storing - # findings to Cloud Storage, the output schema field should not be set. If - # set, it will be ignored. - # - # Note: The following fields are mutually exclusive: `storage_path`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] output_schema - # @return [::Google::Cloud::Dlp::V2::OutputStorageConfig::OutputSchema] - # Schema used for writing the findings for Inspect jobs. This field is only - # used for Inspect and must be unspecified for Risk jobs. Columns are derived - # from the `Finding` object. If appending to an existing table, any columns - # from the predefined schema that are missing will be added. No columns in - # the existing table will be deleted. - # - # If unspecified, then all available columns will be used for a new table or - # an (existing) table with no schema, and no changes will be made to an - # existing table that has a schema. - # Only for use with external storage. - class OutputStorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predefined schemas for storing findings. - # Only for use with external storage. - module OutputSchema - # Unused. - OUTPUT_SCHEMA_UNSPECIFIED = 0 - - # Basic schema including only `info_type`, `quote`, `certainty`, and - # `timestamp`. - BASIC_COLUMNS = 1 - - # Schema tailored to findings from scanning Cloud Storage. - GCS_COLUMNS = 2 - - # Schema tailored to findings from scanning Google Datastore. - DATASTORE_COLUMNS = 3 - - # Schema tailored to findings from scanning Google BigQuery. - BIG_QUERY_COLUMNS = 4 - - # Schema containing all columns. - ALL_COLUMNS = 5 - end - end - - # Statistics regarding a specific InfoType. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The type of finding this stat is for. - # @!attribute [rw] count - # @return [::Integer] - # Number of findings for this infoType. - class InfoTypeStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The results of an inspect DataSource job. - # @!attribute [rw] requested_options - # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails::RequestedOptions] - # The configuration used for this job. - # @!attribute [rw] result - # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails::Result] - # A summary of the outcome of this inspection job. - class InspectDataSourceDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Snapshot of the inspection configuration. - # @!attribute [rw] snapshot_inspect_template - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # If run with an InspectTemplate, a snapshot of its state at the time of - # this run. - # @!attribute [rw] job_config - # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] - # Inspect config. - class RequestedOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # All Result fields are updated while the job is processing. - # @!attribute [rw] processed_bytes - # @return [::Integer] - # Total size in bytes that were processed. - # @!attribute [rw] total_estimated_bytes - # @return [::Integer] - # Estimate of the number of bytes to process. - # @!attribute [rw] info_type_stats - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeStats>] - # Statistics of how many instances of each info type were found during - # inspect job. - # @!attribute [rw] num_rows_processed - # @return [::Integer] - # Number of rows scanned after sampling and time filtering (applicable for - # row based stores such as BigQuery). - # @!attribute [rw] hybrid_stats - # @return [::Google::Cloud::Dlp::V2::HybridInspectStatistics] - # Statistics related to the processing of hybrid inspect. - class Result - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The schema of data to be saved to the BigQuery table when the - # `DataProfileAction` is enabled. - # @!attribute [rw] table_profile - # @return [::Google::Cloud::Dlp::V2::TableDataProfile] - # Table data profile column - # - # Note: The following fields are mutually exclusive: `table_profile`, `column_profile`, `file_store_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_profile - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile] - # Column data profile column - # - # Note: The following fields are mutually exclusive: `column_profile`, `table_profile`, `file_store_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] file_store_profile - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # File store data profile column. - # - # Note: The following fields are mutually exclusive: `file_store_profile`, `table_profile`, `column_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataProfileBigQueryRowSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Statistics related to processing hybrid inspect requests. - # @!attribute [rw] processed_count - # @return [::Integer] - # The number of hybrid inspection requests processed within this job. - # @!attribute [rw] aborted_count - # @return [::Integer] - # The number of hybrid inspection requests aborted because the job ran - # out of quota or was ended before they could be processed. - # @!attribute [rw] pending_count - # @return [::Integer] - # The number of hybrid requests currently being processed. Only populated - # when called via method `getDlpJob`. - # A burst of traffic may cause hybrid inspect requests to be enqueued. - # Processing will take place as quickly as possible, but resource limitations - # may impact how long a request is enqueued for. - class HybridInspectStatistics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The results of an {::Google::Cloud::Dlp::V2::Action Action}. - # @!attribute [rw] deidentify_details - # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceDetails] - # Outcome of a de-identification action. - class ActionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Summary of what was modified during a transformation. - # @!attribute [rw] transformed_bytes - # @return [::Integer] - # Total size in bytes that were transformed in some way. - # @!attribute [rw] transformation_count - # @return [::Integer] - # Number of successfully applied transformations. - # @!attribute [rw] transformation_error_count - # @return [::Integer] - # Number of errors encountered while trying to apply transformations. - class DeidentifyDataSourceStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The results of a {::Google::Cloud::Dlp::V2::Action::Deidentify Deidentify} action - # from an inspect job. - # @!attribute [rw] requested_options - # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceDetails::RequestedDeidentifyOptions] - # De-identification config used for the request. - # @!attribute [rw] deidentify_stats - # @return [::Google::Cloud::Dlp::V2::DeidentifyDataSourceStats] - # Stats about the de-identification operation. - class DeidentifyDataSourceDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # De-identification options. - # @!attribute [rw] snapshot_deidentify_template - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # Snapshot of the state of the `DeidentifyTemplate` from the - # {::Google::Cloud::Dlp::V2::Action::Deidentify Deidentify} action at the time - # this job was run. - # @!attribute [rw] snapshot_structured_deidentify_template - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # Snapshot of the state of the structured `DeidentifyTemplate` from the - # `Deidentify` action at the time this job was run. - # @!attribute [rw] snapshot_image_redact_template - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # Snapshot of the state of the image transformation `DeidentifyTemplate` - # from the `Deidentify` action at the time this job was run. - class RequestedDeidentifyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Locations at which a feature can be used. - # @!attribute [rw] regionalization_scope - # @return [::Google::Cloud::Dlp::V2::LocationSupport::RegionalizationScope] - # The current scope for location on this feature. This may expand over time. - # @!attribute [rw] locations - # @return [::Array<::String>] - # Specific locations where the feature may be used. - # Examples: us-central1, us, asia, global - # If scope is ANY_LOCATION, no regions will be listed. - class LocationSupport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The location scope for a feature. - module RegionalizationScope - # Invalid. - REGIONALIZATION_SCOPE_UNSPECIFIED = 0 - - # Feature may be used with one or more regions. See locations for details. - REGIONAL = 1 - - # Feature may be used anywhere. Default value. - ANY_LOCATION = 2 - end - end - - # InfoType description. - # @!attribute [rw] name - # @return [::String] - # Internal name of the infoType. - # @!attribute [rw] display_name - # @return [::String] - # Human readable form of the infoType name. - # @!attribute [rw] supported_by - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeSupportedBy>] - # Which parts of the API supports this InfoType. - # @!attribute [rw] description - # @return [::String] - # Description of the infotype. Translated when language is provided in the - # request. - # @!attribute [rw] location_support - # @return [::Google::Cloud::Dlp::V2::LocationSupport] - # Locations at which this feature can be used. May change over time. - # @!attribute [rw] example - # @return [::String] - # A sample that is a true positive for this infoType. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::Dlp::V2::VersionDescription>] - # A list of available versions for the infotype. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeCategory>] - # The category of the infoType. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The default sensitivity of the infoType. - # @!attribute [rw] specific_info_types - # @return [::Array<::String>] - # If this field is set, this infoType is a general infoType and these - # specific infoTypes are contained within it. - # General infoTypes are infoTypes that encompass multiple specific infoTypes. - # For example, the "GEOGRAPHIC_DATA" general infoType would have set for this - # field "LOCATION", "LOCATION_COORDINATES", and "STREET_ADDRESS". - # @!attribute [rw] launch_status - # @return [::Google::Cloud::Dlp::V2::InfoTypeDescription::InfoTypeLaunchStatus] - # The launch status of the infoType. - class InfoTypeDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The launch status of an infoType. - module InfoTypeLaunchStatus - # Unspecified. - INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0 - - # InfoType is generally available. - GENERAL_AVAILABILITY = 1 - - # InfoType is in public preview. - PUBLIC_PREVIEW = 2 - - # InfoType is in private preview. - PRIVATE_PREVIEW = 3 - end - end - - # Classification of infoTypes to organize them according to geographic - # location, industry, and data type. - # @!attribute [rw] location_category - # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::LocationCategory] - # The region or country that issued the ID or document represented by the - # infoType. - # - # Note: The following fields are mutually exclusive: `location_category`, `industry_category`, `type_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] industry_category - # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::IndustryCategory] - # The group of relevant businesses where this infoType is commonly used - # - # Note: The following fields are mutually exclusive: `industry_category`, `location_category`, `type_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type_category - # @return [::Google::Cloud::Dlp::V2::InfoTypeCategory::TypeCategory] - # The class of identifiers where this infoType belongs - # - # Note: The following fields are mutually exclusive: `type_category`, `location_category`, `industry_category`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class InfoTypeCategory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum of the current locations. - # We might add more locations in the future. - module LocationCategory - # Unused location - LOCATION_UNSPECIFIED = 0 - - # The infoType is not issued by or tied to a specific region, but is used - # almost everywhere. - GLOBAL = 1 - - # The infoType is typically used in Argentina. - ARGENTINA = 2 - - # The infoType is typically used in Armenia. - ARMENIA = 51 - - # The infoType is typically used in Australia. - AUSTRALIA = 3 - - # The infoType is typically used in Austria. - AUSTRIA = 53 - - # The infoType is typically used in Azerbaijan. - AZERBAIJAN = 48 - - # The infoType is typically used in Belarus. - BELARUS = 50 - - # The infoType is typically used in Belgium. - BELGIUM = 4 - - # The infoType is typically used in Brazil. - BRAZIL = 5 - - # The infoType is typically used in Canada. - CANADA = 6 - - # The infoType is typically used in Chile. - CHILE = 7 - - # The infoType is typically used in China. - CHINA = 8 - - # The infoType is typically used in Colombia. - COLOMBIA = 9 - - # The infoType is typically used in Croatia. - CROATIA = 42 - - # The infoType is typically used in Czechia. - CZECHIA = 52 - - # The infoType is typically used in Denmark. - DENMARK = 10 - - # The infoType is typically used in France. - FRANCE = 11 - - # The infoType is typically used in Finland. - FINLAND = 12 - - # The infoType is typically used in Germany. - GERMANY = 13 - - # The infoType is typically used in Hong Kong. - HONG_KONG = 14 - - # The infoType is typically used in India. - INDIA = 15 - - # The infoType is typically used in Indonesia. - INDONESIA = 16 - - # The infoType is typically used in Ireland. - IRELAND = 17 - - # The infoType is typically used in Israel. - ISRAEL = 18 - - # The infoType is typically used in Italy. - ITALY = 19 - - # The infoType is typically used in Japan. - JAPAN = 20 - - # The infoType is typically used in Kazakhstan. - KAZAKHSTAN = 47 - - # The infoType is typically used in Korea. - KOREA = 21 - - # The infoType is typically used in Mexico. - MEXICO = 22 - - # The infoType is typically used in the Netherlands. - THE_NETHERLANDS = 23 - - # The infoType is typically used in New Zealand. - NEW_ZEALAND = 41 - - # The infoType is typically used in Norway. - NORWAY = 24 - - # The infoType is typically used in Paraguay. - PARAGUAY = 25 - - # The infoType is typically used in Peru. - PERU = 26 - - # The infoType is typically used in Poland. - POLAND = 27 - - # The infoType is typically used in Portugal. - PORTUGAL = 28 - - # The infoType is typically used in Russia. - RUSSIA = 44 - - # The infoType is typically used in Singapore. - SINGAPORE = 29 - - # The infoType is typically used in South Africa. - SOUTH_AFRICA = 30 - - # The infoType is typically used in Spain. - SPAIN = 31 - - # The infoType is typically used in Sweden. - SWEDEN = 32 - - # The infoType is typically used in Switzerland. - SWITZERLAND = 43 - - # The infoType is typically used in Taiwan. - TAIWAN = 33 - - # The infoType is typically used in Thailand. - THAILAND = 34 - - # The infoType is typically used in Turkey. - TURKEY = 35 - - # The infoType is typically used in Ukraine. - UKRAINE = 45 - - # The infoType is typically used in the United Kingdom. - UNITED_KINGDOM = 36 - - # The infoType is typically used in the United States. - UNITED_STATES = 37 - - # The infoType is typically used in Uruguay. - URUGUAY = 38 - - # The infoType is typically used in Uzbekistan. - UZBEKISTAN = 46 - - # The infoType is typically used in Venezuela. - VENEZUELA = 39 - - # The infoType is typically used in Google internally. - INTERNAL = 40 - end - - # Enum of the current industries in the category. - # We might add more industries in the future. - module IndustryCategory - # Unused industry - INDUSTRY_UNSPECIFIED = 0 - - # The infoType is typically used in the finance industry. - FINANCE = 1 - - # The infoType is typically used in the health industry. - HEALTH = 2 - - # The infoType is typically used in the telecommunications industry. - TELECOMMUNICATIONS = 3 - end - - # Enum of the current types in the category. - # We might add more types in the future. - module TypeCategory - # Unused type - TYPE_UNSPECIFIED = 0 - - # Personally identifiable information, for example, a - # name or phone number - PII = 1 - - # Personally identifiable information that is especially sensitive, for - # example, a passport number. - SPII = 2 - - # Attributes that can partially identify someone, especially in - # combination with other attributes, like age, height, and gender. - DEMOGRAPHIC = 3 - - # Confidential or secret information, for example, a password. - CREDENTIAL = 4 - - # An identification document issued by a government. - GOVERNMENT_ID = 5 - - # A document, for example, a resume or source code. - DOCUMENT = 6 - - # Information that is not sensitive on its own, but provides details about - # the circumstances surrounding an entity or an event. - CONTEXTUAL_INFORMATION = 7 - - # Category for `CustomInfoType` types. - CUSTOM = 8 - end - end - - # Details about each available version for an infotype. - # @!attribute [rw] version - # @return [::String] - # Name of the version - # @!attribute [rw] description - # @return [::String] - # Description of the version. - class VersionDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the list of infoTypes. - # @!attribute [rw] parent - # @return [::String] - # The parent resource name. - # - # The format of this value is as follows: - # - # `locations/{location_id}` - # @!attribute [rw] language_code - # @return [::String] - # BCP-47 language code for localized infoType friendly - # names. If omitted, or if localized strings are not available, - # en-US strings will be returned. - # @!attribute [rw] filter - # @return [::String] - # filter to only return infoTypes supported by certain parts of the - # API. Defaults to supported_by=INSPECT. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListInfoTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to the ListInfoTypes request. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeDescription>] - # Set of sensitive infoTypes. - class ListInfoTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a risk analysis job. See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-risk-analysis - # to learn more. - # @!attribute [rw] privacy_metric - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric] - # Privacy metric to compute. - # @!attribute [rw] source_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Input dataset to compute metrics over. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dlp::V2::Action>] - # Actions to execute at the completion of the job. Are executed in the order - # provided. - class RiskAnalysisJobConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A column with a semantic tag attached. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Required. Identifies the column. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # A column can be tagged with a InfoType to use the relevant public - # dataset as a statistical model of population, if available. We - # currently support US ZIP codes, region codes, ages and genders. - # To programmatically obtain the list of supported InfoTypes, use - # ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - # - # Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_tag - # @return [::String] - # A column can be tagged with a custom tag. In this case, the user must - # indicate an auxiliary table that contains statistical information on - # the possible values of this column. - # - # Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] inferred - # @return [::Google::Protobuf::Empty] - # If no semantic tag is indicated, we infer the statistical model from - # the distribution of values in the input data - # - # Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class QuasiId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An auxiliary table containing statistical information on the relative - # frequency of different quasi-identifiers values. It has one or several - # quasi-identifiers columns, and one column that indicates the relative - # frequency of each quasi-identifier tuple. - # If a tuple is present in the data but not in the auxiliary table, the - # corresponding relative frequency is assumed to be zero (and thus, the - # tuple is highly reidentifiable). - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Required. Auxiliary table location. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::StatisticalTable::QuasiIdentifierField>] - # Required. Quasi-identifier columns. - # @!attribute [rw] relative_frequency - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Required. The relative frequency column must contain a floating-point - # number between 0 and 1 (inclusive). Null values are assumed to be zero. - class StatisticalTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A quasi-identifier column has a custom_tag, used to know which column - # in the data corresponds to which column in the statistical model. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Identifies the column. - # @!attribute [rw] custom_tag - # @return [::String] - # A column can be tagged with a custom tag. In this case, the user must - # indicate an auxiliary table that contains statistical information on - # the possible values of this column. - class QuasiIdentifierField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Privacy metric to compute for reidentification risk analysis. - # @!attribute [rw] numerical_stats_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::NumericalStatsConfig] - # Numerical stats - # - # Note: The following fields are mutually exclusive: `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] categorical_stats_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::CategoricalStatsConfig] - # Categorical stats - # - # Note: The following fields are mutually exclusive: `categorical_stats_config`, `numerical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] k_anonymity_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::KAnonymityConfig] - # K-anonymity - # - # Note: The following fields are mutually exclusive: `k_anonymity_config`, `numerical_stats_config`, `categorical_stats_config`, `l_diversity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] l_diversity_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::LDiversityConfig] - # l-diversity - # - # Note: The following fields are mutually exclusive: `l_diversity_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `k_map_estimation_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] k_map_estimation_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig] - # k-map - # - # Note: The following fields are mutually exclusive: `k_map_estimation_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `delta_presence_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delta_presence_estimation_config - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig] - # delta-presence - # - # Note: The following fields are mutually exclusive: `delta_presence_estimation_config`, `numerical_stats_config`, `categorical_stats_config`, `k_anonymity_config`, `l_diversity_config`, `k_map_estimation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PrivacyMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compute numerical stats over an individual column, including - # min, max, and quantiles. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Field to compute numerical stats on. Supported types are - # integer, float, date, datetime, timestamp, time. - class NumericalStatsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Compute numerical stats over an individual column, including - # number of distinct values and value count distribution. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Field to compute categorical stats on. All column types are - # supported except for arrays and structs. However, it may be more - # informative to use NumericalStats when the field type is supported, - # depending on the data. - class CategoricalStatsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # k-anonymity metric, used for analysis of reidentification risk. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Set of fields to compute k-anonymity over. When multiple fields are - # specified, they are considered a single composite key. Structs and - # repeated data types are not supported; however, nested fields are - # supported so long as they are not structs themselves or nested within - # a repeated field. - # @!attribute [rw] entity_id - # @return [::Google::Cloud::Dlp::V2::EntityId] - # Message indicating that multiple rows might be associated to a - # single individual. If the same entity_id is associated to multiple - # quasi-identifier tuples over distinct rows, we consider the entire - # collection of tuples as the composite quasi-identifier. This collection - # is a multiset: the order in which the different tuples appear in the - # dataset is ignored, but their frequency is taken into account. - # - # Important note: a maximum of 1000 rows can be associated to a single - # entity ID. If more rows are associated with the same entity ID, some - # might be ignored. - class KAnonymityConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # l-diversity metric, used for analysis of reidentification risk. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Set of quasi-identifiers indicating how equivalence classes are - # defined for the l-diversity computation. When multiple fields are - # specified, they are considered a single composite key. - # @!attribute [rw] sensitive_attribute - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Sensitive field for computing the l-value. - class LDiversityConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reidentifiability metric. This corresponds to a risk model similar to what - # is called "journalist risk" in the literature, except the attack dataset is - # statistically modeled instead of being perfectly known. This can be done - # using publicly available data (like the US Census), or using a custom - # statistical model (indicated as one or several BigQuery tables), or by - # extrapolating from the distribution of values in the input dataset. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>] - # Required. Fields considered to be quasi-identifiers. No two columns can - # have the same tag. - # @!attribute [rw] region_code - # @return [::String] - # ISO 3166-1 alpha-2 region code to use in the statistical modeling. - # Set if no column is tagged with a region-specific InfoType (like - # US_ZIP_5) or a region code. - # @!attribute [rw] auxiliary_tables - # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>] - # Several auxiliary tables can be used in the analysis. Each custom_tag - # used to tag a quasi-identifiers column must appear in exactly one column - # of one auxiliary table. - class KMapEstimationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A column with a semantic tag attached. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Required. Identifies the column. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # A column can be tagged with a InfoType to use the relevant public - # dataset as a statistical model of population, if available. We - # currently support US ZIP codes, region codes, ages and genders. - # To programmatically obtain the list of supported InfoTypes, use - # ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - # - # Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_tag - # @return [::String] - # A column can be tagged with a custom tag. In this case, the user must - # indicate an auxiliary table that contains statistical information on - # the possible values of this column. - # - # Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] inferred - # @return [::Google::Protobuf::Empty] - # If no semantic tag is indicated, we infer the statistical model from - # the distribution of values in the input data - # - # Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TaggedField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An auxiliary table contains statistical information on the relative - # frequency of different quasi-identifiers values. It has one or several - # quasi-identifiers columns, and one column that indicates the relative - # frequency of each quasi-identifier tuple. - # If a tuple is present in the data but not in the auxiliary table, the - # corresponding relative frequency is assumed to be zero (and thus, the - # tuple is highly reidentifiable). - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Required. Auxiliary table location. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>] - # Required. Quasi-identifier columns. - # @!attribute [rw] relative_frequency - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Required. The relative frequency column must contain a floating-point - # number between 0 and 1 (inclusive). Null values are assumed to be zero. - class AuxiliaryTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A quasi-identifier column has a custom_tag, used to know which column - # in the data corresponds to which column in the statistical model. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Identifies the column. - # @!attribute [rw] custom_tag - # @return [::String] - # A auxiliary field. - class QuasiIdField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # δ-presence metric, used to estimate how likely it is for an attacker to - # figure out that one given individual appears in a de-identified dataset. - # Similarly to the k-map metric, we cannot compute δ-presence exactly without - # knowing the attack dataset, so we use a statistical model instead. - # @!attribute [rw] quasi_ids - # @return [::Array<::Google::Cloud::Dlp::V2::QuasiId>] - # Required. Fields considered to be quasi-identifiers. No two fields can - # have the same tag. - # @!attribute [rw] region_code - # @return [::String] - # ISO 3166-1 alpha-2 region code to use in the statistical modeling. - # Set if no column is tagged with a region-specific InfoType (like - # US_ZIP_5) or a region code. - # @!attribute [rw] auxiliary_tables - # @return [::Array<::Google::Cloud::Dlp::V2::StatisticalTable>] - # Several auxiliary tables can be used in the analysis. Each custom_tag - # used to tag a quasi-identifiers field must appear in exactly one - # field of one auxiliary table. - class DeltaPresenceEstimationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of a risk analysis operation request. - # @!attribute [rw] requested_privacy_metric - # @return [::Google::Cloud::Dlp::V2::PrivacyMetric] - # Privacy metric to compute. - # @!attribute [rw] requested_source_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Input dataset to compute metrics over. - # @!attribute [rw] numerical_stats_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::NumericalStatsResult] - # Numerical stats result - # - # Note: The following fields are mutually exclusive: `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] categorical_stats_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult] - # Categorical stats result - # - # Note: The following fields are mutually exclusive: `categorical_stats_result`, `numerical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] k_anonymity_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult] - # K-anonymity result - # - # Note: The following fields are mutually exclusive: `k_anonymity_result`, `numerical_stats_result`, `categorical_stats_result`, `l_diversity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] l_diversity_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult] - # L-divesity result - # - # Note: The following fields are mutually exclusive: `l_diversity_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `k_map_estimation_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] k_map_estimation_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult] - # K-map result - # - # Note: The following fields are mutually exclusive: `k_map_estimation_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `delta_presence_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delta_presence_estimation_result - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult] - # Delta-presence result - # - # Note: The following fields are mutually exclusive: `delta_presence_estimation_result`, `numerical_stats_result`, `categorical_stats_result`, `k_anonymity_result`, `l_diversity_result`, `k_map_estimation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] requested_options - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::RequestedRiskAnalysisOptions] - # The configuration used for this job. - class AnalyzeDataSourceRiskDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result of the numerical stats computation. - # @!attribute [rw] min_value - # @return [::Google::Cloud::Dlp::V2::Value] - # Minimum value appearing in the column. - # @!attribute [rw] max_value - # @return [::Google::Cloud::Dlp::V2::Value] - # Maximum value appearing in the column. - # @!attribute [rw] quantile_values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # List of 99 values that partition the set of field values into 100 equal - # sized buckets. - class NumericalStatsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result of the categorical stats computation. - # @!attribute [rw] value_frequency_histogram_buckets - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::CategoricalStatsResult::CategoricalStatsHistogramBucket>] - # Histogram of value frequencies in the column. - class CategoricalStatsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Histogram of value frequencies in the column. - # @!attribute [rw] value_frequency_lower_bound - # @return [::Integer] - # Lower bound on the value frequency of the values in this bucket. - # @!attribute [rw] value_frequency_upper_bound - # @return [::Integer] - # Upper bound on the value frequency of the values in this bucket. - # @!attribute [rw] bucket_size - # @return [::Integer] - # Total number of values in this bucket. - # @!attribute [rw] bucket_values - # @return [::Array<::Google::Cloud::Dlp::V2::ValueFrequency>] - # Sample of value frequencies in this bucket. The total number of - # values returned per bucket is capped at 20. - # @!attribute [rw] bucket_value_count - # @return [::Integer] - # Total number of distinct values in this bucket. - class CategoricalStatsHistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the k-anonymity computation. - # @!attribute [rw] equivalence_class_histogram_buckets - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityHistogramBucket>] - # Histogram of k-anonymity equivalence classes. - class KAnonymityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The set of columns' values that share the same ldiversity value - # @!attribute [rw] quasi_ids_values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # Set of values defining the equivalence class. One value per - # quasi-identifier column in the original KAnonymity metric message. - # The order is always the same as the original request. - # @!attribute [rw] equivalence_class_size - # @return [::Integer] - # Size of the equivalence class, for example number of rows with the - # above set of values. - class KAnonymityEquivalenceClass - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Histogram of k-anonymity equivalence classes. - # @!attribute [rw] equivalence_class_size_lower_bound - # @return [::Integer] - # Lower bound on the size of the equivalence classes in this bucket. - # @!attribute [rw] equivalence_class_size_upper_bound - # @return [::Integer] - # Upper bound on the size of the equivalence classes in this bucket. - # @!attribute [rw] bucket_size - # @return [::Integer] - # Total number of equivalence classes in this bucket. - # @!attribute [rw] bucket_values - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KAnonymityResult::KAnonymityEquivalenceClass>] - # Sample of equivalence classes in this bucket. The total number of - # classes returned per bucket is capped at 20. - # @!attribute [rw] bucket_value_count - # @return [::Integer] - # Total number of distinct equivalence classes in this bucket. - class KAnonymityHistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the l-diversity computation. - # @!attribute [rw] sensitive_value_frequency_histogram_buckets - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityHistogramBucket>] - # Histogram of l-diversity equivalence class sensitive value frequencies. - class LDiversityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The set of columns' values that share the same ldiversity value. - # @!attribute [rw] quasi_ids_values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # Quasi-identifier values defining the k-anonymity equivalence - # class. The order is always the same as the original request. - # @!attribute [rw] equivalence_class_size - # @return [::Integer] - # Size of the k-anonymity equivalence class. - # @!attribute [rw] num_distinct_sensitive_values - # @return [::Integer] - # Number of distinct sensitive values in this equivalence class. - # @!attribute [rw] top_sensitive_values - # @return [::Array<::Google::Cloud::Dlp::V2::ValueFrequency>] - # Estimated frequencies of top sensitive values. - class LDiversityEquivalenceClass - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Histogram of l-diversity equivalence class sensitive value frequencies. - # @!attribute [rw] sensitive_value_frequency_lower_bound - # @return [::Integer] - # Lower bound on the sensitive value frequencies of the equivalence - # classes in this bucket. - # @!attribute [rw] sensitive_value_frequency_upper_bound - # @return [::Integer] - # Upper bound on the sensitive value frequencies of the equivalence - # classes in this bucket. - # @!attribute [rw] bucket_size - # @return [::Integer] - # Total number of equivalence classes in this bucket. - # @!attribute [rw] bucket_values - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::LDiversityResult::LDiversityEquivalenceClass>] - # Sample of equivalence classes in this bucket. The total number of - # classes returned per bucket is capped at 20. - # @!attribute [rw] bucket_value_count - # @return [::Integer] - # Total number of distinct equivalence classes in this bucket. - class LDiversityHistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the reidentifiability analysis. Note that these results are an - # estimation, not exact values. - # @!attribute [rw] k_map_estimation_histogram - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationHistogramBucket>] - # The intervals [min_anonymity, max_anonymity] do not overlap. If a value - # doesn't correspond to any such interval, the associated frequency is - # zero. For example, the following records: - # \\{min_anonymity: 1, max_anonymity: 1, frequency: 17} - # \\{min_anonymity: 2, max_anonymity: 3, frequency: 42} - # \\{min_anonymity: 5, max_anonymity: 10, frequency: 99} - # mean that there are no record with an estimated anonymity of 4, 5, or - # larger than 10. - class KMapEstimationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A tuple of values for the quasi-identifier columns. - # @!attribute [rw] quasi_ids_values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # The quasi-identifier values. - # @!attribute [rw] estimated_anonymity - # @return [::Integer] - # The estimated anonymity for these quasi-identifier values. - class KMapEstimationQuasiIdValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A KMapEstimationHistogramBucket message with the following values: - # min_anonymity: 3 - # max_anonymity: 5 - # frequency: 42 - # means that there are 42 records whose quasi-identifier values correspond - # to 3, 4 or 5 people in the overlying population. An important particular - # case is when min_anonymity = max_anonymity = 1: the frequency field then - # corresponds to the number of uniquely identifiable records. - # @!attribute [rw] min_anonymity - # @return [::Integer] - # Always positive. - # @!attribute [rw] max_anonymity - # @return [::Integer] - # Always greater than or equal to min_anonymity. - # @!attribute [rw] bucket_size - # @return [::Integer] - # Number of records within these anonymity bounds. - # @!attribute [rw] bucket_values - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::KMapEstimationResult::KMapEstimationQuasiIdValues>] - # Sample of quasi-identifier tuple values in this bucket. The total - # number of classes returned per bucket is capped at 20. - # @!attribute [rw] bucket_value_count - # @return [::Integer] - # Total number of distinct quasi-identifier tuple values in this bucket. - class KMapEstimationHistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the δ-presence computation. Note that these results are an - # estimation, not exact values. - # @!attribute [rw] delta_presence_estimation_histogram - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationHistogramBucket>] - # The intervals [min_probability, max_probability) do not overlap. If a - # value doesn't correspond to any such interval, the associated frequency - # is zero. For example, the following records: - # \\{min_probability: 0, max_probability: 0.1, frequency: 17} - # \\{min_probability: 0.2, max_probability: 0.3, frequency: 42} - # \\{min_probability: 0.3, max_probability: 0.4, frequency: 99} - # mean that there are no record with an estimated probability in [0.1, 0.2) - # nor larger or equal to 0.4. - class DeltaPresenceEstimationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A tuple of values for the quasi-identifier columns. - # @!attribute [rw] quasi_ids_values - # @return [::Array<::Google::Cloud::Dlp::V2::Value>] - # The quasi-identifier values. - # @!attribute [rw] estimated_probability - # @return [::Float] - # The estimated probability that a given individual sharing these - # quasi-identifier values is in the dataset. This value, typically - # called δ, is the ratio between the number of records in the dataset - # with these quasi-identifier values, and the total number of individuals - # (inside *and* outside the dataset) with these quasi-identifier values. - # For example, if there are 15 individuals in the dataset who share the - # same quasi-identifier values, and an estimated 100 people in the entire - # population with these values, then δ is 0.15. - class DeltaPresenceEstimationQuasiIdValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DeltaPresenceEstimationHistogramBucket message with the following - # values: - # min_probability: 0.1 - # max_probability: 0.2 - # frequency: 42 - # means that there are 42 records for which δ is in [0.1, 0.2). An - # important particular case is when min_probability = max_probability = 1: - # then, every individual who shares this quasi-identifier combination is in - # the dataset. - # @!attribute [rw] min_probability - # @return [::Float] - # Between 0 and 1. - # @!attribute [rw] max_probability - # @return [::Float] - # Always greater than or equal to min_probability. - # @!attribute [rw] bucket_size - # @return [::Integer] - # Number of records within these probability bounds. - # @!attribute [rw] bucket_values - # @return [::Array<::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails::DeltaPresenceEstimationResult::DeltaPresenceEstimationQuasiIdValues>] - # Sample of quasi-identifier tuple values in this bucket. The total - # number of classes returned per bucket is capped at 20. - # @!attribute [rw] bucket_value_count - # @return [::Integer] - # Total number of distinct quasi-identifier tuple values in this bucket. - class DeltaPresenceEstimationHistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Risk analysis options. - # @!attribute [rw] job_config - # @return [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig] - # The job config for the risk job. - class RequestedRiskAnalysisOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A value of a field, including its frequency. - # @!attribute [rw] value - # @return [::Google::Cloud::Dlp::V2::Value] - # A value contained in the field in question. - # @!attribute [rw] count - # @return [::Integer] - # How many times the value is contained in the field. - class ValueFrequency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of primitive values supported by the system. - # Note that for the purposes of inspection or transformation, the number - # of bytes considered to comprise a 'Value' is based on its representation - # as a UTF-8 encoded string. For example, if 'integer_value' is set to - # 123456789, the number of bytes would be counted as 9, even though an - # int64 only holds up to 8 bytes of data. - # @!attribute [rw] integer_value - # @return [::Integer] - # integer - # - # Note: The following fields are mutually exclusive: `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] float_value - # @return [::Float] - # float - # - # Note: The following fields are mutually exclusive: `float_value`, `integer_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # string - # - # Note: The following fields are mutually exclusive: `string_value`, `integer_value`, `float_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] boolean_value - # @return [::Boolean] - # boolean - # - # Note: The following fields are mutually exclusive: `boolean_value`, `integer_value`, `float_value`, `string_value`, `timestamp_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_value - # @return [::Google::Protobuf::Timestamp] - # timestamp - # - # Note: The following fields are mutually exclusive: `timestamp_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `time_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_value - # @return [::Google::Type::TimeOfDay] - # time of day - # - # Note: The following fields are mutually exclusive: `time_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `date_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_value - # @return [::Google::Type::Date] - # date - # - # Note: The following fields are mutually exclusive: `date_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `day_of_week_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] day_of_week_value - # @return [::Google::Type::DayOfWeek] - # day of week - # - # Note: The following fields are mutually exclusive: `day_of_week_value`, `integer_value`, `float_value`, `string_value`, `boolean_value`, `timestamp_value`, `time_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for infoType-dependent details parsed from quote. - # @!attribute [rw] date_time - # @return [::Google::Cloud::Dlp::V2::DateTime] - # The date time indicated by the quote. - class QuoteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for a date time object. - # e.g. 2018-01-01, 5th August. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # One or more of the following must be set. - # Must be a valid date or time value. - # @!attribute [rw] day_of_week - # @return [::Google::Type::DayOfWeek] - # Day of week - # @!attribute [rw] time - # @return [::Google::Type::TimeOfDay] - # Time of day - # @!attribute [rw] time_zone - # @return [::Google::Cloud::Dlp::V2::DateTime::TimeZone] - # Time zone - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Time zone of the date time object. - # @!attribute [rw] offset_minutes - # @return [::Integer] - # Set only if the offset can be determined. Positive for time ahead of UTC. - # E.g. For "UTC-9", this value is -540. - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The configuration that controls how the data will change. - # @!attribute [rw] info_type_transformations - # @return [::Google::Cloud::Dlp::V2::InfoTypeTransformations] - # Treat the dataset as free-form text and apply the same free text - # transformation everywhere. - # - # Note: The following fields are mutually exclusive: `info_type_transformations`, `record_transformations`, `image_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] record_transformations - # @return [::Google::Cloud::Dlp::V2::RecordTransformations] - # Treat the dataset as structured. Transformations can be applied to - # specific locations within structured datasets, such as transforming - # a column within a table. - # - # Note: The following fields are mutually exclusive: `record_transformations`, `info_type_transformations`, `image_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_transformations - # @return [::Google::Cloud::Dlp::V2::ImageTransformations] - # Treat the dataset as an image and redact. - # - # Note: The following fields are mutually exclusive: `image_transformations`, `info_type_transformations`, `record_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] transformation_error_handling - # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling] - # Mode for handling transformation errors. If left unspecified, the default - # mode is `TransformationErrorHandling.ThrowError`. - class DeidentifyConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A type of transformation that is applied over images. - # @!attribute [rw] transforms - # @return [::Array<::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation>] - # List of transforms to make. - class ImageTransformations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for determining how redaction of images should occur. - # @!attribute [rw] selected_info_types - # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::SelectedInfoTypes] - # Apply transformation to the selected info_types. - # - # Note: The following fields are mutually exclusive: `selected_info_types`, `all_info_types`, `all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] all_info_types - # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::AllInfoTypes] - # Apply transformation to all findings not specified in other - # ImageTransformation's selected_info_types. Only one instance is allowed - # within the ImageTransformations message. - # - # Note: The following fields are mutually exclusive: `all_info_types`, `selected_info_types`, `all_text`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] all_text - # @return [::Google::Cloud::Dlp::V2::ImageTransformations::ImageTransformation::AllText] - # Apply transformation to all text that doesn't match an infoType. Only - # one instance is allowed within the ImageTransformations message. - # - # Note: The following fields are mutually exclusive: `all_text`, `selected_info_types`, `all_info_types`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redaction_color - # @return [::Google::Cloud::Dlp::V2::Color] - # The color to use when redacting content from an image. If not - # specified, the default is black. - class ImageTransformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Apply transformation to the selected info_types. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # Required. InfoTypes to apply the transformation to. Required. Provided - # InfoType must be unique within the ImageTransformations message. - class SelectedInfoTypes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Apply transformation to all findings. - class AllInfoTypes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Apply to all text. - class AllText - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # How to handle transformation errors during de-identification. A - # transformation error occurs when the requested transformation is incompatible - # with the data. For example, trying to de-identify an IP address using a - # `DateShift` transformation would result in a transformation error, since date - # info cannot be extracted from an IP address. - # Information about any incompatible transformations, and how they were - # handled, is returned in the response as part of the - # `TransformationOverviews`. - # @!attribute [rw] throw_error - # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling::ThrowError] - # Throw an error - # - # Note: The following fields are mutually exclusive: `throw_error`, `leave_untransformed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] leave_untransformed - # @return [::Google::Cloud::Dlp::V2::TransformationErrorHandling::LeaveUntransformed] - # Ignore errors - # - # Note: The following fields are mutually exclusive: `leave_untransformed`, `throw_error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TransformationErrorHandling - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Throw an error and fail the request when a transformation error occurs. - class ThrowError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Skips the data without modifying it if the requested transformation would - # cause an error. For example, if a `DateShift` transformation were applied - # an an IP address, this mode would leave the IP address unchanged in the - # response. - class LeaveUntransformed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A rule for transforming a value. - # @!attribute [rw] replace_config - # @return [::Google::Cloud::Dlp::V2::ReplaceValueConfig] - # Replace with a specified value. - # - # Note: The following fields are mutually exclusive: `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redact_config - # @return [::Google::Cloud::Dlp::V2::RedactConfig] - # Redact - # - # Note: The following fields are mutually exclusive: `redact_config`, `replace_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] character_mask_config - # @return [::Google::Cloud::Dlp::V2::CharacterMaskConfig] - # Mask - # - # Note: The following fields are mutually exclusive: `character_mask_config`, `replace_config`, `redact_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] crypto_replace_ffx_fpe_config - # @return [::Google::Cloud::Dlp::V2::CryptoReplaceFfxFpeConfig] - # Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig - # instead. Fpe is computationally expensive incurring latency costs. - # - # Note: The following fields are mutually exclusive: `crypto_replace_ffx_fpe_config`, `replace_config`, `redact_config`, `character_mask_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fixed_size_bucketing_config - # @return [::Google::Cloud::Dlp::V2::FixedSizeBucketingConfig] - # Fixed size bucketing - # - # Note: The following fields are mutually exclusive: `fixed_size_bucketing_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bucketing_config - # @return [::Google::Cloud::Dlp::V2::BucketingConfig] - # Bucketing - # - # Note: The following fields are mutually exclusive: `bucketing_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] replace_with_info_type_config - # @return [::Google::Cloud::Dlp::V2::ReplaceWithInfoTypeConfig] - # Replace with infotype - # - # Note: The following fields are mutually exclusive: `replace_with_info_type_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_part_config - # @return [::Google::Cloud::Dlp::V2::TimePartConfig] - # Time extraction - # - # Note: The following fields are mutually exclusive: `time_part_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] crypto_hash_config - # @return [::Google::Cloud::Dlp::V2::CryptoHashConfig] - # Crypto - # - # Note: The following fields are mutually exclusive: `crypto_hash_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `date_shift_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_shift_config - # @return [::Google::Cloud::Dlp::V2::DateShiftConfig] - # Date Shift - # - # Note: The following fields are mutually exclusive: `date_shift_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `crypto_deterministic_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] crypto_deterministic_config - # @return [::Google::Cloud::Dlp::V2::CryptoDeterministicConfig] - # Deterministic Crypto - # - # Note: The following fields are mutually exclusive: `crypto_deterministic_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `replace_dictionary_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] replace_dictionary_config - # @return [::Google::Cloud::Dlp::V2::ReplaceDictionaryConfig] - # Replace with a value randomly drawn (with replacement) from a dictionary. - # - # Note: The following fields are mutually exclusive: `replace_dictionary_config`, `replace_config`, `redact_config`, `character_mask_config`, `crypto_replace_ffx_fpe_config`, `fixed_size_bucketing_config`, `bucketing_config`, `replace_with_info_type_config`, `time_part_config`, `crypto_hash_config`, `date_shift_config`, `crypto_deterministic_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PrimitiveTransformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a - # portion of the value. - # @!attribute [rw] part_to_extract - # @return [::Google::Cloud::Dlp::V2::TimePartConfig::TimePart] - # The part of the time to keep. - class TimePartConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Components that make up time. - module TimePart - # Unused - TIME_PART_UNSPECIFIED = 0 - - # [0-9999] - YEAR = 1 - - # [1-12] - MONTH = 2 - - # [1-31] - DAY_OF_MONTH = 3 - - # [1-7] - DAY_OF_WEEK = 4 - - # [1-53] - WEEK_OF_YEAR = 5 - - # [0-23] - HOUR_OF_DAY = 6 - end - end - - # Pseudonymization method that generates surrogates via cryptographic hashing. - # Uses SHA-256. - # The key size must be either 32 or 64 bytes. - # Outputs a base64 encoded representation of the hashed output - # (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). - # Currently, only string and integer values can be hashed. - # See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization - # to learn more. - # @!attribute [rw] crypto_key - # @return [::Google::Cloud::Dlp::V2::CryptoKey] - # The key used by the hash function. - class CryptoHashConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pseudonymization method that generates deterministic encryption for the given - # input. Outputs a base64 encoded representation of the encrypted output. - # Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. - # @!attribute [rw] crypto_key - # @return [::Google::Cloud::Dlp::V2::CryptoKey] - # The key used by the encryption function. For deterministic encryption - # using AES-SIV, the provided key is internally expanded to 64 bytes prior to - # use. - # @!attribute [rw] surrogate_info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The custom info type to annotate the surrogate with. - # This annotation will be applied to the surrogate by prefixing it with - # the name of the custom info type followed by the number of - # characters comprising the surrogate. The following scheme defines the - # format: \\{info type name}(\\{surrogate character count}):\\{surrogate} - # - # For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and - # the surrogate is 'abc', the full replacement value - # will be: 'MY_TOKEN_INFO_TYPE(3):abc' - # - # This annotation identifies the surrogate when inspecting content using the - # custom info type 'Surrogate'. This facilitates reversal of the - # surrogate when it occurs in free text. - # - # Note: For record transformations where the entire cell in a table is being - # transformed, surrogates are not mandatory. Surrogates are used to denote - # the location of the token and are necessary for re-identification in free - # form text. - # - # In order for inspection to work properly, the name of this info type must - # not occur naturally anywhere in your data; otherwise, inspection may either - # - # - reverse a surrogate that does not correspond to an actual identifier - # - be unable to parse the surrogate and result in an error - # - # Therefore, choose your custom info type name carefully after considering - # what your data looks like. One way to select a name that has a high chance - # of yielding reliable detection is to include one or more unicode characters - # that are highly improbable to exist in your data. - # For example, assuming your data is entered from a regular ASCII keyboard, - # the symbol with the hex code point 29DD might be used like so: - # ⧝MY_TOKEN_TYPE. - # @!attribute [rw] context - # @return [::Google::Cloud::Dlp::V2::FieldId] - # A context may be used for higher security and maintaining - # referential integrity such that the same identifier in two different - # contexts will be given a distinct surrogate. The context is appended to - # plaintext value being encrypted. On decryption the provided context is - # validated against the value used during encryption. If a context was - # provided during encryption, same context must be provided during decryption - # as well. - # - # If the context is not set, plaintext would be used as is for encryption. - # If the context is set but: - # - # 1. there is no record present when transforming a given value or - # 2. the field is not present when transforming a given value, - # - # plaintext would be used as is for encryption. - # - # Note that case (1) is expected when an `InfoTypeTransformation` is - # applied to both structured and unstructured `ContentItem`s. - class CryptoDeterministicConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Replace each input value with a given `Value`. - # @!attribute [rw] new_value - # @return [::Google::Cloud::Dlp::V2::Value] - # Value to replace it with. - class ReplaceValueConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Replace each input value with a value randomly selected from the dictionary. - # @!attribute [rw] word_list - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList] - # A list of words to select from for random replacement. The - # [limits](https://cloud.google.com/sensitive-data-protection/limits) page - # contains details about the size limits of dictionaries. - class ReplaceDictionaryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Replace each matching finding with the name of the info_type. - class ReplaceWithInfoTypeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Redact a given value. For example, if used with an `InfoTypeTransformation` - # transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the - # output would be 'My phone number is '. - class RedactConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Characters to skip when doing deidentification of a value. These will be left - # alone and skipped. - # @!attribute [rw] characters_to_skip - # @return [::String] - # Characters to not transform when masking. - # - # Note: The following fields are mutually exclusive: `characters_to_skip`, `common_characters_to_ignore`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] common_characters_to_ignore - # @return [::Google::Cloud::Dlp::V2::CharsToIgnore::CommonCharsToIgnore] - # Common characters to not transform when masking. Useful to avoid removing - # punctuation. - # - # Note: The following fields are mutually exclusive: `common_characters_to_ignore`, `characters_to_skip`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CharsToIgnore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Convenience enum for indicating common characters to not transform. - module CommonCharsToIgnore - # Unused. - COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0 - - # 0-9 - NUMERIC = 1 - - # A-Z - ALPHA_UPPER_CASE = 2 - - # a-z - ALPHA_LOWER_CASE = 3 - - # US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ - PUNCTUATION = 4 - - # Whitespace character, one of [ \t\n\x0B\f\r] - WHITESPACE = 5 - end - end - - # Partially mask a string by replacing a given number of characters with a - # fixed character. Masking can start from the beginning or end of the string. - # This can be used on data of any type (numbers, longs, and so on) and when - # de-identifying structured data we'll attempt to preserve the original data's - # type. (This allows you to take a long like 123 and modify it to a string like - # **3. - # @!attribute [rw] masking_character - # @return [::String] - # Character to use to mask the sensitive values—for example, `*` for an - # alphabetic string such as a name, or `0` for a numeric string such as ZIP - # code or credit card number. This string must have a length of 1. If not - # supplied, this value defaults to `*` for strings, and `0` for digits. - # @!attribute [rw] number_to_mask - # @return [::Integer] - # Number of characters to mask. If not set, all matching chars will be - # masked. Skipped characters do not count towards this tally. - # - # If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP - # masks all but a number of characters. - # For example, suppose you have the following values: - # - # - `masking_character` is `*` - # - `number_to_mask` is `-4` - # - `reverse_order` is `false` - # - `CharsToIgnore` includes `-` - # - Input string is `1234-5678-9012-3456` - # - # The resulting de-identified string is - # `****-****-****-3456`. Cloud DLP masks all but the last four characters. - # If `reverse_order` is `true`, all but the first four characters are masked - # as `1234-****-****-****`. - # @!attribute [rw] reverse_order - # @return [::Boolean] - # Mask characters in reverse order. For example, if `masking_character` is - # `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the - # input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. - # If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` - # is `true`, then the string `12345` is masked as `12***`. - # @!attribute [rw] characters_to_ignore - # @return [::Array<::Google::Cloud::Dlp::V2::CharsToIgnore>] - # When masking a string, items in this list will be skipped when replacing - # characters. For example, if the input string is `555-555-5555` and you - # instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP - # returns `***-**5-5555`. - class CharacterMaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Buckets values based on fixed size ranges. The - # Bucketing transformation can provide all of this functionality, - # but requires more configuration. This message is provided as a convenience to - # the user for simple bucketing strategies. - # - # The transformed value will be a hyphenated string of - # \\{lower_bound}-\\{upper_bound}. For example, if lower_bound = 10 and upper_bound - # = 20, all values that are within this bucket will be replaced with "10-20". - # - # This can be used on data of type: double, long. - # - # If the bound Value type differs from the type of data - # being transformed, we will first attempt converting the type of the data to - # be transformed to match the type of the bound before comparing. - # - # See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to - # learn more. - # @!attribute [rw] lower_bound - # @return [::Google::Cloud::Dlp::V2::Value] - # Required. Lower bound value of buckets. All values less than `lower_bound` - # are grouped together into a single bucket; for example if `lower_bound` = - # 10, then all values less than 10 are replaced with the value "-10". - # @!attribute [rw] upper_bound - # @return [::Google::Cloud::Dlp::V2::Value] - # Required. Upper bound value of buckets. All values greater than upper_bound - # are grouped together into a single bucket; for example if `upper_bound` = - # 89, then all values greater than 89 are replaced with the value "89+". - # @!attribute [rw] bucket_size - # @return [::Float] - # Required. Size of each bucket (except for minimum and maximum buckets). So - # if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the - # following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - # 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. - class FixedSizeBucketingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generalization function that buckets values based on ranges. The ranges and - # replacement values are dynamically provided by the user for custom behavior, - # such as 1-30 -> LOW, 31-65 -> MEDIUM, 66-100 -> HIGH. - # - # This can be used on data of type: number, long, string, timestamp. - # - # If the bound `Value` type differs from the type of data being transformed, we - # will first attempt converting the type of the data to be transformed to match - # the type of the bound before comparing. - # See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to - # learn more. - # @!attribute [rw] buckets - # @return [::Array<::Google::Cloud::Dlp::V2::BucketingConfig::Bucket>] - # Set of buckets. Ranges must be non-overlapping. - class BucketingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Bucket is represented as a range, along with replacement values. - # @!attribute [rw] min - # @return [::Google::Cloud::Dlp::V2::Value] - # Lower bound of the range, inclusive. Type should be the same as max if - # used. - # @!attribute [rw] max - # @return [::Google::Cloud::Dlp::V2::Value] - # Upper bound of the range, exclusive; type must match min. - # @!attribute [rw] replacement_value - # @return [::Google::Cloud::Dlp::V2::Value] - # Required. Replacement value for this bucket. - class Bucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Replaces an identifier with a surrogate using Format Preserving Encryption - # (FPE) with the FFX mode of operation; however when used in the - # `ReidentifyContent` API method, it serves the opposite function by reversing - # the surrogate back into the original identifier. The identifier must be - # encoded as ASCII. For a given crypto key and context, the same identifier - # will be replaced with the same surrogate. Identifiers must be at least two - # characters long. In the case that the identifier is the empty string, it will - # be skipped. See - # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization to - # learn more. - # - # Note: We recommend using CryptoDeterministicConfig for all use cases which - # do not require preserving the input alphabet space and size, plus warrant - # referential integrity. FPE incurs significant latency costs. - # @!attribute [rw] crypto_key - # @return [::Google::Cloud::Dlp::V2::CryptoKey] - # Required. The key used by the encryption algorithm. - # @!attribute [rw] context - # @return [::Google::Cloud::Dlp::V2::FieldId] - # The 'tweak', a context may be used for higher security since the same - # identifier in two different contexts won't be given the same surrogate. If - # the context is not set, a default tweak will be used. - # - # If the context is set but: - # - # 1. there is no record present when transforming a given value or - # 1. the field is not present when transforming a given value, - # - # a default tweak will be used. - # - # Note that case (1) is expected when an `InfoTypeTransformation` is - # applied to both structured and unstructured `ContentItem`s. - # Currently, the referenced field may be of value type integer or string. - # - # The tweak is constructed as a sequence of bytes in big endian byte order - # such that: - # - # - a 64 bit integer is encoded followed by a single byte of value 1 - # - a string is encoded in UTF-8 format followed by a single byte of value 2 - # @!attribute [rw] common_alphabet - # @return [::Google::Cloud::Dlp::V2::CryptoReplaceFfxFpeConfig::FfxCommonNativeAlphabet] - # Common alphabets. - # - # Note: The following fields are mutually exclusive: `common_alphabet`, `custom_alphabet`, `radix`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_alphabet - # @return [::String] - # This is supported by mapping these to the alphanumeric characters - # that the FFX mode natively supports. This happens before/after - # encryption/decryption. - # Each character listed must appear only once. - # Number of characters must be in the range [2, 95]. - # This must be encoded as ASCII. - # The order of characters does not matter. - # The full list of allowed characters is: - # ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/`` - # - # Note: The following fields are mutually exclusive: `custom_alphabet`, `common_alphabet`, `radix`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] radix - # @return [::Integer] - # The native way to select the alphabet. Must be in the range [2, 95]. - # - # Note: The following fields are mutually exclusive: `radix`, `common_alphabet`, `custom_alphabet`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] surrogate_info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The custom infoType to annotate the surrogate with. - # This annotation will be applied to the surrogate by prefixing it with - # the name of the custom infoType followed by the number of - # characters comprising the surrogate. The following scheme defines the - # format: info_type_name(surrogate_character_count):surrogate - # - # For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and - # the surrogate is 'abc', the full replacement value - # will be: 'MY_TOKEN_INFO_TYPE(3):abc' - # - # This annotation identifies the surrogate when inspecting content using the - # custom infoType - # [`SurrogateType`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#surrogatetype). - # This facilitates reversal of the surrogate when it occurs in free text. - # - # In order for inspection to work properly, the name of this infoType must - # not occur naturally anywhere in your data; otherwise, inspection may - # find a surrogate that does not correspond to an actual identifier. - # Therefore, choose your custom infoType name carefully after considering - # what your data looks like. One way to select a name that has a high chance - # of yielding reliable detection is to include one or more unicode characters - # that are highly improbable to exist in your data. - # For example, assuming your data is entered from a regular ASCII keyboard, - # the symbol with the hex code point 29DD might be used like so: - # ⧝MY_TOKEN_TYPE - class CryptoReplaceFfxFpeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # These are commonly used subsets of the alphabet that the FFX mode - # natively supports. In the algorithm, the alphabet is selected using - # the "radix". Therefore each corresponds to a particular radix. - module FfxCommonNativeAlphabet - # Unused. - FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0 - - # `[0-9]` (radix of 10) - NUMERIC = 1 - - # `[0-9A-F]` (radix of 16) - HEXADECIMAL = 2 - - # `[0-9A-Z]` (radix of 36) - UPPER_CASE_ALPHA_NUMERIC = 3 - - # `[0-9A-Za-z]` (radix of 62) - ALPHA_NUMERIC = 4 - end - end - - # This is a data encryption key (DEK) (as opposed to - # a key encryption key (KEK) stored by Cloud Key Management Service - # (Cloud KMS). - # When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate - # IAM policy on the KEK to ensure an attacker cannot - # unwrap the DEK. - # @!attribute [rw] transient - # @return [::Google::Cloud::Dlp::V2::TransientCryptoKey] - # Transient crypto key - # - # Note: The following fields are mutually exclusive: `transient`, `unwrapped`, `kms_wrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] unwrapped - # @return [::Google::Cloud::Dlp::V2::UnwrappedCryptoKey] - # Unwrapped crypto key - # - # Note: The following fields are mutually exclusive: `unwrapped`, `transient`, `kms_wrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kms_wrapped - # @return [::Google::Cloud::Dlp::V2::KmsWrappedCryptoKey] - # Key wrapped using Cloud KMS - # - # Note: The following fields are mutually exclusive: `kms_wrapped`, `transient`, `unwrapped`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CryptoKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Use this to have a random data crypto key generated. - # It will be discarded after the request finishes. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the key. - # This is an arbitrary string used to differentiate different keys. - # A unique key is generated per name: two separate `TransientCryptoKey` - # protos share the same generated key if their names are the same. - # When the data crypto key is generated, this name is not used in any way - # (repeating the api call will result in a different key being generated). - class TransientCryptoKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Using raw keys is prone to security risks due to accidentally - # leaking the key. Choose another type of key if possible. - # @!attribute [rw] key - # @return [::String] - # Required. A 128/192/256 bit key. - class UnwrappedCryptoKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Include to use an existing data crypto key wrapped by KMS. - # The wrapped key must be a 128-, 192-, or 256-bit key. - # Authorization requires the following IAM permissions when sending a request - # to perform a crypto transformation using a KMS-wrapped crypto key: - # dlp.kms.encrypt - # - # For more information, see [Creating a wrapped key] - # (https://cloud.google.com/sensitive-data-protection/docs/create-wrapped-key). - # - # Note: When you use Cloud KMS for cryptographic operations, - # [charges apply](https://cloud.google.com/kms/pricing). - # @!attribute [rw] wrapped_key - # @return [::String] - # Required. The wrapped data crypto key. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Required. The resource name of the KMS CryptoKey to use for unwrapping. - class KmsWrappedCryptoKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Shifts dates by random number of days, with option to be consistent for the - # same context. See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting - # to learn more. - # @!attribute [rw] upper_bound_days - # @return [::Integer] - # Required. Range of shift in days. Actual shift will be selected at random - # within this range (inclusive ends). Negative means shift to earlier in - # time. Must not be more than 365250 days (1000 years) each direction. - # - # For example, 3 means shift date to at most 3 days into the future. - # @!attribute [rw] lower_bound_days - # @return [::Integer] - # Required. For example, -5 means shift date to at most 5 days back in the - # past. - # @!attribute [rw] context - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Points to the field that contains the context, for example, an entity id. - # If set, must also set cryptoKey. If set, shift will be consistent for the - # given context. - # @!attribute [rw] crypto_key - # @return [::Google::Cloud::Dlp::V2::CryptoKey] - # Causes the shift to be computed based on this key and the context. This - # results in the same shift for the same context and crypto_key. If - # set, must also set context. Can only be applied to table items. - class DateShiftConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A type of transformation that will scan unstructured text and - # apply various `PrimitiveTransformation`s to each finding, where the - # transformation is applied to only values that were identified as a specific - # info_type. - # @!attribute [rw] transformations - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeTransformations::InfoTypeTransformation>] - # Required. Transformation for each infoType. Cannot specify more than one - # for a given infoType. - class InfoTypeTransformations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A transformation to apply to text that is identified as a specific - # info_type. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoType>] - # InfoTypes to apply the transformation to. An empty list will cause - # this transformation to apply to all findings that correspond to - # infoTypes that were requested in `InspectConfig`. - # @!attribute [rw] primitive_transformation - # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] - # Required. Primitive transformation to apply to the infoType. - class InfoTypeTransformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The transformation to apply to the field. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Required. Input field(s) to apply the transformation to. - # When you have columns that reference their position within a list, - # omit the index from the FieldId. FieldId name matching ignores the index. - # For example, instead of "contact.nums[0].type", use "contact.nums.type". - # @!attribute [rw] condition - # @return [::Google::Cloud::Dlp::V2::RecordCondition] - # Only apply the transformation if the condition evaluates to true for the - # given `RecordCondition`. The conditions are allowed to reference fields - # that are not used in the actual transformation. - # - # Example Use Cases: - # - # - Apply a different bucket transformation to an age column if the zip code - # column for the same record is within a specific range. - # - Redact a field if the date of birth field is greater than 85. - # @!attribute [rw] primitive_transformation - # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] - # Apply the transformation to the entire field. - # - # Note: The following fields are mutually exclusive: `primitive_transformation`, `info_type_transformations`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] info_type_transformations - # @return [::Google::Cloud::Dlp::V2::InfoTypeTransformations] - # Treat the contents of the field as free text, and selectively - # transform content that matches an `InfoType`. - # - # Note: The following fields are mutually exclusive: `info_type_transformations`, `primitive_transformation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class FieldTransformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A type of transformation that is applied over structured data such as a - # table. - # @!attribute [rw] field_transformations - # @return [::Array<::Google::Cloud::Dlp::V2::FieldTransformation>] - # Transform the record by applying various field transformations. - # @!attribute [rw] record_suppressions - # @return [::Array<::Google::Cloud::Dlp::V2::RecordSuppression>] - # Configuration defining which records get suppressed entirely. Records that - # match any suppression rule are omitted from the output. - class RecordTransformations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration to suppress records whose suppression conditions evaluate to - # true. - # @!attribute [rw] condition - # @return [::Google::Cloud::Dlp::V2::RecordCondition] - # A condition that when it evaluates to true will result in the record being - # evaluated to be suppressed from the transformed content. - class RecordSuppression - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A condition for determining whether a transformation should be applied to - # a field. - # @!attribute [rw] expressions - # @return [::Google::Cloud::Dlp::V2::RecordCondition::Expressions] - # An expression. - class RecordCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The field type of `value` and `field` do not need to match to be - # considered equal, but not all comparisons are possible. - # EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, - # but all other comparisons are invalid with incompatible types. - # A `value` of type: - # - # - `string` can be compared against all other types - # - `boolean` can only be compared against other booleans - # - `integer` can be compared against doubles or a string if the string value - # can be parsed as an integer. - # - `double` can be compared against integers or a string if the string can - # be parsed as a double. - # - `Timestamp` can be compared against strings in RFC 3339 date string - # format. - # - `TimeOfDay` can be compared against timestamps and strings in the format - # of 'HH:mm:ss'. - # - # If we fail to compare do to type mismatch, a warning will be given and - # the condition will evaluate to false. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Required. Field within the record this condition is evaluated against. - # @!attribute [rw] operator - # @return [::Google::Cloud::Dlp::V2::RelationalOperator] - # Required. Operator used to compare the field or infoType to the value. - # @!attribute [rw] value - # @return [::Google::Cloud::Dlp::V2::Value] - # Value to compare against. [Mandatory, except for `EXISTS` tests.] - class Condition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of conditions. - # @!attribute [rw] conditions - # @return [::Array<::Google::Cloud::Dlp::V2::RecordCondition::Condition>] - # A collection of conditions. - class Conditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An expression, consisting of an operator and conditions. - # @!attribute [rw] logical_operator - # @return [::Google::Cloud::Dlp::V2::RecordCondition::Expressions::LogicalOperator] - # The operator to apply to the result of conditions. Default and currently - # only supported value is `AND`. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::RecordCondition::Conditions] - # Conditions to apply to the expression. - class Expressions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Logical operators for conditional checks. - module LogicalOperator - # Unused - LOGICAL_OPERATOR_UNSPECIFIED = 0 - - # Conditional AND - AND = 1 - end - end - end - - # Overview of the modifications that occurred. - # @!attribute [rw] transformed_bytes - # @return [::Integer] - # Total size in bytes that were transformed in some way. - # @!attribute [rw] transformation_summaries - # @return [::Array<::Google::Cloud::Dlp::V2::TransformationSummary>] - # Transformations applied to the dataset. - class TransformationOverview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Summary of a single transformation. - # Only one of 'transformation', 'field_transformation', or 'record_suppress' - # will be set. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # Set if the transformation was limited to a specific InfoType. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Set if the transformation was limited to a specific FieldId. - # @!attribute [rw] transformation - # @return [::Google::Cloud::Dlp::V2::PrimitiveTransformation] - # The specific transformation these stats apply to. - # @!attribute [rw] field_transformations - # @return [::Array<::Google::Cloud::Dlp::V2::FieldTransformation>] - # The field transformation that was applied. - # If multiple field transformations are requested for a single field, - # this list will contain all of them; otherwise, only one is supplied. - # @!attribute [rw] record_suppress - # @return [::Google::Cloud::Dlp::V2::RecordSuppression] - # The specific suppression option these stats apply to. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Dlp::V2::TransformationSummary::SummaryResult>] - # Collection of all transformations that took place or had an error. - # @!attribute [rw] transformed_bytes - # @return [::Integer] - # Total size in bytes that were transformed in some way. - class TransformationSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A collection that informs the user the number of times a particular - # `TransformationResultCode` and error details occurred. - # @!attribute [rw] count - # @return [::Integer] - # Number of transformations counted by this result. - # @!attribute [rw] code - # @return [::Google::Cloud::Dlp::V2::TransformationSummary::TransformationResultCode] - # Outcome of the transformation. - # @!attribute [rw] details - # @return [::String] - # A place for warnings or errors to show up if a transformation didn't - # work as expected. - class SummaryResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible outcomes of transformations. - module TransformationResultCode - # Unused - TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0 - - # Transformation completed without an error. - SUCCESS = 1 - - # Transformation had an error. - ERROR = 2 - end - end - - # A flattened description of a `PrimitiveTransformation` or - # `RecordSuppression`. - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::TransformationType] - # The transformation type. - # @!attribute [rw] description - # @return [::String] - # A description of the transformation. This is empty for a - # RECORD_SUPPRESSION, or is the output of calling toString() on the - # `PrimitiveTransformation` protocol buffer message for any other type of - # transformation. - # @!attribute [rw] condition - # @return [::String] - # A human-readable string representation of the `RecordCondition` - # corresponding to this transformation. Set if a `RecordCondition` was used - # to determine whether or not to apply this transformation. - # - # Examples: - # * (age_field > 85) - # * (age_field <= 18) - # * (zip_field exists) - # * (zip_field == 01234) && (city_field != "Springville") - # * (zip_field == 01234) && (age_field <= 18) && (city_field exists) - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # Set if the transformation was limited to a specific `InfoType`. - class TransformationDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about a single transformation. This object contains a description of - # the transformation, information about whether the transformation was - # successfully applied, and the precise location where the transformation - # occurred. These details are stored in a user-specified BigQuery table. - # @!attribute [rw] resource_name - # @return [::String] - # The name of the job that completed the transformation. - # @!attribute [rw] container_name - # @return [::String] - # The top level name of the container where the transformation is located - # (this will be the source file name or table name). - # @!attribute [rw] transformation - # @return [::Array<::Google::Cloud::Dlp::V2::TransformationDescription>] - # Description of transformation. This would only contain more than one - # element if there were multiple matching transformations and which one to - # apply was ambiguous. Not set for states that contain no transformation, - # currently only state that contains no transformation is - # TransformationResultStateType.METADATA_UNRETRIEVABLE. - # @!attribute [rw] status_details - # @return [::Google::Cloud::Dlp::V2::TransformationResultStatus] - # Status of the transformation, if transformation was not successful, this - # will specify what caused it to fail, otherwise it will show that the - # transformation was successful. - # @!attribute [rw] transformed_bytes - # @return [::Integer] - # The number of bytes that were transformed. If transformation was - # unsuccessful or did not take place because there was no content to - # transform, this will be zero. - # @!attribute [rw] transformation_location - # @return [::Google::Cloud::Dlp::V2::TransformationLocation] - # The precise location of the transformed content in the original container. - class TransformationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the location of a transformation. - # @!attribute [rw] finding_id - # @return [::String] - # For infotype transformations, link to the corresponding findings ID so - # that location information does not need to be duplicated. Each findings - # ID correlates to an entry in the findings output table, this table only - # gets created when users specify to save findings (add the save findings - # action to the request). - # - # Note: The following fields are mutually exclusive: `finding_id`, `record_transformation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] record_transformation - # @return [::Google::Cloud::Dlp::V2::RecordTransformation] - # For record transformations, provide a field and container information. - # - # Note: The following fields are mutually exclusive: `record_transformation`, `finding_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] container_type - # @return [::Google::Cloud::Dlp::V2::TransformationContainerType] - # Information about the functionality of the container where this finding - # occurred, if available. - class TransformationLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The field in a record to transform. - # @!attribute [rw] field_id - # @return [::Google::Cloud::Dlp::V2::FieldId] - # For record transformations, provide a field. - # @!attribute [rw] container_timestamp - # @return [::Google::Protobuf::Timestamp] - # Findings container modification timestamp, if applicable. - # @!attribute [rw] container_version - # @return [::String] - # Container version, if available ("generation" for Cloud Storage). - class RecordTransformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The outcome of a transformation. - # @!attribute [rw] result_status_type - # @return [::Google::Cloud::Dlp::V2::TransformationResultStatusType] - # Transformation result status type, this will be either SUCCESS, or it will - # be the reason for why the transformation was not completely successful. - # @!attribute [rw] details - # @return [::Google::Rpc::Status] - # Detailed error codes and messages - class TransformationResultStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for storing transformation details. - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # The BigQuery table in which to store the output. This may be an existing - # table or in a new table in an existing dataset. - # If table_id is not set a new one will be generated for you with the - # following format: - # dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific - # time zone will be used for generating the date details. - class TransformationDetailsStorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Schedule for inspect job triggers. - # @!attribute [rw] recurrence_period_duration - # @return [::Google::Protobuf::Duration] - # With this option a job is started on a regular periodic basis. For - # example: every day (86400 seconds). - # - # A scheduled start time will be skipped if the previous - # execution has not ended when its scheduled time occurs. - # - # This value must be set to a time duration greater than or equal - # to 1 day and can be no longer than 60 days. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Job trigger option for hybrid jobs. Jobs must be manually created - # and finished. - class Manual - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The inspectTemplate contains a configuration (set of types of sensitive data - # to be detected) to be used anywhere you otherwise would normally specify - # InspectConfig. See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to - # learn more. - # @!attribute [r] name - # @return [::String] - # Output only. The template name. - # - # The template will have one of the following formats: - # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR - # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; - # @!attribute [rw] display_name - # @return [::String] - # Display name (max 256 chars). - # @!attribute [rw] description - # @return [::String] - # Short description (max 256 chars). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of an inspectTemplate. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of an inspectTemplate. - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # The core content of the template. Configuration of the scanning process. - class InspectTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeidentifyTemplates contains instructions on how to de-identify content. - # See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to - # learn more. - # @!attribute [r] name - # @return [::String] - # Output only. The template name. - # - # The template will have one of the following formats: - # `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR - # `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` - # @!attribute [rw] display_name - # @return [::String] - # Display name (max 256 chars). - # @!attribute [rw] description - # @return [::String] - # Short description (max 256 chars). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of an inspectTemplate. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of an inspectTemplate. - # @!attribute [rw] deidentify_config - # @return [::Google::Cloud::Dlp::V2::DeidentifyConfig] - # The core content of the template. - class DeidentifyTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details information about an error encountered during job execution or - # the results of an unsuccessful activation of the JobTrigger. - # @!attribute [rw] details - # @return [::Google::Rpc::Status] - # Detailed error codes and messages. - # @!attribute [rw] timestamps - # @return [::Array<::Google::Protobuf::Timestamp>] - # The times the error occurred. List includes the oldest timestamp and the - # last 9 timestamps. - # @!attribute [rw] extra_info - # @return [::Google::Cloud::Dlp::V2::Error::ErrorExtraInfo] - # Additional information about the error. - class Error - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional information about the error. - module ErrorExtraInfo - # Unused. - ERROR_INFO_UNSPECIFIED = 0 - - # Image scan is not available in the region. - IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1 - - # File store cluster is not supported for profile generation. - FILE_STORE_CLUSTER_UNSUPPORTED = 2 - end - end - - # Contains a configuration to make API calls on a repeating basis. - # See - # https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers - # to learn more. - # @!attribute [rw] name - # @return [::String] - # Unique resource name for the triggeredJob, assigned by the service when the - # triggeredJob is created, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @!attribute [rw] display_name - # @return [::String] - # Display name (max 100 chars) - # @!attribute [rw] description - # @return [::String] - # User provided description (max 256 chars) - # @!attribute [rw] inspect_job - # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] - # For inspect jobs, a snapshot of the configuration. - # @!attribute [rw] triggers - # @return [::Array<::Google::Cloud::Dlp::V2::JobTrigger::Trigger>] - # A list of triggers which will be OR'ed together. Only one in the list - # needs to trigger for a job to be started. The list may contain only - # a single Schedule trigger and must have at least one object. - # @!attribute [r] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # Output only. A stream of errors encountered when the trigger was activated. - # Repeated errors may result in the JobTrigger automatically being paused. - # Will return the last 100 errors. Whenever the JobTrigger is modified - # this list will be cleared. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a triggeredJob. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a triggeredJob. - # @!attribute [r] last_run_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the last time this trigger executed. - # @!attribute [rw] status - # @return [::Google::Cloud::Dlp::V2::JobTrigger::Status] - # Required. A status for this trigger. - class JobTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # What event needs to occur for a new job to be started. - # @!attribute [rw] schedule - # @return [::Google::Cloud::Dlp::V2::Schedule] - # Create a job on a repeating basis based on the elapse of time. - # - # Note: The following fields are mutually exclusive: `schedule`, `manual`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] manual - # @return [::Google::Cloud::Dlp::V2::Manual] - # For use with hybrid jobs. Jobs must be manually created and finished. - # - # Note: The following fields are mutually exclusive: `manual`, `schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Trigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs - # will be created with this configuration. The service may automatically - # pause triggers experiencing frequent errors. To restart a job, set the - # status to HEALTHY after correcting user errors. - module Status - # Unused. - STATUS_UNSPECIFIED = 0 - - # Trigger is healthy. - HEALTHY = 1 - - # Trigger is temporarily paused. - PAUSED = 2 - - # Trigger is cancelled and can not be resumed. - CANCELLED = 3 - end - end - - # A task to execute on the completion of a job. - # See https://cloud.google.com/sensitive-data-protection/docs/concepts-actions - # to learn more. - # @!attribute [rw] save_findings - # @return [::Google::Cloud::Dlp::V2::Action::SaveFindings] - # Save resulting findings in a provided location. - # - # Note: The following fields are mutually exclusive: `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pub_sub - # @return [::Google::Cloud::Dlp::V2::Action::PublishToPubSub] - # Publish a notification to a Pub/Sub topic. - # - # Note: The following fields are mutually exclusive: `pub_sub`, `save_findings`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_summary_to_cscc - # @return [::Google::Cloud::Dlp::V2::Action::PublishSummaryToCscc] - # Publish summary to Cloud Security Command Center (Alpha). - # - # Note: The following fields are mutually exclusive: `publish_summary_to_cscc`, `save_findings`, `pub_sub`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_findings_to_cloud_data_catalog - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Dlp::V2::Action::PublishFindingsToCloudDataCatalog] - # Deprecated because Data Catalog is being turned down. Use - # publish_findings_to_dataplex_catalog to publish findings to Dataplex - # Universal Catalog. - # - # Note: The following fields are mutually exclusive: `publish_findings_to_cloud_data_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_findings_to_dataplex_catalog - # @return [::Google::Cloud::Dlp::V2::Action::PublishFindingsToDataplexCatalog] - # Publish findings as an aspect to Dataplex Universal Catalog. - # - # Note: The following fields are mutually exclusive: `publish_findings_to_dataplex_catalog`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `deidentify`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deidentify - # @return [::Google::Cloud::Dlp::V2::Action::Deidentify] - # Create a de-identified copy of the input data. - # - # Note: The following fields are mutually exclusive: `deidentify`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `job_notification_emails`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] job_notification_emails - # @return [::Google::Cloud::Dlp::V2::Action::JobNotificationEmails] - # Sends an email when the job completes. The email goes to IAM project - # owners and technical [Essential - # Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). - # - # Note: The following fields are mutually exclusive: `job_notification_emails`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `publish_to_stackdriver`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_to_stackdriver - # @return [::Google::Cloud::Dlp::V2::Action::PublishToStackdriver] - # Enable Stackdriver metric dlp.googleapis.com/finding_count. - # - # Note: The following fields are mutually exclusive: `publish_to_stackdriver`, `save_findings`, `pub_sub`, `publish_summary_to_cscc`, `publish_findings_to_cloud_data_catalog`, `publish_findings_to_dataplex_catalog`, `deidentify`, `job_notification_emails`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If set, the detailed findings will be persisted to the specified - # OutputStorageConfig. Only a single instance of this action can be - # specified. - # Compatible with: Inspect, Risk - # @!attribute [rw] output_config - # @return [::Google::Cloud::Dlp::V2::OutputStorageConfig] - # Location to store findings outside of DLP. - class SaveFindings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Publish a message into a given Pub/Sub topic when DlpJob has completed. The - # message contains a single field, `DlpJobName`, which is equal to the - # finished job's - # [`DlpJob.name`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob). - # Compatible with: Inspect, Risk - # @!attribute [rw] topic - # @return [::String] - # Cloud Pub/Sub topic to send notifications to. The topic must have given - # publishing access rights to the DLP API service account executing - # the long running DlpJob sending the notifications. - # Format is projects/\\{project}/topics/\\{topic}. - class PublishToPubSub - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Publish the result summary of a DlpJob to [Security Command - # Center](https://cloud.google.com/security-command-center). This action is - # available for only projects that belong to an organization. This action - # publishes the count of finding instances and their infoTypes. The summary - # of findings are persisted in Security Command Center and are governed by - # [service-specific policies for Security Command - # Center](https://cloud.google.com/terms/service-terms). Only a single - # instance of this action can be specified. Compatible with: Inspect - class PublishSummaryToCscc - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag - # templates are applied to the resource that Cloud DLP scanned. Data - # Catalog tag templates are stored in the same project and region where the - # BigQuery table exists. For Cloud DLP to create and apply the tag template, - # the Cloud DLP service agent must have the - # `roles/datacatalog.tagTemplateOwner` permission on the project. The tag - # template contains fields summarizing the results of the DlpJob. Any field - # values previously written by another DlpJob are deleted. [InfoType naming - # patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using - # this feature. - # - # Findings are persisted in Data Catalog storage and are governed by - # service-specific policies for Data Catalog. For more information, see - # [Service Specific Terms](https://cloud.google.com/terms/service-terms). - # - # Only a single instance of this action can be specified. This action is - # allowed only if all resources being scanned are BigQuery tables. - # Compatible with: Inspect - class PublishFindingsToCloudDataCatalog - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Publish findings of a DlpJob to Dataplex Universal Catalog as a - # `sensitive-data-protection-job-result` aspect. For more information, - # see [Send inspection results to Dataplex Universal Catalog as - # aspects](https://cloud.google.com/sensitive-data-protection/docs/add-aspects-inspection-job). - # - # Aspects are stored in Dataplex Universal Catalog storage and are - # governed by service-specific policies for Dataplex Universal Catalog. For - # more information, see [Service Specific - # Terms](https://cloud.google.com/terms/service-terms). - # - # Only a single instance of this action can be specified. This action is - # allowed only if all resources being scanned are BigQuery tables. - # Compatible with: Inspect - class PublishFindingsToDataplexCatalog - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create a de-identified copy of a storage bucket. Only compatible - # with Cloud Storage buckets. - # - # - # A TransformationDetail will be created for each transformation. - # - # - # Compatible with: Inspection of Cloud Storage - # @!attribute [rw] transformation_config - # @return [::Google::Cloud::Dlp::V2::TransformationConfig] - # User specified deidentify templates and configs for structured, - # unstructured, and image files. - # @!attribute [rw] transformation_details_storage_config - # @return [::Google::Cloud::Dlp::V2::TransformationDetailsStorageConfig] - # Config for storing transformation details. - # - # This field specifies the configuration for storing detailed metadata - # about each transformation performed during a de-identification process. - # The metadata is stored separately from the de-identified content itself - # and provides a granular record of both successful transformations and any - # failures that occurred. - # - # Enabling this configuration is essential for users who need to access - # comprehensive information about the status, outcome, and specifics of - # each transformation. The details are captured in the - # {::Google::Cloud::Dlp::V2::TransformationDetails TransformationDetails} - # message for each operation. - # - # Key use cases: - # - # * **Auditing and compliance** - # * Provides a verifiable audit trail of de-identification activities, - # which is crucial for meeting regulatory requirements and internal - # data governance policies. - # * Logs what data was transformed, what transformations were applied, - # when they occurred, and their success status. This helps - # demonstrate accountability and due diligence in protecting - # sensitive data. - # - # * **Troubleshooting and debugging** - # * Offers detailed error messages and context if a transformation - # fails. This information is useful for diagnosing and resolving - # issues in the de-identification pipeline. - # * Helps pinpoint the exact location and nature of failures, speeding - # up the debugging process. - # - # * **Process verification and quality assurance** - # * Allows users to confirm that de-identification rules and - # transformations were applied correctly and consistently across - # the dataset as intended. - # * Helps in verifying the effectiveness of the chosen - # de-identification strategies. - # - # * **Data lineage and impact analysis** - # * Creates a record of how data elements were modified, contributing - # to data lineage. This is useful for understanding the provenance - # of de-identified data. - # * Aids in assessing the potential impact of de-identification choices - # on downstream analytical processes or data usability. - # - # * **Reporting and operational insights** - # * You can analyze the metadata stored in a queryable BigQuery table - # to generate reports on transformation success rates, common - # error types, processing volumes (e.g., transformedBytes), and the - # types of transformations applied. - # * These insights can inform optimization of de-identification - # configurations and resource planning. - # - # To take advantage of these benefits, set this configuration. The stored - # details include a description of the transformation, success or - # error codes, error messages, the number of bytes transformed, the - # location of the transformed content, and identifiers for the job and - # source data. - # @!attribute [rw] cloud_storage_output - # @return [::String] - # Required. User settable Cloud Storage bucket and folders to store - # de-identified files. This field must be set for Cloud Storage - # deidentification. The output Cloud Storage bucket must be different - # from the input bucket. De-identified files will overwrite files in the - # output path. - # - # Form of: gs://bucket/folder/ or gs://bucket - # @!attribute [rw] file_types_to_transform - # @return [::Array<::Google::Cloud::Dlp::V2::FileType>] - # List of user-specified file type groups to transform. If specified, only - # the files with these file types are transformed. If empty, all - # supported files are transformed. Supported types may be automatically - # added over time. Any unsupported file types that are set in this field - # are excluded from de-identification. An error is recorded for each - # unsupported file in the TransformationDetails output table. Currently the - # only file types supported are: IMAGES, TEXT_FILES, CSV, TSV. - class Deidentify - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sends an email when the job completes. The email goes to IAM project owners - # and technical [Essential - # Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). - class JobNotificationEmails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enable Stackdriver metric dlp.googleapis.com/finding_count. This - # will publish a metric to stack driver on each infotype requested and - # how many findings were found for it. CustomDetectors will be bucketed - # as 'Custom' under the Stackdriver label 'info_type'. - class PublishToStackdriver - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User specified templates and configs for how to deidentify structured, - # unstructures, and image files. User must provide either a unstructured - # deidentify template or at least one redact image config. - # @!attribute [rw] deidentify_template - # @return [::String] - # De-identify template. - # If this template is specified, it will serve as the default de-identify - # template. This template cannot contain `record_transformations` since it - # can be used for unstructured content such as free-form text files. If this - # template is not set, a default `ReplaceWithInfoTypeConfig` will be used to - # de-identify unstructured content. - # @!attribute [rw] structured_deidentify_template - # @return [::String] - # Structured de-identify template. - # If this template is specified, it will serve as the de-identify template - # for structured content such as delimited files and tables. If this template - # is not set but the `deidentify_template` is set, then `deidentify_template` - # will also apply to the structured content. If neither template is set, a - # default `ReplaceWithInfoTypeConfig` will be used to de-identify structured - # content. - # @!attribute [rw] image_redact_template - # @return [::String] - # Image redact template. - # If this template is specified, it will serve as the de-identify template - # for images. If this template is not set, all findings in the image will be - # redacted with a black box. - class TransformationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateInspectTemplate. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] inspect_template - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # Required. The InspectTemplate to create. - # @!attribute [rw] template_id - # @return [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class CreateInspectTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateInspectTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of organization and inspectTemplate to be updated, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - # @!attribute [rw] inspect_template - # @return [::Google::Cloud::Dlp::V2::InspectTemplate] - # New InspectTemplate value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask to control which fields get updated. - class UpdateInspectTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetInspectTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and inspectTemplate to be read, - # for example `organizations/433245324/inspectTemplates/432452342` or - # projects/project-id/inspectTemplates/432452342. - class GetInspectTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListInspectTemplates. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListInspectTemplates`. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListInspectTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListInspectTemplates. - # @!attribute [rw] inspect_templates - # @return [::Array<::Google::Cloud::Dlp::V2::InspectTemplate>] - # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest. - # @!attribute [rw] next_page_token - # @return [::String] - # If the next page is available then the next page token to be used in the - # following ListInspectTemplates request. - class ListInspectTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteInspectTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and inspectTemplate to be - # deleted, for example `organizations/433245324/inspectTemplates/432452342` - # or projects/project-id/inspectTemplates/432452342. - class DeleteInspectTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateJobTrigger. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] job_trigger - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # Required. The JobTrigger to create. - # @!attribute [rw] trigger_id - # @return [::String] - # The trigger id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class CreateJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ActivateJobTrigger. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the trigger to activate, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - class ActivateJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateJobTrigger. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - # @!attribute [rw] job_trigger - # @return [::Google::Cloud::Dlp::V2::JobTrigger] - # New JobTrigger value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask to control which fields get updated. - class UpdateJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetJobTrigger. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - class GetJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDiscoveryConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] discovery_config - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # Required. The DiscoveryConfig to create. - # @!attribute [rw] config_id - # @return [::String] - # The config ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - class CreateDiscoveryConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDiscoveryConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - # @!attribute [rw] discovery_config - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # Required. New DiscoveryConfig value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask to control which fields get updated. - class UpdateDiscoveryConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetDiscoveryConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the configuration, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - class GetDiscoveryConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDiscoveryConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value is as follows: - # `projects/{project_id}/locations/{location_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListDiscoveryConfigs. `order_by` field must not - # change for subsequent calls. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by a server. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of config fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - # - `name`: corresponds to the DiscoveryConfig's name. - # - `status`: corresponds to DiscoveryConfig's status. - class ListDiscoveryConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDiscoveryConfigs. - # @!attribute [rw] discovery_configs - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryConfig>] - # List of configs, up to page_size in ListDiscoveryConfigsRequest. - # @!attribute [rw] next_page_token - # @return [::String] - # If the next page is available then this value is the next page token to be - # used in the following ListDiscoveryConfigs request. - class ListDiscoveryConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteDiscoveryConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the config, for example - # `projects/dlp-test-project/discoveryConfigs/53234423`. - class DeleteDiscoveryConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDlpJobRequest. Used to initiate long running - # jobs such as calculating risk metrics or inspecting Google Cloud - # Storage. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] inspect_job - # @return [::Google::Cloud::Dlp::V2::InspectJobConfig] - # An inspection job scans a storage repository for InfoTypes. - # - # Note: The following fields are mutually exclusive: `inspect_job`, `risk_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] risk_job - # @return [::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig] - # A risk analysis job calculates re-identification risk metrics for a - # BigQuery table. - # - # Note: The following fields are mutually exclusive: `risk_job`, `inspect_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] job_id - # @return [::String] - # The job id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class CreateDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListJobTriggers. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. Comes from the previous call - # to ListJobTriggers. `order_by` field must not - # change for subsequent calls. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by a server. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of triggeredJob fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the JobTrigger was created. - # - `update_time`: corresponds to the time the JobTrigger was last updated. - # - `last_run_time`: corresponds to the last time the JobTrigger ran. - # - `name`: corresponds to the JobTrigger's name. - # - `display_name`: corresponds to the JobTrigger's display name. - # - `status`: corresponds to JobTrigger's status. - # @!attribute [rw] filter - # @return [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect triggers: - # - `status` - HEALTHY|PAUSED|CANCELLED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by - # quotation marks. Nanoseconds are ignored. - # - 'error_count' - Number of errors that have occurred while running. - # * The operator must be `=` or `!=` for status and inspected_storage. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND status = HEALTHY - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) - # * last_run_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of jobs. Will use `DlpJobType.INSPECT` if not set. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListJobTriggersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListJobTriggers. - # @!attribute [rw] job_triggers - # @return [::Array<::Google::Cloud::Dlp::V2::JobTrigger>] - # List of triggeredJobs, up to page_size in ListJobTriggersRequest. - # @!attribute [rw] next_page_token - # @return [::String] - # If the next page is available then this value is the next page token to be - # used in the following ListJobTriggers request. - class ListJobTriggersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteJobTrigger. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the project and the triggeredJob, for example - # `projects/dlp-test-project/jobTriggers/53234423`. - class DeleteJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Controls what and how to inspect for findings. - # @!attribute [rw] storage_config - # @return [::Google::Cloud::Dlp::V2::StorageConfig] - # The data to scan. - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # How and what to scan for. - # @!attribute [rw] inspect_template_name - # @return [::String] - # If provided, will be used as the default for all values in InspectConfig. - # `inspect_config` will be merged into the values persisted as part of the - # template. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dlp::V2::Action>] - # Actions to execute at the completion of the job. - class InspectJobConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A task to execute when a data profile has been generated. - # @!attribute [rw] export_data - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::Export] - # Export data profiles into a provided location. - # - # Note: The following fields are mutually exclusive: `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pub_sub_notification - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification] - # Publish a message into the Pub/Sub topic. - # - # Note: The following fields are mutually exclusive: `pub_sub_notification`, `export_data`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_to_chronicle - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToChronicle] - # Publishes generated data profiles to Google Security Operations. - # For more information, see [Use Sensitive Data Protection data in - # context-aware - # analytics](https://cloud.google.com/chronicle/docs/detection/usecase-dlp-high-risk-user-download). - # - # Note: The following fields are mutually exclusive: `publish_to_chronicle`, `export_data`, `pub_sub_notification`, `publish_to_scc`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_to_scc - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToSecurityCommandCenter] - # Publishes findings to Security Command Center for each data profile. - # - # Note: The following fields are mutually exclusive: `publish_to_scc`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `tag_resources`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tag_resources - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources] - # Tags the profiled resources with the specified tag values. - # - # Note: The following fields are mutually exclusive: `tag_resources`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `publish_to_dataplex_catalog`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] publish_to_dataplex_catalog - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PublishToDataplexCatalog] - # Publishes a portion of each profile to Dataplex Universal Catalog with - # the aspect type Sensitive Data Protection Profile. - # - # Note: The following fields are mutually exclusive: `publish_to_dataplex_catalog`, `export_data`, `pub_sub_notification`, `publish_to_chronicle`, `publish_to_scc`, `tag_resources`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataProfileAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # If set, the detailed data profiles will be persisted to the location - # of your choice whenever updated. - # @!attribute [rw] profile_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Store all profiles to BigQuery. - # - # * The system will create a new dataset and table for you if none are - # are provided. The dataset will be named - # `sensitive_data_protection_discovery` and table will be named - # `discovery_profiles`. This table will be placed in the same project as - # the container project running the scan. After the first profile is - # generated and the dataset and table are created, the discovery scan - # configuration will be updated with the dataset and table names. - # * See [Analyze data profiles stored in - # BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles). - # * See [Sample queries for your BigQuery - # table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries). - # * Data is inserted using [streaming - # insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) - # and so data may be in the buffer for a period of time after the - # profile has finished. - # * The Pub/Sub notification is sent before the streaming buffer is - # guaranteed to be written, so data may not be instantly - # visible to queries by the time your topic receives the Pub/Sub - # notification. - # * The best practice is to use the same table for an entire organization - # so that you can take advantage of the [provided Looker - # reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report). - # If you use VPC Service Controls to define security perimeters, then - # you must use a separate table for each boundary. - # @!attribute [rw] sample_findings_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Store sample [data profile - # findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table - # or a new table in an existing dataset. Each regeneration will result in - # new rows in BigQuery. Data is inserted using [streaming - # insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) - # and so data may be in the buffer for a period of time after the profile - # has finished. - class Export - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Send a Pub/Sub message into the given Pub/Sub topic to connect other - # systems to data profile generation. The message payload data will - # be the byte serialization of `DataProfilePubSubMessage`. - # @!attribute [rw] topic - # @return [::String] - # Cloud Pub/Sub topic to send notifications to. - # Format is projects/\\{project}/topics/\\{topic}. - # @!attribute [rw] event - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType] - # The type of event that triggers a Pub/Sub. At most one - # `PubSubNotification` per EventType is permitted. - # @!attribute [rw] pubsub_condition - # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition] - # Conditions (e.g., data risk or sensitivity level) for triggering a - # Pub/Sub. - # @!attribute [rw] detail_of_message - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::PubSubNotification::DetailLevel] - # How much data to include in the Pub/Sub message. If the user wishes to - # limit the size of the message, they can use resource_name and fetch the - # profile fields they wish to. Per table profile (not per column). - class PubSubNotification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The levels of detail that can be included in the Pub/Sub message. - module DetailLevel - # Unused. - DETAIL_LEVEL_UNSPECIFIED = 0 - - # The full table data profile. - TABLE_PROFILE = 1 - - # The name of the profiled resource. - RESOURCE_NAME = 2 - - # The full file store data profile. - FILE_STORE_PROFILE = 3 - end - end - - # Message expressing intention to publish to Google Security Operations. - class PublishToChronicle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # If set, a summary finding will be created or updated in Security Command - # Center for each profile. - class PublishToSecurityCommandCenter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create Dataplex Universal Catalog aspects for profiled resources with the - # aspect type Sensitive Data Protection Profile. To learn more about aspects, - # see https://cloud.google.com/sensitive-data-protection/docs/add-aspects. - # @!attribute [rw] lower_data_risk_to_low - # @return [::Boolean] - # Whether creating a Dataplex Universal Catalog aspect for a profiled - # resource should lower the risk of the profile for that resource. This - # also lowers the data risk of resources at the lower levels of the - # resource hierarchy. For example, reducing the data risk of a table data - # profile also reduces the data risk of the constituent column data - # profiles. - class PublishToDataplexCatalog - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # If set, attaches the [tags] - # (https://cloud.google.com/resource-manager/docs/tags/tags-overview) - # provided to profiled resources. Tags support [access - # control](https://cloud.google.com/iam/docs/tags-access-control). You can - # conditionally grant or deny access to a resource based on whether the - # resource has a specific tag. - # @!attribute [rw] tag_conditions - # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagCondition>] - # The tags to associate with different conditions. - # @!attribute [rw] profile_generations_to_tag - # @return [::Array<::Google::Cloud::Dlp::V2::ProfileGeneration>] - # The profile generations for which the tag should be attached to - # resources. If you attach a tag to only new profiles, then if the - # sensitivity score of a profile subsequently changes, its tag doesn't - # change. By default, this field includes only new profiles. To include - # both new and updated profiles for tagging, this field should explicitly - # include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`. - # @!attribute [rw] lower_data_risk_to_low - # @return [::Boolean] - # Whether applying a tag to a resource should lower the risk of the profile - # for that resource. For example, in conjunction with an [IAM deny - # policy](https://cloud.google.com/iam/docs/deny-overview), you can deny - # all principals a permission if a tag value is present, mitigating the - # risk of the resource. This also lowers the data risk of resources at the - # lower levels of the resource hierarchy. For example, reducing the data - # risk of a table data profile also reduces the data risk of the - # constituent column data profiles. - class TagResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The tag to attach to profiles matching the condition. At most one - # `TagCondition` can be specified per sensitivity level. - # @!attribute [rw] tag - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::TagResources::TagValue] - # The tag value to attach to resources. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # Conditions attaching the tag to a resource on its profile having this - # sensitivity score. - class TagCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A value of a tag. - # @!attribute [rw] namespaced_value - # @return [::String] - # The namespaced name for the tag value to attach to resources. Must be - # in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for - # example, "123456/environment/prod" for an organization parent, or - # "my-project/environment/prod" for a project parent. - class TagValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Types of event that can trigger an action. - module EventType - # Unused. - EVENT_TYPE_UNSPECIFIED = 0 - - # New profile (not a re-profile). - NEW_PROFILE = 1 - - # One of the following profile metrics changed: Data risk score, - # Sensitivity score, Resource visibility, Encryption type, Predicted - # infoTypes, Other infoTypes - CHANGED_PROFILE = 2 - - # Table data risk score or sensitivity score increased. - SCORE_INCREASED = 3 - - # A user (non-internal) error occurred. - ERROR_CHANGED = 4 - end - end - - # Details about a piece of potentially sensitive information that was detected - # when the data resource was profiled. - # @!attribute [rw] quote - # @return [::String] - # The content that was found. Even if the content is not textual, it - # may be converted to a textual representation here. If the finding exceeds - # 4096 bytes in length, the quote may be omitted. - # @!attribute [rw] infotype - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The [type of - # content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference) - # that might have been found. - # @!attribute [rw] quote_info - # @return [::Google::Cloud::Dlp::V2::QuoteInfo] - # Contains data parsed from quotes. Currently supported infoTypes: DATE, - # DATE_OF_BIRTH, and TIME. - # @!attribute [rw] data_profile_resource_name - # @return [::String] - # Resource name of the data profile associated with the finding. - # @!attribute [rw] finding_id - # @return [::String] - # A unique identifier for the finding. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Timestamp when the finding was detected. - # @!attribute [rw] location - # @return [::Google::Cloud::Dlp::V2::DataProfileFindingLocation] - # Where the content was found. - # @!attribute [rw] resource_visibility - # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] - # How broadly a resource has been shared. - # @!attribute [rw] full_resource_name - # @return [::String] - # The [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # of the resource profiled for this finding. - # @!attribute [rw] data_source_type - # @return [::Google::Cloud::Dlp::V2::DataSourceType] - # The type of the resource that was profiled. - class DataProfileFinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of a data profile finding within a resource. - # @!attribute [rw] container_name - # @return [::String] - # Name of the container where the finding is located. - # The top-level name is the source file name or table name. Names of some - # common storage containers are formatted as follows: - # - # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` - # * Cloud Storage files: `gs://{bucket}/{path}` - # @!attribute [rw] data_profile_finding_record_location - # @return [::Google::Cloud::Dlp::V2::DataProfileFindingRecordLocation] - # Location of a finding within a resource that produces a table data - # profile. - class DataProfileFindingLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of a finding within a resource that produces a table data profile. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Field ID of the column containing the finding. - class DataProfileFindingRecordLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for setting up a job to scan resources for profile generation. - # Only one data profile configuration may exist per organization, folder, - # or project. - # - # The generated data profiles are retained according to the - # [data retention policy] - # (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). - # @!attribute [rw] location - # @return [::Google::Cloud::Dlp::V2::DataProfileLocation] - # The data to scan. - # @!attribute [rw] project_id - # @return [::String] - # The project that will run the scan. The DLP service - # account that exists within this project must have access to all resources - # that are profiled, and the DLP API must be enabled. - # @!attribute [rw] other_cloud_starting_location - # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation] - # Must be set only when scanning other clouds. - # @!attribute [rw] inspect_templates - # @return [::Array<::String>] - # Detection logic for profile generation. - # - # Not all template features are used by profiles. FindingLimits, - # include_quote and exclude_info_types have no impact on - # data profiling. - # - # Multiple templates may be provided if there is data in multiple regions. - # At most one template must be specified per-region (including "global"). - # Each region is scanned using the applicable template. If no region-specific - # template is specified, but a "global" template is specified, it will be - # copied to that region and used instead. If no global or region-specific - # template is provided for a region with data, that region's data will not be - # scanned. - # - # For more information, see - # https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. - # @!attribute [rw] data_profile_actions - # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction>] - # Actions to execute at the completion of the job. - class DataProfileJobConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more tables, datasets, or projects that - # contain BigQuery tables. At least one pattern must be specified. - # Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - # @!attribute [rw] project_id_regex - # @return [::String] - # For organizations, if unset, will match all projects. Has no effect - # for data profile configurations created within a project. - # @!attribute [rw] dataset_id_regex - # @return [::String] - # If unset, this property matches all datasets. - # @!attribute [rw] table_id_regex - # @return [::String] - # If unset, this property matches all tables. - class BigQueryRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of regular expressions to determine what tables to match - # against. - # @!attribute [rw] patterns - # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryRegex>] - # A single BigQuery regular expression pattern to match against one or more - # tables, datasets, or projects that contain BigQuery tables. - class BigQueryRegexes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The types of BigQuery tables supported by Cloud DLP. - # @!attribute [rw] types - # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryTableType>] - # A set of BigQuery table types. - class BigQueryTableTypes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Do not profile the tables. - class Disabled - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data that will be profiled. - # @!attribute [rw] organization_id - # @return [::Integer] - # The ID of an organization to scan. - # - # Note: The following fields are mutually exclusive: `organization_id`, `folder_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] folder_id - # @return [::Integer] - # The ID of the folder within an organization to scan. - # - # Note: The following fields are mutually exclusive: `folder_id`, `organization_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataProfileLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for discovery to scan resources for profile generation. - # Only one discovery configuration may exist per organization, folder, - # or project. - # - # The generated data profiles are retained according to the - # [data retention policy] - # (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). - # @!attribute [rw] name - # @return [::String] - # Unique resource name for the DiscoveryConfig, assigned by the service when - # the DiscoveryConfig is created, for example - # `projects/dlp-test-project/locations/global/discoveryConfigs/53234423`. - # @!attribute [rw] display_name - # @return [::String] - # Display name (max 100 chars) - # @!attribute [rw] org_config - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig::OrgConfig] - # Only set when the parent is an org. - # @!attribute [rw] other_cloud_starting_location - # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation] - # Must be set only when scanning other clouds. - # @!attribute [rw] inspect_templates - # @return [::Array<::String>] - # Detection logic for profile generation. - # - # Not all template features are used by Discovery. FindingLimits, - # include_quote and exclude_info_types have no impact on - # Discovery. - # - # Multiple templates may be provided if there is data in multiple regions. - # At most one template must be specified per-region (including "global"). - # Each region is scanned using the applicable template. If no region-specific - # template is specified, but a "global" template is specified, it will be - # copied to that region and used instead. If no global or region-specific - # template is provided for a region with data, that region's data will not be - # scanned. - # - # For more information, see - # https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dlp::V2::DataProfileAction>] - # Actions to execute at the completion of scanning. - # @!attribute [rw] targets - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryTarget>] - # Target to match against for determining what to scan and how frequently. - # @!attribute [r] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # Output only. A stream of errors encountered when the config was activated. - # Repeated errors may result in the config automatically being paused. Output - # only field. Will return the last 100 errors. Whenever the config is - # modified this list will be cleared. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a DiscoveryConfig. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a DiscoveryConfig. - # @!attribute [r] last_run_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the last time this config was executed. - # @!attribute [rw] status - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig::Status] - # Required. A status for this configuration. - # @!attribute [rw] processing_location - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation] - # Optional. Processing location configuration. Vertex AI dataset scanning - # will set processing_location.image_fallback_type to MultiRegionProcessing - # by default. - class DiscoveryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Project and scan location information. Only set when the parent is an org. - # @!attribute [rw] location - # @return [::Google::Cloud::Dlp::V2::DiscoveryStartingLocation] - # The data to scan: folder, org, or project - # @!attribute [rw] project_id - # @return [::String] - # The project that will run the scan. The DLP service - # account that exists within this project must have access to all resources - # that are profiled, and the DLP API must be enabled. - class OrgConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Whether the discovery config is currently active. New options may be added - # at a later time. - module Status - # Unused - STATUS_UNSPECIFIED = 0 - - # The discovery config is currently active. - RUNNING = 1 - - # The discovery config is paused temporarily. - PAUSED = 2 - end - end - - # Target used to match against for Discovery. - # @!attribute [rw] big_query_target - # @return [::Google::Cloud::Dlp::V2::BigQueryDiscoveryTarget] - # BigQuery target for Discovery. The first target to match a table will be - # the one applied. - # - # Note: The following fields are mutually exclusive: `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_sql_target - # @return [::Google::Cloud::Dlp::V2::CloudSqlDiscoveryTarget] - # Cloud SQL target for Discovery. The first target to match a table will be - # the one applied. - # - # Note: The following fields are mutually exclusive: `cloud_sql_target`, `big_query_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] secrets_target - # @return [::Google::Cloud::Dlp::V2::SecretsDiscoveryTarget] - # Discovery target that looks for credentials and secrets stored in cloud - # resource metadata and reports them as vulnerabilities to Security Command - # Center. Only one target of this type is allowed. - # - # Note: The following fields are mutually exclusive: `secrets_target`, `big_query_target`, `cloud_sql_target`, `cloud_storage_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_storage_target - # @return [::Google::Cloud::Dlp::V2::CloudStorageDiscoveryTarget] - # Cloud Storage target for Discovery. The first target to match a table - # will be the one applied. - # - # Note: The following fields are mutually exclusive: `cloud_storage_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `other_cloud_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] other_cloud_target - # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryTarget] - # Other clouds target for discovery. The first target to match a resource - # will be the one applied. - # - # Note: The following fields are mutually exclusive: `other_cloud_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `vertex_dataset_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vertex_dataset_target - # @return [::Google::Cloud::Dlp::V2::VertexDatasetDiscoveryTarget] - # Vertex AI dataset target for Discovery. The first target to match a - # dataset will be the one applied. Note that discovery for Vertex AI can - # incur Cloud Storage Class B operation charges for storage.objects.get - # operations and retrieval fees. For more information, see [Cloud Storage - # pricing](https://cloud.google.com/storage/pricing#price-tables). - # Note that discovery for Vertex AI dataset will not be able to scan images - # unless DiscoveryConfig.processing_location.image_fallback_location has - # multi_region_processing or global_processing configured. - # - # Note: The following fields are mutually exclusive: `vertex_dataset_target`, `big_query_target`, `cloud_sql_target`, `secrets_target`, `cloud_storage_target`, `other_cloud_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target used to match against for discovery with BigQuery tables - # @!attribute [rw] filter - # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryFilter] - # Required. The tables the discovery cadence applies to. The first target - # with a matching filter will be the one to apply to a table. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryConditions] - # In addition to matching the filter, these conditions must be true - # before a profile is generated. - # @!attribute [rw] cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryGenerationCadence] - # How often and when to update profiles. New tables that match both the - # filter and conditions are scanned as quickly as possible depending on - # system capacity. - # - # Note: The following fields are mutually exclusive: `cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disabled - # @return [::Google::Cloud::Dlp::V2::Disabled] - # Tables that match this filter will not have profiles created. - # - # Note: The following fields are mutually exclusive: `disabled`, `cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BigQueryDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines what tables will have profiles generated within an organization - # or project. Includes the ability to filter by regular expression patterns - # on project ID, dataset ID, and table ID. - # @!attribute [rw] tables - # @return [::Google::Cloud::Dlp::V2::BigQueryTableCollection] - # A specific set of tables for this filter to apply to. A table collection - # must be specified in only one filter per config. - # If a table id or dataset is empty, Cloud DLP assumes all tables in that - # collection must be profiled. Must specify a project ID. - # - # Note: The following fields are mutually exclusive: `tables`, `other_tables`, `table_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] other_tables - # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryFilter::AllOtherBigQueryTables] - # Catch-all. This should always be the last filter in the list because - # anything above it will apply first. Should only appear once in a - # configuration. If none is specified, a default one will be added - # automatically. - # - # Note: The following fields are mutually exclusive: `other_tables`, `tables`, `table_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table_reference - # @return [::Google::Cloud::Dlp::V2::TableReference] - # The table to scan. Discovery configurations including this can only - # include one DiscoveryTarget (the DiscoveryTarget with this - # TableReference). - # - # Note: The following fields are mutually exclusive: `table_reference`, `tables`, `other_tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryBigQueryFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Catch-all for all other tables not specified by other filters. Should - # always be last, except for single-table configurations, which will only - # have a TableReference target. - class AllOtherBigQueryTables - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies a collection of BigQuery tables. Used for Discovery. - # @!attribute [rw] include_regexes - # @return [::Google::Cloud::Dlp::V2::BigQueryRegexes] - # A collection of regular expressions to match a BigQuery table against. - class BigQueryTableCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requirements that must be true before a table is scanned in discovery for the - # first time. There is an AND relationship between the top-level attributes. - # Additionally, minimum conditions with an OR relationship that must be met - # before Cloud DLP scans a table can be set (like a minimum row count or a - # minimum table age). - # @!attribute [rw] created_after - # @return [::Google::Protobuf::Timestamp] - # BigQuery table must have been created after this date. Used to avoid - # backfilling. - # @!attribute [rw] types - # @return [::Google::Cloud::Dlp::V2::BigQueryTableTypes] - # Restrict discovery to specific table types. - # - # Note: The following fields are mutually exclusive: `types`, `type_collection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type_collection - # @return [::Google::Cloud::Dlp::V2::BigQueryTableTypeCollection] - # Restrict discovery to categories of table types. - # - # Note: The following fields are mutually exclusive: `type_collection`, `types`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] or_conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryBigQueryConditions::OrConditions] - # At least one of the conditions must be true for a table to be scanned. - class DiscoveryBigQueryConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # There is an OR relationship between these attributes. They are used to - # determine if a table should be scanned or not in Discovery. - # @!attribute [rw] min_row_count - # @return [::Integer] - # Minimum number of rows that should be present before Cloud DLP - # profiles a table - # @!attribute [rw] min_age - # @return [::Google::Protobuf::Duration] - # Minimum age a table must have before Cloud DLP can profile it. Value must - # be 1 hour or greater. - class OrConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # What must take place for a profile to be updated and how - # frequently it should occur. - # New tables are scanned as quickly as possible depending on system - # capacity. - # @!attribute [rw] schema_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoverySchemaModifiedCadence] - # Governs when to update data profiles when a schema is modified. - # @!attribute [rw] table_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryTableModifiedCadence] - # Governs when to update data profiles when a table is modified. - # @!attribute [rw] inspect_template_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] - # Governs when to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # If not set, changing the template will not cause a data profile to update. - # @!attribute [rw] refresh_frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # Frequency at which profiles should be updated, regardless of whether the - # underlying resource has changed. Defaults to never. - class DiscoveryGenerationCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The cadence at which to update data profiles when a table is modified. - # @!attribute [rw] types - # @return [::Array<::Google::Cloud::Dlp::V2::BigQueryTableModification>] - # The type of events to consider when deciding if the table has been - # modified and should have the profile updated. Defaults to - # MODIFIED_TIMESTAMP. - # @!attribute [rw] frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # How frequently data profiles can be updated when tables are modified. - # Defaults to never. - class DiscoveryTableModifiedCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The cadence at which to update data profiles when a schema is modified. - # @!attribute [rw] types - # @return [::Array<::Google::Cloud::Dlp::V2::BigQuerySchemaModification>] - # The type of events to consider when deciding if the table's schema - # has been modified and should have the profile updated. Defaults to - # NEW_COLUMNS. - # @!attribute [rw] frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # How frequently profiles may be updated when schemas are - # modified. Defaults to monthly. - class DiscoverySchemaModifiedCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The cadence at which to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # @!attribute [rw] frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # How frequently data profiles can be updated when the template is modified. - # Defaults to never. - class DiscoveryInspectTemplateModifiedCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target used to match against for discovery with Cloud SQL tables. - # @!attribute [rw] filter - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlFilter] - # Required. The tables the discovery cadence applies to. The first target - # with a matching filter will be the one to apply to a table. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions] - # In addition to matching the filter, these conditions must be true - # before a profile is generated. - # @!attribute [rw] generation_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence] - # How often and when to update profiles. New tables that match both the - # filter and conditions are scanned as quickly as possible depending on - # system capacity. - # - # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disabled - # @return [::Google::Cloud::Dlp::V2::Disabled] - # Disable profiling for database resources that match this filter. - # - # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CloudSqlDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines what tables will have profiles generated within an organization - # or project. Includes the ability to filter by regular expression patterns - # on project ID, location, instance, database, and database resource name. - # @!attribute [rw] collection - # @return [::Google::Cloud::Dlp::V2::DatabaseResourceCollection] - # A specific set of database resources for this filter to apply to. - # - # Note: The following fields are mutually exclusive: `collection`, `others`, `database_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] others - # @return [::Google::Cloud::Dlp::V2::AllOtherDatabaseResources] - # Catch-all. This should always be the last target in the list because - # anything above it will apply first. Should only appear once in a - # configuration. If none is specified, a default one will be added - # automatically. - # - # Note: The following fields are mutually exclusive: `others`, `collection`, `database_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] database_resource_reference - # @return [::Google::Cloud::Dlp::V2::DatabaseResourceReference] - # The database resource to scan. Targets including this can only include - # one target (the target with this database resource reference). - # - # Note: The following fields are mutually exclusive: `database_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryCloudSqlFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Match database resources using regex filters. Examples of database - # resources are tables, views, and stored procedures. - # @!attribute [rw] include_regexes - # @return [::Google::Cloud::Dlp::V2::DatabaseResourceRegexes] - # A collection of regular expressions to match a database resource against. - class DatabaseResourceCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of regular expressions to determine what database resources to - # match against. - # @!attribute [rw] patterns - # @return [::Array<::Google::Cloud::Dlp::V2::DatabaseResourceRegex>] - # A group of regular expression patterns to match against one or more - # database resources. - # Maximum of 100 entries. The sum of all regular expression's length can't - # exceed 10 KiB. - class DatabaseResourceRegexes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more database resources. At least one - # pattern must be specified. Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - # @!attribute [rw] project_id_regex - # @return [::String] - # For organizations, if unset, will match all projects. Has no effect - # for configurations created within a project. - # @!attribute [rw] instance_regex - # @return [::String] - # Regex to test the instance name against. If empty, all instances match. - # @!attribute [rw] database_regex - # @return [::String] - # Regex to test the database name against. If empty, all databases match. - # @!attribute [rw] database_resource_name_regex - # @return [::String] - # Regex to test the database resource's name against. An example of a - # database resource name is a table's name. Other database resource names - # like view names could be included in the future. If empty, all database - # resources match. - class DatabaseResourceRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Match database resources not covered by any other filter. - class AllOtherDatabaseResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identifies a single database resource, like a table within a database. - # @!attribute [rw] project_id - # @return [::String] - # Required. If within a project-level config, then this must match the - # config's project ID. - # @!attribute [rw] instance - # @return [::String] - # Required. The instance where this resource is located. For example: Cloud - # SQL instance ID. - # @!attribute [rw] database - # @return [::String] - # Required. Name of a database within the instance. - # @!attribute [rw] database_resource - # @return [::String] - # Required. Name of a database resource, for example, a table within the - # database. - class DatabaseResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requirements that must be true before a table is profiled for the - # first time. - # @!attribute [rw] database_engines - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions::DatabaseEngine>] - # Optional. Database engines that should be profiled. - # Optional. Defaults to ALL_SUPPORTED_DATABASE_ENGINES if unspecified. - # @!attribute [rw] types - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlConditions::DatabaseResourceType>] - # Data profiles will only be generated for the database resource types - # specified in this field. - # If not specified, defaults to [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES]. - class DiscoveryCloudSqlConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The database engines that should be profiled. - module DatabaseEngine - # Unused. - DATABASE_ENGINE_UNSPECIFIED = 0 - - # Include all supported database engines. - ALL_SUPPORTED_DATABASE_ENGINES = 1 - - # MySQL database. - MYSQL = 2 - - # PostgreSQL database. - POSTGRES = 3 - end - - # Cloud SQL database resource types. New values can be added at a later time. - module DatabaseResourceType - # Unused. - DATABASE_RESOURCE_TYPE_UNSPECIFIED = 0 - - # Includes database resource types that become supported at a later time. - DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES = 1 - - # Tables. - DATABASE_RESOURCE_TYPE_TABLE = 2 - end - end - - # How often existing tables should have their profiles refreshed. - # New tables are scanned as quickly as possible depending on system - # capacity. - # @!attribute [rw] schema_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence] - # When to reprofile if the schema has changed. - # @!attribute [rw] refresh_frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # Data changes (non-schema changes) in Cloud SQL tables can't trigger - # reprofiling. If you set this field, profiles are refreshed at this - # frequency regardless of whether the underlying tables have changed. - # Defaults to never. - # @!attribute [rw] inspect_template_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] - # Governs when to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # If not set, changing the template will not cause a data profile to update. - class DiscoveryCloudSqlGenerationCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How frequently to modify the profile when the table's schema is modified. - # @!attribute [rw] types - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudSqlGenerationCadence::SchemaModifiedCadence::CloudSqlSchemaModification>] - # The types of schema modifications to consider. - # Defaults to NEW_COLUMNS. - # @!attribute [rw] frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # Frequency to regenerate data profiles when the schema is modified. - # Defaults to monthly. - class SchemaModifiedCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of modification that causes a profile update. - module CloudSqlSchemaModification - # Unused. - SQL_SCHEMA_MODIFICATION_UNSPECIFIED = 0 - - # New columns have appeared. - NEW_COLUMNS = 1 - - # Columns have been removed from the table. - REMOVED_COLUMNS = 2 - end - end - end - - # Discovery target for credentials and secrets in cloud resource metadata. - # - # This target does not include any filtering or frequency controls. Cloud - # DLP will scan cloud resource metadata for secrets daily. - # - # No inspect template should be included in the discovery config for a - # security benchmarks scan. Instead, the built-in list of secrets and - # credentials infoTypes will be used (see - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets). - # - # Credentials and secrets discovered will be reported as vulnerabilities to - # Security Command Center. - class SecretsDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target used to match against for discovery with Cloud Storage buckets. - # @!attribute [rw] filter - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageFilter] - # Required. The buckets the generation_cadence applies to. The first target - # with a matching filter will be the one to apply to a bucket. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryFileStoreConditions] - # Optional. In addition to matching the filter, these conditions must be true - # before a profile is generated. - # @!attribute [rw] generation_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageGenerationCadence] - # Optional. How often and when to update profiles. New buckets that match - # both the filter and conditions are scanned as quickly as possible - # depending on system capacity. - # - # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disabled - # @return [::Google::Cloud::Dlp::V2::Disabled] - # Optional. Disable profiling for buckets that match this filter. - # - # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CloudStorageDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines which buckets will have profiles generated within an organization - # or project. Includes the ability to filter by regular expression patterns - # on project ID and bucket name. - # @!attribute [rw] collection - # @return [::Google::Cloud::Dlp::V2::FileStoreCollection] - # Optional. A specific set of buckets for this filter to apply to. - # - # Note: The following fields are mutually exclusive: `collection`, `cloud_storage_resource_reference`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_storage_resource_reference - # @return [::Google::Cloud::Dlp::V2::CloudStorageResourceReference] - # Optional. The bucket to scan. Targets including this can only include one - # target (the target with this bucket). This enables profiling the contents - # of a single bucket, while the other options allow for easy profiling of - # many bucets within a project or an organization. - # - # Note: The following fields are mutually exclusive: `cloud_storage_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] others - # @return [::Google::Cloud::Dlp::V2::AllOtherResources] - # Optional. Catch-all. This should always be the last target in the list - # because anything above it will apply first. Should only appear once in a - # configuration. If none is specified, a default one will be added - # automatically. - # - # Note: The following fields are mutually exclusive: `others`, `collection`, `cloud_storage_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryCloudStorageFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Match file stores (e.g. buckets) using filters. - # @!attribute [rw] include_regexes - # @return [::Google::Cloud::Dlp::V2::FileStoreRegexes] - # Optional. A collection of regular expressions to match a file store - # against. - # @!attribute [rw] include_tags - # @return [::Google::Cloud::Dlp::V2::TagFilters] - # Optional. To be included in the collection, a resource must meet all of the - # following requirements: - # - # - If tag filters are provided, match all provided tag filters. - # - If one or more patterns are specified, match at least one pattern. - # - # For a resource to match the tag filters, the resource must have all of the - # provided tags attached. Tags refer to Resource Manager tags bound to the - # resource or its ancestors. For more information, see [Manage - # schedules](https://cloud.google.com/sensitive-data-protection/docs/profile-project-cloud-storage#manage-schedules). - class FileStoreCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of regular expressions to determine what file store to match - # against. - # @!attribute [rw] patterns - # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreRegex>] - # Required. The group of regular expression patterns to match against one or - # more file stores. Maximum of 100 entries. The sum of all regular - # expression's length can't exceed 10 KiB. - class FileStoreRegexes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more file stores. - # @!attribute [rw] cloud_storage_regex - # @return [::Google::Cloud::Dlp::V2::CloudStorageRegex] - # Optional. Regex for Cloud Storage. - class FileStoreRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more file stores. At least one - # pattern must be specified. Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - # @!attribute [rw] project_id_regex - # @return [::String] - # Optional. For organizations, if unset, will match all projects. - # @!attribute [rw] bucket_name_regex - # @return [::String] - # Optional. Regex to test the bucket name against. If empty, all buckets - # match. Example: "marketing2021" or "(marketing)\d\\{4}" will both match the - # bucket gs://marketing2021 - class CloudStorageRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identifies a single Cloud Storage bucket. - # @!attribute [rw] bucket_name - # @return [::String] - # Required. The bucket to scan. - # @!attribute [rw] project_id - # @return [::String] - # Required. If within a project-level config, then this must match the - # config's project id. - class CloudStorageResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How often existing buckets should have their profiles refreshed. - # New buckets are scanned as quickly as possible depending on system - # capacity. - # @!attribute [rw] refresh_frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # Optional. Data changes in Cloud Storage can't trigger reprofiling. If you - # set this field, profiles are refreshed at this frequency regardless of - # whether the underlying buckets have changed. Defaults to never. - # @!attribute [rw] inspect_template_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] - # Optional. Governs when to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # If not set, changing the template will not cause a data profile to update. - class DiscoveryCloudStorageGenerationCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requirements that must be true before a Cloud Storage bucket or object is - # scanned in discovery for the first time. There is an AND relationship between - # the top-level attributes. - # @!attribute [rw] included_object_attributes - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions::CloudStorageObjectAttribute>] - # Required. Only objects with the specified attributes will be scanned. If an - # object has one of the specified attributes but is inside an excluded - # bucket, it will not be scanned. Defaults to [ALL_SUPPORTED_OBJECTS]. A - # profile will be created even if no objects match the - # included_object_attributes. - # @!attribute [rw] included_bucket_attributes - # @return [::Array<::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions::CloudStorageBucketAttribute>] - # Required. Only objects with the specified attributes will be scanned. - # Defaults to [ALL_SUPPORTED_BUCKETS] if unset. - class DiscoveryCloudStorageConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The attribute of an object. See - # https://cloud.google.com/storage/docs/storage-classes for more information - # on storage classes. - module CloudStorageObjectAttribute - # Unused. - CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED = 0 - - # Scan objects regardless of the attribute. - ALL_SUPPORTED_OBJECTS = 1 - - # Scan objects with the standard storage class. - STANDARD = 2 - - # Scan objects with the nearline storage class. This will incur retrieval - # fees. - NEARLINE = 3 - - # Scan objects with the coldline storage class. This will incur retrieval - # fees. - COLDLINE = 4 - - # Scan objects with the archive storage class. This will incur retrieval - # fees. - ARCHIVE = 5 - - # Scan objects with the regional storage class. - REGIONAL = 6 - - # Scan objects with the multi-regional storage class. - MULTI_REGIONAL = 7 - - # Scan objects with the dual-regional storage class. This will incur - # retrieval fees. - DURABLE_REDUCED_AVAILABILITY = 8 - end - - # The attribute of a bucket. - module CloudStorageBucketAttribute - # Unused. - CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED = 0 - - # Scan buckets regardless of the attribute. - ALL_SUPPORTED_BUCKETS = 1 - - # Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) - # disabled. Only one of - # AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. - AUTOCLASS_DISABLED = 2 - - # Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) - # enabled. Only one of - # AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. Scanning - # Autoclass-enabled buckets can affect object storage classes. - AUTOCLASS_ENABLED = 3 - end - end - - # Requirements that must be true before a file store is scanned in discovery - # for the first time. There is an AND relationship between the top-level - # attributes. - # @!attribute [rw] created_after - # @return [::Google::Protobuf::Timestamp] - # Optional. File store must have been created after this date. Used to avoid - # backfilling. - # @!attribute [rw] min_age - # @return [::Google::Protobuf::Duration] - # Optional. Minimum age a file store must have. If set, the value must be 1 - # hour or greater. - # @!attribute [rw] cloud_storage_conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryCloudStorageConditions] - # Optional. Cloud Storage conditions. - class DiscoveryFileStoreConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target used to match against for discovery of resources from other clouds. - # An [AWS connector in Security Command Center - # (Enterprise](https://cloud.google.com/security-command-center/docs/connect-scc-to-aws) - # is required to use this feature. - # @!attribute [rw] data_source_type - # @return [::Google::Cloud::Dlp::V2::DataSourceType] - # Required. The type of data profiles generated by this discovery target. - # Supported values are: - # * aws/s3/bucket - # @!attribute [rw] filter - # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudFilter] - # Required. The resources that the discovery cadence applies to. The - # first target with a matching filter will be the one to apply to a resource. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudConditions] - # Optional. In addition to matching the filter, these conditions must be true - # before a profile is generated. - # @!attribute [rw] generation_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryOtherCloudGenerationCadence] - # How often and when to update data profiles. New resources that match both - # the filter and conditions are scanned as quickly as possible depending on - # system capacity. - # - # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disabled - # @return [::Google::Cloud::Dlp::V2::Disabled] - # Disable profiling for resources that match this filter. - # - # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OtherCloudDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines which resources from the other cloud will have profiles generated. - # Includes the ability to filter by resource names. - # @!attribute [rw] collection - # @return [::Google::Cloud::Dlp::V2::OtherCloudResourceCollection] - # A collection of resources for this filter to apply to. - # - # Note: The following fields are mutually exclusive: `collection`, `single_resource`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] single_resource - # @return [::Google::Cloud::Dlp::V2::OtherCloudSingleResourceReference] - # The resource to scan. Configs using this filter can only have one target - # (the target with this single resource reference). - # - # Note: The following fields are mutually exclusive: `single_resource`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] others - # @return [::Google::Cloud::Dlp::V2::AllOtherResources] - # Optional. Catch-all. This should always be the last target in the list - # because anything above it will apply first. Should only appear once in a - # configuration. If none is specified, a default one will be added - # automatically. - # - # Note: The following fields are mutually exclusive: `others`, `collection`, `single_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryOtherCloudFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Match resources using regex filters. - # @!attribute [rw] include_regexes - # @return [::Google::Cloud::Dlp::V2::OtherCloudResourceRegexes] - # A collection of regular expressions to match a resource against. - class OtherCloudResourceCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of regular expressions to determine what resources to match - # against. - # @!attribute [rw] patterns - # @return [::Array<::Google::Cloud::Dlp::V2::OtherCloudResourceRegex>] - # A group of regular expression patterns to match against one or more - # resources. - # Maximum of 100 entries. The sum of all regular expression's length can't - # exceed 10 KiB. - class OtherCloudResourceRegexes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more resources. At least one pattern must - # be specified. Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - # @!attribute [rw] amazon_s3_bucket_regex - # @return [::Google::Cloud::Dlp::V2::AmazonS3BucketRegex] - # Regex for Amazon S3 buckets. - class OtherCloudResourceRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AWS account regex. - # @!attribute [rw] account_id_regex - # @return [::String] - # Optional. Regex to test the AWS account ID against. - # If empty, all accounts match. - class AwsAccountRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Amazon S3 bucket regex. - # @!attribute [rw] aws_account_regex - # @return [::Google::Cloud::Dlp::V2::AwsAccountRegex] - # The AWS account regex. - # @!attribute [rw] bucket_name_regex - # @return [::String] - # Optional. Regex to test the bucket name against. - # If empty, all buckets match. - class AmazonS3BucketRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identifies a single resource, like a single Amazon S3 bucket. - # @!attribute [rw] amazon_s3_bucket - # @return [::Google::Cloud::Dlp::V2::AmazonS3Bucket] - # Amazon S3 bucket. - class OtherCloudSingleResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AWS account. - # @!attribute [rw] account_id - # @return [::String] - # Required. AWS account ID. - class AwsAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Amazon S3 bucket. - # @!attribute [rw] aws_account - # @return [::Google::Cloud::Dlp::V2::AwsAccount] - # The AWS account. - # @!attribute [rw] bucket_name - # @return [::String] - # Required. The bucket name. - class AmazonS3Bucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requirements that must be true before a resource is profiled for the first - # time. - # @!attribute [rw] min_age - # @return [::Google::Protobuf::Duration] - # Minimum age a resource must be before Cloud DLP can profile it. Value must - # be 1 hour or greater. - # @!attribute [rw] amazon_s3_bucket_conditions - # @return [::Google::Cloud::Dlp::V2::AmazonS3BucketConditions] - # Amazon S3 bucket conditions. - class DiscoveryOtherCloudConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Amazon S3 bucket conditions. - # @!attribute [rw] bucket_types - # @return [::Array<::Google::Cloud::Dlp::V2::AmazonS3BucketConditions::BucketType>] - # Optional. Bucket types that should be profiled. - # Optional. Defaults to TYPE_ALL_SUPPORTED if unspecified. - # @!attribute [rw] object_storage_classes - # @return [::Array<::Google::Cloud::Dlp::V2::AmazonS3BucketConditions::ObjectStorageClass>] - # Optional. Object classes that should be profiled. - # Optional. Defaults to ALL_SUPPORTED_CLASSES if unspecified. - class AmazonS3BucketConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported Amazon S3 bucket types. - # Defaults to TYPE_ALL_SUPPORTED. - module BucketType - # Unused. - TYPE_UNSPECIFIED = 0 - - # All supported classes. - TYPE_ALL_SUPPORTED = 1 - - # A general purpose Amazon S3 bucket. - TYPE_GENERAL_PURPOSE = 2 - end - - # Supported Amazon S3 object storage classes. - # Defaults to ALL_SUPPORTED_CLASSES. - module ObjectStorageClass - # Unused. - UNSPECIFIED = 0 - - # All supported classes. - ALL_SUPPORTED_CLASSES = 1 - - # Standard object class. - STANDARD = 2 - - # Standard - infrequent access object class. - STANDARD_INFREQUENT_ACCESS = 4 - - # Glacier - instant retrieval object class. - GLACIER_INSTANT_RETRIEVAL = 6 - - # Objects in the S3 Intelligent-Tiering access tiers. - INTELLIGENT_TIERING = 7 - end - end - - # How often existing resources should have their profiles refreshed. - # New resources are scanned as quickly as possible depending on system - # capacity. - # @!attribute [rw] refresh_frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # Optional. Frequency to update profiles regardless of whether the underlying - # resource has changes. Defaults to never. - # @!attribute [rw] inspect_template_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] - # Optional. Governs when to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # If not set, changing the template will not cause a data profile to update. - class DiscoveryOtherCloudGenerationCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location to begin a discovery scan. Denotes an organization ID or folder - # ID within an organization. - # @!attribute [rw] organization_id - # @return [::Integer] - # The ID of an organization to scan. - # - # Note: The following fields are mutually exclusive: `organization_id`, `folder_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] folder_id - # @return [::Integer] - # The ID of the folder within an organization to be scanned. - # - # Note: The following fields are mutually exclusive: `folder_id`, `organization_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryStartingLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The other cloud starting location for discovery. - # @!attribute [rw] aws_location - # @return [::Google::Cloud::Dlp::V2::OtherCloudDiscoveryStartingLocation::AwsDiscoveryStartingLocation] - # The AWS starting location for discovery. - class OtherCloudDiscoveryStartingLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The AWS starting location for discovery. - # @!attribute [rw] account_id - # @return [::String] - # The AWS account ID that this discovery config applies to. - # Within an AWS organization, you can find the AWS account ID inside an - # AWS account ARN. Example: - # arn:\\{partition}:organizations::\\{management_account_id}:account/\\{org_id}/\\{account_id} - # - # Note: The following fields are mutually exclusive: `account_id`, `all_asset_inventory_assets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] all_asset_inventory_assets - # @return [::Boolean] - # All AWS assets stored in Asset Inventory that didn't match other AWS - # discovery configs. - # - # Note: The following fields are mutually exclusive: `all_asset_inventory_assets`, `account_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AwsDiscoveryStartingLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Match discovery resources not covered by any other filter. - class AllOtherResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Target used to match against for discovery with Vertex AI datasets. - # @!attribute [rw] filter - # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetFilter] - # Required. The datasets the discovery cadence applies to. The first target - # with a matching filter will be the one to apply to a dataset. - # @!attribute [rw] conditions - # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetConditions] - # In addition to matching the filter, these conditions must be true - # before a profile is generated. - # @!attribute [rw] generation_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryVertexDatasetGenerationCadence] - # How often and when to update profiles. New datasets that match both the - # filter and conditions are scanned as quickly as possible depending on - # system capacity. - # - # Note: The following fields are mutually exclusive: `generation_cadence`, `disabled`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disabled - # @return [::Google::Cloud::Dlp::V2::Disabled] - # Disable profiling for datasets that match this filter. - # - # Note: The following fields are mutually exclusive: `disabled`, `generation_cadence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class VertexDatasetDiscoveryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines what datasets will have profiles generated within an organization - # or project. Includes the ability to filter by regular expression patterns - # on project ID or dataset regex. - # @!attribute [rw] collection - # @return [::Google::Cloud::Dlp::V2::VertexDatasetCollection] - # A specific set of Vertex AI datasets for this filter to apply to. - # - # Note: The following fields are mutually exclusive: `collection`, `vertex_dataset_resource_reference`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vertex_dataset_resource_reference - # @return [::Google::Cloud::Dlp::V2::VertexDatasetResourceReference] - # The dataset resource to scan. Targets including this can only include - # one target (the target with this dataset resource reference). - # - # Note: The following fields are mutually exclusive: `vertex_dataset_resource_reference`, `collection`, `others`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] others - # @return [::Google::Cloud::Dlp::V2::AllOtherResources] - # Catch-all. This should always be the last target in the list because - # anything above it will apply first. Should only appear once in a - # configuration. If none is specified, a default one will be added - # automatically. - # - # Note: The following fields are mutually exclusive: `others`, `collection`, `vertex_dataset_resource_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryVertexDatasetFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Match dataset resources using regex filters. - # @!attribute [rw] vertex_dataset_regexes - # @return [::Google::Cloud::Dlp::V2::VertexDatasetRegexes] - # The regex used to filter dataset resources. - class VertexDatasetCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of regular expressions to determine what datasets to match - # against. - # @!attribute [rw] patterns - # @return [::Array<::Google::Cloud::Dlp::V2::VertexDatasetRegex>] - # Required. The group of regular expression patterns to match against one or - # more datasets. Maximum of 100 entries. The sum of the lengths of all - # regular expressions can't exceed 10 KiB. - class VertexDatasetRegexes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A pattern to match against one or more dataset resources. - # @!attribute [rw] project_id_regex - # @return [::String] - # For organizations, if unset, will match all projects. Has no effect - # for configurations created within a project. - class VertexDatasetRegex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identifies a single Vertex AI resource. Only datasets are - # supported. - # @!attribute [rw] dataset_resource_name - # @return [::String] - # Required. The name of the Vertex AI resource. If set within a project-level - # configuration, the specified resource must be within the project. - # Examples: - # - # * `projects/{project}/locations/{location}/datasets/{dataset}` - class VertexDatasetResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requirements that must be true before a dataset is profiled for the - # first time. - # @!attribute [rw] created_after - # @return [::Google::Protobuf::Timestamp] - # Vertex AI dataset must have been created after this date. Used to avoid - # backfilling. - # @!attribute [rw] min_age - # @return [::Google::Protobuf::Duration] - # Minimum age a Vertex AI dataset must have. If set, the value must be 1 hour - # or greater. - class DiscoveryVertexDatasetConditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How often existing datasets should have their profiles refreshed. - # New datasets are scanned as quickly as possible depending on system - # capacity. - # @!attribute [rw] refresh_frequency - # @return [::Google::Cloud::Dlp::V2::DataProfileUpdateFrequency] - # If you set this field, profiles are refreshed at this - # frequency regardless of whether the underlying datasets have changed. - # Defaults to never. - # @!attribute [rw] inspect_template_modified_cadence - # @return [::Google::Cloud::Dlp::V2::DiscoveryInspectTemplateModifiedCadence] - # Governs when to update data profiles when the inspection rules - # defined by the `InspectTemplate` change. - # If not set, changing the template will not cause a data profile to be - # updated. - class DiscoveryVertexDatasetGenerationCadence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Combines all of the information about a DLP job. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of job. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::DlpJob::JobState] - # State of a job. - # @!attribute [rw] risk_details - # @return [::Google::Cloud::Dlp::V2::AnalyzeDataSourceRiskDetails] - # Results from analyzing risk of a data source. - # - # Note: The following fields are mutually exclusive: `risk_details`, `inspect_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] inspect_details - # @return [::Google::Cloud::Dlp::V2::InspectDataSourceDetails] - # Results from inspecting a data source. - # - # Note: The following fields are mutually exclusive: `inspect_details`, `risk_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time when the job was created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the job started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Time when the job finished. - # @!attribute [rw] last_modified - # @return [::Google::Protobuf::Timestamp] - # Time when the job was last modified by the system. - # @!attribute [rw] job_trigger_name - # @return [::String] - # If created by a job trigger, the resource name of the trigger that - # instantiated the job. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # A stream of errors encountered running the job. - # @!attribute [rw] action_details - # @return [::Array<::Google::Cloud::Dlp::V2::ActionDetails>] - # Events that should occur after the job has completed. - class DlpJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a job. New items may be added. - module JobState - # Unused. - JOB_STATE_UNSPECIFIED = 0 - - # The job has not yet started. - PENDING = 1 - - # The job is currently running. Once a job has finished it will transition - # to FAILED or DONE. - RUNNING = 2 - - # The job is no longer running. - DONE = 3 - - # The job was canceled before it could be completed. - CANCELED = 4 - - # The job had an error and did not complete. - FAILED = 5 - - # The job is currently accepting findings via hybridInspect. - # A hybrid job in ACTIVE state may continue to have findings added to it - # through the calling of hybridInspect. After the job has finished no more - # calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. - ACTIVE = 6 - end - end - - # The request message for - # {::Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job GetDlpJob}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DlpJob resource. - class GetDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for listing DLP jobs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on whether you have [specified a - # processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] filter - # @return [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields/values for inspect jobs: - # - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - # - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - # - `trigger_name` - The name of the trigger that created the job. - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * Supported fields for risk analysis jobs: - # - `state` - RUNNING|CANCELED|FINISHED|FAILED - # - 'end_time` - Corresponds to the time the job finished. - # - 'start_time` - Corresponds to the time the job finished. - # * The operator must be `=` or `!=`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * inspected_storage = cloud_storage AND state = done - # * inspected_storage = cloud_storage OR inspected_storage = bigquery - # * inspected_storage = cloud_storage AND (state = done OR state = canceled) - # * end_time > \"2017-12-12T00:00:00+00:00\" - # - # The length of this field should be no more than 500 characters. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] type - # @return [::Google::Cloud::Dlp::V2::DlpJobType] - # The type of job. Defaults to `DlpJobType.INSPECT` - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, end_time asc, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the job was created. - # - `end_time`: corresponds to the time the job ended. - # - `name`: corresponds to the job's name. - # - `state`: corresponds to `state` - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListDlpJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for listing DLP jobs. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Dlp::V2::DlpJob>] - # A list of DlpJobs that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - class ListDlpJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for canceling a DLP job. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DlpJob resource to be cancelled. - class CancelDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for finishing a DLP hybrid job. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DlpJob resource to be finished. - class FinishDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for deleting a DLP job. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the DlpJob resource to be deleted. - class DeleteDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDeidentifyTemplate. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] deidentify_template - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # Required. The DeidentifyTemplate to create. - # @!attribute [rw] template_id - # @return [::String] - # The template id can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class CreateDeidentifyTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDeidentifyTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of organization and deidentify template to be - # updated, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - # @!attribute [rw] deidentify_template - # @return [::Google::Cloud::Dlp::V2::DeidentifyTemplate] - # New DeidentifyTemplate value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask to control which fields get updated. - class UpdateDeidentifyTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetDeidentifyTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and deidentify template to be - # read, for example `organizations/433245324/deidentifyTemplates/432452342` - # or projects/project-id/deidentifyTemplates/432452342. - class GetDeidentifyTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDeidentifyTemplates. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListDeidentifyTemplates`. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc,update_time, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the template was created. - # - `update_time`: corresponds to the time the template was last updated. - # - `name`: corresponds to the template's name. - # - `display_name`: corresponds to the template's display name. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListDeidentifyTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDeidentifyTemplates. - # @!attribute [rw] deidentify_templates - # @return [::Array<::Google::Cloud::Dlp::V2::DeidentifyTemplate>] - # List of deidentify templates, up to page_size in - # ListDeidentifyTemplatesRequest. - # @!attribute [rw] next_page_token - # @return [::String] - # If the next page is available then the next page token to be used in the - # following ListDeidentifyTemplates request. - class ListDeidentifyTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteDeidentifyTemplate. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and deidentify template to be - # deleted, for example - # `organizations/433245324/deidentifyTemplates/432452342` or - # projects/project-id/deidentifyTemplates/432452342. - class DeleteDeidentifyTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a custom dictionary created from a data source of any size - # up to the maximum size defined in the - # [limits](https://cloud.google.com/sensitive-data-protection/limits) page. The - # artifacts of dictionary creation are stored in the specified Cloud Storage - # location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries - # that satisfy the size requirements. - # @!attribute [rw] output_path - # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] - # Location to store dictionary artifacts in Cloud Storage. These files - # will only be accessible by project owners and the DLP API. If any of these - # artifacts are modified, the dictionary is considered invalid and can no - # longer be used. - # @!attribute [rw] cloud_storage_file_set - # @return [::Google::Cloud::Dlp::V2::CloudStorageFileSet] - # Set of files containing newline-delimited lists of dictionary phrases. - # - # Note: The following fields are mutually exclusive: `cloud_storage_file_set`, `big_query_field`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] big_query_field - # @return [::Google::Cloud::Dlp::V2::BigQueryField] - # Field in a BigQuery table where each cell represents a dictionary phrase. - # - # Note: The following fields are mutually exclusive: `big_query_field`, `cloud_storage_file_set`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class LargeCustomDictionaryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Summary statistics of a custom dictionary. - # @!attribute [rw] approx_num_phrases - # @return [::Integer] - # Approximate number of distinct phrases in the dictionary. - class LargeCustomDictionaryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for stored infoTypes. All fields and subfield are provided - # by the user. For more information, see - # https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes. - # @!attribute [rw] display_name - # @return [::String] - # Display name of the StoredInfoType (max 256 characters). - # @!attribute [rw] description - # @return [::String] - # Description of the StoredInfoType (max 256 characters). - # @!attribute [rw] large_custom_dictionary - # @return [::Google::Cloud::Dlp::V2::LargeCustomDictionaryConfig] - # StoredInfoType where findings are defined by a dictionary of phrases. - # - # Note: The following fields are mutually exclusive: `large_custom_dictionary`, `dictionary`, `regex`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dictionary - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] - # Store dictionary-based CustomInfoType. - # - # Note: The following fields are mutually exclusive: `dictionary`, `large_custom_dictionary`, `regex`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] - # Store regular expression-based StoredInfoType. - # - # Note: The following fields are mutually exclusive: `regex`, `large_custom_dictionary`, `dictionary`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StoredInfoTypeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Statistics for a StoredInfoType. - # @!attribute [rw] large_custom_dictionary - # @return [::Google::Cloud::Dlp::V2::LargeCustomDictionaryStats] - # StoredInfoType where findings are defined by a dictionary of phrases. - class StoredInfoTypeStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Version of a StoredInfoType, including the configuration used to build it, - # create timestamp, and current state. - # @!attribute [rw] config - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] - # StoredInfoType configuration. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Create timestamp of the version. Read-only, determined by the system - # when the version is created. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeState] - # Stored info type version state. Read-only, updated by the system - # during dictionary creation. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # Errors that occurred when creating this storedInfoType version, or - # anomalies detected in the storedInfoType data that render it unusable. Only - # the five most recent errors will be displayed, with the most recent error - # appearing first. - # - # For example, some of the data for stored custom dictionaries is put in - # the user's Cloud Storage bucket, and if this data is modified or - # deleted by the user or another system, the dictionary becomes invalid. - # - # If any errors occur, fix the problem indicated by the error message and - # use the UpdateStoredInfoType API method to create another version of the - # storedInfoType to continue using it, reusing the same `config` if it was - # not the source of the error. - # @!attribute [rw] stats - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeStats] - # Statistics about this storedInfoType version. - class StoredInfoTypeVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # StoredInfoType resource message that contains information about the current - # version and any pending updates. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] current_version - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeVersion] - # Current version of the stored info type. - # @!attribute [rw] pending_versions - # @return [::Array<::Google::Cloud::Dlp::V2::StoredInfoTypeVersion>] - # Pending versions of the stored info type. Empty if no versions are - # pending. - class StoredInfoType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateStoredInfoType. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # + Organizations scope, location specified: - # `organizations/{org_id}/locations/{location_id}` - # + Organizations scope, no location specified (defaults to global): - # `organizations/{org_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] config - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] - # Required. Configuration of the storedInfoType to create. - # @!attribute [rw] stored_info_type_id - # @return [::String] - # The storedInfoType ID can contain uppercase and lowercase letters, - # numbers, and hyphens; that is, it must match the regular - # expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - # characters. Can be empty to allow the system to generate one. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class CreateStoredInfoTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateStoredInfoType. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of organization and storedInfoType to be updated, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - # @!attribute [rw] config - # @return [::Google::Cloud::Dlp::V2::StoredInfoTypeConfig] - # Updated configuration for the storedInfoType. If not provided, a new - # version of the storedInfoType will be created with the existing - # configuration. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask to control which fields get updated. - class UpdateStoredInfoTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetStoredInfoType. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and storedInfoType to be read, - # for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - class GetStoredInfoTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListStoredInfoTypes. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization) and whether you have [specified a processing - # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): - # - # + Projects scope, location specified: - # `projects/{project_id}/locations/{location_id}` - # + Projects scope, no location specified (defaults to global): - # `projects/{project_id}` - # - # The following example `parent` string specifies a parent project with the - # identifier `example-project`, and specifies the `europe-west3` location - # for processing data: - # - # parent=projects/example-project/locations/europe-west3 - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. Comes from the previous call - # to `ListStoredInfoTypes`. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, - # followed by `asc` or `desc` postfix. This list is case insensitive. The - # default sorting order is ascending. Redundant space characters are - # insignificant. - # - # Example: `name asc, display_name, create_time desc` - # - # Supported fields are: - # - # - `create_time`: corresponds to the time the most recent version of the - # resource was created. - # - `state`: corresponds to the state of the resource. - # - `name`: corresponds to resource name. - # - `display_name`: corresponds to info type's display name. - # @!attribute [rw] location_id - # @return [::String] - # Deprecated. This field has no effect. - class ListStoredInfoTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListStoredInfoTypes. - # @!attribute [rw] stored_info_types - # @return [::Array<::Google::Cloud::Dlp::V2::StoredInfoType>] - # List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. - # @!attribute [rw] next_page_token - # @return [::String] - # If the next page is available then the next page token to be used - # in the following ListStoredInfoTypes request. - class ListStoredInfoTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteStoredInfoType. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the organization and storedInfoType to be - # deleted, for example `organizations/433245324/storedInfoTypes/432452342` or - # projects/project-id/storedInfoTypes/432452342. - class DeleteStoredInfoTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to search for potentially sensitive info in a custom location. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the trigger to execute a hybrid inspect on, for - # example `projects/dlp-test-project/jobTriggers/53234423`. - # @!attribute [rw] hybrid_item - # @return [::Google::Cloud::Dlp::V2::HybridContentItem] - # The item to inspect. - class HybridInspectJobTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to search for potentially sensitive info in a custom location. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the job to execute a hybrid inspect on, for - # example `projects/dlp-test-project/dlpJob/53234423`. - # @!attribute [rw] hybrid_item - # @return [::Google::Cloud::Dlp::V2::HybridContentItem] - # The item to inspect. - class HybridInspectDlpJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An individual hybrid item to inspect. Will be stored temporarily during - # processing. - # @!attribute [rw] item - # @return [::Google::Cloud::Dlp::V2::ContentItem] - # The item to inspect. - # @!attribute [rw] finding_details - # @return [::Google::Cloud::Dlp::V2::HybridFindingDetails] - # Supplementary information that will be added to each finding. - class HybridContentItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Populate to associate additional data with each finding. - # @!attribute [rw] container_details - # @return [::Google::Cloud::Dlp::V2::Container] - # Details about the container where the content being inspected is from. - # @!attribute [rw] file_offset - # @return [::Integer] - # Offset in bytes of the line, from the beginning of the file, where the - # finding is located. Populate if the item being scanned is only part of a - # bigger item, such as a shard of a file and you want to track the absolute - # position of the finding. - # @!attribute [rw] row_offset - # @return [::Integer] - # Offset of the row for tables. Populate if the row(s) being scanned are - # part of a bigger dataset and you want to keep track of their absolute - # position. - # @!attribute [rw] table_options - # @return [::Google::Cloud::Dlp::V2::TableOptions] - # If the container is a table, additional information to make findings - # meaningful such as the columns that are primary keys. If not known ahead - # of time, can also be set within each inspect hybrid call and the two - # will be merged. Note that identifying_fields will only be stored to - # BigQuery, and only if the BigQuery action has been included. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels to represent user provided metadata about the data being inspected. - # If configured by the job, some key values may be required. - # The labels associated with `Finding`'s produced by hybrid - # inspection. - # - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - # - # No more than 10 labels can be associated with a given finding. - # - # Examples: - # - # * `"environment" : "production"` - # * `"pipeline" : "etl"` - class HybridFindingDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Quota exceeded errors will be thrown once quota has been met. - class HybridInspectResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the relationship between bounding boxes for image findings. - # @!attribute [rw] encloses - # @return [::Google::Cloud::Dlp::V2::Encloses] - # The context finding's bounding box must fully contain the target - # finding's bounding box. - # - # Note: The following fields are mutually exclusive: `encloses`, `fully_inside`, `overlaps`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fully_inside - # @return [::Google::Cloud::Dlp::V2::FullyInside] - # The context finding's bounding box must be fully inside the target - # finding's bounding box. - # - # Note: The following fields are mutually exclusive: `fully_inside`, `encloses`, `overlaps`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] overlaps - # @return [::Google::Cloud::Dlp::V2::Overlap] - # The context finding's bounding box and the target finding's bounding box - # must have a non-zero intersection. - # - # Note: The following fields are mutually exclusive: `overlaps`, `encloses`, `fully_inside`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ImageContainmentType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a condition for overlapping bounding boxes. - class Overlap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a condition where one bounding box encloses another. - class Encloses - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a condition where one bounding box is fully inside another. - class FullyInside - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list the profiles generated for a given organization or project. - # @!attribute [rw] parent - # @return [::String] - # Required. organizations/\\{org_id}/locations/\\{loc_id} - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id` - # * `sensitivity_level desc` - # - # Supported fields: - # - # - `project_id`: Google Cloud project ID - # - `sensitivity_level`: How sensitive the data in a project is, at most - # - `data_risk_level`: How much risk is associated with this data - # - `profile_last_generated`: Date and time (in epoch seconds) the profile - # was last generated - # @!attribute [rw] filter - # @return [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: the Google Cloud project ID - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - class ListProjectDataProfilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of profiles generated for a given organization or project. - # @!attribute [rw] project_data_profiles - # @return [::Array<::Google::Cloud::Dlp::V2::ProjectDataProfile>] - # List of data profiles. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. - class ListProjectDataProfilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list the profiles generated for a given organization or project. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `row_count`: Number of rows in this resource. - # @!attribute [rw] filter - # @return [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `dataset_id`: The BigQuery dataset ID - # - `table_id`: The ID of the BigQuery table - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - class ListTableDataProfilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of profiles generated for a given organization or project. - # @!attribute [rw] table_data_profiles - # @return [::Array<::Google::Cloud::Dlp::V2::TableDataProfile>] - # List of data profiles. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. - class ListTableDataProfilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list the profiles generated for a given organization or project. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @!attribute [rw] page_token - # @return [::String] - # Page token to continue retrieval. - # @!attribute [rw] page_size - # @return [::Integer] - # Size of the page. This value can be limited by the server. If zero, server - # returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields to order by, followed by `asc` or `desc` - # postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `table_id` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `dataset_id`: The ID of a BigQuery dataset. - # - `table_id`: The ID of a BigQuery table. - # - `sensitivity_level`: How sensitive the data in a column is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # @!attribute [rw] filter - # @return [::String] - # Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `table_data_profile_name`: The name of the related table data - # profile - # - `project_id`: The Google Cloud project ID (REQUIRED) - # - `dataset_id`: The BigQuery dataset ID (REQUIRED) - # - `table_id`: The BigQuery table ID (REQUIRED) - # - `field_id`: The ID of the BigQuery field - # - `info_type`: The infotype detected in the resource - # - `sensitivity_level`: HIGH|MEDIUM|LOW - # - `data_risk_level`: How much risk is associated with this data - # - `status_code`: An RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # * The operator must be `=` for project_id, dataset_id, and table_id. Other - # filters also support `!=`. The `profile_last_generated` filter also - # supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * project_id = 12345 AND status_code = 1 - # * project_id = 12345 AND sensitivity_level = HIGH - # * project_id = 12345 AND info_type = STREET_ADDRESS - # * profile_last_generated < "2025-01-01T00:00:00.000Z" - # - # The length of this field should be no more than 500 characters. - class ListColumnDataProfilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of profiles generated for a given organization or project. - # @!attribute [rw] column_data_profiles - # @return [::Array<::Google::Cloud::Dlp::V2::ColumnDataProfile>] - # List of data profiles. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. - class ListColumnDataProfilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Score is a summary of all elements in the data profile. - # A higher number means more risk. - # @!attribute [rw] score - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel::DataRiskLevelScore] - # The score applied to the resource. - class DataRiskLevel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Various score levels for resources. - module DataRiskLevelScore - # Unused. - RISK_SCORE_UNSPECIFIED = 0 - - # Low risk - Lower indication of sensitive data that appears to have - # additional access restrictions in place or no indication of sensitive - # data found. - RISK_LOW = 10 - - # Unable to determine risk. - RISK_UNKNOWN = 12 - - # Medium risk - Sensitive data may be present but additional access or fine - # grain access restrictions appear to be present. Consider limiting - # access even further or transform data to mask. - RISK_MODERATE = 20 - - # High risk – SPII may be present. Access controls may include public - # ACLs. Exfiltration of data may lead to user data loss. Re-identification - # of users may be possible. Consider limiting usage and or removing SPII. - RISK_HIGH = 30 - end - end - - # An aggregated profile for this project, based on the resources profiled - # within it. - # @!attribute [rw] name - # @return [::String] - # The resource name of the profile. - # @!attribute [rw] project_id - # @return [::String] - # Project ID or account that was profiled. - # @!attribute [rw] profile_last_generated - # @return [::Google::Protobuf::Timestamp] - # The last time the profile was generated. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The sensitivity score of this project. - # @!attribute [rw] data_risk_level - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] - # The data risk level of this project. - # @!attribute [rw] profile_status - # @return [::Google::Cloud::Dlp::V2::ProfileStatus] - # Success or error status of the last attempt to profile the project. - # @!attribute [rw] table_data_profile_count - # @return [::Integer] - # The number of table data profiles generated for this project. - # @!attribute [rw] file_store_data_profile_count - # @return [::Integer] - # The number of file store data profiles generated for this project. - class ProjectDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Snapshot of the configurations used to generate the profile. - # @!attribute [rw] inspect_config - # @return [::Google::Cloud::Dlp::V2::InspectConfig] - # A copy of the inspection config used to generate this profile. This - # is a copy of the inspect_template specified in `DataProfileJobConfig`. - # @!attribute [rw] data_profile_job - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Dlp::V2::DataProfileJobConfig] - # A copy of the configuration used to generate this profile. This is - # deprecated, and the DiscoveryConfig field is preferred moving forward. - # DataProfileJobConfig will still be written here for Discovery in BigQuery - # for backwards compatibility, but will not be updated with new fields, while - # DiscoveryConfig will. - # @!attribute [rw] discovery_config - # @return [::Google::Cloud::Dlp::V2::DiscoveryConfig] - # A copy of the configuration used to generate this profile. - # @!attribute [rw] inspect_template_name - # @return [::String] - # Name of the inspection template used to generate this profile - # @!attribute [rw] inspect_template_modified_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp when the template was modified - class DataProfileConfigSnapshot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile for a scanned table. - # @!attribute [rw] name - # @return [::String] - # The name of the profile. - # @!attribute [rw] data_source_type - # @return [::Google::Cloud::Dlp::V2::DataSourceType] - # The resource type that was profiled. - # @!attribute [rw] project_data_profile - # @return [::String] - # The resource name of the project data profile for this table. - # @!attribute [rw] dataset_project_id - # @return [::String] - # The Google Cloud project ID that owns the resource. - # @!attribute [rw] dataset_location - # @return [::String] - # If supported, the location where the dataset's data is stored. - # See https://cloud.google.com/bigquery/docs/locations for supported - # locations. - # @!attribute [rw] dataset_id - # @return [::String] - # If the resource is BigQuery, the dataset ID. - # @!attribute [rw] table_id - # @return [::String] - # The table ID. - # @!attribute [rw] full_resource - # @return [::String] - # The Cloud Asset Inventory resource that was profiled in order to generate - # this TableDataProfile. - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] profile_status - # @return [::Google::Cloud::Dlp::V2::ProfileStatus] - # Success or error status from the most recent profile generation attempt. - # May be empty if the profile is still being generated. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::TableDataProfile::State] - # State of a profile. This will always be set to DONE when the table data - # profile is written to another service like BigQuery or Pub/Sub. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The sensitivity score of this table. - # @!attribute [rw] data_risk_level - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] - # The data risk level of this table. - # @!attribute [rw] predicted_info_types - # @return [::Array<::Google::Cloud::Dlp::V2::InfoTypeSummary>] - # The infoTypes predicted from this table's data. - # @!attribute [rw] other_info_types - # @return [::Array<::Google::Cloud::Dlp::V2::OtherInfoTypeSummary>] - # Other infoTypes found in this table's data. - # @!attribute [rw] config_snapshot - # @return [::Google::Cloud::Dlp::V2::DataProfileConfigSnapshot] - # The snapshot of the configurations used to generate the profile. - # @!attribute [rw] last_modified_time - # @return [::Google::Protobuf::Timestamp] - # The time when this table was last modified - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when this table expires. - # @!attribute [rw] scanned_column_count - # @return [::Integer] - # The number of columns profiled in the table. - # @!attribute [rw] failed_column_count - # @return [::Integer] - # The number of columns skipped in the table because of an error. - # @!attribute [rw] table_size_bytes - # @return [::Integer] - # The size of the table when the profile was generated. - # @!attribute [rw] row_count - # @return [::Integer] - # Number of rows in the table when the profile was generated. - # This will not be populated for BigLake tables. - # @!attribute [rw] encryption_status - # @return [::Google::Cloud::Dlp::V2::EncryptionStatus] - # How the table is encrypted. - # @!attribute [rw] resource_visibility - # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] - # How broadly a resource has been shared. - # @!attribute [rw] profile_last_generated - # @return [::Google::Protobuf::Timestamp] - # The last time the profile was generated. - # @!attribute [rw] resource_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels applied to the resource at the time the profile was generated. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the table was created. - # @!attribute [rw] sample_findings_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # The BigQuery table to which the sample findings are written. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::Dlp::V2::Tag>] - # The tags attached to the table, including any tags attached during - # profiling. Because tags are attached to Cloud SQL instances rather than - # Cloud SQL tables, this field is empty for Cloud SQL table profiles. - # @!attribute [rw] related_resources - # @return [::Array<::Google::Cloud::Dlp::V2::RelatedResource>] - # Resources related to this profile. - # @!attribute [rw] domains - # @return [::Array<::Google::Cloud::Dlp::V2::Domain>] - # Domains associated with the profile. - class TableDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible states of a profile. New items may be added. - module State - # Unused. - STATE_UNSPECIFIED = 0 - - # The profile is currently running. Once a profile has finished it will - # transition to DONE. - RUNNING = 1 - - # The profile is no longer generating. - # If profile_status.status.code is 0, the profile succeeded, otherwise, it - # failed. - DONE = 2 - end - end - - # Success or errors for the profile generation. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Profiling status code and optional message. The `status.code` value is 0 - # (default value) for OK. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Time when the profile generation status was updated - class ProfileStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The infoType details for this column. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The infoType. - # @!attribute [rw] estimated_prevalence - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Not populated for predicted infotypes. - class InfoTypeSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Infotype details for other infoTypes found within a column. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The other infoType. - # @!attribute [rw] estimated_prevalence - # @return [::Integer] - # Approximate percentage of non-null rows that contained data detected by - # this infotype. - # @!attribute [rw] excluded_from_analysis - # @return [::Boolean] - # Whether this infoType was excluded from sensitivity and risk analysis due - # to factors such as low prevalence (subject to change). - class OtherInfoTypeSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile for a scanned column within a table. - # @!attribute [rw] name - # @return [::String] - # The name of the profile. - # @!attribute [rw] profile_status - # @return [::Google::Cloud::Dlp::V2::ProfileStatus] - # Success or error status from the most recent profile generation attempt. - # May be empty if the profile is still being generated. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::State] - # State of a profile. - # @!attribute [rw] profile_last_generated - # @return [::Google::Protobuf::Timestamp] - # The last time the profile was generated. - # @!attribute [rw] table_data_profile - # @return [::String] - # The resource name of the table data profile. - # @!attribute [rw] table_full_resource - # @return [::String] - # The resource name of the resource this column is within. - # @!attribute [rw] dataset_project_id - # @return [::String] - # The Google Cloud project ID that owns the profiled resource. - # @!attribute [rw] dataset_location - # @return [::String] - # If supported, the location where the dataset's data is stored. - # See https://cloud.google.com/bigquery/docs/locations for supported - # BigQuery locations. - # @!attribute [rw] dataset_id - # @return [::String] - # The BigQuery dataset ID, if the resource profiled is a BigQuery table. - # @!attribute [rw] table_id - # @return [::String] - # The table ID. - # @!attribute [rw] column - # @return [::String] - # The name of the column. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The sensitivity of this column. - # @!attribute [rw] data_risk_level - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] - # The data risk level for this column. - # @!attribute [rw] column_info_type - # @return [::Google::Cloud::Dlp::V2::InfoTypeSummary] - # If it's been determined this column can be identified as a single type, - # this will be set. Otherwise the column either has unidentifiable content - # or mixed types. - # @!attribute [rw] other_matches - # @return [::Array<::Google::Cloud::Dlp::V2::OtherInfoTypeSummary>] - # Other types found within this column. List will be unordered. - # @!attribute [rw] estimated_null_percentage - # @return [::Google::Cloud::Dlp::V2::NullPercentageLevel] - # Approximate percentage of entries being null in the column. - # @!attribute [rw] estimated_uniqueness_score - # @return [::Google::Cloud::Dlp::V2::UniquenessScoreLevel] - # Approximate uniqueness of the column. - # @!attribute [rw] free_text_score - # @return [::Float] - # The likelihood that this column contains free-form text. - # A value close to 1 may indicate the column is likely to contain - # free-form or natural language text. - # Range in 0-1. - # @!attribute [rw] column_type - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::ColumnDataType] - # The data type of a given column. - # @!attribute [rw] policy_state - # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile::ColumnPolicyState] - # Indicates if a policy tag has been applied to the column. - class ColumnDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a profile. New items may be added. - module State - # Unused. - STATE_UNSPECIFIED = 0 - - # The profile is currently running. Once a profile has finished it will - # transition to DONE. - RUNNING = 1 - - # The profile is no longer generating. - # If profile_status.status.code is 0, the profile succeeded, otherwise, it - # failed. - DONE = 2 - end - - # Data types of the data in a column. Types may be added over time. - module ColumnDataType - # Invalid type. - COLUMN_DATA_TYPE_UNSPECIFIED = 0 - - # Encoded as a string in decimal format. - TYPE_INT64 = 1 - - # Encoded as a boolean "false" or "true". - TYPE_BOOL = 2 - - # Encoded as a number, or string "NaN", "Infinity" or "-Infinity". - TYPE_FLOAT64 = 3 - - # Encoded as a string value. - TYPE_STRING = 4 - - # Encoded as a base64 string per RFC 4648, section 4. - TYPE_BYTES = 5 - - # Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string: - # 1985-04-12T23:20:50.52Z - TYPE_TIMESTAMP = 6 - - # Encoded as RFC 3339 full-date format string: 1985-04-12 - TYPE_DATE = 7 - - # Encoded as RFC 3339 partial-time format string: 23:20:50.52 - TYPE_TIME = 8 - - # Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52 - TYPE_DATETIME = 9 - - # Encoded as WKT - TYPE_GEOGRAPHY = 10 - - # Encoded as a decimal string. - TYPE_NUMERIC = 11 - - # Container of ordered fields, each with a type and field name. - TYPE_RECORD = 12 - - # Decimal type. - TYPE_BIGNUMERIC = 13 - - # Json type. - TYPE_JSON = 14 - - # Interval type. - TYPE_INTERVAL = 15 - - # `Range` type. - TYPE_RANGE_DATE = 16 - - # `Range` type. - TYPE_RANGE_DATETIME = 17 - - # `Range` type. - TYPE_RANGE_TIMESTAMP = 18 - end - - # The possible policy states for a column. - module ColumnPolicyState - # No policy tags. - COLUMN_POLICY_STATE_UNSPECIFIED = 0 - - # Column has policy tag applied. - COLUMN_POLICY_TAGGED = 1 - end - end - - # The profile for a file store. - # - # * Cloud Storage: maps 1:1 with a bucket. - # * Amazon S3: maps 1:1 with a bucket. - # @!attribute [rw] name - # @return [::String] - # The name of the profile. - # @!attribute [rw] data_source_type - # @return [::Google::Cloud::Dlp::V2::DataSourceType] - # The resource type that was profiled. - # @!attribute [rw] project_data_profile - # @return [::String] - # The resource name of the project data profile for this file store. - # @!attribute [rw] project_id - # @return [::String] - # The Google Cloud project ID that owns the resource. - # For Amazon S3 buckets, this is the AWS Account Id. - # @!attribute [rw] file_store_location - # @return [::String] - # The location of the file store. - # - # * Cloud Storage: - # https://cloud.google.com/storage/docs/locations#available-locations - # * Amazon S3: - # https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints - # @!attribute [rw] data_storage_locations - # @return [::Array<::String>] - # For resources that have multiple storage locations, these are those - # regions. For Cloud Storage this is the list of regions chosen for - # dual-region storage. `file_store_location` will normally be the - # corresponding multi-region for the list of individual locations. The first - # region is always picked as the processing and storage location for the data - # profile. - # @!attribute [rw] location_type - # @return [::String] - # The location type of the file store (region, dual-region, multi-region, - # etc). If dual-region, expect data_storage_locations to be populated. - # @!attribute [rw] file_store_path - # @return [::String] - # The file store path. - # - # * Cloud Storage: `gs://{bucket}` - # * Amazon S3: `s3://{bucket}` - # * Vertex AI dataset: - # `projects/{project_number}/locations/{location}/datasets/{dataset_id}` - # @!attribute [rw] full_resource - # @return [::String] - # The resource name of the resource profiled. - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # - # Example format of an S3 bucket full resource name: - # `//cloudasset.googleapis.com/organizations/{org_id}/otherCloudConnections/aws/arn:aws:s3:::{bucket_name}` - # @!attribute [rw] config_snapshot - # @return [::Google::Cloud::Dlp::V2::DataProfileConfigSnapshot] - # The snapshot of the configurations used to generate the profile. - # @!attribute [rw] profile_status - # @return [::Google::Cloud::Dlp::V2::ProfileStatus] - # Success or error status from the most recent profile generation attempt. - # May be empty if the profile is still being generated. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile::State] - # State of a profile. - # @!attribute [rw] profile_last_generated - # @return [::Google::Protobuf::Timestamp] - # The last time the profile was generated. - # @!attribute [rw] resource_visibility - # @return [::Google::Cloud::Dlp::V2::ResourceVisibility] - # How broadly a resource has been shared. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The sensitivity score of this resource. - # @!attribute [rw] data_risk_level - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] - # The data risk level of this resource. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the file store was first created. - # @!attribute [rw] last_modified_time - # @return [::Google::Protobuf::Timestamp] - # The time the file store was last modified. - # @!attribute [rw] file_cluster_summaries - # @return [::Array<::Google::Cloud::Dlp::V2::FileClusterSummary>] - # FileClusterSummary per each cluster. - # @!attribute [rw] resource_attributes - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dlp::V2::Value}] - # Attributes of the resource being profiled. - # Currently used attributes: - # - # * customer_managed_encryption: boolean - # - true: the resource is encrypted with a customer-managed key. - # - false: the resource is encrypted with a provider-managed key. - # @!attribute [rw] resource_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels applied to the resource at the time the profile was generated. - # @!attribute [rw] file_store_info_type_summaries - # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreInfoTypeSummary>] - # InfoTypes detected in this file store. - # @!attribute [rw] sample_findings_table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # The BigQuery table to which the sample findings are written. - # @!attribute [rw] file_store_is_empty - # @return [::Boolean] - # The file store does not have any files. If the profiling operation failed, - # this is false. - # @!attribute [rw] tags - # @return [::Array<::Google::Cloud::Dlp::V2::Tag>] - # The tags attached to the resource, including any tags attached during - # profiling. - # @!attribute [rw] related_resources - # @return [::Array<::Google::Cloud::Dlp::V2::RelatedResource>] - # Resources related to this profile. - # @!attribute [rw] domains - # @return [::Array<::Google::Cloud::Dlp::V2::Domain>] - # Domains associated with the profile. - class FileStoreDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Dlp::V2::Value] - class ResourceAttributesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible states of a profile. New items may be added. - module State - # Unused. - STATE_UNSPECIFIED = 0 - - # The profile is currently running. Once a profile has finished it will - # transition to DONE. - RUNNING = 1 - - # The profile is no longer generating. - # If profile_status.status.code is 0, the profile succeeded, otherwise, it - # failed. - DONE = 2 - end - end - - # A tag associated with a resource. - # @!attribute [rw] namespaced_tag_value - # @return [::String] - # The namespaced name for the tag value to attach to Google Cloud resources. - # Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for - # example, "123456/environment/prod" for an organization parent, or - # "my-project/environment/prod" for a project parent. This is only set for - # Google Cloud resources. - # @!attribute [rw] key - # @return [::String] - # The key of a tag key-value pair. For Google Cloud resources, this is the - # resource name of the key, for example, "tagKeys/123456". - # @!attribute [rw] value - # @return [::String] - # The value of a tag key-value pair. For Google Cloud resources, this is the - # resource name of the value, for example, "tagValues/123456". - class Tag - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Tags to match against for filtering. - # @!attribute [rw] tag_filters - # @return [::Array<::Google::Cloud::Dlp::V2::TagFilter>] - # Required. A resource must match ALL of the specified tag filters to be - # included in the collection. - class TagFilters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single tag to filter against. - # @!attribute [rw] namespaced_tag_value - # @return [::String] - # The namespaced name for the tag value. Must be in the format - # `{parent_id}/{tag_key_short_name}/{short_name}`, for example, - # "123456/environment/prod" for an organization parent, or - # "my-project/environment/prod" for a project parent. - # - # Note: The following fields are mutually exclusive: `namespaced_tag_value`, `namespaced_tag_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] namespaced_tag_key - # @return [::String] - # The namespaced name for the tag key. Must be in the format - # `{parent_id}/{tag_key_short_name}`, for example, "123456/sensitive" for - # an organization parent, or "my-project/sensitive" for a project parent. - # - # Note: The following fields are mutually exclusive: `namespaced_tag_key`, `namespaced_tag_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TagFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A related resource. - # Examples: - # - # * The source BigQuery table for a Vertex AI dataset. - # * The source Cloud Storage bucket for a Vertex AI dataset. - # @!attribute [rw] full_resource - # @return [::String] - # The full resource name of the related resource. - class RelatedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding the discovered InfoType. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # The InfoType seen. - class FileStoreInfoTypeSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding the discovered file extension. - # @!attribute [rw] file_extension - # @return [::String] - # The file extension if set. (aka .pdf, .jpg, .txt) - class FileExtensionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The file cluster summary. - # @!attribute [rw] file_cluster_type - # @return [::Google::Cloud::Dlp::V2::FileClusterType] - # The file cluster type. - # @!attribute [rw] file_store_info_type_summaries - # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreInfoTypeSummary>] - # InfoTypes detected in this cluster. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # The sensitivity score of this cluster. The score will be SENSITIVITY_LOW - # if nothing has been scanned. - # @!attribute [rw] data_risk_level - # @return [::Google::Cloud::Dlp::V2::DataRiskLevel] - # The data risk level of this cluster. RISK_LOW if nothing has been - # scanned. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # A list of errors detected while scanning this cluster. The list is - # truncated to 10 per cluster. - # @!attribute [rw] file_extensions_scanned - # @return [::Array<::Google::Cloud::Dlp::V2::FileExtensionInfo>] - # A sample of file types scanned in this cluster. Empty if no files were - # scanned. File extensions can be derived from the file name or the file - # content. - # @!attribute [rw] file_extensions_seen - # @return [::Array<::Google::Cloud::Dlp::V2::FileExtensionInfo>] - # A sample of file types seen in this cluster. Empty if no files were seen. - # File extensions can be derived from the file name or the file content. - # @!attribute [rw] no_files_exist - # @return [::Boolean] - # True if no files exist in this cluster. If the file store had more files - # than could be listed, this will be false even if no files for this cluster - # were seen and file_extensions_seen is empty. - class FileClusterSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a project data profile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/projectDataProfiles/53234423`. - class GetProjectDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a file store data profile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. - class GetFileStoreDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list the file store profiles generated for a given organization or - # project. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the organization or project, for - # example `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token to continue retrieval. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Size of the page. This value can be limited by the server. If - # zero, server returns a page of max size 100. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Comma-separated list of fields to order by, followed by `asc` or - # `desc` postfix. This list is case insensitive. The default sorting order is - # ascending. Redundant space characters are insignificant. Only one order - # field at a time is allowed. - # - # Examples: - # - # * `project_id asc` - # * `name` - # * `sensitivity_level desc` - # - # Supported fields are: - # - # - `project_id`: The Google Cloud project ID. - # - `sensitivity_level`: How sensitive the data in a table is, at most. - # - `data_risk_level`: How much risk is associated with this data. - # - `profile_last_generated`: When the profile was last updated in epoch - # seconds. - # - `last_modified`: The last time the resource was modified. - # - `resource_visibility`: Visibility restriction for this resource. - # - `name`: The name of the profile. - # - `create_time`: The time the file store was first created. - # @!attribute [rw] filter - # @return [::String] - # Optional. Allows filtering. - # - # Supported syntax: - # - # * Filter expressions are made up of one or more restrictions. - # * Restrictions can be combined by `AND` or `OR` logical operators. A - # sequence of restrictions implicitly uses `AND`. - # * A restriction has the form of `{field} {operator} {value}`. - # * Supported fields: - # - `project_id`: The Google Cloud project ID - # - `account_id`: The AWS account ID - # - `file_store_path`: The path like "gs://bucket" - # - `data_source_type`: The profile's data source type, like - # "google/storage/bucket" - # - `data_storage_location`: The location where the file store's data is - # stored, like "us-central1" - # - `sensitivity_level`: HIGH|MODERATE|LOW - # - `data_risk_level`: HIGH|MODERATE|LOW - # - `resource_visibility`: PUBLIC|RESTRICTED - # - `status_code`: an RPC status code as defined in - # https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto - # - `profile_last_generated`: Date and time the profile was last - # generated - # - # * The operator must be `=` or `!=`. The `profile_last_generated` filter - # also supports `<` and `>`. - # - # The syntax is based on https://google.aip.dev/160. - # - # Examples: - # - # * `project_id = 12345 AND status_code = 1` - # * `project_id = 12345 AND sensitivity_level = HIGH` - # * `project_id = 12345 AND resource_visibility = PUBLIC` - # * `file_store_path = "gs://mybucket"` - # * `profile_last_generated < "2025-01-01T00:00:00.000Z"` - # - # The length of this field should be no more than 500 characters. - class ListFileStoreDataProfilesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of file store data profiles generated for a given organization or - # project. - # @!attribute [rw] file_store_data_profiles - # @return [::Array<::Google::Cloud::Dlp::V2::FileStoreDataProfile>] - # List of data profiles. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. - class ListFileStoreDataProfilesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteFileStoreProfile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the file store data profile. - class DeleteFileStoreDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a table data profile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/tableDataProfiles/53234423`. - class GetTableDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a column data profile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name, for example - # `organizations/12345/locations/us/columnDataProfiles/53234423`. - class GetColumnDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A condition for determining whether a Pub/Sub should be triggered. - # @!attribute [rw] expressions - # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubExpressions] - # An expression. - class DataProfilePubSubCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A condition consisting of a value. - # @!attribute [rw] minimum_risk_score - # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::ProfileScoreBucket] - # The minimum data risk score that triggers the condition. - # - # Note: The following fields are mutually exclusive: `minimum_risk_score`, `minimum_sensitivity_score`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] minimum_sensitivity_score - # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::ProfileScoreBucket] - # The minimum sensitivity level that triggers the condition. - # - # Note: The following fields are mutually exclusive: `minimum_sensitivity_score`, `minimum_risk_score`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PubSubCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An expression, consisting of an operator and conditions. - # @!attribute [rw] logical_operator - # @return [::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubExpressions::PubSubLogicalOperator] - # The operator to apply to the collection of conditions. - # @!attribute [rw] conditions - # @return [::Array<::Google::Cloud::Dlp::V2::DataProfilePubSubCondition::PubSubCondition>] - # Conditions to apply to the expression. - class PubSubExpressions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Logical operators for conditional checks. - module PubSubLogicalOperator - # Unused. - LOGICAL_OPERATOR_UNSPECIFIED = 0 - - # Conditional OR. - OR = 1 - - # Conditional AND. - AND = 2 - end - end - - # Various score levels for resources. - module ProfileScoreBucket - # Unused. - PROFILE_SCORE_BUCKET_UNSPECIFIED = 0 - - # High risk/sensitivity detected. - HIGH = 1 - - # Medium or high risk/sensitivity detected. - MEDIUM_OR_HIGH = 2 - end - end - - # Pub/Sub topic message for a DataProfileAction.PubSubNotification event. - # To receive a message of protocol buffer schema type, convert the message data - # to an object of this proto class. - # @!attribute [rw] profile - # @return [::Google::Cloud::Dlp::V2::TableDataProfile] - # If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. - # Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and - # `full_resource` will be populated. - # @!attribute [rw] file_store_profile - # @return [::Google::Cloud::Dlp::V2::FileStoreDataProfile] - # If `DetailLevel` is `FILE_STORE_PROFILE` this will be fully populated. - # Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and - # `file_store_path` will be populated. - # @!attribute [rw] event - # @return [::Google::Cloud::Dlp::V2::DataProfileAction::EventType] - # The event that caused the Pub/Sub message to be sent. - class DataProfilePubSubMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateConnection. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # - # The format of this value varies depending on the scope of the request - # (project or organization): - # - # + Projects scope: - # `projects/{project_id}/locations/{location_id}` - # + Organizations scope: - # `organizations/{org_id}/locations/{location_id}` - # @!attribute [rw] connection - # @return [::Google::Cloud::Dlp::V2::Connection] - # Required. The connection resource. - class CreateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetConnection. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - class GetConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the organization or project, for - # example, `organizations/433245324/locations/europe` or - # `projects/project-id/locations/asia`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of results per page, max 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @!attribute [rw] filter - # @return [::String] - # Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - class ListConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SearchConnections. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the organization or project with a wildcard - # location, for example, `organizations/433245324/locations/-` or - # `projects/project-id/locations/-`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of results per page, max 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token from a previous page to return the next set of - # results. If set, all other request fields must match the original request. - # @!attribute [rw] filter - # @return [::String] - # Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR - # - # The syntax is based on https://google.aip.dev/160. - class SearchConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListConnections. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::Dlp::V2::Connection>] - # List of connections. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. An empty value means there are - # no more results. - class ListConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SearchConnections. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::Dlp::V2::Connection>] - # List of connections that match the search query. Note that only a subset - # of the fields will be populated, and only "name" is guaranteed to be set. - # For full details of a Connection, call GetConnection with the name. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. An empty value means there are - # no more results. - class SearchConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateConnection. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - # @!attribute [rw] connection - # @return [::Google::Cloud::Dlp::V2::Connection] - # Required. The connection with new values for the relevant fields. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Mask to control which fields get updated. - class UpdateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteConnection. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the Connection to be deleted, in the format: - # `projects/{project}/locations/{location}/connections/{connection}`. - class DeleteConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A data connection to allow the DLP API to profile data in locations that - # require additional configuration. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the connection: - # `projects/{project}/locations/{location}/connections/{name}`. - # @!attribute [rw] state - # @return [::Google::Cloud::Dlp::V2::ConnectionState] - # Required. The connection's state in its lifecycle. - # @!attribute [r] errors - # @return [::Array<::Google::Cloud::Dlp::V2::Error>] - # Output only. Set if status == ERROR, to provide additional details. Will - # store the last 10 errors sorted with the most recent first. - # @!attribute [rw] cloud_sql - # @return [::Google::Cloud::Dlp::V2::CloudSqlProperties] - # Connect to a Cloud SQL instance. - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A credential consisting of a username and password, where the password is - # stored in a Secret Manager resource. - # Note: Secret Manager [charges - # apply](https://cloud.google.com/secret-manager/pricing). - # @!attribute [rw] username - # @return [::String] - # Required. The username. - # @!attribute [rw] password_secret_version_name - # @return [::String] - # Required. The name of the Secret Manager resource that stores the password, - # in the form `projects/project-id/secrets/secret-name/versions/version`. - class SecretManagerCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Use IAM authentication to connect. This requires the Cloud SQL IAM feature - # to be enabled on the instance, which is not the default for Cloud SQL. - # See https://cloud.google.com/sql/docs/postgres/authentication and - # https://cloud.google.com/sql/docs/mysql/authentication. - class CloudSqlIamCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud SQL connection properties. - # @!attribute [rw] connection_name - # @return [::String] - # Optional. Immutable. The Cloud SQL instance for which the connection is - # defined. Only one connection per instance is allowed. This can only be set - # at creation time, and cannot be updated. - # - # It is an error to use a connection_name from different project or region - # than the one that holds the connection. - # For example, a Connection resource for Cloud SQL connection_name - # `project-id:us-central1:sql-instance` - # must be created under the parent - # `projects/project-id/locations/us-central1` - # @!attribute [rw] username_password - # @return [::Google::Cloud::Dlp::V2::SecretManagerCredential] - # A username and password stored in Secret Manager. - # - # Note: The following fields are mutually exclusive: `username_password`, `cloud_sql_iam`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_sql_iam - # @return [::Google::Cloud::Dlp::V2::CloudSqlIamCredential] - # Built-in IAM authentication (must be configured in Cloud SQL). - # - # Note: The following fields are mutually exclusive: `cloud_sql_iam`, `username_password`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_connections - # @return [::Integer] - # Required. The DLP API will limit its connections to max_connections. - # Must be 2 or greater. - # @!attribute [rw] database_engine - # @return [::Google::Cloud::Dlp::V2::CloudSqlProperties::DatabaseEngine] - # Required. The database engine used by the Cloud SQL instance that this - # connection configures. - class CloudSqlProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Database engine of a Cloud SQL instance. - # New values may be added over time. - module DatabaseEngine - # An engine that is not currently supported by Sensitive Data Protection. - DATABASE_ENGINE_UNKNOWN = 0 - - # Cloud SQL for MySQL instance. - DATABASE_ENGINE_MYSQL = 1 - - # Cloud SQL for PostgreSQL instance. - DATABASE_ENGINE_POSTGRES = 2 - end - end - - # Request message for DeleteTableProfile. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the table data profile. - class DeleteTableDataProfileRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message used to identify the type of resource being profiled. - # @!attribute [rw] data_source - # @return [::String] - # A string that identifies the type of resource being profiled. - # Current values: - # - # * google/bigquery/table - # * google/project - # * google/sql/table - # * google/gcs/bucket - class DataSourceType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message used to identify file cluster type being profiled. - # @!attribute [rw] cluster - # @return [::Google::Cloud::Dlp::V2::FileClusterType::Cluster] - # Cluster type. - class FileClusterType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Cluster type. Each cluster corresponds to a set of file types. - # Over time, new types may be added and files may move between clusters. - module Cluster - # Unused. - CLUSTER_UNSPECIFIED = 0 - - # Unsupported files. - CLUSTER_UNKNOWN = 1 - - # Plain text. - CLUSTER_TEXT = 2 - - # Structured data like CSV, TSV etc. - CLUSTER_STRUCTURED_DATA = 3 - - # Source code. - CLUSTER_SOURCE_CODE = 4 - - # Rich document like docx, xlsx etc. - CLUSTER_RICH_DOCUMENT = 5 - - # Images like jpeg, bmp. - CLUSTER_IMAGE = 6 - - # Archives and containers like .zip, .tar etc. - CLUSTER_ARCHIVE = 7 - - # Multimedia like .mp4, .avi etc. - CLUSTER_MULTIMEDIA = 8 - - # Executable files like .exe, .class, .apk etc. - CLUSTER_EXECUTABLE = 9 - - # AI models like .tflite etc. - CLUSTER_AI_MODEL = 10 - end - end - - # Configure processing location for discovery and inspection. For example, - # image OCR is only provided in limited regions but configuring - # ProcessingLocation will redirect OCR to a location where OCR is provided. - # @!attribute [rw] image_fallback_location - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::ImageFallbackLocation] - # Image processing falls back using this configuration. - # @!attribute [rw] document_fallback_location - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::DocumentFallbackLocation] - # Document processing falls back using this configuration. - class ProcessingLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Processing occurs in a multi-region that contains the current region - # if available. - class MultiRegionProcessing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Processing occurs in the global region. - class GlobalProcessing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configure image processing to fall back to any of the following processing - # options if image processing is unavailable in the original request - # location. - # @!attribute [rw] multi_region_processing - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::MultiRegionProcessing] - # Processing occurs in a multi-region that contains the current region - # if available. - # @!attribute [rw] global_processing - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::GlobalProcessing] - # Processing occurs in the global region. - class ImageFallbackLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configure document processing to fall back to any of the following - # processing options if document processing is unavailable in the original - # request location. - # @!attribute [rw] multi_region_processing - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::MultiRegionProcessing] - # Processing occurs in a multi-region that contains the current region - # if available. - # @!attribute [rw] global_processing - # @return [::Google::Cloud::Dlp::V2::ProcessingLocation::GlobalProcessing] - # Processing occurs in the global region. - class DocumentFallbackLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Collection of findings saved to a Cloud Storage bucket. This is used as the - # proto schema for textproto files created when specifying a cloud storage - # path to save Inspect findings. - # @!attribute [rw] findings - # @return [::Array<::Google::Cloud::Dlp::V2::Finding>] - # List of findings. - class SaveToGcsFindingsOutput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A domain represents a thematic category that a data profile can fall under. - # @!attribute [rw] category - # @return [::Google::Cloud::Dlp::V2::Domain::Category] - # A domain category that this profile is related to. - # @!attribute [rw] signals - # @return [::Array<::Google::Cloud::Dlp::V2::Domain::Signal>] - # The collection of signals that influenced selection of the category. - class Domain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum defines the various domain categories a data profile can fall - # under. - module Category - # Category unspecified. - CATEGORY_UNSPECIFIED = 0 - - # Indicates that the data profile is related to artificial intelligence. - # When set, all findings stored to Security Command Center will set the - # corresponding AI domain field of `Finding` objects. - AI = 1 - - # Indicates that the data profile is related to code. - CODE = 2 - end - - # The signal used to determine the category. - # New values may be added in the future. - module Signal - # Unused. - SIGNAL_UNSPECIFIED = 0 - - # One or more machine learning models are present. - MODEL = 1 - - # A table appears to contain text embeddings. - TEXT_EMBEDDING = 2 - - # A table appears to contain embeddings of any type (for example, text, - # image, multimodal). The `TEXT_EMBEDDING` signal might also be present if - # the table contains text embeddings. - EMBEDDING = 7 - - # The [Cloud SQL Vertex - # AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) - # plugin is installed on the database. - VERTEX_PLUGIN = 3 - - # Support for [Cloud SQL vector - # embeddings](https://cloud.google.com/sql/docs/mysql/enable-vector-search) - # is enabled on the database. - VECTOR_PLUGIN = 4 - - # Source code is present. - SOURCE_CODE = 5 - - # If the service determines the category type. For example, Vertex AI - # assets would always have a `Category` of `AI`. - SERVICE = 6 - end - end - - # Enum of possible outcomes of transformations. SUCCESS if transformation and - # storing of transformation was successful, otherwise, reason for not - # transforming. - module TransformationResultStatusType - # Unused. - STATE_TYPE_UNSPECIFIED = 0 - - # This will be set when a finding could not be transformed (i.e. outside user - # set bucket range). - INVALID_TRANSFORM = 1 - - # This will be set when a BigQuery transformation was successful but could - # not be stored back in BigQuery because the transformed row exceeds - # BigQuery's max row size. - BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2 - - # This will be set when there is a finding in the custom metadata of a file, - # but at the write time of the transformed file, this key / value pair is - # unretrievable. - METADATA_UNRETRIEVABLE = 3 - - # This will be set when the transformation and storing of it is successful. - SUCCESS = 4 - end - - # Describes functionality of a given container in its original format. - module TransformationContainerType - # Unused. - TRANSFORM_UNKNOWN_CONTAINER = 0 - - # Body of a file. - TRANSFORM_BODY = 1 - - # Metadata for a file. - TRANSFORM_METADATA = 2 - - # A table. - TRANSFORM_TABLE = 3 - end - - # An enum of rules that can be used to transform a value. Can be a - # record suppression, or one of the transformation rules specified under - # `PrimitiveTransformation`. - module TransformationType - # Unused - TRANSFORMATION_TYPE_UNSPECIFIED = 0 - - # Record suppression - RECORD_SUPPRESSION = 1 - - # Replace value - REPLACE_VALUE = 2 - - # Replace value using a dictionary. - REPLACE_DICTIONARY = 15 - - # Redact - REDACT = 3 - - # Character mask - CHARACTER_MASK = 4 - - # FFX-FPE - CRYPTO_REPLACE_FFX_FPE = 5 - - # Fixed size bucketing - FIXED_SIZE_BUCKETING = 6 - - # Bucketing - BUCKETING = 7 - - # Replace with info type - REPLACE_WITH_INFO_TYPE = 8 - - # Time part - TIME_PART = 9 - - # Crypto hash - CRYPTO_HASH = 10 - - # Date shift - DATE_SHIFT = 12 - - # Deterministic crypto - CRYPTO_DETERMINISTIC_CONFIG = 13 - - # Redact image - REDACT_IMAGE = 14 - end - - # Whether a profile being created is the first generation or an update. - module ProfileGeneration - # Unused. - PROFILE_GENERATION_UNSPECIFIED = 0 - - # The profile is the first profile for the resource. - PROFILE_GENERATION_NEW = 1 - - # The profile is an update to a previous profile. - PROFILE_GENERATION_UPDATE = 2 - end - - # Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and - # non-BigLake external tables are not supported. - module BigQueryTableTypeCollection - # Unused. - BIG_QUERY_COLLECTION_UNSPECIFIED = 0 - - # Automatically generate profiles for all tables, even if the table type is - # not yet fully supported for analysis. Profiles for unsupported tables will - # be generated with errors to indicate their partial support. When full - # support is added, the tables will automatically be profiled during the next - # scheduled run. - BIG_QUERY_COLLECTION_ALL_TYPES = 1 - - # Only those types fully supported will be profiled. Will expand - # automatically as Cloud DLP adds support for new table types. Unsupported - # table types will not have partial profiles generated. - BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES = 2 - end - - # Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and - # non-BigLake external tables are not supported. - module BigQueryTableType - # Unused. - BIG_QUERY_TABLE_TYPE_UNSPECIFIED = 0 - - # A normal BigQuery table. - BIG_QUERY_TABLE_TYPE_TABLE = 1 - - # A table that references data stored in Cloud Storage. - BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE = 2 - - # A snapshot of a BigQuery table. - BIG_QUERY_TABLE_TYPE_SNAPSHOT = 3 - end - - # How frequently data profiles can be updated. New options can be added at a - # later time. - module DataProfileUpdateFrequency - # Unspecified. - UPDATE_FREQUENCY_UNSPECIFIED = 0 - - # After the data profile is created, it will never be updated. - UPDATE_FREQUENCY_NEVER = 1 - - # The data profile can be updated up to once every 24 hours. - UPDATE_FREQUENCY_DAILY = 2 - - # The data profile can be updated up to once every 30 days. Default. - UPDATE_FREQUENCY_MONTHLY = 4 - end - - # Attributes evaluated to determine if a table has been modified. New values - # may be added at a later time. - module BigQueryTableModification - # Unused. - TABLE_MODIFICATION_UNSPECIFIED = 0 - - # A table will be considered modified when the last_modified_time from - # BigQuery has been updated. - TABLE_MODIFIED_TIMESTAMP = 1 - end - - # Attributes evaluated to determine if a schema has been modified. New values - # may be added at a later time. - module BigQuerySchemaModification - # Unused - SCHEMA_MODIFICATION_UNSPECIFIED = 0 - - # Profiles should be regenerated when new columns are added to the table. - # Default. - SCHEMA_NEW_COLUMNS = 1 - - # Profiles should be regenerated when columns are removed from the table. - SCHEMA_REMOVED_COLUMNS = 2 - end - - # Operators available for comparing the value of fields. - module RelationalOperator - # Unused - RELATIONAL_OPERATOR_UNSPECIFIED = 0 - - # Equal. Attempts to match even with incompatible types. - EQUAL_TO = 1 - - # Not equal to. Attempts to match even with incompatible types. - NOT_EQUAL_TO = 2 - - # Greater than. - GREATER_THAN = 3 - - # Less than. - LESS_THAN = 4 - - # Greater than or equals. - GREATER_THAN_OR_EQUALS = 5 - - # Less than or equals. - LESS_THAN_OR_EQUALS = 6 - - # Exists - EXISTS = 7 - end - - # Type of the match which can be applied to different ways of matching, like - # Dictionary, regular expression and intersecting with findings of another - # infoType. - module MatchingType - # Invalid. - MATCHING_TYPE_UNSPECIFIED = 0 - - # Full match. - # - # - Dictionary: join of Dictionary results matched the complete finding quote - # - Regex: all regex matches fill a finding quote from start to end - # - Exclude infoType: completely inside affecting infoTypes findings - MATCHING_TYPE_FULL_MATCH = 1 - - # Partial match. - # - # - Dictionary: at least one of the tokens in the finding matches - # - Regex: substring of the finding matches - # - Exclude infoType: intersects with affecting infoTypes findings - MATCHING_TYPE_PARTIAL_MATCH = 2 - - # Inverse match. - # - # - Dictionary: no tokens in the finding match the dictionary - # - Regex: finding doesn't match the regex - # - Exclude infoType: no intersection with affecting infoTypes findings - MATCHING_TYPE_INVERSE_MATCH = 3 - - # Rule-specific match. - # - # The matching logic is based on the specific rule being used. This is - # required for rules where the matching behavior is not a simple string - # comparison (e.g., image containment). This matching type can only be - # used with the `ExcludeByImageFindings` rule. - # - # - Exclude by image findings: The matching logic is defined within - # `ExcludeByImageFindings` based on spatial relationships between bounding - # boxes. - MATCHING_TYPE_RULE_SPECIFIC = 4 - end - - # Deprecated and unused. - module ContentOption - # Includes entire content of a file or a data stream. - CONTENT_UNSPECIFIED = 0 - - # Text content within the data, excluding any metadata. - CONTENT_TEXT = 1 - - # Images found in the data. - CONTENT_IMAGE = 2 - end - - # Type of metadata containing the finding. - module MetadataType - # Unused - METADATATYPE_UNSPECIFIED = 0 - - # General file metadata provided by Cloud Storage. - STORAGE_METADATA = 2 - - # Metadata extracted from the files. - CONTENT_METADATA = 3 - - # Metadata provided by the client. - CLIENT_PROVIDED_METADATA = 4 - end - - # Parts of the APIs which use certain infoTypes. - module InfoTypeSupportedBy - # Unused. - ENUM_TYPE_UNSPECIFIED = 0 - - # Supported by the inspect operations. - INSPECT = 1 - - # Supported by the risk analysis operations. - RISK_ANALYSIS = 2 - end - - # An enum to represent the various types of DLP jobs. - module DlpJobType - # Defaults to INSPECT_JOB. - DLP_JOB_TYPE_UNSPECIFIED = 0 - - # The job inspected Google Cloud for sensitive data. - INSPECT_JOB = 1 - - # The job executed a Risk Analysis computation. - RISK_ANALYSIS_JOB = 2 - end - - # State of a StoredInfoType version. - module StoredInfoTypeState - # Unused - STORED_INFO_TYPE_STATE_UNSPECIFIED = 0 - - # StoredInfoType version is being created. - PENDING = 1 - - # StoredInfoType version is ready for use. - READY = 2 - - # StoredInfoType creation failed. All relevant error messages are returned in - # the `StoredInfoTypeVersion` message. - FAILED = 3 - - # StoredInfoType is no longer valid because artifacts stored in - # user-controlled storage were modified. To fix an invalid StoredInfoType, - # use the `UpdateStoredInfoType` method to create a new version. - INVALID = 4 - end - - # How broadly the data in the resource has been shared. New items may be added - # over time. A higher number means more restricted. - module ResourceVisibility - # Unused. - RESOURCE_VISIBILITY_UNSPECIFIED = 0 - - # Visible to any user. - RESOURCE_VISIBILITY_PUBLIC = 10 - - # May contain public items. - # For example, if a Cloud Storage bucket has uniform bucket level access - # disabled, some objects inside it may be public, but none are known yet. - RESOURCE_VISIBILITY_INCONCLUSIVE = 15 - - # Visible only to specific users. - RESOURCE_VISIBILITY_RESTRICTED = 20 - end - - # How a resource is encrypted. - module EncryptionStatus - # Unused. - ENCRYPTION_STATUS_UNSPECIFIED = 0 - - # Google manages server-side encryption keys on your behalf. - ENCRYPTION_GOOGLE_MANAGED = 1 - - # Customer provides the key. - ENCRYPTION_CUSTOMER_MANAGED = 2 - end - - # Bucketized nullness percentage levels. A higher level means a higher - # percentage of the column is null. - module NullPercentageLevel - # Unused. - NULL_PERCENTAGE_LEVEL_UNSPECIFIED = 0 - - # Very few null entries. - NULL_PERCENTAGE_VERY_LOW = 1 - - # Some null entries. - NULL_PERCENTAGE_LOW = 2 - - # A few null entries. - NULL_PERCENTAGE_MEDIUM = 3 - - # A lot of null entries. - NULL_PERCENTAGE_HIGH = 4 - end - - # Bucketized uniqueness score levels. A higher uniqueness score is a strong - # signal that the column may contain a unique identifier like user id. A low - # value indicates that the column contains few unique values like booleans or - # other classifiers. - module UniquenessScoreLevel - # Some columns do not have estimated uniqueness. Possible reasons include - # having too few values. - UNIQUENESS_SCORE_LEVEL_UNSPECIFIED = 0 - - # Low uniqueness, possibly a boolean, enum or similiarly typed column. - UNIQUENESS_SCORE_LOW = 1 - - # Medium uniqueness. - UNIQUENESS_SCORE_MEDIUM = 2 - - # High uniqueness, possibly a column of free text or unique identifiers. - UNIQUENESS_SCORE_HIGH = 3 - end - - # State of the connection. - # New values may be added over time. - module ConnectionState - # Unused - CONNECTION_STATE_UNSPECIFIED = 0 - - # The DLP API automatically created this connection during an initial scan, - # and it is awaiting full configuration by a user. - MISSING_CREDENTIALS = 1 - - # A configured connection that has not encountered any errors. - AVAILABLE = 2 - - # A configured connection that encountered errors during its last use. It - # will not be used again until it is set to AVAILABLE. - # - # If the resolution requires external action, then the client must send a - # request to set the status to AVAILABLE when the connection is ready for - # use. If the resolution doesn't require external action, then any changes to - # the connection properties will automatically mark it as AVAILABLE. - ERROR = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb deleted file mode 100644 index 8120b766540f..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/privacy/dlp/v2/storage.rb +++ /dev/null @@ -1,1047 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dlp - module V2 - # Type of information detected by the API. - # @!attribute [rw] name - # @return [::String] - # Name of the information type. Either a name of your choosing when - # creating a CustomInfoType, or one of the names listed - # at - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # when specifying a built-in type. When sending Cloud DLP results to Data - # Catalog, infoType names should conform to the pattern - # `[A-Za-z0-9$_-]{1,64}`. - # @!attribute [rw] version - # @return [::String] - # Optional version name for this InfoType. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # Optional custom sensitivity for this InfoType. - # This only applies to data profiling. - class InfoType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Score is calculated from of all elements in the data profile. - # A higher level means the data is more sensitive. - # @!attribute [rw] score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore::SensitivityScoreLevel] - # The sensitivity score applied to the resource. - class SensitivityScore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Various sensitivity score levels for resources. - module SensitivityScoreLevel - # Unused. - SENSITIVITY_SCORE_UNSPECIFIED = 0 - - # No sensitive information detected. The resource isn't publicly - # accessible. - SENSITIVITY_LOW = 10 - - # Unable to determine sensitivity. - SENSITIVITY_UNKNOWN = 12 - - # Medium risk. Contains personally identifiable information (PII), - # potentially sensitive data, or fields with free-text data that are at a - # higher risk of having intermittent sensitive data. Consider limiting - # access. - SENSITIVITY_MODERATE = 20 - - # High risk. Sensitive personally identifiable information (SPII) can be - # present. Exfiltration of data can lead to user data loss. - # Re-identification of users might be possible. Consider limiting usage and - # or removing SPII. - SENSITIVITY_HIGH = 30 - end - end - - # A reference to a StoredInfoType to use with scanning. - # @!attribute [rw] name - # @return [::String] - # Resource name of the requested `StoredInfoType`, for example - # `organizations/433245324/storedInfoTypes/432452342` or - # `projects/project-id/storedInfoTypes/432452342`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp indicating when the version of the `StoredInfoType` used for - # inspection was created. Output-only field, populated by the system. - class StoredType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Custom information type provided by the user. Used to find domain-specific - # sensitive information configurable to the data in question. - # @!attribute [rw] info_type - # @return [::Google::Cloud::Dlp::V2::InfoType] - # CustomInfoType can either be a new infoType, or an extension of built-in - # infoType, when the name matches one of existing infoTypes and that infoType - # is specified in `InspectContent.info_types` field. Specifying the latter - # adds findings to the one detected by the system. If built-in info type is - # not specified in `InspectContent.info_types` list then the name is treated - # as a custom info type. - # @!attribute [rw] likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Likelihood to return for this CustomInfoType. This base value can be - # altered by a detection rule if the finding meets the criteria specified by - # the rule. Defaults to `VERY_LIKELY` if not specified. - # @!attribute [rw] dictionary - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary] - # A list of phrases to detect as a CustomInfoType. - # - # Note: The following fields are mutually exclusive: `dictionary`, `regex`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] - # Regular expression based CustomInfoType. - # - # Note: The following fields are mutually exclusive: `regex`, `dictionary`, `surrogate_type`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] surrogate_type - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::SurrogateType] - # Message for detecting output from deidentification transformations that - # support reversing. - # - # Note: The following fields are mutually exclusive: `surrogate_type`, `dictionary`, `regex`, `stored_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] stored_type - # @return [::Google::Cloud::Dlp::V2::StoredType] - # Loads an existing `StoredInfoType` resource. - # - # Note: The following fields are mutually exclusive: `stored_type`, `dictionary`, `regex`, `surrogate_type`, `metadata_key_value_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] metadata_key_value_expression - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::MetadataKeyValueExpression] - # Key-value pair to detect in the metadata. - # - # Note: The following fields are mutually exclusive: `metadata_key_value_expression`, `dictionary`, `regex`, `surrogate_type`, `stored_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] detection_rules - # @return [::Array<::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule>] - # Set of detection rules to apply to all findings of this CustomInfoType. - # Rules are applied in the order that they are specified. Only supported - # for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. - # @!attribute [rw] exclusion_type - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::ExclusionType] - # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding - # to be returned. It still can be used for rules matching. Only supported - # for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::Dlp::V2::SensitivityScore] - # Sensitivity for this CustomInfoType. If this CustomInfoType extends an - # existing InfoType, the sensitivity here will take precedence over that of - # the original InfoType. If unset for a CustomInfoType, it will default to - # HIGH. - # This only applies to data profiling. - class CustomInfoType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Custom information type based on a dictionary of words or phrases. This can - # be used to match sensitive information specific to the data, such as a list - # of employee IDs or job titles. - # - # Dictionary words are case-insensitive and all characters other than letters - # and digits in the unicode [Basic Multilingual - # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) - # will be replaced with whitespace when scanning for matches, so the - # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", - # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters - # surrounding any match must be of a different type than the adjacent - # characters within the word, so letters must be next to non-letters and - # digits next to non-digits. For example, the dictionary word "jen" will - # match the first three letters of the text "jen123" but will return no - # matches for "jennifer". - # - # Dictionary words containing a large number of characters that are not - # letters or digits may result in unexpected findings because such characters - # are treated as whitespace. The - # [limits](https://cloud.google.com/sensitive-data-protection/limits) page - # contains details about the size limits of dictionaries. For dictionaries - # that do not fit within these constraints, consider using - # `LargeCustomDictionaryConfig` in the `StoredInfoType` API. - # @!attribute [rw] word_list - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList] - # List of words or phrases to search for. - # - # Note: The following fields are mutually exclusive: `word_list`, `cloud_storage_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_storage_path - # @return [::Google::Cloud::Dlp::V2::CloudStoragePath] - # Newline-delimited file of words in Cloud Storage. Only a single file - # is accepted. - # - # Note: The following fields are mutually exclusive: `cloud_storage_path`, `word_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Dictionary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message defining a list of words or phrases to search for in the data. - # @!attribute [rw] words - # @return [::Array<::String>] - # Words or phrases defining the dictionary. The dictionary must contain - # at least one phrase and every phrase must contain at least 2 characters - # that are letters or digits. [required] - class WordList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message defining a custom regular expression. - # @!attribute [rw] pattern - # @return [::String] - # Pattern defining the regular expression. Its syntax - # (https://github.com/google/re2/wiki/Syntax) can be found under the - # google/re2 repository on GitHub. - # @!attribute [rw] group_indexes - # @return [::Array<::Integer>] - # The index of the submatch to extract as findings. When not - # specified, the entire match is returned. No more than 3 may be included. - class Regex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for detecting output from deidentification transformations - # such as - # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). - # These types of transformations are - # those that perform pseudonymization, thereby producing a "surrogate" as - # output. This should be used in conjunction with a field on the - # transformation such as `surrogate_info_type`. This CustomInfoType does - # not support the use of `detection_rules`. - class SurrogateType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a custom infoType that detects key-value pairs in the - # metadata matching the specified regular expressions. - # @!attribute [rw] key_regex - # @return [::String] - # The regular expression for the key. Key should be - # non-empty. - # @!attribute [rw] value_regex - # @return [::String] - # The regular expression for the value. Value should be non-empty. - class MetadataKeyValueExpression - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a - # `CustomInfoType` to alter behavior under certain circumstances, depending - # on the specific details of the rule. Not supported for the `surrogate_type` - # custom infoType. - # @!attribute [rw] hotword_rule - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule] - # Hotword-based detection rule. - class DetectionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message for specifying a window around a finding to apply a detection - # rule. - # @!attribute [rw] window_before - # @return [::Integer] - # Number of characters before the finding to consider. For tabular data, - # if you want to modify the likelihood of an entire column of findngs, - # set this to 1. For more information, see - # [Hotword example: Set the match likelihood of a table column] - # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). - # @!attribute [rw] window_after - # @return [::Integer] - # Number of characters after the finding to consider. - class Proximity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for specifying an adjustment to the likelihood of a finding as - # part of a detection rule. - # @!attribute [rw] fixed_likelihood - # @return [::Google::Cloud::Dlp::V2::Likelihood] - # Set the likelihood of a finding to a fixed value. - # - # Note: The following fields are mutually exclusive: `fixed_likelihood`, `relative_likelihood`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative_likelihood - # @return [::Integer] - # Increase or decrease the likelihood by the specified number of - # levels. For example, if a finding would be `POSSIBLE` without the - # detection rule and `relative_likelihood` is 1, then it is upgraded to - # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. - # Likelihood may never drop below `VERY_UNLIKELY` or exceed - # `VERY_LIKELY`, so applying an adjustment of 1 followed by an - # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in - # a final likelihood of `LIKELY`. - # - # Note: The following fields are mutually exclusive: `relative_likelihood`, `fixed_likelihood`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class LikelihoodAdjustment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rule that adjusts the likelihood of findings within a certain - # proximity of hotwords. - # @!attribute [rw] hotword_regex - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex] - # Regular expression pattern defining what qualifies as a hotword. - # @!attribute [rw] proximity - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity] - # Range of characters within which the entire hotword must reside. - # The total length of the window cannot exceed 1000 characters. - # The finding itself will be included in the window, so that hotwords can - # be used to match substrings of the finding itself. Suppose you - # want Cloud DLP to promote the likelihood of the phone number - # regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the - # area code of a company's office. In this case, use the hotword regex - # "\(xxx\)", where "xxx" is the area code in question. - # - # For tabular data, if you want to modify the likelihood of an entire - # column of findngs, see - # [Hotword example: Set the match likelihood of a table column] - # (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). - # @!attribute [rw] likelihood_adjustment - # @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment] - # Likelihood adjustment to apply to all matching findings. - class HotwordRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Type of exclusion rule. - module ExclusionType - # A finding of this custom info type will not be excluded from results. - EXCLUSION_TYPE_UNSPECIFIED = 0 - - # A finding of this custom info type will be excluded from final results, - # but can still affect rule execution. - EXCLUSION_TYPE_EXCLUDE = 1 - end - end - - # General identifier of a data field in a storage service. - # @!attribute [rw] name - # @return [::String] - # Name describing the field. - class FieldId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Datastore partition ID. - # A partition ID identifies a grouping of entities. The grouping is always - # by project and namespace, however the namespace ID may be empty. - # - # A partition ID contains several dimensions: - # project ID and namespace ID. - # @!attribute [rw] project_id - # @return [::String] - # The ID of the project to which the entities belong. - # @!attribute [rw] namespace_id - # @return [::String] - # If not empty, the ID of the namespace to which the entities belong. - class PartitionId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a Datastore kind. - # @!attribute [rw] name - # @return [::String] - # The name of the kind. - class KindExpression - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options defining a data set within Google Cloud Datastore. - # @!attribute [rw] partition_id - # @return [::Google::Cloud::Dlp::V2::PartitionId] - # A partition ID identifies a grouping of entities. The grouping is always - # by project and namespace, however the namespace ID may be empty. - # @!attribute [rw] kind - # @return [::Google::Cloud::Dlp::V2::KindExpression] - # The kind to process. - class DatastoreOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a set of files in a Cloud Storage bucket. Regular - # expressions are used to allow fine-grained control over which files in the - # bucket to include. - # - # Included files are those that match at least one item in `include_regex` and - # do not match any items in `exclude_regex`. Note that a file that matches - # items from both lists will _not_ be included. For a match to occur, the - # entire file path (i.e., everything in the url after the bucket name) must - # match the regular expression. - # - # For example, given the input `{bucket_name: "mybucket", include_regex: - # ["directory1/.*"], exclude_regex: - # ["directory1/excluded.*"]}`: - # - # * `gs://mybucket/directory1/myfile` will be included - # * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches - # across `/`) - # * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the - # full path doesn't match any items in `include_regex`) - # * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path - # matches an item in `exclude_regex`) - # - # If `include_regex` is left empty, it will match all files by default - # (this is equivalent to setting `include_regex: [".*"]`). - # - # Some other common use cases: - # - # * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all - # files in `mybucket` except for .pdf files - # * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will - # include all files directly under `gs://mybucket/directory/`, without matching - # across `/` - # @!attribute [rw] bucket_name - # @return [::String] - # The name of a Cloud Storage bucket. Required. - # @!attribute [rw] include_regex - # @return [::Array<::String>] - # A list of regular expressions matching file paths to include. All files in - # the bucket that match at least one of these regular expressions will be - # included in the set of files, except for those that also match an item in - # `exclude_regex`. Leaving this field empty will match all files by default - # (this is equivalent to including `.*` in the list). - # - # Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - # @!attribute [rw] exclude_regex - # @return [::Array<::String>] - # A list of regular expressions matching file paths to exclude. All files in - # the bucket that match at least one of these regular expressions will be - # excluded from the scan. - # - # Regular expressions use RE2 - # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - # under the google/re2 repository on GitHub. - class CloudStorageRegexFileSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options defining a file or a set of files within a Cloud Storage - # bucket. - # @!attribute [rw] file_set - # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions::FileSet] - # The set of one or more files to scan. - # @!attribute [rw] bytes_limit_per_file - # @return [::Integer] - # Max number of bytes to scan from a file. If a scanned file's size is bigger - # than this value then the rest of the bytes are omitted. Only one of - # `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified. - # This field can't be set if de-identification is requested. For certain file - # types, setting this field has no effect. For more information, see [Limits - # on bytes scanned per - # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). - # @!attribute [rw] bytes_limit_per_file_percent - # @return [::Integer] - # Max percentage of bytes to scan from a file. The rest are omitted. The - # number of bytes scanned is rounded down. Must be between 0 and 100, - # inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of - # bytes_limit_per_file and bytes_limit_per_file_percent can be specified. - # This field can't be set if de-identification is requested. For certain file - # types, setting this field has no effect. For more information, see [Limits - # on bytes scanned per - # file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). - # @!attribute [rw] file_types - # @return [::Array<::Google::Cloud::Dlp::V2::FileType>] - # List of file type groups to include in the scan. - # If empty, all files are scanned and available data format processors - # are applied. In addition, the binary content of the selected files - # is always scanned as well. - # Images are scanned only as binary if the specified region - # does not support image inspection and no file_types were specified. - # Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. - # @!attribute [rw] sample_method - # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions::SampleMethod] - # How to sample the data. - # @!attribute [rw] files_limit_percent - # @return [::Integer] - # Limits the number of files to scan to this percentage of the input FileSet. - # Number of files scanned is rounded down. Must be between 0 and 100, - # inclusively. Both 0 and 100 means no limit. Defaults to 0. - class CloudStorageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Set of files to scan. - # @!attribute [rw] url - # @return [::String] - # The Cloud Storage url of the file(s) to scan, in the format - # `gs:///`. Trailing wildcard in the path is allowed. - # - # If the url ends in a trailing slash, the bucket or directory represented - # by the url will be scanned non-recursively (content in sub-directories - # will not be scanned). This means that `gs://mybucket/` is equivalent to - # `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to - # `gs://mybucket/directory/*`. - # - # Exactly one of `url` or `regex_file_set` must be set. - # @!attribute [rw] regex_file_set - # @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet] - # The regex-filtered set of files to scan. Exactly one of `url` or - # `regex_file_set` must be set. - class FileSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How to sample bytes if not all bytes are scanned. Meaningful only when used - # in conjunction with bytes_limit_per_file. If not specified, scanning would - # start from the top. - module SampleMethod - # No sampling. - SAMPLE_METHOD_UNSPECIFIED = 0 - - # Scan from the top (default). - TOP = 1 - - # For each file larger than bytes_limit_per_file, randomly pick the offset - # to start scanning. The scanned bytes are contiguous. - RANDOM_START = 2 - end - end - - # Message representing a set of files in Cloud Storage. - # @!attribute [rw] url - # @return [::String] - # The url, in the format `gs:///`. Trailing wildcard in the - # path is allowed. - class CloudStorageFileSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a single file or path in Cloud Storage. - # @!attribute [rw] path - # @return [::String] - # A URL representing a file or path (no wildcards) in Cloud Storage. - # Example: `gs://[BUCKET_NAME]/dictionary.txt` - class CloudStoragePath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options defining BigQuery table and row identifiers. - # @!attribute [rw] table_reference - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Complete BigQuery table reference. - # @!attribute [rw] identifying_fields - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Table fields that may uniquely identify a row within the table. When - # `actions.saveFindings.outputConfig.table` is specified, the values of - # columns specified here are available in the output table under - # `location.content_locations.record_location.record_key.id_values`. Nested - # fields such as `person.birthdate.year` are allowed. - # @!attribute [rw] rows_limit - # @return [::Integer] - # Max number of rows to scan. If the table has more rows than this value, the - # rest of the rows are omitted. If not set, or if set to 0, all rows will be - # scanned. Only one of rows_limit and rows_limit_percent can be specified. - # Cannot be used in conjunction with TimespanConfig. - # @!attribute [rw] rows_limit_percent - # @return [::Integer] - # Max percentage of rows to scan. The rest are omitted. The number of rows - # scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and - # 100 means no limit. Defaults to 0. Only one of rows_limit and - # rows_limit_percent can be specified. Cannot be used in conjunction with - # TimespanConfig. - # - # Caution: A [known - # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) - # is causing the `rowsLimitPercent` field to behave unexpectedly. We - # recommend using `rowsLimit` instead. - # @!attribute [rw] sample_method - # @return [::Google::Cloud::Dlp::V2::BigQueryOptions::SampleMethod] - # How to sample the data. - # @!attribute [rw] excluded_fields - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # References to fields excluded from scanning. This allows you to skip - # inspection of entire columns which you know have no findings. - # When inspecting a table, we recommend that you inspect all columns. - # Otherwise, findings might be affected because hints from excluded columns - # will not be used. - # @!attribute [rw] included_fields - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # Limit scanning only to these fields. - # When inspecting a table, we recommend that you inspect all columns. - # Otherwise, findings might be affected because hints from excluded columns - # will not be used. - class BigQueryOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How to sample rows if not all rows are scanned. Meaningful only when used - # in conjunction with either rows_limit or rows_limit_percent. If not - # specified, rows are scanned in the order BigQuery reads them. - module SampleMethod - # No sampling. - SAMPLE_METHOD_UNSPECIFIED = 0 - - # Scan groups of rows in the order BigQuery provides (default). Multiple - # groups of rows may be scanned in parallel, so results may not appear in - # the same order the rows are read. - TOP = 1 - - # Randomly pick groups of rows to scan. - RANDOM_START = 2 - end - end - - # Shared message indicating Cloud storage type. - # @!attribute [rw] datastore_options - # @return [::Google::Cloud::Dlp::V2::DatastoreOptions] - # Google Cloud Datastore options. - # - # Note: The following fields are mutually exclusive: `datastore_options`, `cloud_storage_options`, `big_query_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_storage_options - # @return [::Google::Cloud::Dlp::V2::CloudStorageOptions] - # Cloud Storage options. - # - # Note: The following fields are mutually exclusive: `cloud_storage_options`, `datastore_options`, `big_query_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] big_query_options - # @return [::Google::Cloud::Dlp::V2::BigQueryOptions] - # BigQuery options. - # - # Note: The following fields are mutually exclusive: `big_query_options`, `datastore_options`, `cloud_storage_options`, `hybrid_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hybrid_options - # @return [::Google::Cloud::Dlp::V2::HybridOptions] - # Hybrid inspection options. - # - # Note: The following fields are mutually exclusive: `hybrid_options`, `datastore_options`, `cloud_storage_options`, `big_query_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timespan_config - # @return [::Google::Cloud::Dlp::V2::StorageConfig::TimespanConfig] - # Configuration of the timespan of the items to include in scanning. - class StorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of the timespan of the items to include in scanning. - # Currently only supported when inspecting Cloud Storage and BigQuery. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Exclude files, tables, or rows older than this value. - # If not set, no lower time limit is applied. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Exclude files, tables, or rows newer than this value. - # If not set, no upper time limit is applied. - # @!attribute [rw] timestamp_field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Specification of the field containing the timestamp of scanned items. - # Used for data sources like Datastore and BigQuery. - # - # **For BigQuery** - # - # If this value is not specified and the table was modified between the - # given start and end times, the entire table will be scanned. If this - # value is specified, then rows are filtered based on the given start and - # end times. Rows with a `NULL` value in the provided BigQuery column are - # skipped. - # Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, - # `TIMESTAMP`, and `DATETIME`. - # - # If your BigQuery table is [partitioned at ingestion - # time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), - # you can use any of the following pseudo-columns as your timestamp field. - # When used with Cloud DLP, these pseudo-column names are case sensitive. - # - # - `_PARTITIONTIME` - # - `_PARTITIONDATE` - # - `_PARTITION_LOAD_TIME` - # - # **For Datastore** - # - # If this value is specified, then entities are filtered based on the given - # start and end times. If an entity does not contain the provided timestamp - # property or contains empty or invalid values, then it is included. - # Valid data types of the provided timestamp property are: `TIMESTAMP`. - # - # See the - # [known - # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) - # related to this operation. - # @!attribute [rw] enable_auto_population_of_timespan_config - # @return [::Boolean] - # When the job is started by a JobTrigger we will automatically figure out - # a valid start_time to avoid scanning files that have not been modified - # since the last time the JobTrigger executed. This will be based on the - # time of the execution of the last run of the JobTrigger or the timespan - # end_time used in the last run of the JobTrigger. - # - # **For BigQuery** - # - # Inspect jobs triggered by automatic population will scan data that is at - # least three hours old when the job starts. This is because streaming - # buffer rows are not read during inspection and reading up to the current - # timestamp will result in skipped rows. - # - # See the [known - # issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data) - # related to this operation. - class TimespanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration to control jobs where the content being inspected is outside - # of Google Cloud Platform. - # @!attribute [rw] description - # @return [::String] - # A short description of where the data is coming from. Will be stored once - # in the job. 256 max length. - # @!attribute [rw] required_finding_label_keys - # @return [::Array<::String>] - # These are labels that each inspection request must include within their - # 'finding_labels' map. Request may contain others, but any missing one of - # these will be rejected. - # - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # - # No more than 10 keys can be required. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # To organize findings, these labels will be added to each finding. - # - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - # - # No more than 10 labels can be associated with a given finding. - # - # Examples: - # - # * `"environment" : "production"` - # * `"pipeline" : "etl"` - # @!attribute [rw] table_options - # @return [::Google::Cloud::Dlp::V2::TableOptions] - # If the container is a table, additional information to make findings - # meaningful such as the columns that are primary keys. - class HybridOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Row key for identifying a record in BigQuery table. - # @!attribute [rw] table_reference - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Complete BigQuery table reference. - # @!attribute [rw] row_number - # @return [::Integer] - # Row number inferred at the time the table was scanned. This value is - # nondeterministic, cannot be queried, and may be null for inspection - # jobs. To locate findings within a table, specify - # `inspect_job.storage_config.big_query_options.identifying_fields` in - # `CreateDlpJobRequest`. - class BigQueryKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Record key for a finding in Cloud Datastore. - # @!attribute [rw] entity_key - # @return [::Google::Cloud::Dlp::V2::Key] - # Datastore entity key. - class DatastoreKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A unique identifier for a Datastore entity. - # If a key's partition ID or any of its path kinds or names are - # reserved/read-only, the key is reserved/read-only. - # A reserved/read-only key is forbidden in certain documented contexts. - # @!attribute [rw] partition_id - # @return [::Google::Cloud::Dlp::V2::PartitionId] - # Entities are partitioned into subsets, currently identified by a project - # ID and namespace ID. - # Queries are scoped to a single partition. - # @!attribute [rw] path - # @return [::Array<::Google::Cloud::Dlp::V2::Key::PathElement>] - # The entity path. - # An entity path consists of one or more elements composed of a kind and a - # string or numerical identifier, which identify entities. The first - # element identifies a _root entity_, the second element identifies - # a _child_ of the root entity, the third element identifies a child of the - # second entity, and so forth. The entities identified by all prefixes of - # the path are called the element's _ancestors_. - # - # A path can never be empty, and a path can have at most 100 elements. - class Key - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A (kind, ID/name) pair used to construct a key path. - # - # If either name or ID is set, the element is complete. - # If neither is set, the element is incomplete. - # @!attribute [rw] kind - # @return [::String] - # The kind of the entity. - # A kind matching regex `__.*__` is reserved/read-only. - # A kind must not contain more than 1500 bytes when UTF-8 encoded. - # Cannot be `""`. - # @!attribute [rw] id - # @return [::Integer] - # The auto-allocated ID of the entity. - # Never equal to zero. Values less than zero are discouraged and may not - # be supported in the future. - # - # Note: The following fields are mutually exclusive: `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # The name of the entity. - # A name matching regex `__.*__` is reserved/read-only. - # A name must not be more than 1500 bytes when UTF-8 encoded. - # Cannot be `""`. - # - # Note: The following fields are mutually exclusive: `name`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PathElement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for a unique key indicating a record that contains a finding. - # @!attribute [rw] datastore_key - # @return [::Google::Cloud::Dlp::V2::DatastoreKey] - # BigQuery key - # - # Note: The following fields are mutually exclusive: `datastore_key`, `big_query_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] big_query_key - # @return [::Google::Cloud::Dlp::V2::BigQueryKey] - # Datastore key - # - # Note: The following fields are mutually exclusive: `big_query_key`, `datastore_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id_values - # @return [::Array<::String>] - # Values of identifying columns in the given row. Order of values matches - # the order of `identifying_fields` specified in the scanning request. - class RecordKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message defining the location of a BigQuery table. A table is uniquely - # identified by its project_id, dataset_id, and table_name. Within a query - # a table is often referenced with a string in the format of: - # `:.` or - # `..`. - # @!attribute [rw] project_id - # @return [::String] - # The Google Cloud project ID of the project containing the table. - # If omitted, project ID is inferred from the API call. - # @!attribute [rw] dataset_id - # @return [::String] - # Dataset ID of the table. - # @!attribute [rw] table_id - # @return [::String] - # Name of the table. - class BigQueryTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message defining the location of a BigQuery table with the projectId inferred - # from the parent project. - # @!attribute [rw] dataset_id - # @return [::String] - # Dataset ID of the table. - # @!attribute [rw] table_id - # @return [::String] - # Name of the table. - # @!attribute [rw] project_id - # @return [::String] - # The Google Cloud project ID of the project containing the table. - # If omitted, the project ID is inferred from the parent project. This field - # is required if the parent resource is an organization. - class TableReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message defining a field of a BigQuery table. - # @!attribute [rw] table - # @return [::Google::Cloud::Dlp::V2::BigQueryTable] - # Source table of the field. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Designated field in the BigQuery table. - class BigQueryField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entity in a dataset is a field or set of fields that correspond to a - # single person. For example, in medical records the `EntityId` might be a - # patient identifier, or for financial records it might be an account - # identifier. This message is used when generalizations or analysis must take - # into account that multiple rows correspond to the same entity. - # @!attribute [rw] field - # @return [::Google::Cloud::Dlp::V2::FieldId] - # Composite key indicating which field contains the entity identifier. - class EntityId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Instructions regarding the table content being inspected. - # @!attribute [rw] identifying_fields - # @return [::Array<::Google::Cloud::Dlp::V2::FieldId>] - # The columns that are the primary keys for table objects included in - # ContentItem. A copy of this cell's value will stored alongside alongside - # each finding so that the finding can be traced to the specific row it came - # from. No more than 3 may be provided. - class TableOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Coarse-grained confidence level of how well a particular finding - # satisfies the criteria to match a particular infoType. - # - # Likelihood is calculated based on the number of signals a - # finding has that implies that the finding matches the infoType. For - # example, a string that has an '@' and a '.com' is more likely to be a - # match for an email address than a string that only has an '@'. - # - # In general, the highest likelihood level has the strongest signals that - # indicate a match. That is, a finding with a high likelihood has a low chance - # of being a false positive. - # - # For more information about each likelihood level - # and how likelihood works, see [Match - # likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). - module Likelihood - # Default value; same as POSSIBLE. - LIKELIHOOD_UNSPECIFIED = 0 - - # Highest chance of a false positive. - VERY_UNLIKELY = 1 - - # High chance of a false positive. - UNLIKELY = 2 - - # Some matching signals. The default value. - POSSIBLE = 3 - - # Low chance of a false positive. - LIKELY = 4 - - # Confidence level is high. Lowest chance of a false positive. - VERY_LIKELY = 5 - end - - # Definitions of file type groups to scan. New types will be added to this - # list. - module FileType - # Includes all files. - FILE_TYPE_UNSPECIFIED = 0 - - # Includes all file extensions not covered by another entry. Binary - # scanning attempts to convert the content of the file to utf_8 to scan - # the file. - # If you wish to avoid this fall back, specify one or more of the other - # file types in your storage scan. - BINARY_FILE = 1 - - # Included file extensions: - # asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, - # dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, - # mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, - # properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, - # shtml, shtm, xhtml, lhs, ics, ini, java, js, json, jsonl, kix, kml, - # ocaml, md, txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, - # yml, yaml. - TEXT_FILE = 2 - - # Included file extensions: - # bmp, gif, jpg, jpeg, jpe, png. Setting - # {::Google::Cloud::Dlp::V2::CloudStorageOptions#bytes_limit_per_file bytes_limit_per_file} - # or - # {::Google::Cloud::Dlp::V2::CloudStorageOptions#bytes_limit_per_file bytes_limit_per_file_percent} - # has no effect on image files. Image inspection is restricted to the - # `global`, `us`, `asia`, and `europe` regions. - IMAGE = 3 - - # Microsoft Word files larger than 30 MB will be scanned as binary files. - # Included file extensions: - # docx, dotx, docm, dotm. Setting `bytes_limit_per_file` or - # `bytes_limit_per_file_percent` has no effect on Word files. - WORD = 5 - - # PDF files larger than 30 MB will be scanned as binary files. - # Included file extensions: - # pdf. Setting `bytes_limit_per_file` or `bytes_limit_per_file_percent` - # has no effect on PDF files. - PDF = 6 - - # Included file extensions: - # avro - AVRO = 7 - - # Included file extensions: - # csv - CSV = 8 - - # Included file extensions: - # tsv - TSV = 9 - - # Microsoft PowerPoint files larger than 30 MB will be scanned as binary - # files. Included file extensions: - # pptx, pptm, potx, potm, pot. Setting `bytes_limit_per_file` or - # `bytes_limit_per_file_percent` has no effect on PowerPoint files. - POWERPOINT = 11 - - # Microsoft Excel files larger than 30 MB will be scanned as binary files. - # Included file extensions: - # xlsx, xlsm, xltx, xltm. Setting `bytes_limit_per_file` or - # `bytes_limit_per_file_percent` has no effect on Excel files. - EXCEL = 12 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb deleted file mode 100644 index 7de2b93f3556..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/date.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values. - # * A month and day, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * {::Google::Type::TimeOfDay google.type.TimeOfDay} - # * [google.type.DateTime][google.type.DateTime] - # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb deleted file mode 100644 index e59ba755b43a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/proto_docs/google/type/timeofday.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are {::Google::Type::Date google.type.Date} and - # `google.protobuf.Timestamp`. - # @!attribute [rw] hours - # @return [::Integer] - # Hours of a day in 24 hour format. Must be greater than or equal to 0 and - # typically must be less than or equal to 23. An API may choose to allow the - # value "24:00:00" for scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Minutes of an hour. Must be greater than or equal to 0 and less than or - # equal to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of a minute. Must be greater than or equal to 0 and typically must - # be less than or equal to 59. An API may allow the value 60 if it allows - # leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 - # and less than or equal to 999,999,999. - class TimeOfDay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile deleted file mode 100644 index bd1f42b5f28e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-dlp-v2", path: "../" -else - gem "google-cloud-dlp-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb deleted file mode 100644 index 2692dec794bd..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/activate_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ActivateJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the activate_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger. -# -def activate_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new - - # Call the activate_job_trigger method. - result = client.activate_job_trigger request - - # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - p result -end -# [END dlp_v2_generated_DlpService_ActivateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb deleted file mode 100644 index 8be1e65384e4..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/cancel_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CancelDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the cancel_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job. -# -def cancel_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new - - # Call the cancel_dlp_job method. - result = client.cancel_dlp_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_CancelDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb deleted file mode 100644 index 73ba06dd0cc7..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateConnection_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_connection call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_connection. -# -def create_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new - - # Call the create_connection method. - result = client.create_connection request - - # The returned object is of type Google::Cloud::Dlp::V2::Connection. - p result -end -# [END dlp_v2_generated_DlpService_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb deleted file mode 100644 index 75aff544d5d5..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_deidentify_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_deidentify_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template. -# -def create_deidentify_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new - - # Call the create_deidentify_template method. - result = client.create_deidentify_template request - - # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - p result -end -# [END dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb deleted file mode 100644 index f078dc705ce4..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_discovery_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_discovery_config call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config. -# -def create_discovery_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new - - # Call the create_discovery_config method. - result = client.create_discovery_config request - - # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - p result -end -# [END dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb deleted file mode 100644 index 3e0525b876ab..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job. -# -def create_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new - - # Call the create_dlp_job method. - result = client.create_dlp_job request - - # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - p result -end -# [END dlp_v2_generated_DlpService_CreateDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb deleted file mode 100644 index 4856fb08e07d..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_inspect_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateInspectTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_inspect_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template. -# -def create_inspect_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new - - # Call the create_inspect_template method. - result = client.create_inspect_template request - - # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - p result -end -# [END dlp_v2_generated_DlpService_CreateInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb deleted file mode 100644 index 0800a195a632..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger. -# -def create_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new - - # Call the create_job_trigger method. - result = client.create_job_trigger request - - # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - p result -end -# [END dlp_v2_generated_DlpService_CreateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb deleted file mode 100644 index ea9521915d0c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/create_stored_info_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_CreateStoredInfoType_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the create_stored_info_type call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type. -# -def create_stored_info_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new - - # Call the create_stored_info_type method. - result = client.create_stored_info_type request - - # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - p result -end -# [END dlp_v2_generated_DlpService_CreateStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb deleted file mode 100644 index 9b97dd7a447c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/deidentify_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeidentifyContent_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the deidentify_content call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content. -# -def deidentify_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new - - # Call the deidentify_content method. - result = client.deidentify_content request - - # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. - p result -end -# [END dlp_v2_generated_DlpService_DeidentifyContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb deleted file mode 100644 index 0cad49395d7d..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteConnection_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_connection call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_connection. -# -def delete_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new - - # Call the delete_connection method. - result = client.delete_connection request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb deleted file mode 100644 index 6ab8eba2977b..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_deidentify_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_deidentify_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template. -# -def delete_deidentify_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new - - # Call the delete_deidentify_template method. - result = client.delete_deidentify_template request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb deleted file mode 100644 index dcc3b3e28568..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_discovery_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_discovery_config call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config. -# -def delete_discovery_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new - - # Call the delete_discovery_config method. - result = client.delete_discovery_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb deleted file mode 100644 index 1d049fb6a72e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job. -# -def delete_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new - - # Call the delete_dlp_job method. - result = client.delete_dlp_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb deleted file mode 100644 index 8e9aaf210e92..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_file_store_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_file_store_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile. -# -def delete_file_store_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new - - # Call the delete_file_store_data_profile method. - result = client.delete_file_store_data_profile request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb deleted file mode 100644 index 8f2cbfd05b3e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_inspect_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_inspect_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template. -# -def delete_inspect_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new - - # Call the delete_inspect_template method. - result = client.delete_inspect_template request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb deleted file mode 100644 index 72b26189767f..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger. -# -def delete_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new - - # Call the delete_job_trigger method. - result = client.delete_job_trigger request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb deleted file mode 100644 index 5a558ef94d89..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_stored_info_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_stored_info_type call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type. -# -def delete_stored_info_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new - - # Call the delete_stored_info_type method. - result = client.delete_stored_info_type request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb deleted file mode 100644 index 832880d44397..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/delete_table_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_DeleteTableDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the delete_table_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile. -# -def delete_table_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new - - # Call the delete_table_data_profile method. - result = client.delete_table_data_profile request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_DeleteTableDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb deleted file mode 100644 index 17484a7d9f1f..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/finish_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_FinishDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the finish_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job. -# -def finish_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new - - # Call the finish_dlp_job method. - result = client.finish_dlp_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dlp_v2_generated_DlpService_FinishDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb deleted file mode 100644 index 4e9c58b96e2e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_column_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetColumnDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_column_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile. -# -def get_column_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new - - # Call the get_column_data_profile method. - result = client.get_column_data_profile request - - # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. - p result -end -# [END dlp_v2_generated_DlpService_GetColumnDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb deleted file mode 100644 index 79434735c48e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetConnection_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_connection call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_connection. -# -def get_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetConnectionRequest.new - - # Call the get_connection method. - result = client.get_connection request - - # The returned object is of type Google::Cloud::Dlp::V2::Connection. - p result -end -# [END dlp_v2_generated_DlpService_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb deleted file mode 100644 index b3f654a73543..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_deidentify_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_deidentify_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template. -# -def get_deidentify_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new - - # Call the get_deidentify_template method. - result = client.get_deidentify_template request - - # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - p result -end -# [END dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb deleted file mode 100644 index 21fdd04b0f01..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_discovery_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetDiscoveryConfig_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_discovery_config call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config. -# -def get_discovery_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new - - # Call the get_discovery_config method. - result = client.get_discovery_config request - - # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - p result -end -# [END dlp_v2_generated_DlpService_GetDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb deleted file mode 100644 index ce7e98999fc9..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job. -# -def get_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new - - # Call the get_dlp_job method. - result = client.get_dlp_job request - - # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. - p result -end -# [END dlp_v2_generated_DlpService_GetDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb deleted file mode 100644 index 95de62c509e1..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_file_store_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_file_store_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile. -# -def get_file_store_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new - - # Call the get_file_store_data_profile method. - result = client.get_file_store_data_profile request - - # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. - p result -end -# [END dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb deleted file mode 100644 index 5bbd10c8c46c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_inspect_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetInspectTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_inspect_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template. -# -def get_inspect_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new - - # Call the get_inspect_template method. - result = client.get_inspect_template request - - # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - p result -end -# [END dlp_v2_generated_DlpService_GetInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb deleted file mode 100644 index c1118339ad67..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger. -# -def get_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new - - # Call the get_job_trigger method. - result = client.get_job_trigger request - - # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - p result -end -# [END dlp_v2_generated_DlpService_GetJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb deleted file mode 100644 index a05dedb75e84..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_project_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetProjectDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_project_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile. -# -def get_project_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new - - # Call the get_project_data_profile method. - result = client.get_project_data_profile request - - # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. - p result -end -# [END dlp_v2_generated_DlpService_GetProjectDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb deleted file mode 100644 index 546ada73e8f4..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_stored_info_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetStoredInfoType_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_stored_info_type call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type. -# -def get_stored_info_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new - - # Call the get_stored_info_type method. - result = client.get_stored_info_type request - - # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - p result -end -# [END dlp_v2_generated_DlpService_GetStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb deleted file mode 100644 index 6f41463e955e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/get_table_data_profile.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_GetTableDataProfile_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the get_table_data_profile call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile. -# -def get_table_data_profile - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new - - # Call the get_table_data_profile method. - result = client.get_table_data_profile request - - # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. - p result -end -# [END dlp_v2_generated_DlpService_GetTableDataProfile_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb deleted file mode 100644 index 8b9a334e084e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_dlp_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the hybrid_inspect_dlp_job call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job. -# -def hybrid_inspect_dlp_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new - - # Call the hybrid_inspect_dlp_job method. - result = client.hybrid_inspect_dlp_job request - - # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - p result -end -# [END dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb deleted file mode 100644 index 4c6f60064a05..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/hybrid_inspect_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the hybrid_inspect_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger. -# -def hybrid_inspect_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new - - # Call the hybrid_inspect_job_trigger method. - result = client.hybrid_inspect_job_trigger request - - # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. - p result -end -# [END dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb deleted file mode 100644 index 7ac975280cf8..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/inspect_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_InspectContent_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the inspect_content call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#inspect_content. -# -def inspect_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::InspectContentRequest.new - - # Call the inspect_content method. - result = client.inspect_content request - - # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. - p result -end -# [END dlp_v2_generated_DlpService_InspectContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb deleted file mode 100644 index 637bd65e246a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_column_data_profiles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListColumnDataProfiles_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_column_data_profiles call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles. -# -def list_column_data_profiles - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new - - # Call the list_column_data_profiles method. - result = client.list_column_data_profiles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. - p item - end -end -# [END dlp_v2_generated_DlpService_ListColumnDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb deleted file mode 100644 index a34c00ba3328..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListConnections_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_connections call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_connections. -# -def list_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new - - # Call the list_connections method. - result = client.list_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - p item - end -end -# [END dlp_v2_generated_DlpService_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb deleted file mode 100644 index c017f821fb6a..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_deidentify_templates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_deidentify_templates call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates. -# -def list_deidentify_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new - - # Call the list_deidentify_templates method. - result = client.list_deidentify_templates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate. - p item - end -end -# [END dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb deleted file mode 100644 index 1a372d54c8b8..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_discovery_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_discovery_configs call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs. -# -def list_discovery_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new - - # Call the list_discovery_configs method. - result = client.list_discovery_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig. - p item - end -end -# [END dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb deleted file mode 100644 index fd785e93e367..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_dlp_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListDlpJobs_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_dlp_jobs call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs. -# -def list_dlp_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new - - # Call the list_dlp_jobs method. - result = client.list_dlp_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob. - p item - end -end -# [END dlp_v2_generated_DlpService_ListDlpJobs_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb deleted file mode 100644 index aa5a8526fba6..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_file_store_data_profiles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_file_store_data_profiles call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles. -# -def list_file_store_data_profiles - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new - - # Call the list_file_store_data_profiles method. - result = client.list_file_store_data_profiles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::FileStoreDataProfile. - p item - end -end -# [END dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb deleted file mode 100644 index b0c6d42efe6e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_info_types.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListInfoTypes_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_info_types call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_info_types. -# -def list_info_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new - - # Call the list_info_types method. - result = client.list_info_types request - - # The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse. - p result -end -# [END dlp_v2_generated_DlpService_ListInfoTypes_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb deleted file mode 100644 index 2be75a31f47b..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_inspect_templates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListInspectTemplates_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_inspect_templates call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates. -# -def list_inspect_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new - - # Call the list_inspect_templates method. - result = client.list_inspect_templates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate. - p item - end -end -# [END dlp_v2_generated_DlpService_ListInspectTemplates_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb deleted file mode 100644 index 5ebbce52ee34..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_job_triggers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListJobTriggers_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_job_triggers call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers. -# -def list_job_triggers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new - - # Call the list_job_triggers method. - result = client.list_job_triggers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger. - p item - end -end -# [END dlp_v2_generated_DlpService_ListJobTriggers_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb deleted file mode 100644 index 58f447296c52..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_project_data_profiles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListProjectDataProfiles_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_project_data_profiles call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles. -# -def list_project_data_profiles - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new - - # Call the list_project_data_profiles method. - result = client.list_project_data_profiles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile. - p item - end -end -# [END dlp_v2_generated_DlpService_ListProjectDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb deleted file mode 100644 index 6eda6d1cdf95..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_stored_info_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_stored_info_types call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types. -# -def list_stored_info_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new - - # Call the list_stored_info_types method. - result = client.list_stored_info_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType. - p item - end -end -# [END dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb deleted file mode 100644 index 4739158df40e..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/list_table_data_profiles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ListTableDataProfiles_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the list_table_data_profiles call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles. -# -def list_table_data_profiles - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new - - # Call the list_table_data_profiles method. - result = client.list_table_data_profiles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile. - p item - end -end -# [END dlp_v2_generated_DlpService_ListTableDataProfiles_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb deleted file mode 100644 index 5e3f17a73fab..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/redact_image.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_RedactImage_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the redact_image call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#redact_image. -# -def redact_image - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::RedactImageRequest.new - - # Call the redact_image method. - result = client.redact_image request - - # The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse. - p result -end -# [END dlp_v2_generated_DlpService_RedactImage_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb deleted file mode 100644 index c2f066a9a83f..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/reidentify_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_ReidentifyContent_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the reidentify_content call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content. -# -def reidentify_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new - - # Call the reidentify_content method. - result = client.reidentify_content request - - # The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse. - p result -end -# [END dlp_v2_generated_DlpService_ReidentifyContent_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb deleted file mode 100644 index cd3861f3f87c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/search_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_SearchConnections_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the search_connections call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#search_connections. -# -def search_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new - - # Call the search_connections method. - result = client.search_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dlp::V2::Connection. - p item - end -end -# [END dlp_v2_generated_DlpService_SearchConnections_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb deleted file mode 100644 index 2813c373cf69..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateConnection_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_connection call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_connection. -# -def update_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new - - # Call the update_connection method. - result = client.update_connection request - - # The returned object is of type Google::Cloud::Dlp::V2::Connection. - p result -end -# [END dlp_v2_generated_DlpService_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb deleted file mode 100644 index d2b58b4a427c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_deidentify_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_deidentify_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template. -# -def update_deidentify_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new - - # Call the update_deidentify_template method. - result = client.update_deidentify_template request - - # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. - p result -end -# [END dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb deleted file mode 100644 index deec072ba831..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_discovery_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_discovery_config call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config. -# -def update_discovery_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new - - # Call the update_discovery_config method. - result = client.update_discovery_config request - - # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. - p result -end -# [END dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb deleted file mode 100644 index 76ba6abd45b2..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_inspect_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_inspect_template call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template. -# -def update_inspect_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new - - # Call the update_inspect_template method. - result = client.update_inspect_template request - - # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. - p result -end -# [END dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb deleted file mode 100644 index 031f02e5aca2..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_job_trigger.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateJobTrigger_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_job_trigger call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger. -# -def update_job_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new - - # Call the update_job_trigger method. - result = client.update_job_trigger request - - # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. - p result -end -# [END dlp_v2_generated_DlpService_UpdateJobTrigger_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb b/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb deleted file mode 100644 index 393fa91feb1f..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/dlp_service/update_stored_info_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] -require "google/cloud/dlp/v2" - -## -# Snippet for the update_stored_info_type call in the DlpService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type. -# -def update_stored_info_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dlp::V2::DlpService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new - - # Call the update_stored_info_type method. - result = client.update_stored_info_type request - - # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. - p result -end -# [END dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] diff --git a/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json b/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json deleted file mode 100644 index 92df99e10d9d..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/snippets/snippet_metadata_google.privacy.dlp.v2.json +++ /dev/null @@ -1,2215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-dlp-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.privacy.dlp.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "dlp_v2_generated_DlpService_InspectContent_sync", - "title": "Snippet for the inspect_content call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#inspect_content.", - "file": "dlp_service/inspect_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "inspect_content", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#inspect_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::InspectContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::InspectContentResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "InspectContent", - "full_name": "google.privacy.dlp.v2.DlpService.InspectContent", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_RedactImage_sync", - "title": "Snippet for the redact_image call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#redact_image.", - "file": "dlp_service/redact_image.rb", - "language": "RUBY", - "client_method": { - "short_name": "redact_image", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#redact_image", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::RedactImageRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::RedactImageResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "RedactImage", - "full_name": "google.privacy.dlp.v2.DlpService.RedactImage", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeidentifyContent_sync", - "title": "Snippet for the deidentify_content call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content.", - "file": "dlp_service/deidentify_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "deidentify_content", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#deidentify_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeidentifyContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DeidentifyContentResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeidentifyContent", - "full_name": "google.privacy.dlp.v2.DlpService.DeidentifyContent", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ReidentifyContent_sync", - "title": "Snippet for the reidentify_content call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content.", - "file": "dlp_service/reidentify_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "reidentify_content", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#reidentify_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ReidentifyContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ReidentifyContentResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ReidentifyContent", - "full_name": "google.privacy.dlp.v2.DlpService.ReidentifyContent", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListInfoTypes_sync", - "title": "Snippet for the list_info_types call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_info_types.", - "file": "dlp_service/list_info_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_info_types", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_info_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListInfoTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListInfoTypesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListInfoTypes", - "full_name": "google.privacy.dlp.v2.DlpService.ListInfoTypes", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateInspectTemplate_sync", - "title": "Snippet for the create_inspect_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template.", - "file": "dlp_service/create_inspect_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_inspect_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_inspect_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateInspectTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.CreateInspectTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateInspectTemplate_sync", - "title": "Snippet for the update_inspect_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template.", - "file": "dlp_service/update_inspect_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_inspect_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_inspect_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateInspectTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateInspectTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetInspectTemplate_sync", - "title": "Snippet for the get_inspect_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template.", - "file": "dlp_service/get_inspect_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_inspect_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_inspect_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetInspectTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::InspectTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetInspectTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.GetInspectTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListInspectTemplates_sync", - "title": "Snippet for the list_inspect_templates call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates.", - "file": "dlp_service/list_inspect_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_inspect_templates", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_inspect_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListInspectTemplates", - "full_name": "google.privacy.dlp.v2.DlpService.ListInspectTemplates", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteInspectTemplate_sync", - "title": "Snippet for the delete_inspect_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template.", - "file": "dlp_service/delete_inspect_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_inspect_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_inspect_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteInspectTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteInspectTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync", - "title": "Snippet for the create_deidentify_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template.", - "file": "dlp_service/create_deidentify_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_deidentify_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_deidentify_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateDeidentifyTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync", - "title": "Snippet for the update_deidentify_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template.", - "file": "dlp_service/update_deidentify_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_deidentify_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_deidentify_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateDeidentifyTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync", - "title": "Snippet for the get_deidentify_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template.", - "file": "dlp_service/get_deidentify_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_deidentify_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_deidentify_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DeidentifyTemplate", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetDeidentifyTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.GetDeidentifyTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync", - "title": "Snippet for the list_deidentify_templates call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates.", - "file": "dlp_service/list_deidentify_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_deidentify_templates", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_deidentify_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListDeidentifyTemplates", - "full_name": "google.privacy.dlp.v2.DlpService.ListDeidentifyTemplates", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync", - "title": "Snippet for the delete_deidentify_template call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template.", - "file": "dlp_service/delete_deidentify_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_deidentify_template", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_deidentify_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteDeidentifyTemplate", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplate", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateJobTrigger_sync", - "title": "Snippet for the create_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger.", - "file": "dlp_service/create_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.CreateJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateJobTrigger_sync", - "title": "Snippet for the update_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger.", - "file": "dlp_service/update_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync", - "title": "Snippet for the hybrid_inspect_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger.", - "file": "dlp_service/hybrid_inspect_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "hybrid_inspect_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::HybridInspectResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "HybridInspectJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.HybridInspectJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetJobTrigger_sync", - "title": "Snippet for the get_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger.", - "file": "dlp_service/get_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::JobTrigger", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.GetJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListJobTriggers_sync", - "title": "Snippet for the list_job_triggers call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers.", - "file": "dlp_service/list_job_triggers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_job_triggers", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_job_triggers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListJobTriggersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListJobTriggersResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListJobTriggers", - "full_name": "google.privacy.dlp.v2.DlpService.ListJobTriggers", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteJobTrigger_sync", - "title": "Snippet for the delete_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger.", - "file": "dlp_service/delete_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ActivateJobTrigger_sync", - "title": "Snippet for the activate_job_trigger call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger.", - "file": "dlp_service/activate_job_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "activate_job_trigger", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#activate_job_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DlpJob", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ActivateJobTrigger", - "full_name": "google.privacy.dlp.v2.DlpService.ActivateJobTrigger", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateDiscoveryConfig_sync", - "title": "Snippet for the create_discovery_config call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config.", - "file": "dlp_service/create_discovery_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_discovery_config", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_discovery_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateDiscoveryConfig", - "full_name": "google.privacy.dlp.v2.DlpService.CreateDiscoveryConfig", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateDiscoveryConfig_sync", - "title": "Snippet for the update_discovery_config call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config.", - "file": "dlp_service/update_discovery_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_discovery_config", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_discovery_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateDiscoveryConfig", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateDiscoveryConfig", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetDiscoveryConfig_sync", - "title": "Snippet for the get_discovery_config call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config.", - "file": "dlp_service/get_discovery_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_discovery_config", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_discovery_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DiscoveryConfig", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetDiscoveryConfig", - "full_name": "google.privacy.dlp.v2.DlpService.GetDiscoveryConfig", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListDiscoveryConfigs_sync", - "title": "Snippet for the list_discovery_configs call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs.", - "file": "dlp_service/list_discovery_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_discovery_configs", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_discovery_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListDiscoveryConfigs", - "full_name": "google.privacy.dlp.v2.DlpService.ListDiscoveryConfigs", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteDiscoveryConfig_sync", - "title": "Snippet for the delete_discovery_config call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config.", - "file": "dlp_service/delete_discovery_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_discovery_config", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_discovery_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteDiscoveryConfig", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteDiscoveryConfig", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateDlpJob_sync", - "title": "Snippet for the create_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job.", - "file": "dlp_service/create_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DlpJob", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.CreateDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListDlpJobs_sync", - "title": "Snippet for the list_dlp_jobs call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs.", - "file": "dlp_service/list_dlp_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_dlp_jobs", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_dlp_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListDlpJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListDlpJobsResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListDlpJobs", - "full_name": "google.privacy.dlp.v2.DlpService.ListDlpJobs", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetDlpJob_sync", - "title": "Snippet for the get_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job.", - "file": "dlp_service/get_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::DlpJob", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.GetDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteDlpJob_sync", - "title": "Snippet for the delete_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job.", - "file": "dlp_service/delete_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CancelDlpJob_sync", - "title": "Snippet for the cancel_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job.", - "file": "dlp_service/cancel_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#cancel_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CancelDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CancelDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.CancelDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateStoredInfoType_sync", - "title": "Snippet for the create_stored_info_type call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type.", - "file": "dlp_service/create_stored_info_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_stored_info_type", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_stored_info_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateStoredInfoType", - "full_name": "google.privacy.dlp.v2.DlpService.CreateStoredInfoType", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateStoredInfoType_sync", - "title": "Snippet for the update_stored_info_type call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type.", - "file": "dlp_service/update_stored_info_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_stored_info_type", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_stored_info_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateStoredInfoType", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateStoredInfoType", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetStoredInfoType_sync", - "title": "Snippet for the get_stored_info_type call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type.", - "file": "dlp_service/get_stored_info_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_stored_info_type", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_stored_info_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::StoredInfoType", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetStoredInfoType", - "full_name": "google.privacy.dlp.v2.DlpService.GetStoredInfoType", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListStoredInfoTypes_sync", - "title": "Snippet for the list_stored_info_types call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types.", - "file": "dlp_service/list_stored_info_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_stored_info_types", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_stored_info_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListStoredInfoTypes", - "full_name": "google.privacy.dlp.v2.DlpService.ListStoredInfoTypes", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteStoredInfoType_sync", - "title": "Snippet for the delete_stored_info_type call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type.", - "file": "dlp_service/delete_stored_info_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_stored_info_type", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_stored_info_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteStoredInfoType", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteStoredInfoType", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListProjectDataProfiles_sync", - "title": "Snippet for the list_project_data_profiles call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles.", - "file": "dlp_service/list_project_data_profiles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_project_data_profiles", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_project_data_profiles", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListProjectDataProfiles", - "full_name": "google.privacy.dlp.v2.DlpService.ListProjectDataProfiles", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListTableDataProfiles_sync", - "title": "Snippet for the list_table_data_profiles call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles.", - "file": "dlp_service/list_table_data_profiles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_table_data_profiles", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_table_data_profiles", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListTableDataProfiles", - "full_name": "google.privacy.dlp.v2.DlpService.ListTableDataProfiles", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListColumnDataProfiles_sync", - "title": "Snippet for the list_column_data_profiles call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles.", - "file": "dlp_service/list_column_data_profiles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_column_data_profiles", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_column_data_profiles", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListColumnDataProfiles", - "full_name": "google.privacy.dlp.v2.DlpService.ListColumnDataProfiles", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetProjectDataProfile_sync", - "title": "Snippet for the get_project_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile.", - "file": "dlp_service/get_project_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_project_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ProjectDataProfile", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetProjectDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.GetProjectDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListFileStoreDataProfiles_sync", - "title": "Snippet for the list_file_store_data_profiles call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles.", - "file": "dlp_service/list_file_store_data_profiles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_file_store_data_profiles", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_file_store_data_profiles", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListFileStoreDataProfiles", - "full_name": "google.privacy.dlp.v2.DlpService.ListFileStoreDataProfiles", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetFileStoreDataProfile_sync", - "title": "Snippet for the get_file_store_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile.", - "file": "dlp_service/get_file_store_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_file_store_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_file_store_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::FileStoreDataProfile", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetFileStoreDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.GetFileStoreDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_sync", - "title": "Snippet for the delete_file_store_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile.", - "file": "dlp_service/delete_file_store_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_file_store_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_file_store_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteFileStoreDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteFileStoreDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetTableDataProfile_sync", - "title": "Snippet for the get_table_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile.", - "file": "dlp_service/get_table_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_table_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_table_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetTableDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::TableDataProfile", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetTableDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.GetTableDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetColumnDataProfile_sync", - "title": "Snippet for the get_column_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile.", - "file": "dlp_service/get_column_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_column_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_column_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ColumnDataProfile", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetColumnDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.GetColumnDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteTableDataProfile_sync", - "title": "Snippet for the delete_table_data_profile call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile.", - "file": "dlp_service/delete_table_data_profile.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_table_data_profile", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_table_data_profile", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteTableDataProfile", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteTableDataProfile", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_HybridInspectDlpJob_sync", - "title": "Snippet for the hybrid_inspect_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job.", - "file": "dlp_service/hybrid_inspect_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "hybrid_inspect_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#hybrid_inspect_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::HybridInspectResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "HybridInspectDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.HybridInspectDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_FinishDlpJob_sync", - "title": "Snippet for the finish_dlp_job call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job.", - "file": "dlp_service/finish_dlp_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "finish_dlp_job", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#finish_dlp_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::FinishDlpJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "FinishDlpJob", - "full_name": "google.privacy.dlp.v2.DlpService.FinishDlpJob", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_CreateConnection_sync", - "title": "Snippet for the create_connection call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#create_connection.", - "file": "dlp_service/create_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connection", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#create_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::CreateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::Connection", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "CreateConnection", - "full_name": "google.privacy.dlp.v2.DlpService.CreateConnection", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_GetConnection_sync", - "title": "Snippet for the get_connection call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#get_connection.", - "file": "dlp_service/get_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connection", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#get_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::GetConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::Connection", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "GetConnection", - "full_name": "google.privacy.dlp.v2.DlpService.GetConnection", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_ListConnections_sync", - "title": "Snippet for the list_connections call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#list_connections.", - "file": "dlp_service/list_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connections", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#list_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::ListConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::ListConnectionsResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "ListConnections", - "full_name": "google.privacy.dlp.v2.DlpService.ListConnections", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_SearchConnections_sync", - "title": "Snippet for the search_connections call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#search_connections.", - "file": "dlp_service/search_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_connections", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#search_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::SearchConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::SearchConnectionsResponse", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "SearchConnections", - "full_name": "google.privacy.dlp.v2.DlpService.SearchConnections", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_DeleteConnection_sync", - "title": "Snippet for the delete_connection call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#delete_connection.", - "file": "dlp_service/delete_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connection", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#delete_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::DeleteConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "DeleteConnection", - "full_name": "google.privacy.dlp.v2.DlpService.DeleteConnection", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dlp_v2_generated_DlpService_UpdateConnection_sync", - "title": "Snippet for the update_connection call in the DlpService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dlp::V2::DlpService::Client#update_connection.", - "file": "dlp_service/update_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_connection", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client#update_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dlp::V2::UpdateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dlp::V2::Connection", - "client": { - "short_name": "DlpService::Client", - "full_name": "::Google::Cloud::Dlp::V2::DlpService::Client" - }, - "method": { - "short_name": "UpdateConnection", - "full_name": "google.privacy.dlp.v2.DlpService.UpdateConnection", - "service": { - "short_name": "DlpService", - "full_name": "google.privacy.dlp.v2.DlpService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb deleted file mode 100644 index fb06b253390c..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_paths_test.rb +++ /dev/null @@ -1,271 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dlp/v2/dlp_service" - -class ::Google::Cloud::Dlp::V2::DlpService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_column_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.column_data_profile_path organization: "value0", location: "value1", column_data_profile: "value2" - assert_equal "organizations/value0/locations/value1/columnDataProfiles/value2", path - - path = client.column_data_profile_path project: "value0", location: "value1", column_data_profile: "value2" - assert_equal "projects/value0/locations/value1/columnDataProfiles/value2", path - end - end - - def test_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connection_path project: "value0", location: "value1", connection: "value2" - assert_equal "projects/value0/locations/value1/connections/value2", path - - path = client.connection_path organization: "value0", location: "value1", connection: "value2" - assert_equal "organizations/value0/locations/value1/connections/value2", path - end - end - - def test_deidentify_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deidentify_template_path organization: "value0", deidentify_template: "value1" - assert_equal "organizations/value0/deidentifyTemplates/value1", path - - path = client.deidentify_template_path project: "value0", deidentify_template: "value1" - assert_equal "projects/value0/deidentifyTemplates/value1", path - - path = client.deidentify_template_path organization: "value0", location: "value1", deidentify_template: "value2" - assert_equal "organizations/value0/locations/value1/deidentifyTemplates/value2", path - - path = client.deidentify_template_path project: "value0", location: "value1", deidentify_template: "value2" - assert_equal "projects/value0/locations/value1/deidentifyTemplates/value2", path - end - end - - def test_discovery_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.discovery_config_path project: "value0", location: "value1", discovery_config: "value2" - assert_equal "projects/value0/locations/value1/discoveryConfigs/value2", path - end - end - - def test_dlp_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dlp_job_path project: "value0", dlp_job: "value1" - assert_equal "projects/value0/dlpJobs/value1", path - - path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" - assert_equal "projects/value0/locations/value1/dlpJobs/value2", path - end - end - - def test_file_store_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.file_store_data_profile_path organization: "value0", location: "value1", file_store_data_profile: "value2" - assert_equal "organizations/value0/locations/value1/fileStoreDataProfiles/value2", path - - path = client.file_store_data_profile_path project: "value0", location: "value1", file_store_data_profile: "value2" - assert_equal "projects/value0/locations/value1/fileStoreDataProfiles/value2", path - end - end - - def test_inspect_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.inspect_template_path organization: "value0", inspect_template: "value1" - assert_equal "organizations/value0/inspectTemplates/value1", path - - path = client.inspect_template_path project: "value0", inspect_template: "value1" - assert_equal "projects/value0/inspectTemplates/value1", path - - path = client.inspect_template_path organization: "value0", location: "value1", inspect_template: "value2" - assert_equal "organizations/value0/locations/value1/inspectTemplates/value2", path - - path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" - assert_equal "projects/value0/locations/value1/inspectTemplates/value2", path - end - end - - def test_job_trigger_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_trigger_path project: "value0", job_trigger: "value1" - assert_equal "projects/value0/jobTriggers/value1", path - - path = client.job_trigger_path project: "value0", location: "value1", job_trigger: "value2" - assert_equal "projects/value0/locations/value1/jobTriggers/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_project_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_data_profile_path organization: "value0", location: "value1", project_data_profile: "value2" - assert_equal "organizations/value0/locations/value1/projectDataProfiles/value2", path - - path = client.project_data_profile_path project: "value0", location: "value1", project_data_profile: "value2" - assert_equal "projects/value0/locations/value1/projectDataProfiles/value2", path - end - end - - def test_stored_info_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.stored_info_type_path organization: "value0", stored_info_type: "value1" - assert_equal "organizations/value0/storedInfoTypes/value1", path - - path = client.stored_info_type_path project: "value0", stored_info_type: "value1" - assert_equal "projects/value0/storedInfoTypes/value1", path - - path = client.stored_info_type_path organization: "value0", location: "value1", stored_info_type: "value2" - assert_equal "organizations/value0/locations/value1/storedInfoTypes/value2", path - - path = client.stored_info_type_path project: "value0", location: "value1", stored_info_type: "value2" - assert_equal "projects/value0/locations/value1/storedInfoTypes/value2", path - end - end - - def test_table_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_data_profile_path organization: "value0", location: "value1", table_data_profile: "value2" - assert_equal "organizations/value0/locations/value1/tableDataProfiles/value2", path - - path = client.table_data_profile_path project: "value0", location: "value1", table_data_profile: "value2" - assert_equal "projects/value0/locations/value1/tableDataProfiles/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb deleted file mode 100644 index a67f69527aba..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_rest_test.rb +++ /dev/null @@ -1,3176 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/privacy/dlp/v2/dlp_pb" -require "google/cloud/dlp/v2/dlp_service/rest" - - -class ::Google::Cloud::Dlp::V2::DlpService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_inspect_content - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::InspectContentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_config = {} - item = {} - inspect_template_name = "hello world" - location_id = "hello world" - - inspect_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_inspect_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, inspect_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.inspect_content parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.inspect_content ::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.inspect_content(::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, inspect_content_client_stub.call_count - end - end - end - - def test_redact_image - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::RedactImageResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - location_id = "hello world" - inspect_config = {} - image_redaction_configs = [{}] - include_findings = true - byte_item = {} - inspect_template = "hello world" - deidentify_template = "hello world" - - redact_image_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_redact_image_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, redact_image_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.redact_image parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.redact_image ::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.redact_image(::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, redact_image_client_stub.call_count - end - end - end - - def test_deidentify_content - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deidentify_config = {} - inspect_config = {} - item = {} - inspect_template_name = "hello world" - deidentify_template_name = "hello world" - location_id = "hello world" - - deidentify_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_deidentify_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deidentify_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.deidentify_content parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.deidentify_content ::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.deidentify_content(::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deidentify_content_client_stub.call_count - end - end - end - - def test_reidentify_content - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reidentify_config = {} - inspect_config = {} - item = {} - inspect_template_name = "hello world" - reidentify_template_name = "hello world" - location_id = "hello world" - - reidentify_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_reidentify_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reidentify_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reidentify_content parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reidentify_content ::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reidentify_content(::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reidentify_content_client_stub.call_count - end - end - end - - def test_list_info_types - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - language_code = "hello world" - filter = "hello world" - location_id = "hello world" - - list_info_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_info_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_info_types_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_info_types parent: parent, language_code: language_code, filter: filter, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_info_types ::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_info_types(::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_info_types_client_stub.call_count - end - end - end - - def test_create_inspect_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_template = {} - template_id = "hello world" - location_id = "hello world" - - create_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_inspect_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_inspect_template parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_inspect_template ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_inspect_template(::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_inspect_template_client_stub.call_count - end - end - end - - def test_update_inspect_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - inspect_template = {} - update_mask = {} - - update_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_inspect_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_inspect_template name: name, inspect_template: inspect_template, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_inspect_template ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_inspect_template(::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_inspect_template_client_stub.call_count - end - end - end - - def test_get_inspect_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::InspectTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_inspect_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_inspect_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_inspect_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_inspect_template ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_inspect_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_inspect_template(::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_inspect_template_client_stub.call_count - end - end - end - - def test_list_inspect_templates - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_inspect_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_inspect_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_inspect_templates_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_inspect_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_inspect_templates ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_inspect_templates(::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_inspect_templates_client_stub.call_count - end - end - end - - def test_delete_inspect_template - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_inspect_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_inspect_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_inspect_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_inspect_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_inspect_template ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_inspect_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_inspect_template(::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_inspect_template_client_stub.call_count - end - end - end - - def test_create_deidentify_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deidentify_template = {} - template_id = "hello world" - location_id = "hello world" - - create_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_deidentify_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_deidentify_template parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_deidentify_template ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_deidentify_template(::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_deidentify_template_client_stub.call_count - end - end - end - - def test_update_deidentify_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - deidentify_template = {} - update_mask = {} - - update_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_deidentify_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_deidentify_template name: name, deidentify_template: deidentify_template, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_deidentify_template ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_deidentify_template(::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_deidentify_template_client_stub.call_count - end - end - end - - def test_get_deidentify_template - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_deidentify_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_deidentify_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_deidentify_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_deidentify_template ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_deidentify_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_deidentify_template(::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_deidentify_template_client_stub.call_count - end - end - end - - def test_list_deidentify_templates - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_deidentify_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_deidentify_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_deidentify_templates_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_deidentify_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_deidentify_templates ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_deidentify_templates(::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_deidentify_templates_client_stub.call_count - end - end - end - - def test_delete_deidentify_template - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_deidentify_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_deidentify_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_deidentify_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_deidentify_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_deidentify_template ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_deidentify_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_deidentify_template(::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_deidentify_template_client_stub.call_count - end - end - end - - def test_create_job_trigger - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_trigger = {} - trigger_id = "hello world" - location_id = "hello world" - - create_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_job_trigger parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_job_trigger ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_job_trigger(::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_job_trigger_client_stub.call_count - end - end - end - - def test_update_job_trigger - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - job_trigger = {} - update_mask = {} - - update_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_job_trigger name: name, job_trigger: job_trigger, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_job_trigger ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_job_trigger(::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_job_trigger_client_stub.call_count - end - end - end - - def test_hybrid_inspect_job_trigger - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - hybrid_item = {} - - hybrid_inspect_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_hybrid_inspect_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, hybrid_inspect_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.hybrid_inspect_job_trigger name: name, hybrid_item: hybrid_item do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.hybrid_inspect_job_trigger ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.hybrid_inspect_job_trigger(::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, hybrid_inspect_job_trigger_client_stub.call_count - end - end - end - - def test_get_job_trigger - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::JobTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job_trigger({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job_trigger name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job_trigger ::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job_trigger({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job_trigger(::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_trigger_client_stub.call_count - end - end - end - - def test_list_job_triggers - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - type = :DLP_JOB_TYPE_UNSPECIFIED - location_id = "hello world" - - list_job_triggers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_job_triggers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_job_triggers_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_job_triggers parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_job_triggers ::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_job_triggers(::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_job_triggers_client_stub.call_count - end - end - end - - def test_delete_job_trigger - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_job_trigger({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_job_trigger name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_job_trigger ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_job_trigger({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_job_trigger(::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_job_trigger_client_stub.call_count - end - end - end - - def test_activate_job_trigger - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DlpJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - activate_job_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_activate_job_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, activate_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.activate_job_trigger({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.activate_job_trigger name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.activate_job_trigger ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.activate_job_trigger({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.activate_job_trigger(::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, activate_job_trigger_client_stub.call_count - end - end - end - - def test_create_discovery_config - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - discovery_config = {} - config_id = "hello world" - - create_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_discovery_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_discovery_config parent: parent, discovery_config: discovery_config, config_id: config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_discovery_config ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_discovery_config(::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_discovery_config_client_stub.call_count - end - end - end - - def test_update_discovery_config - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - discovery_config = {} - update_mask = {} - - update_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_discovery_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_discovery_config name: name, discovery_config: discovery_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_discovery_config ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_discovery_config(::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_discovery_config_client_stub.call_count - end - end - end - - def test_get_discovery_config - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_discovery_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_discovery_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_discovery_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_discovery_config ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_discovery_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_discovery_config(::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_discovery_config_client_stub.call_count - end - end - end - - def test_list_discovery_configs - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_discovery_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_discovery_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_discovery_configs_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_discovery_configs parent: parent, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_discovery_configs ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_discovery_configs(::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_discovery_configs_client_stub.call_count - end - end - end - - def test_delete_discovery_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_discovery_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_discovery_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_discovery_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_discovery_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_discovery_config ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_discovery_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_discovery_config(::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_discovery_config_client_stub.call_count - end - end - end - - def test_create_dlp_job - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DlpJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_job = {} - job_id = "hello world" - location_id = "hello world" - - create_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dlp_job parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dlp_job ::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dlp_job(::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dlp_job_client_stub.call_count - end - end - end - - def test_list_dlp_jobs - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - type = :DLP_JOB_TYPE_UNSPECIFIED - order_by = "hello world" - location_id = "hello world" - - list_dlp_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_dlp_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_dlp_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_dlp_jobs parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_dlp_jobs ::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_dlp_jobs(::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_dlp_jobs_client_stub.call_count - end - end - end - - def test_get_dlp_job - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::DlpJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dlp_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dlp_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dlp_job ::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dlp_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dlp_job(::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dlp_job_client_stub.call_count - end - end - end - - def test_delete_dlp_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dlp_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dlp_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dlp_job ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dlp_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dlp_job(::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dlp_job_client_stub.call_count - end - end - end - - def test_cancel_dlp_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_cancel_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_dlp_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_dlp_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_dlp_job ::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_dlp_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_dlp_job(::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_dlp_job_client_stub.call_count - end - end - end - - def test_create_stored_info_type - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config = {} - stored_info_type_id = "hello world" - location_id = "hello world" - - create_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_stored_info_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_stored_info_type parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_stored_info_type ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_stored_info_type(::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_stored_info_type_client_stub.call_count - end - end - end - - def test_update_stored_info_type - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - config = {} - update_mask = {} - - update_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_stored_info_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_stored_info_type name: name, config: config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_stored_info_type ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_stored_info_type(::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_stored_info_type_client_stub.call_count - end - end - end - - def test_get_stored_info_type - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::StoredInfoType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_stored_info_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_stored_info_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_stored_info_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_stored_info_type ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_stored_info_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_stored_info_type(::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_stored_info_type_client_stub.call_count - end - end - end - - def test_list_stored_info_types - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_stored_info_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_stored_info_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_stored_info_types_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_stored_info_types parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_stored_info_types ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_stored_info_types(::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_stored_info_types_client_stub.call_count - end - end - end - - def test_delete_stored_info_type - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_stored_info_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_stored_info_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_stored_info_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_stored_info_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_stored_info_type ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_stored_info_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_stored_info_type(::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_stored_info_type_client_stub.call_count - end - end - end - - def test_list_project_data_profiles - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_project_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_project_data_profiles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_project_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_project_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_project_data_profiles ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_project_data_profiles(::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_project_data_profiles_client_stub.call_count - end - end - end - - def test_list_table_data_profiles - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_table_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_table_data_profiles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_table_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_table_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_table_data_profiles ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_table_data_profiles(::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_table_data_profiles_client_stub.call_count - end - end - end - - def test_list_column_data_profiles - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_column_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_column_data_profiles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_column_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_column_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_column_data_profiles ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_column_data_profiles(::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_column_data_profiles_client_stub.call_count - end - end - end - - def test_get_project_data_profile - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ProjectDataProfile.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_project_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_project_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_project_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_project_data_profile ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_project_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_project_data_profile(::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_data_profile_client_stub.call_count - end - end - end - - def test_list_file_store_data_profiles - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_file_store_data_profiles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_file_store_data_profiles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_file_store_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_file_store_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_file_store_data_profiles ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_file_store_data_profiles(::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_file_store_data_profiles_client_stub.call_count - end - end - end - - def test_get_file_store_data_profile - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_store_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_file_store_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_file_store_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_file_store_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_file_store_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_file_store_data_profile ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_file_store_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_file_store_data_profile(::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_file_store_data_profile_client_stub.call_count - end - end - end - - def test_delete_file_store_data_profile - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_file_store_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_file_store_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_file_store_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_file_store_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_file_store_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_file_store_data_profile ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_file_store_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_file_store_data_profile(::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_file_store_data_profile_client_stub.call_count - end - end - end - - def test_get_table_data_profile - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::TableDataProfile.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_table_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_table_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_table_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_table_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_table_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_table_data_profile ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_table_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_table_data_profile(::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_table_data_profile_client_stub.call_count - end - end - end - - def test_get_column_data_profile - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ColumnDataProfile.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_column_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_column_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_column_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_column_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_column_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_column_data_profile ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_column_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_column_data_profile(::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_column_data_profile_client_stub.call_count - end - end - end - - def test_delete_table_data_profile - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_table_data_profile_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_table_data_profile_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_table_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_table_data_profile({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_table_data_profile name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_table_data_profile ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_table_data_profile({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_table_data_profile(::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_table_data_profile_client_stub.call_count - end - end - end - - def test_hybrid_inspect_dlp_job - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - hybrid_item = {} - - hybrid_inspect_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_hybrid_inspect_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, hybrid_inspect_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.hybrid_inspect_dlp_job name: name, hybrid_item: hybrid_item do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.hybrid_inspect_dlp_job ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.hybrid_inspect_dlp_job(::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, hybrid_inspect_dlp_job_client_stub.call_count - end - end - end - - def test_finish_dlp_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - finish_dlp_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_finish_dlp_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, finish_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.finish_dlp_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.finish_dlp_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.finish_dlp_job ::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.finish_dlp_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.finish_dlp_job(::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, finish_dlp_job_client_stub.call_count - end - end - end - - def test_create_connection - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection = {} - - create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_connection({ parent: parent, connection: connection }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_connection parent: parent, connection: connection do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_connection ::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_connection({ parent: parent, connection: connection }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_count - end - end - end - - def test_get_connection - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_connection ::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_count - end - end - end - - def test_list_connections - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_connections ::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_connections_client_stub.call_count - end - end - end - - def test_search_connections - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_search_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_connections_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_connections ::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_connections(::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_connections_client_stub.call_count - end - end - end - - def test_delete_connection - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_connection_client_stub.call_count - end - end - end - - def test_update_connection - # Create test objects. - client_result = ::Google::Cloud::Dlp::V2::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - connection = {} - update_mask = {} - - update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_connection name: name, connection: connection, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_connection ::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_connection({ name: name, connection: connection, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_connection_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb b/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb deleted file mode 100644 index cffc58e83501..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/test/google/cloud/dlp/v2/dlp_service_test.rb +++ /dev/null @@ -1,3569 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/privacy/dlp/v2/dlp_pb" -require "google/cloud/dlp/v2/dlp_service" - -class ::Google::Cloud::Dlp::V2::DlpService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_inspect_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::InspectContentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_config = {} - item = {} - inspect_template_name = "hello world" - location_id = "hello world" - - inspect_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :inspect_content, name - assert_kind_of ::Google::Cloud::Dlp::V2::InspectContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] - assert_equal "hello world", request["inspect_template_name"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, inspect_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.inspect_content parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.inspect_content ::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.inspect_content({ parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.inspect_content(::Google::Cloud::Dlp::V2::InspectContentRequest.new(parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, inspect_content_client_stub.call_rpc_count - end - end - - def test_redact_image - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::RedactImageResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - location_id = "hello world" - inspect_config = {} - image_redaction_configs = [{}] - include_findings = true - byte_item = {} - inspect_template = "hello world" - deidentify_template = "hello world" - - redact_image_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :redact_image, name - assert_kind_of ::Google::Cloud::Dlp::V2::RedactImageRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["location_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] - assert_kind_of ::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, request["image_redaction_configs"].first - assert_equal true, request["include_findings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ByteContentItem), request["byte_item"] - assert_equal "hello world", request["inspect_template"] - assert_equal "hello world", request["deidentify_template"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, redact_image_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.redact_image parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.redact_image ::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.redact_image({ parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.redact_image(::Google::Cloud::Dlp::V2::RedactImageRequest.new(parent: parent, location_id: location_id, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item, inspect_template: inspect_template, deidentify_template: deidentify_template), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, redact_image_client_stub.call_rpc_count - end - end - - def test_deidentify_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyContentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deidentify_config = {} - inspect_config = {} - item = {} - inspect_template_name = "hello world" - deidentify_template_name = "hello world" - location_id = "hello world" - - deidentify_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deidentify_content, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeidentifyContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyConfig), request["deidentify_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] - assert_equal "hello world", request["inspect_template_name"] - assert_equal "hello world", request["deidentify_template_name"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deidentify_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.deidentify_content parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.deidentify_content ::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.deidentify_content({ parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.deidentify_content(::Google::Cloud::Dlp::V2::DeidentifyContentRequest.new(parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, deidentify_content_client_stub.call_rpc_count - end - end - - def test_reidentify_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ReidentifyContentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reidentify_config = {} - inspect_config = {} - item = {} - inspect_template_name = "hello world" - reidentify_template_name = "hello world" - location_id = "hello world" - - reidentify_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reidentify_content, name - assert_kind_of ::Google::Cloud::Dlp::V2::ReidentifyContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyConfig), request["reidentify_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectConfig), request["inspect_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::ContentItem), request["item"] - assert_equal "hello world", request["inspect_template_name"] - assert_equal "hello world", request["reidentify_template_name"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reidentify_content_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reidentify_content parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reidentify_content ::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reidentify_content({ parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.reidentify_content(::Google::Cloud::Dlp::V2::ReidentifyContentRequest.new(parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, reidentify_content_client_stub.call_rpc_count - end - end - - def test_list_info_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListInfoTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - language_code = "hello world" - filter = "hello world" - location_id = "hello world" - - list_info_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_info_types, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListInfoTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_info_types_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_info_types parent: parent, language_code: language_code, filter: filter, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_info_types ::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_info_types({ parent: parent, language_code: language_code, filter: filter, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_info_types(::Google::Cloud::Dlp::V2::ListInfoTypesRequest.new(parent: parent, language_code: language_code, filter: filter, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_info_types_client_stub.call_rpc_count - end - end - - def test_create_inspect_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_template = {} - template_id = "hello world" - location_id = "hello world" - - create_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_inspect_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectTemplate), request["inspect_template"] - assert_equal "hello world", request["template_id"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_inspect_template parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_inspect_template ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_inspect_template({ parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_inspect_template(::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new(parent: parent, inspect_template: inspect_template, template_id: template_id, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_inspect_template_client_stub.call_rpc_count - end - end - - def test_update_inspect_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - inspect_template = {} - update_mask = {} - - update_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_inspect_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectTemplate), request["inspect_template"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_inspect_template name: name, inspect_template: inspect_template, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_inspect_template ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_inspect_template({ name: name, inspect_template: inspect_template, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_inspect_template(::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new(name: name, inspect_template: inspect_template, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_inspect_template_client_stub.call_rpc_count - end - end - - def test_get_inspect_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::InspectTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_inspect_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_inspect_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_inspect_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_inspect_template ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_inspect_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_inspect_template(::Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_inspect_template_client_stub.call_rpc_count - end - end - - def test_list_inspect_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListInspectTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_inspect_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_inspect_templates, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_inspect_templates_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_inspect_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_inspect_templates ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_inspect_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_inspect_templates(::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_inspect_templates_client_stub.call_rpc_count - end - end - - def test_delete_inspect_template - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_inspect_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_inspect_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_inspect_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_inspect_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_inspect_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_inspect_template ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_inspect_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_inspect_template(::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_inspect_template_client_stub.call_rpc_count - end - end - - def test_create_deidentify_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - deidentify_template = {} - template_id = "hello world" - location_id = "hello world" - - create_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_deidentify_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyTemplate), request["deidentify_template"] - assert_equal "hello world", request["template_id"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_deidentify_template parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_deidentify_template ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_deidentify_template({ parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_deidentify_template(::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new(parent: parent, deidentify_template: deidentify_template, template_id: template_id, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_deidentify_template_client_stub.call_rpc_count - end - end - - def test_update_deidentify_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - deidentify_template = {} - update_mask = {} - - update_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_deidentify_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DeidentifyTemplate), request["deidentify_template"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_deidentify_template name: name, deidentify_template: deidentify_template, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_deidentify_template ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_deidentify_template({ name: name, deidentify_template: deidentify_template, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_deidentify_template(::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new(name: name, deidentify_template: deidentify_template, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_deidentify_template_client_stub.call_rpc_count - end - end - - def test_get_deidentify_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DeidentifyTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_deidentify_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_deidentify_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_deidentify_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_deidentify_template ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_deidentify_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_deidentify_template(::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_deidentify_template_client_stub.call_rpc_count - end - end - - def test_list_deidentify_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_deidentify_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_deidentify_templates, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_deidentify_templates_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_deidentify_templates parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_deidentify_templates ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_deidentify_templates({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_deidentify_templates(::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_deidentify_templates_client_stub.call_rpc_count - end - end - - def test_delete_deidentify_template - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_deidentify_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_deidentify_template, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_deidentify_template_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_deidentify_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_deidentify_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_deidentify_template ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_deidentify_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_deidentify_template(::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_deidentify_template_client_stub.call_rpc_count - end - end - - def test_create_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - job_trigger = {} - trigger_id = "hello world" - location_id = "hello world" - - create_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::JobTrigger), request["job_trigger"] - assert_equal "hello world", request["trigger_id"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_job_trigger parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_job_trigger ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_job_trigger({ parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_job_trigger(::Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new(parent: parent, job_trigger: job_trigger, trigger_id: trigger_id, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_job_trigger_client_stub.call_rpc_count - end - end - - def test_update_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - job_trigger = {} - update_mask = {} - - update_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::JobTrigger), request["job_trigger"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_job_trigger name: name, job_trigger: job_trigger, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_job_trigger ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_job_trigger({ name: name, job_trigger: job_trigger, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_job_trigger(::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new(name: name, job_trigger: job_trigger, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_job_trigger_client_stub.call_rpc_count - end - end - - def test_hybrid_inspect_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - hybrid_item = {} - - hybrid_inspect_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :hybrid_inspect_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::HybridContentItem), request["hybrid_item"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, hybrid_inspect_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.hybrid_inspect_job_trigger name: name, hybrid_item: hybrid_item do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.hybrid_inspect_job_trigger ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.hybrid_inspect_job_trigger({ name: name, hybrid_item: hybrid_item }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.hybrid_inspect_job_trigger(::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new(name: name, hybrid_item: hybrid_item), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, hybrid_inspect_job_trigger_client_stub.call_rpc_count - end - end - - def test_get_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::JobTrigger.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetJobTriggerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job_trigger({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job_trigger name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job_trigger ::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job_trigger({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job_trigger(::Google::Cloud::Dlp::V2::GetJobTriggerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_trigger_client_stub.call_rpc_count - end - end - - def test_list_job_triggers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListJobTriggersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - type = :DLP_JOB_TYPE_UNSPECIFIED - location_id = "hello world" - - list_job_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_job_triggers, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListJobTriggersRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - assert_equal :DLP_JOB_TYPE_UNSPECIFIED, request["type"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_job_triggers_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_job_triggers parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_job_triggers ::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_job_triggers({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_job_triggers(::Google::Cloud::Dlp::V2::ListJobTriggersRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter, type: type, location_id: location_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_job_triggers_client_stub.call_rpc_count - end - end - - def test_delete_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_job_trigger({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_job_trigger name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_job_trigger ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_job_trigger({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_job_trigger(::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_job_trigger_client_stub.call_rpc_count - end - end - - def test_activate_job_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - activate_job_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :activate_job_trigger, name - assert_kind_of ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, activate_job_trigger_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.activate_job_trigger({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.activate_job_trigger name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.activate_job_trigger ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.activate_job_trigger({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.activate_job_trigger(::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, activate_job_trigger_client_stub.call_rpc_count - end - end - - def test_create_discovery_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - discovery_config = {} - config_id = "hello world" - - create_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_discovery_config, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DiscoveryConfig), request["discovery_config"] - assert_equal "hello world", request["config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_discovery_config parent: parent, discovery_config: discovery_config, config_id: config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_discovery_config ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_discovery_config({ parent: parent, discovery_config: discovery_config, config_id: config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_discovery_config(::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new(parent: parent, discovery_config: discovery_config, config_id: config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_discovery_config_client_stub.call_rpc_count - end - end - - def test_update_discovery_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - discovery_config = {} - update_mask = {} - - update_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_discovery_config, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::DiscoveryConfig), request["discovery_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_discovery_config name: name, discovery_config: discovery_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_discovery_config ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_discovery_config({ name: name, discovery_config: discovery_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_discovery_config(::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new(name: name, discovery_config: discovery_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_discovery_config_client_stub.call_rpc_count - end - end - - def test_get_discovery_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DiscoveryConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_discovery_config, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_discovery_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_discovery_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_discovery_config ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_discovery_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_discovery_config(::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_discovery_config_client_stub.call_rpc_count - end - end - - def test_list_discovery_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_discovery_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_discovery_configs, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_discovery_configs_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_discovery_configs parent: parent, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_discovery_configs ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_discovery_configs({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_discovery_configs(::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_discovery_configs_client_stub.call_rpc_count - end - end - - def test_delete_discovery_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_discovery_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_discovery_config, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_discovery_config_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_discovery_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_discovery_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_discovery_config ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_discovery_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_discovery_config(::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_discovery_config_client_stub.call_rpc_count - end - end - - def test_create_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - inspect_job = {} - job_id = "hello world" - location_id = "hello world" - - create_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateDlpJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::InspectJobConfig), request["inspect_job"] - assert_equal :inspect_job, request.job - assert_equal "hello world", request["job_id"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_dlp_job parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_dlp_job ::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_dlp_job({ parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_dlp_job(::Google::Cloud::Dlp::V2::CreateDlpJobRequest.new(parent: parent, inspect_job: inspect_job, job_id: job_id, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_dlp_job_client_stub.call_rpc_count - end - end - - def test_list_dlp_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListDlpJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - type = :DLP_JOB_TYPE_UNSPECIFIED - order_by = "hello world" - location_id = "hello world" - - list_dlp_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_dlp_jobs, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListDlpJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :DLP_JOB_TYPE_UNSPECIFIED, request["type"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_dlp_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_dlp_jobs parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_dlp_jobs ::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_dlp_jobs({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_dlp_jobs(::Google::Cloud::Dlp::V2::ListDlpJobsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, type: type, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_dlp_jobs_client_stub.call_rpc_count - end - end - - def test_get_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::DlpJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetDlpJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dlp_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dlp_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dlp_job ::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dlp_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_dlp_job(::Google::Cloud::Dlp::V2::GetDlpJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_dlp_job_client_stub.call_rpc_count - end - end - - def test_delete_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dlp_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_dlp_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_dlp_job ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_dlp_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_dlp_job(::Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_dlp_job_client_stub.call_rpc_count - end - end - - def test_cancel_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::CancelDlpJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_dlp_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_dlp_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_dlp_job ::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_dlp_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_dlp_job(::Google::Cloud::Dlp::V2::CancelDlpJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_dlp_job_client_stub.call_rpc_count - end - end - - def test_create_stored_info_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config = {} - stored_info_type_id = "hello world" - location_id = "hello world" - - create_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_stored_info_type, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::StoredInfoTypeConfig), request["config"] - assert_equal "hello world", request["stored_info_type_id"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_stored_info_type parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_stored_info_type ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_stored_info_type({ parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_stored_info_type(::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new(parent: parent, config: config, stored_info_type_id: stored_info_type_id, location_id: location_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_stored_info_type_client_stub.call_rpc_count - end - end - - def test_update_stored_info_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - config = {} - update_mask = {} - - update_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_stored_info_type, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::StoredInfoTypeConfig), request["config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_stored_info_type name: name, config: config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_stored_info_type ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_stored_info_type({ name: name, config: config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_stored_info_type(::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new(name: name, config: config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_stored_info_type_client_stub.call_rpc_count - end - end - - def test_get_stored_info_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::StoredInfoType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_stored_info_type, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_stored_info_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_stored_info_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_stored_info_type ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_stored_info_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_stored_info_type(::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_stored_info_type_client_stub.call_rpc_count - end - end - - def test_list_stored_info_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListStoredInfoTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - location_id = "hello world" - - list_stored_info_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_stored_info_types, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["location_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_stored_info_types_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_stored_info_types parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_stored_info_types ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_stored_info_types({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_stored_info_types(::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, location_id: location_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_stored_info_types_client_stub.call_rpc_count - end - end - - def test_delete_stored_info_type - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_stored_info_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_stored_info_type, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_stored_info_type_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_stored_info_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_stored_info_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_stored_info_type ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_stored_info_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_stored_info_type(::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_stored_info_type_client_stub.call_rpc_count - end - end - - def test_list_project_data_profiles - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_project_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_project_data_profiles, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_project_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_project_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_project_data_profiles ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_project_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_project_data_profiles(::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_project_data_profiles_client_stub.call_rpc_count - end - end - - def test_list_table_data_profiles - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_table_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_table_data_profiles, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_table_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_table_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_table_data_profiles ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_table_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_table_data_profiles(::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_table_data_profiles_client_stub.call_rpc_count - end - end - - def test_list_column_data_profiles - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_column_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_column_data_profiles, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_column_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_column_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_column_data_profiles ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_column_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_column_data_profiles(::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_column_data_profiles_client_stub.call_rpc_count - end - end - - def test_get_project_data_profile - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ProjectDataProfile.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_project_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_project_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_project_data_profile ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_project_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_project_data_profile(::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_project_data_profile_client_stub.call_rpc_count - end - end - - def test_list_file_store_data_profiles - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - filter = "hello world" - - list_file_store_data_profiles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_file_store_data_profiles, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_file_store_data_profiles_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_file_store_data_profiles parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_file_store_data_profiles ::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_file_store_data_profiles({ parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_file_store_data_profiles(::Google::Cloud::Dlp::V2::ListFileStoreDataProfilesRequest.new(parent: parent, page_token: page_token, page_size: page_size, order_by: order_by, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_file_store_data_profiles_client_stub.call_rpc_count - end - end - - def test_get_file_store_data_profile - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::FileStoreDataProfile.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_file_store_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_file_store_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_file_store_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_file_store_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_file_store_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_file_store_data_profile ::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_file_store_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_file_store_data_profile(::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_file_store_data_profile_client_stub.call_rpc_count - end - end - - def test_delete_file_store_data_profile - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_file_store_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_file_store_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_file_store_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_file_store_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_file_store_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_file_store_data_profile ::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_file_store_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_file_store_data_profile(::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_file_store_data_profile_client_stub.call_rpc_count - end - end - - def test_get_table_data_profile - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::TableDataProfile.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_table_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_table_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_table_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_table_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_table_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_table_data_profile ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_table_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_table_data_profile(::Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_table_data_profile_client_stub.call_rpc_count - end - end - - def test_get_column_data_profile - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ColumnDataProfile.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_column_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_column_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_column_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_column_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_column_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_column_data_profile ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_column_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_column_data_profile(::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_column_data_profile_client_stub.call_rpc_count - end - end - - def test_delete_table_data_profile - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_table_data_profile_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_table_data_profile, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_table_data_profile_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_table_data_profile({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_table_data_profile name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_table_data_profile ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_table_data_profile({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_table_data_profile(::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_table_data_profile_client_stub.call_rpc_count - end - end - - def test_hybrid_inspect_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::HybridInspectResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - hybrid_item = {} - - hybrid_inspect_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :hybrid_inspect_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::HybridContentItem), request["hybrid_item"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, hybrid_inspect_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.hybrid_inspect_dlp_job name: name, hybrid_item: hybrid_item do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.hybrid_inspect_dlp_job ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.hybrid_inspect_dlp_job({ name: name, hybrid_item: hybrid_item }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.hybrid_inspect_dlp_job(::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new(name: name, hybrid_item: hybrid_item), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, hybrid_inspect_dlp_job_client_stub.call_rpc_count - end - end - - def test_finish_dlp_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - finish_dlp_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :finish_dlp_job, name - assert_kind_of ::Google::Cloud::Dlp::V2::FinishDlpJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, finish_dlp_job_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.finish_dlp_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.finish_dlp_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.finish_dlp_job ::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.finish_dlp_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.finish_dlp_job(::Google::Cloud::Dlp::V2::FinishDlpJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, finish_dlp_job_client_stub.call_rpc_count - end - end - - def test_create_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection = {} - - create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connection, name - assert_kind_of ::Google::Cloud::Dlp::V2::CreateConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::Connection), request["connection"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connection({ parent: parent, connection: connection }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_connection parent: parent, connection: connection do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_connection ::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_connection({ parent: parent, connection: connection }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::Dlp::V2::CreateConnectionRequest.new(parent: parent, connection: connection), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_rpc_count - end - end - - def test_get_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connection, name - assert_kind_of ::Google::Cloud::Dlp::V2::GetConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connection ::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::Dlp::V2::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_rpc_count - end - end - - def test_list_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connections, name - assert_kind_of ::Google::Cloud::Dlp::V2::ListConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_connections ::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::Dlp::V2::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_connections_client_stub.call_rpc_count - end - end - - def test_search_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - search_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_connections, name - assert_kind_of ::Google::Cloud::Dlp::V2::SearchConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_connections_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_connections ::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_connections(::Google::Cloud::Dlp::V2::SearchConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_connections_client_stub.call_rpc_count - end - end - - def test_delete_connection - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connection, name - assert_kind_of ::Google::Cloud::Dlp::V2::DeleteConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::Dlp::V2::DeleteConnectionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_connection_client_stub.call_rpc_count - end - end - - def test_update_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dlp::V2::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - connection = {} - update_mask = {} - - update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_connection, name - assert_kind_of ::Google::Cloud::Dlp::V2::UpdateConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dlp::V2::Connection), request["connection"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_connection({ name: name, connection: connection, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_connection name: name, connection: connection, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_connection ::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_connection({ name: name, connection: connection, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::Dlp::V2::UpdateConnectionRequest.new(name: name, connection: connection, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_connection_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dlp::V2::DlpService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dlp::V2::DlpService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb b/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-dlp-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"