From 5ad58967881492556206b1abcf493b0efe25ed8e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 11 Aug 2026 15:59:56 +0000 Subject: [PATCH 1/2] docs: A comment for field `account_defender_assessment` in message `.google.cloud.recaptchaenterprise.v1.Assessment` is changed docs: A comment for field `phone_fraud_assessment` in message `.google.cloud.recaptchaenterprise.v1.Assessment` is changed docs: A comment for field `expected_action` in message `.google.cloud.recaptchaenterprise.v1.Event` is changed docs: A comment for field `account_id` in message `.google.cloud.recaptchaenterprise.v1.TransactionData` is changed docs: A comment for enum value `SUSPECTED_CARDING` in enum `ClassificationReason` is changed docs: A comment for enum value `SUSPECTED_CHARGEBACK` in enum `ClassificationReason` is changed docs: A comment for enum `Challenge` is changed docs: A comment for field `extended_verdict_reasons` in message `.google.cloud.recaptchaenterprise.v1.RiskAnalysis` is changed docs: A comment for field `challenge` in message `.google.cloud.recaptchaenterprise.v1.RiskAnalysis` is changed docs: A comment for field `name` in message `.google.cloud.recaptchaenterprise.v1.Bot` is changed docs: A comment for field `valid` in message `.google.cloud.recaptchaenterprise.v1.TokenProperties` is changed docs: A comment for message `AccountDefenderAssessment` is changed docs: A comment for enum `AccountDefenderLabel` is changed docs: A comment for enum value `PROFILE_MATCH` in enum `AccountDefenderLabel` is changed feat: A new method `GetPolicy` is added to service `RecaptchaEnterpriseService` feat: A new method `UpdatePolicy` is added to service `RecaptchaEnterpriseService` feat: A new field `policy_evaluation` is added to message `.google.cloud.recaptchaenterprise.v1.Assessment` feat: A new field `last_challenge_type` is added to message `.google.cloud.recaptchaenterprise.v1.RiskAnalysis` feat: A new value `KEY_MISMATCH` is added to enum `InvalidReason` feat: A new value `DOMAIN_MISMATCH` is added to enum `InvalidReason` feat: A new message `AccountTakeoverVerdict` is added feat: A new message `AccountRiskReason` is added feat: A new message `AccountTrustReason` is added feat: A new field `account_takeover_verdict` is added to message `.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment` feat: A new field `universal_settings` is added to message `.google.cloud.recaptchaenterprise.v1.Key` feat: A new message `UniversalKeySettings` is added feat: A new message `PolicyEvaluation` is added feat: A new message `ChallengeRuleEvaluation` is added feat: A new message `GetPolicyRequest` is added feat: A new message `UpdatePolicyRequest` is added feat: A new message `Policy` is added feat: A new resource_definition `recaptchaenterprise.googleapis.com/Policy` is added feat: A new message `ChallengeRuleGroup` is added feat: A new message `ChallengeRule` is added feat: A new message `ClientSettings` is added feat: A new message `ProtectedEndpointGroup` is added feat: A new message `ProtectedEndpoint` is added feat: A new enum `ChallengeType` is added PiperOrigin-RevId: 962748552 Source-Link: https://github.com/googleapis/googleapis/commit/c14dc21071b762a167591a9a39f497abfbf08a08 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6c632fe1424fb9108f1c7b4c1a0610ef4d7d2eb2 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI2YzYzMmZlMTQyNGZiOTEwOGYxYzdiNGMxYTA2MTBlZjRkN2QyZWIyIn0= --- .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 138 + ...ogle-cloud-recaptcha_enterprise-v1.gemspec | 28 + .../google-cloud-recaptcha_enterprise-v1.rb | 21 + .../google/cloud/recaptcha_enterprise/v1.rb | 40 + .../v1/recaptcha_enterprise_service.rb | 49 + .../v1/recaptcha_enterprise_service/client.rb | 2800 +++++++++++++++++ .../credentials.rb | 51 + .../v1/recaptcha_enterprise_service/paths.rb | 149 + .../cloud/recaptcha_enterprise/v1/version.rb | 28 + .../v1/recaptchaenterprise_pb.rb | 156 + .../v1/recaptchaenterprise_services_pb.rb | 109 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1/recaptchaenterprise.rb | 2587 +++++++++++++++ .../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 | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../add_ip_override.rb | 47 + .../annotate_assessment.rb | 47 + .../create_assessment.rb | 47 + .../create_firewall_policy.rb | 47 + .../create_key.rb | 47 + .../delete_firewall_policy.rb | 47 + .../delete_key.rb | 47 + .../get_firewall_policy.rb | 47 + .../recaptcha_enterprise_service/get_key.rb | 47 + .../get_metrics.rb | 47 + .../get_policy.rb | 47 + .../list_firewall_policies.rb | 51 + .../list_ip_overrides.rb | 51 + .../recaptcha_enterprise_service/list_keys.rb | 51 + .../list_related_account_group_memberships.rb | 51 + .../list_related_account_groups.rb | 51 + .../migrate_key.rb | 47 + .../remove_ip_override.rb | 47 + .../reorder_firewall_policies.rb | 47 + .../retrieve_legacy_secret_key.rb | 47 + ...earch_related_account_group_memberships.rb | 51 + .../update_firewall_policy.rb | 47 + .../update_key.rb | 47 + .../update_policy.rb | 47 + ...a_google.cloud.recaptchaenterprise.v1.json | 975 ++++++ ...recaptcha_enterprise_service_paths_test.rb | 127 + .../v1/recaptcha_enterprise_service_test.rb | 1586 ++++++++++ .../test/helper.rb | 35 + 64 files changed, 12587 insertions(+) create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore @@ -0,0 +1,20 @@ +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-recaptcha_enterprise-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json new file mode 100644 index 000000000000..3e4db3422126 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "recaptchaenterprise.googleapis.com", + "api_shortname": "recaptchaenterprise", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest", + "distribution_name": "google-cloud-recaptcha_enterprise-v1", + "is_cloud": true, + "language": "ruby", + "name": "recaptchaenterprise", + "name_pretty": "reCAPTCHA Enterprise V1 API", + "product_documentation": "https://cloud.google.com/recaptcha-enterprise", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "reCAPTCHA Enterprise is a service that protects your site from spam and abuse. Note that google-cloud-recaptcha_enterprise-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-recaptcha_enterprise instead. See the readme for more details.", + "ruby-cloud-env-prefix": "RECAPTCHA_ENTERPRISE", + "ruby-cloud-product-url": "https://cloud.google.com/recaptcha-enterprise", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml new file mode 100644 index 000000000000..8ef5ef06ddf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-recaptcha_enterprise-v1.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-recaptcha_enterprise-v1.rb" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.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-recaptcha_enterprise-v1/.yardopts b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts new file mode 100644 index 000000000000..b645b56b6f54 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="reCAPTCHA Enterprise V1 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-recaptcha_enterprise-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5c2af6e5e391 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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/recaptcha_enterprise/v1" + +client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/recaptcha_enterprise/v1" + +::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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-recaptcha_enterprise-v1 +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/recaptcha_enterprise/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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-recaptcha_enterprise-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-recaptcha_enterprise-v1/LICENSE.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md new file mode 100644 index 000000000000..7fa9c915cfab --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the reCAPTCHA Enterprise V1 API + +Help protect your website from fraudulent activity, spam, and abuse without creating friction. + +reCAPTCHA Enterprise is a service that protects your site from spam and abuse. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the reCAPTCHA Enterprise V1 API. Most users should consider using +the main client gem, +[google-cloud-recaptcha_enterprise](https://rubygems.org/gems/google-cloud-recaptcha_enterprise). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-recaptcha_enterprise-v1 +``` + +## 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/recaptchaenterprise.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/recaptcha_enterprise/v1" + +client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new +request = ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new # (request fields as keyword arguments...) +response = client.create_assessment request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise) +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/recaptcha_enterprise/v1" +require "logger" + +client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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.2+. + +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-recaptcha_enterprise`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-recaptcha_enterprise-v1`. +_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-recaptcha_enterprise`. +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-recaptcha_enterprise-v1`. + +### 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-recaptcha_enterprise-v1/Rakefile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Rakefile new file mode 100644 index 000000000000..5d19c638aa73 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["RECAPTCHA_ENTERPRISE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["RECAPTCHA_ENTERPRISE_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 RECAPTCHA_ENTERPRISE_TEST_PROJECT=test123 RECAPTCHA_ENTERPRISE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" + ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["RECAPTCHA_ENTERPRISE_PROJECT"] = project + ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] = project + ENV["RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-recaptcha_enterprise-v1" + header "google-cloud-recaptcha_enterprise-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-recaptcha_enterprise-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json new file mode 100644 index 000000000000..1c3c335bc5d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json @@ -0,0 +1,138 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.recaptchaenterprise.v1", + "libraryPackage": "::Google::Cloud::RecaptchaEnterprise::V1", + "services": { + "RecaptchaEnterpriseService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client", + "rpcs": { + "CreateAssessment": { + "methods": [ + "create_assessment" + ] + }, + "AnnotateAssessment": { + "methods": [ + "annotate_assessment" + ] + }, + "CreateKey": { + "methods": [ + "create_key" + ] + }, + "ListKeys": { + "methods": [ + "list_keys" + ] + }, + "RetrieveLegacySecretKey": { + "methods": [ + "retrieve_legacy_secret_key" + ] + }, + "GetKey": { + "methods": [ + "get_key" + ] + }, + "UpdateKey": { + "methods": [ + "update_key" + ] + }, + "DeleteKey": { + "methods": [ + "delete_key" + ] + }, + "MigrateKey": { + "methods": [ + "migrate_key" + ] + }, + "AddIpOverride": { + "methods": [ + "add_ip_override" + ] + }, + "RemoveIpOverride": { + "methods": [ + "remove_ip_override" + ] + }, + "ListIpOverrides": { + "methods": [ + "list_ip_overrides" + ] + }, + "GetMetrics": { + "methods": [ + "get_metrics" + ] + }, + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, + "CreateFirewallPolicy": { + "methods": [ + "create_firewall_policy" + ] + }, + "ListFirewallPolicies": { + "methods": [ + "list_firewall_policies" + ] + }, + "GetFirewallPolicy": { + "methods": [ + "get_firewall_policy" + ] + }, + "UpdateFirewallPolicy": { + "methods": [ + "update_firewall_policy" + ] + }, + "DeleteFirewallPolicy": { + "methods": [ + "delete_firewall_policy" + ] + }, + "ReorderFirewallPolicies": { + "methods": [ + "reorder_firewall_policies" + ] + }, + "ListRelatedAccountGroups": { + "methods": [ + "list_related_account_groups" + ] + }, + "ListRelatedAccountGroupMemberships": { + "methods": [ + "list_related_account_group_memberships" + ] + }, + "SearchRelatedAccountGroupMemberships": { + "methods": [ + "search_related_account_group_memberships" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec new file mode 100644 index 000000000000..6deb6e2d1d41 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/recaptcha_enterprise/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-recaptcha_enterprise-v1" + gem.version = Google::Cloud::RecaptchaEnterprise::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "reCAPTCHA Enterprise is a service that protects your site from spam and abuse. Note that google-cloud-recaptcha_enterprise-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-recaptcha_enterprise instead. See the readme for more details." + gem.summary = "Help protect your website from fraudulent activity, spam, and abuse without creating friction." + 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.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb new file mode 100644 index 000000000000..709bd158bdb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.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/recaptcha_enterprise/v1" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb new file mode 100644 index 000000000000..c0a5bb548e00 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb @@ -0,0 +1,40 @@ +# 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/recaptcha_enterprise/v1/recaptcha_enterprise_service" +require "google/cloud/recaptcha_enterprise/v1/version" + +module Google + module Cloud + module RecaptchaEnterprise + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/recaptcha_enterprise/v1" + # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/recaptcha_enterprise/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb new file mode 100644 index 000000000000..2bbbe6309445 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/recaptcha_enterprise/v1/version" + +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths" +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client" + +module Google + module Cloud + module RecaptchaEnterprise + module V1 + ## + # Service to determine the likelihood an event is legitimate. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" + # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + module RecaptchaEnterpriseService + end + end + end + end +end + +helper_path = ::File.join __dir__, "recaptcha_enterprise_service", "helpers.rb" +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb new file mode 100644 index 000000000000..4b9f9d5cfd4e --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb @@ -0,0 +1,2800 @@ +# 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/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb" + +module Google + module Cloud + module RecaptchaEnterprise + module V1 + module RecaptchaEnterpriseService + ## + # Client for the RecaptchaEnterpriseService service. + # + # Service to determine the likelihood an event is legitimate. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "recaptchaenterprise.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :recaptcha_enterprise_service_stub + + ## + # Configure the RecaptchaEnterpriseService Client class. + # + # See {::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RecaptchaEnterpriseService clients + # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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", "RecaptchaEnterprise", "V1"] + 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.create_assessment.timeout = 600.0 + + default_config.rpcs.annotate_assessment.timeout = 600.0 + + default_config.rpcs.create_key.timeout = 600.0 + + default_config.rpcs.list_keys.timeout = 600.0 + + default_config.rpcs.get_key.timeout = 600.0 + + default_config.rpcs.update_key.timeout = 600.0 + + default_config.rpcs.delete_key.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 + @recaptcha_enterprise_service_stub.universe_domain + end + + ## + # Create a new RecaptchaEnterpriseService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RecaptchaEnterpriseService 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/cloud/recaptchaenterprise/v1/recaptchaenterprise_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 + + @recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 + ) + + @recaptcha_enterprise_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @recaptcha_enterprise_service_stub.logger + end + + # Service calls + + ## + # Creates an Assessment of the likelihood an event is legitimate. + # + # @overload create_assessment(request, options = nil) + # Pass arguments to `create_assessment` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, ::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_assessment(parent: nil, assessment: nil) + # Pass arguments to `create_assessment` 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. The name of the project in which the assessment is created, + # in the format `projects/{project}`. + # @param assessment [::Google::Cloud::RecaptchaEnterprise::V1::Assessment, ::Hash] + # Required. The assessment details. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new + # + # # Call the create_assessment method. + # result = client.create_assessment request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment. + # p result + # + def create_assessment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest + + # 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_assessment.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::RecaptchaEnterprise::V1::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_assessment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_assessment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :create_assessment, 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 + + ## + # Annotates a previously created Assessment to provide additional information + # on whether the event turned out to be authentic or fraudulent. + # + # @overload annotate_assessment(request, options = nil) + # Pass arguments to `annotate_assessment` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, ::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 annotate_assessment(name: nil, annotation: nil, reasons: nil, account_id: nil, hashed_account_id: nil, transaction_event: nil, phone_authentication_event: nil) + # Pass arguments to `annotate_assessment` 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 resource name of the Assessment, in the format + # `projects/{project}/assessments/{assessment}`. + # @param annotation [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation] + # Optional. The annotation that is assigned to the Event. This field can be + # left empty to provide reasons that apply to an event without concluding + # whether the event is legitimate or fraudulent. + # @param reasons [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>] + # Optional. Reasons for the annotation that are assigned to the event. + # @param account_id [::String] + # Optional. A stable account identifier to apply to the assessment. This is + # an alternative to setting `account_id` in `CreateAssessment`, for example + # when a stable account identifier is not yet known in the initial request. + # @param hashed_account_id [::String] + # Optional. A stable hashed account identifier to apply to the assessment. + # This is an alternative to setting `hashed_account_id` in + # `CreateAssessment`, for example when a stable account identifier is not yet + # known in the initial request. + # @param transaction_event [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent, ::Hash] + # Optional. If the assessment is part of a payment transaction, provide + # details on payment lifecycle events that occur in the transaction. + # @param phone_authentication_event [::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent, ::Hash] + # Optional. If using an external multi-factor authentication provider, + # provide phone authentication details for fraud detection purposes. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new + # + # # Call the annotate_assessment method. + # result = client.annotate_assessment request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse. + # p result + # + def annotate_assessment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest + + # 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.annotate_assessment.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::RecaptchaEnterprise::V1::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.annotate_assessment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.annotate_assessment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, 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 reCAPTCHA Enterprise key. + # + # @overload create_key(request, options = nil) + # Pass arguments to `create_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, ::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_key(parent: nil, key: nil) + # Pass arguments to `create_key` 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. The name of the project in which the key is created, in the + # format `projects/{project}`. + # @param key [::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash] + # Required. Information to create a reCAPTCHA Enterprise key. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new + # + # # Call the create_key method. + # result = client.create_key request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + # p result + # + def create_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest + + # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :create_key, 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 the list of all keys that belong to a project. + # + # @overload list_keys(request, options = nil) + # Pass arguments to `list_keys` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, ::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_keys(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_keys` 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. The name of the project that contains the keys that is + # listed, in the format `projects/{project}`. + # @param page_size [::Integer] + # Optional. The maximum number of keys to return. Default is 10. Max limit is + # 1000. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous. + # ListKeysRequest, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new + # + # # Call the list_keys method. + # result = client.list_keys 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::RecaptchaEnterprise::V1::Key. + # p item + # end + # + def list_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest + + # 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_keys.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::RecaptchaEnterprise::V1::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_keys.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, 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 + + ## + # Returns the secret key related to the specified public key. + # You must use the legacy secret key only in a 3rd party integration with + # legacy reCAPTCHA. + # + # @overload retrieve_legacy_secret_key(request, options = nil) + # Pass arguments to `retrieve_legacy_secret_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, ::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 retrieve_legacy_secret_key(key: nil) + # Pass arguments to `retrieve_legacy_secret_key` 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 key [::String] + # Required. The public key name linked to the requested secret key in the + # format `projects/{project}/keys/{key}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new + # + # # Call the retrieve_legacy_secret_key method. + # result = client.retrieve_legacy_secret_key request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse. + # p result + # + def retrieve_legacy_secret_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest + + # 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.retrieve_legacy_secret_key.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::RecaptchaEnterprise::V1::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.key + header_params["key"] = request.key + 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.retrieve_legacy_secret_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retrieve_legacy_secret_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :retrieve_legacy_secret_key, 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 the specified key. + # + # @overload get_key(request, options = nil) + # Pass arguments to `get_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, ::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_key(name: nil) + # Pass arguments to `get_key` 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 requested key, in the format + # `projects/{project}/keys/{key}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new + # + # # Call the get_key method. + # result = client.get_key request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + # p result + # + def get_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest + + # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :get_key, 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 specified key. + # + # @overload update_key(request, options = nil) + # Pass arguments to `update_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, ::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_key(key: nil, update_mask: nil) + # Pass arguments to `update_key` 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 key [::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash] + # Required. The key to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The mask to control which fields of the key get updated. If the + # mask is not present, all fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new + # + # # Call the update_key method. + # result = client.update_key request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + # p result + # + def update_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest + + # 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_key.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::RecaptchaEnterprise::V1::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.key&.name + header_params["key.name"] = request.key.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_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :update_key, 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 the specified key. + # + # @overload delete_key(request, options = nil) + # Pass arguments to `delete_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, ::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_key(name: nil) + # Pass arguments to `delete_key` 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 key to be deleted, in the format + # `projects/{project}/keys/{key}`. + # + # @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/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new + # + # # Call the delete_key method. + # result = client.delete_key request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest + + # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :delete_key, 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 + + ## + # Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. + # Once a key is migrated, it can be used from either product. SiteVerify + # requests are billed as CreateAssessment calls. You must be + # authenticated as one of the current owners of the reCAPTCHA Key, and + # your user must have the reCAPTCHA Enterprise Admin IAM role in the + # destination project. + # + # @overload migrate_key(request, options = nil) + # Pass arguments to `migrate_key` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::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 migrate_key(name: nil, skip_billing_check: nil) + # Pass arguments to `migrate_key` 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 key to be migrated, in the format + # `projects/{project}/keys/{key}`. + # @param skip_billing_check [::Boolean] + # Optional. If true, skips the billing check. + # A reCAPTCHA Enterprise key or migrated key behaves differently than a + # reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + # https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid + # any disruption of your usage, we check that a billing account is present. + # If your usage of reCAPTCHA is under the free quota, you can safely skip the + # billing check and proceed with the migration. See + # https://cloud.google.com/recaptcha/docs/billing-information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new + # + # # Call the migrate_key method. + # result = client.migrate_key request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + # p result + # + def migrate_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest + + # 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.migrate_key.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::RecaptchaEnterprise::V1::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.migrate_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.migrate_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :migrate_key, 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 + + ## + # Adds an IP override to a key. The following restrictions hold: + # * The maximum number of IP overrides per key is 1000. + # * For any conflict (such as IP already exists or IP part of an existing + # IP range), an error is returned. + # + # @overload add_ip_override(request, options = nil) + # Pass arguments to `add_ip_override` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, ::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 add_ip_override(name: nil, ip_override_data: nil) + # Pass arguments to `add_ip_override` 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 key to which the IP override is added, in the + # format `projects/{project}/keys/{key}`. + # @param ip_override_data [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData, ::Hash] + # Required. IP override added to the key. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new + # + # # Call the add_ip_override method. + # result = client.add_ip_override request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse. + # p result + # + def add_ip_override request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest + + # 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.add_ip_override.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::RecaptchaEnterprise::V1::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.add_ip_override.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_ip_override.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :add_ip_override, 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 + + ## + # Removes an IP override from a key. The following restrictions hold: + # * If the IP isn't found in an existing IP override, a `NOT_FOUND` error + # is returned. + # * If the IP is found in an existing IP override, but the + # override type does not match, a `NOT_FOUND` error is returned. + # + # @overload remove_ip_override(request, options = nil) + # Pass arguments to `remove_ip_override` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, ::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 remove_ip_override(name: nil, ip_override_data: nil) + # Pass arguments to `remove_ip_override` 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 key from which the IP override is removed, in the + # format `projects/{project}/keys/{key}`. + # @param ip_override_data [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData, ::Hash] + # Required. IP override to be removed from the key. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new + # + # # Call the remove_ip_override method. + # result = client.remove_ip_override request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse. + # p result + # + def remove_ip_override request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest + + # 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.remove_ip_override.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::RecaptchaEnterprise::V1::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.remove_ip_override.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_ip_override.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :remove_ip_override, 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 all IP overrides for a key. + # + # @overload list_ip_overrides(request, options = nil) + # Pass arguments to `list_ip_overrides` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, ::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_ip_overrides(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_ip_overrides` 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. The parent key for which the IP overrides are listed, in the + # format `projects/{project}/keys/{key}`. + # @param page_size [::Integer] + # Optional. The maximum number of overrides to return. Default is 10. Max + # limit is 100. If the number of overrides is less than the page_size, all + # overrides are returned. If the page size is more than 100, it is coerced to + # 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous + # ListIpOverridesRequest, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new + # + # # Call the list_ip_overrides method. + # result = client.list_ip_overrides 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::RecaptchaEnterprise::V1::IpOverrideData. + # p item + # end + # + def list_ip_overrides request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest + + # 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_ip_overrides.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::RecaptchaEnterprise::V1::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_ip_overrides.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_ip_overrides.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :list_ip_overrides, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_ip_overrides, 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 + + ## + # Get some aggregated metrics for a Key. This data can be used to build + # dashboards. + # + # @overload get_metrics(request, options = nil) + # Pass arguments to `get_metrics` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::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_metrics(name: nil) + # Pass arguments to `get_metrics` 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 requested metrics, in the format + # `projects/{project}/keys/{key}/metrics`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Metrics] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Metrics] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new + # + # # Call the get_metrics method. + # result = client.get_metrics request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics. + # p result + # + def get_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest + + # 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_metrics.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::RecaptchaEnterprise::V1::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_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :get_metrics, 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 the policy for a key. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::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_policy(name: nil) + # Pass arguments to `get_policy` 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 policy to get, in the format + # `projects/{project}/keys/{key}/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest + + # 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_policy.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::RecaptchaEnterprise::V1::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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :get_policy, 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 policy for a key. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::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_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_policy` 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 policy [::Google::Cloud::RecaptchaEnterprise::V1::Policy, ::Hash] + # Required. The Policy's name is used to identify the policy to update, in + # the format `projects/{project}/keys/{key}/policy`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest + + # 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_policy.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::RecaptchaEnterprise::V1::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.policy&.name + header_params["policy.name"] = request.policy.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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :update_policy, 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 FirewallPolicy, specifying conditions at which reCAPTCHA + # Enterprise actions can be executed. + # A project may have a maximum of 1000 policies. + # + # @overload create_firewall_policy(request, options = nil) + # Pass arguments to `create_firewall_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, ::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_firewall_policy(parent: nil, firewall_policy: nil) + # Pass arguments to `create_firewall_policy` 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. The name of the project this policy applies to, in the format + # `projects/{project}`. + # @param firewall_policy [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy, ::Hash] + # Required. Information to create the policy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new + # + # # Call the create_firewall_policy method. + # result = client.create_firewall_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + # p result + # + def create_firewall_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest + + # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_firewall_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :create_firewall_policy, 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 the list of all firewall policies that belong to a project. + # + # @overload list_firewall_policies(request, options = nil) + # Pass arguments to `list_firewall_policies` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, ::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_firewall_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_firewall_policies` 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. The name of the project to list the policies for, in the format + # `projects/{project}`. + # @param page_size [::Integer] + # Optional. The maximum number of policies to return. Default is 10. Max + # limit is 1000. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous. + # ListFirewallPoliciesRequest, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new + # + # # Call the list_firewall_policies method. + # result = client.list_firewall_policies 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::RecaptchaEnterprise::V1::FirewallPolicy. + # p item + # end + # + def list_firewall_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest + + # 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_firewall_policies.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::RecaptchaEnterprise::V1::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_firewall_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_firewall_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :list_firewall_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_firewall_policies, 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 + + ## + # Returns the specified firewall policy. + # + # @overload get_firewall_policy(request, options = nil) + # Pass arguments to `get_firewall_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, ::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_firewall_policy(name: nil) + # Pass arguments to `get_firewall_policy` 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 requested policy, in the format + # `projects/{project}/firewallpolicies/{firewallpolicy}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new + # + # # Call the get_firewall_policy method. + # result = client.get_firewall_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + # p result + # + def get_firewall_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest + + # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_firewall_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :get_firewall_policy, 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 specified firewall policy. + # + # @overload update_firewall_policy(request, options = nil) + # Pass arguments to `update_firewall_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, ::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_firewall_policy(firewall_policy: nil, update_mask: nil) + # Pass arguments to `update_firewall_policy` 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 firewall_policy [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy, ::Hash] + # Required. The policy to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new + # + # # Call the update_firewall_policy method. + # result = client.update_firewall_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + # p result + # + def update_firewall_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest + + # 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_firewall_policy.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::RecaptchaEnterprise::V1::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.firewall_policy&.name + header_params["firewall_policy.name"] = request.firewall_policy.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_firewall_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_firewall_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :update_firewall_policy, 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 the specified firewall policy. + # + # @overload delete_firewall_policy(request, options = nil) + # Pass arguments to `delete_firewall_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, ::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_firewall_policy(name: nil) + # Pass arguments to `delete_firewall_policy` 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 policy to be deleted, in the format + # `projects/{project}/firewallpolicies/{firewallpolicy}`. + # + # @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/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new + # + # # Call the delete_firewall_policy method. + # result = client.delete_firewall_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_firewall_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest + + # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_firewall_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :delete_firewall_policy, 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 + + ## + # Reorders all firewall policies. + # + # @overload reorder_firewall_policies(request, options = nil) + # Pass arguments to `reorder_firewall_policies` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, ::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 reorder_firewall_policies(parent: nil, names: nil) + # Pass arguments to `reorder_firewall_policies` 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. The name of the project to list the policies for, in the format + # `projects/{project}`. + # @param names [::Array<::String>] + # Required. A list containing all policy names, in the new order. Each name + # is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new + # + # # Call the reorder_firewall_policies method. + # result = client.reorder_firewall_policies request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse. + # p result + # + def reorder_firewall_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest + + # 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.reorder_firewall_policies.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::RecaptchaEnterprise::V1::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.reorder_firewall_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reorder_firewall_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :reorder_firewall_policies, 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 + + ## + # List groups of related accounts. + # + # @overload list_related_account_groups(request, options = nil) + # Pass arguments to `list_related_account_groups` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::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_related_account_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_related_account_groups` 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. The name of the project to list related account groups from, in + # the format `projects/{project}`. + # @param page_size [::Integer] + # Optional. The maximum number of groups to return. The service might return + # fewer than this value. If unspecified, at most 50 groups are returned. The + # maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListRelatedAccountGroups` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListRelatedAccountGroups` must match the call that provided the page + # token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new + # + # # Call the list_related_account_groups method. + # result = client.list_related_account_groups 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::RecaptchaEnterprise::V1::RelatedAccountGroup. + # p item + # end + # + def list_related_account_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest + + # 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_related_account_groups.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::RecaptchaEnterprise::V1::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_related_account_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_related_account_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :list_related_account_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_groups, 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 + + ## + # Get memberships in a group of related accounts. + # + # @overload list_related_account_group_memberships(request, options = nil) + # Pass arguments to `list_related_account_group_memberships` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::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_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_related_account_group_memberships` 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. The resource name for the related account group in the format + # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + # @param page_size [::Integer] + # Optional. The maximum number of accounts to return. The service might + # return fewer than this value. If unspecified, at most 50 accounts are + # returned. The maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListRelatedAccountGroupMemberships` call. + # + # When paginating, all other parameters provided to + # `ListRelatedAccountGroupMemberships` must match the call that provided the + # page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new + # + # # Call the list_related_account_group_memberships method. + # result = client.list_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. + # p item + # end + # + def list_related_account_group_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest + + # 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_related_account_group_memberships.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::RecaptchaEnterprise::V1::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_related_account_group_memberships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_related_account_group_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :list_related_account_group_memberships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_group_memberships, 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 + + ## + # Search group memberships related to a given account. + # + # @overload search_related_account_group_memberships(request, options = nil) + # Pass arguments to `search_related_account_group_memberships` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::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_related_account_group_memberships(project: nil, account_id: nil, hashed_account_id: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_related_account_group_memberships` 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 project [::String] + # Required. The name of the project to search related account group + # memberships from. Specify the project name in the following format: + # `projects/{project}`. + # @param account_id [::String] + # Optional. The unique stable account identifier used to search connections. + # The identifier should correspond to an `account_id` provided in a previous + # `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + # or account_id must be set, but not both. + # @param hashed_account_id [::String] + # Optional. Deprecated: use `account_id` instead. + # The unique stable hashed account identifier used to search connections. The + # identifier should correspond to a `hashed_account_id` provided in a + # previous `CreateAssessment` or `AnnotateAssessment` call. Either + # hashed_account_id or account_id must be set, but not both. + # @param page_size [::Integer] + # Optional. The maximum number of groups to return. The service might return + # fewer than this value. If unspecified, at most 50 groups are returned. The + # maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchRelatedAccountGroupMemberships` must match the call that provided + # the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new + # + # # Call the search_related_account_group_memberships method. + # result = client.search_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. + # p item + # end + # + def search_related_account_group_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest + + # 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_related_account_group_memberships.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::RecaptchaEnterprise::V1::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.project + header_params["project"] = request.project + 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_related_account_group_memberships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_related_account_group_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :search_related_account_group_memberships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :search_related_account_group_memberships, 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 + + ## + # Configuration class for the RecaptchaEnterpriseService API. + # + # This class represents the configuration for RecaptchaEnterpriseService, + # 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 + # # create_assessment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_assessment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_assessment.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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "recaptchaenterprise.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 RecaptchaEnterpriseService 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_assessment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_assessment + ## + # RPC-specific configuration for `annotate_assessment` + # @return [::Gapic::Config::Method] + # + attr_reader :annotate_assessment + ## + # RPC-specific configuration for `create_key` + # @return [::Gapic::Config::Method] + # + attr_reader :create_key + ## + # RPC-specific configuration for `list_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :list_keys + ## + # RPC-specific configuration for `retrieve_legacy_secret_key` + # @return [::Gapic::Config::Method] + # + attr_reader :retrieve_legacy_secret_key + ## + # RPC-specific configuration for `get_key` + # @return [::Gapic::Config::Method] + # + attr_reader :get_key + ## + # RPC-specific configuration for `update_key` + # @return [::Gapic::Config::Method] + # + attr_reader :update_key + ## + # RPC-specific configuration for `delete_key` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_key + ## + # RPC-specific configuration for `migrate_key` + # @return [::Gapic::Config::Method] + # + attr_reader :migrate_key + ## + # RPC-specific configuration for `add_ip_override` + # @return [::Gapic::Config::Method] + # + attr_reader :add_ip_override + ## + # RPC-specific configuration for `remove_ip_override` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_ip_override + ## + # RPC-specific configuration for `list_ip_overrides` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ip_overrides + ## + # RPC-specific configuration for `get_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :get_metrics + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_firewall_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_firewall_policy + ## + # RPC-specific configuration for `list_firewall_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_firewall_policies + ## + # RPC-specific configuration for `get_firewall_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_firewall_policy + ## + # RPC-specific configuration for `update_firewall_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_firewall_policy + ## + # RPC-specific configuration for `delete_firewall_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_firewall_policy + ## + # RPC-specific configuration for `reorder_firewall_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :reorder_firewall_policies + ## + # RPC-specific configuration for `list_related_account_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_related_account_groups + ## + # RPC-specific configuration for `list_related_account_group_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_related_account_group_memberships + ## + # RPC-specific configuration for `search_related_account_group_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :search_related_account_group_memberships + + # @private + def initialize parent_rpcs = nil + create_assessment_config = parent_rpcs.create_assessment if parent_rpcs.respond_to? :create_assessment + @create_assessment = ::Gapic::Config::Method.new create_assessment_config + annotate_assessment_config = parent_rpcs.annotate_assessment if parent_rpcs.respond_to? :annotate_assessment + @annotate_assessment = ::Gapic::Config::Method.new annotate_assessment_config + create_key_config = parent_rpcs.create_key if parent_rpcs.respond_to? :create_key + @create_key = ::Gapic::Config::Method.new create_key_config + list_keys_config = parent_rpcs.list_keys if parent_rpcs.respond_to? :list_keys + @list_keys = ::Gapic::Config::Method.new list_keys_config + retrieve_legacy_secret_key_config = parent_rpcs.retrieve_legacy_secret_key if parent_rpcs.respond_to? :retrieve_legacy_secret_key + @retrieve_legacy_secret_key = ::Gapic::Config::Method.new retrieve_legacy_secret_key_config + get_key_config = parent_rpcs.get_key if parent_rpcs.respond_to? :get_key + @get_key = ::Gapic::Config::Method.new get_key_config + update_key_config = parent_rpcs.update_key if parent_rpcs.respond_to? :update_key + @update_key = ::Gapic::Config::Method.new update_key_config + delete_key_config = parent_rpcs.delete_key if parent_rpcs.respond_to? :delete_key + @delete_key = ::Gapic::Config::Method.new delete_key_config + migrate_key_config = parent_rpcs.migrate_key if parent_rpcs.respond_to? :migrate_key + @migrate_key = ::Gapic::Config::Method.new migrate_key_config + add_ip_override_config = parent_rpcs.add_ip_override if parent_rpcs.respond_to? :add_ip_override + @add_ip_override = ::Gapic::Config::Method.new add_ip_override_config + remove_ip_override_config = parent_rpcs.remove_ip_override if parent_rpcs.respond_to? :remove_ip_override + @remove_ip_override = ::Gapic::Config::Method.new remove_ip_override_config + list_ip_overrides_config = parent_rpcs.list_ip_overrides if parent_rpcs.respond_to? :list_ip_overrides + @list_ip_overrides = ::Gapic::Config::Method.new list_ip_overrides_config + get_metrics_config = parent_rpcs.get_metrics if parent_rpcs.respond_to? :get_metrics + @get_metrics = ::Gapic::Config::Method.new get_metrics_config + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_firewall_policy_config = parent_rpcs.create_firewall_policy if parent_rpcs.respond_to? :create_firewall_policy + @create_firewall_policy = ::Gapic::Config::Method.new create_firewall_policy_config + list_firewall_policies_config = parent_rpcs.list_firewall_policies if parent_rpcs.respond_to? :list_firewall_policies + @list_firewall_policies = ::Gapic::Config::Method.new list_firewall_policies_config + get_firewall_policy_config = parent_rpcs.get_firewall_policy if parent_rpcs.respond_to? :get_firewall_policy + @get_firewall_policy = ::Gapic::Config::Method.new get_firewall_policy_config + update_firewall_policy_config = parent_rpcs.update_firewall_policy if parent_rpcs.respond_to? :update_firewall_policy + @update_firewall_policy = ::Gapic::Config::Method.new update_firewall_policy_config + delete_firewall_policy_config = parent_rpcs.delete_firewall_policy if parent_rpcs.respond_to? :delete_firewall_policy + @delete_firewall_policy = ::Gapic::Config::Method.new delete_firewall_policy_config + reorder_firewall_policies_config = parent_rpcs.reorder_firewall_policies if parent_rpcs.respond_to? :reorder_firewall_policies + @reorder_firewall_policies = ::Gapic::Config::Method.new reorder_firewall_policies_config + list_related_account_groups_config = parent_rpcs.list_related_account_groups if parent_rpcs.respond_to? :list_related_account_groups + @list_related_account_groups = ::Gapic::Config::Method.new list_related_account_groups_config + list_related_account_group_memberships_config = parent_rpcs.list_related_account_group_memberships if parent_rpcs.respond_to? :list_related_account_group_memberships + @list_related_account_group_memberships = ::Gapic::Config::Method.new list_related_account_group_memberships_config + search_related_account_group_memberships_config = parent_rpcs.search_related_account_group_memberships if parent_rpcs.respond_to? :search_related_account_group_memberships + @search_related_account_group_memberships = ::Gapic::Config::Method.new search_related_account_group_memberships_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb new file mode 100644 index 000000000000..5bad44dfdcb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_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 RecaptchaEnterprise + module V1 + module RecaptchaEnterpriseService + # Credentials for the RecaptchaEnterpriseService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "RECAPTCHA_ENTERPRISE_CREDENTIALS", + "RECAPTCHA_ENTERPRISE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "RECAPTCHA_ENTERPRISE_CREDENTIALS_JSON", + "RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb new file mode 100644 index 000000000000..764baa008be0 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb @@ -0,0 +1,149 @@ +# 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 RecaptchaEnterprise + module V1 + module RecaptchaEnterpriseService + # Path helper methods for the RecaptchaEnterpriseService API. + module Paths + ## + # Create a fully-qualified Assessment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/assessments/{assessment}` + # + # @param project [String] + # @param assessment [String] + # + # @return [::String] + def assessment_path project:, assessment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/assessments/#{assessment}" + end + + ## + # Create a fully-qualified FirewallPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/firewallpolicies/{firewallpolicy}` + # + # @param project [String] + # @param firewallpolicy [String] + # + # @return [::String] + def firewall_policy_path project:, firewallpolicy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/firewallpolicies/#{firewallpolicy}" + end + + ## + # Create a fully-qualified Key resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/keys/{key}` + # + # @param project [String] + # @param key [String] + # + # @return [::String] + def key_path project:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/keys/#{key}" + end + + ## + # Create a fully-qualified Metrics resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/keys/{key}/metrics` + # + # @param project [String] + # @param key [String] + # + # @return [::String] + def metrics_path project:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/keys/#{key}/metrics" + end + + ## + # Create a fully-qualified Policy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/keys/{key}/policy` + # + # @param project [String] + # @param key [String] + # + # @return [::String] + def policy_path project:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/keys/#{key}/policy" + 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 RelatedAccountGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}` + # + # @param project [String] + # @param relatedaccountgroup [String] + # + # @return [::String] + def related_account_group_path project:, relatedaccountgroup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/relatedaccountgroups/#{relatedaccountgroup}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb new file mode 100644 index 000000000000..6d793f226301 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/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 RecaptchaEnterprise + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb new file mode 100644 index 000000000000..a6447a580b63 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n=google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto\x12#google.cloud.recaptchaenterprise.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\x17\x43reateAssessmentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\nassessment\x18\x02 \x01(\x0b\x32/.google.cloud.recaptchaenterprise.v1.AssessmentB\x03\xe0\x41\x02\"\x92\x05\n\x10TransactionEvent\x12\x63\n\nevent_type\x18\x01 \x01(\x0e\x32J.google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventTypeB\x03\xe0\x41\x01\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x33\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xba\x03\n\x14TransactionEventType\x12&\n\"TRANSACTION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MERCHANT_APPROVE\x10\x01\x12\x11\n\rMERCHANT_DENY\x10\x02\x12\x11\n\rMANUAL_REVIEW\x10\x03\x12\x11\n\rAUTHORIZATION\x10\x04\x12\x19\n\x15\x41UTHORIZATION_DECLINE\x10\x05\x12\x13\n\x0fPAYMENT_CAPTURE\x10\x06\x12\x1b\n\x17PAYMENT_CAPTURE_DECLINE\x10\x07\x12\n\n\x06\x43\x41NCEL\x10\x08\x12\x16\n\x12\x43HARGEBACK_INQUIRY\x10\t\x12\x14\n\x10\x43HARGEBACK_ALERT\x10\n\x12\x16\n\x12\x46RAUD_NOTIFICATION\x10\x0b\x12\x0e\n\nCHARGEBACK\x10\x0c\x12\x1c\n\x18\x43HARGEBACK_REPRESENTMENT\x10\r\x12\x16\n\x12\x43HARGEBACK_REVERSE\x10\x0e\x12\x12\n\x0eREFUND_REQUEST\x10\x0f\x12\x12\n\x0eREFUND_DECLINE\x10\x10\x12\n\n\x06REFUND\x10\x11\x12\x12\n\x0eREFUND_REVERSE\x10\x12\"j\n\x18PhoneAuthenticationEvent\x12\x19\n\x0cphone_number\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xeb\x07\n\x19\x41nnotateAssessmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-recaptchaenterprise.googleapis.com/Assessment\x12\x62\n\nannotation\x18\x02 \x01(\x0e\x32I.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.AnnotationB\x03\xe0\x41\x01\x12[\n\x07reasons\x18\x03 \x03(\x0e\x32\x45.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.ReasonB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11hashed_account_id\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x12U\n\x11transaction_event\x18\x05 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.TransactionEventB\x03\xe0\x41\x01\x12\x66\n\x1aphone_authentication_event\x18\x06 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEventB\x03\xe0\x41\x01\"~\n\nAnnotation\x12\x1a\n\x16\x41NNOTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nLEGITIMATE\x10\x01\x12\x0e\n\nFRAUDULENT\x10\x02\x12\x18\n\x10PASSWORD_CORRECT\x10\x03\x1a\x02\x08\x01\x12\x1a\n\x12PASSWORD_INCORRECT\x10\x04\x1a\x02\x08\x01\"\xcf\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nCHARGEBACK\x10\x01\x12\x14\n\x10\x43HARGEBACK_FRAUD\x10\x08\x12\x16\n\x12\x43HARGEBACK_DISPUTE\x10\t\x12\n\n\x06REFUND\x10\n\x12\x10\n\x0cREFUND_FRAUD\x10\x0b\x12\x18\n\x14TRANSACTION_ACCEPTED\x10\x0c\x12\x18\n\x14TRANSACTION_DECLINED\x10\r\x12\x16\n\x12PAYMENT_HEURISTICS\x10\x02\x12\x18\n\x14INITIATED_TWO_FACTOR\x10\x07\x12\x15\n\x11PASSED_TWO_FACTOR\x10\x03\x12\x15\n\x11\x46\x41ILED_TWO_FACTOR\x10\x04\x12\x14\n\x10\x43ORRECT_PASSWORD\x10\x05\x12\x16\n\x12INCORRECT_PASSWORD\x10\x06\x12\x0f\n\x0bSOCIAL_SPAM\x10\x0e\"\x1c\n\x1a\x41nnotateAssessmentResponse\"\xb4\x01\n\x18\x45ndpointVerificationInfo\x12\x17\n\remail_address\x18\x01 \x01(\tH\x00\x12\x16\n\x0cphone_number\x18\x02 \x01(\tH\x00\x12\x1a\n\rrequest_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x16last_verification_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\n\n\x08\x65ndpoint\"\xdb\x04\n\x17\x41\x63\x63ountVerificationInfo\x12U\n\tendpoints\x18\x01 \x03(\x0b\x32=.google.cloud.recaptchaenterprise.v1.EndpointVerificationInfoB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12l\n\x1alatest_verification_result\x18\x07 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.ResultB\x03\xe0\x41\x03\x12\x14\n\x08username\x18\x02 \x01(\tB\x02\x18\x01\"\xc8\x02\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x19\n\x15SUCCESS_USER_VERIFIED\x10\x01\x12\x1b\n\x17\x45RROR_USER_NOT_VERIFIED\x10\x02\x12$\n ERROR_SITE_ONBOARDING_INCOMPLETE\x10\x03\x12\x1f\n\x1b\x45RROR_RECIPIENT_NOT_ALLOWED\x10\x04\x12)\n%ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED\x10\x05\x12\x1b\n\x17\x45RROR_CRITICAL_INTERNAL\x10\x06\x12\"\n\x1e\x45RROR_CUSTOMER_QUOTA_EXHAUSTED\x10\x07\x12\x1f\n\x1b\x45RROR_VERIFICATION_BYPASSED\x10\x08\x12\x1a\n\x16\x45RROR_VERDICT_MISMATCH\x10\t\"\xcc\x01\n\x1fPrivatePasswordLeakVerification\x12\x1f\n\x12lookup_hash_prefix\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12,\n\x1f\x65ncrypted_user_credentials_hash\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\x12*\n\x1d\x65ncrypted_leak_match_prefixes\x18\x03 \x03(\x0c\x42\x03\xe0\x41\x03\x12.\n!reencrypted_user_credentials_hash\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x03\"\xfb\t\n\nAssessment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05\x65vent\x18\x02 \x01(\x0b\x32*.google.cloud.recaptchaenterprise.v1.EventB\x03\xe0\x41\x01\x12M\n\rrisk_analysis\x18\x03 \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.RiskAnalysisB\x03\xe0\x41\x03\x12S\n\x10token_properties\x18\x04 \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TokenPropertiesB\x03\xe0\x41\x03\x12_\n\x14\x61\x63\x63ount_verification\x18\x05 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.AccountVerificationInfoB\x03\xe0\x41\x01\x12h\n\x1b\x61\x63\x63ount_defender_assessment\x18\x06 \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessmentB\x03\xe0\x41\x03\x12u\n\"private_password_leak_verification\x18\x08 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerificationB\x03\xe0\x41\x01\x12\x66\n\x1a\x66irewall_policy_assessment\x18\n \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessmentB\x03\xe0\x41\x03\x12h\n\x1b\x66raud_prevention_assessment\x18\x0b \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessmentB\x03\xe0\x41\x03\x12M\n\rfraud_signals\x18\r \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.FraudSignalsB\x03\xe0\x41\x03\x12^\n\x16phone_fraud_assessment\x18\x0c \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.PhoneFraudAssessmentB\x03\xe0\x41\x03\x12_\n\x16\x61ssessment_environment\x18\x0e \x01(\x0b\x32:.google.cloud.recaptchaenterprise.v1.AssessmentEnvironmentB\x03\xe0\x41\x01\x12U\n\x11policy_evaluation\x18\x10 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.PolicyEvaluationB\x03\xe0\x41\x03:x\xea\x41u\n-recaptchaenterprise.googleapis.com/Assessment\x12+projects/{project}/assessments/{assessment}*\x0b\x61ssessments2\nassessment\"\xb0\x05\n\x05\x45vent\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08site_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nuser_agent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12$\n\x0fuser_ip_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x1c\n\x0f\x65xpected_action\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x06 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x14\n\x07\x65xpress\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rrequested_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14waf_token_assessment\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x10\n\x03ja3\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03ja4\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07headers\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x66irewall_policy_evaluation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\x10transaction_data\x18\r \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TransactionDataB\x03\xe0\x41\x01\x12\x45\n\tuser_info\x18\x0f \x01(\x0b\x32-.google.cloud.recaptchaenterprise.v1.UserInfoB\x03\xe0\x41\x01\x12Y\n\x10\x66raud_prevention\x18\x11 \x01(\x0e\x32:.google.cloud.recaptchaenterprise.v1.Event.FraudPreventionB\x03\xe0\x41\x01\"N\n\x0f\x46raudPrevention\x12 \n\x1c\x46RAUD_PREVENTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\xa0\n\n\x0fTransactionData\x12\x1b\n\x0etransaction_id\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61rd_bin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x63\x61rd_last_four\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1b\n\x0eshipping_value\x18\x0c \x01(\x01\x42\x03\xe0\x41\x01\x12[\n\x10shipping_address\x18\x06 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12Z\n\x0f\x62illing_address\x18\x07 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12L\n\x04user\x18\x08 \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12Q\n\tmerchants\x18\r \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12M\n\x05items\x18\x0e \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.ItemB\x03\xe0\x41\x01\x12[\n\x0cgateway_info\x18\n \x01(\x0b\x32@.google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfoB\x03\xe0\x41\x01\x1a\xa4\x01\n\x07\x41\x64\x64ress\x12\x16\n\trecipient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08locality\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x61\x64ministrative_area\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpostal_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04User\x12\x17\n\naccount_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x63reation_ms\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cphone_number\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ephone_verified\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x66\n\x04Item\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12 \n\x13merchant_account_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x0bGatewayInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15gateway_response_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61vs_response_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63vv_response_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f_transaction_id\"\xa5\x01\n\x08UserInfo\x12<\n\x13\x63reate_account_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x08user_ids\x18\x03 \x03(\x0b\x32+.google.cloud.recaptchaenterprise.v1.UserIdB\x03\xe0\x41\x01\"`\n\x06UserId\x12\x14\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x17\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x42\n\n\x08id_oneof\"\xdb\x05\n\x0cRiskAnalysis\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\\\n\x07reasons\x18\x02 \x03(\x0e\x32\x46.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReasonB\x03\xe0\x41\x03\x12%\n\x18\x65xtended_verdict_reasons\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12T\n\x13last_challenge_type\x18\x06 \x01(\x0e\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeTypeB\x03\xe0\x41\x03\x12S\n\tchallenge\x18\x04 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ChallengeB\x03\xe0\x41\x03\x12\x44\n\rverified_bots\x18\x05 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.BotB\x03\xe0\x41\x03\"\xf1\x01\n\x14\x43lassificationReason\x12%\n!CLASSIFICATION_REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMATION\x10\x01\x12\x1a\n\x16UNEXPECTED_ENVIRONMENT\x10\x02\x12\x14\n\x10TOO_MUCH_TRAFFIC\x10\x03\x12\x1d\n\x19UNEXPECTED_USAGE_PATTERNS\x10\x04\x12\x18\n\x14LOW_CONFIDENCE_SCORE\x10\x05\x12\x19\n\x11SUSPECTED_CARDING\x10\x06\x1a\x02\x08\x01\x12\x1c\n\x14SUSPECTED_CHARGEBACK\x10\x07\x1a\x02\x08\x01\"M\n\tChallenge\x12\x19\n\x15\x43HALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\n\n\x06PASSED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\xbd\x01\n\x03\x42ot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08\x62ot_type\x18\x02 \x01(\x0e\x32\x30.google.cloud.recaptchaenterprise.v1.Bot.BotTypeB\x03\xe0\x41\x01\"Z\n\x07\x42otType\x12\x18\n\x14\x42OT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41I_AGENT\x10\x01\x12\x13\n\x0f\x43ONTENT_SCRAPER\x10\x02\x12\x12\n\x0eSEARCH_INDEXER\x10\x03\"\xf9\x03\n\x0fTokenProperties\x12\x12\n\x05valid\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0einvalid_reason\x18\x02 \x01(\x0e\x32\x42.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReasonB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08hostname\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61ndroid_package_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rios_bundle_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\rInvalidReason\x12\x1e\n\x1aINVALID_REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16UNKNOWN_INVALID_REASON\x10\x01\x12\r\n\tMALFORMED\x10\x02\x12\x0b\n\x07\x45XPIRED\x10\x03\x12\x08\n\x04\x44UPE\x10\x04\x12\x0b\n\x07MISSING\x10\x05\x12\x11\n\rBROWSER_ERROR\x10\x06\x12\x15\n\x11UNEXPECTED_ACTION\x10\x07\x12\x10\n\x0cKEY_MISMATCH\x10\x08\x12\x13\n\x0f\x44OMAIN_MISMATCH\x10\t\"\xd0\x07\n\x19\x46raudPreventionAssessment\x12\x1d\n\x10transaction_risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x64\n\x0crisk_reasons\x18\x06 \x03(\x0b\x32I.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReasonB\x03\xe0\x41\x03\x12~\n\x19stolen_instrument_verdict\x18\x02 \x01(\x0b\x32V.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdictB\x03\xe0\x41\x03\x12t\n\x14\x63\x61rd_testing_verdict\x18\x03 \x01(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictB\x03\xe0\x41\x03\x12|\n\x18\x62\x65havioral_trust_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictB\x03\xe0\x41\x03\x1a\xb4\x02\n\nRiskReason\x12\x65\n\x06reason\x18\x01 \x01(\x0e\x32P.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.ReasonB\x03\xe0\x41\x03\"\xbe\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19HIGH_TRANSACTION_VELOCITY\x10\x01\x12!\n\x1d\x45XCESSIVE_ENUMERATION_PATTERN\x10\x02\x12\x1a\n\x16SHORT_IDENTITY_HISTORY\x10\x03\x12\x1b\n\x17GEOLOCATION_DISCREPANCY\x10\x04\x12!\n\x1d\x41SSOCIATED_WITH_FRAUD_CLUSTER\x10\x05\x1a,\n\x17StolenInstrumentVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\'\n\x12\x43\x61rdTestingVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a,\n\x16\x42\x65havioralTrustVerdict\x12\x12\n\x05trust\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\"\xe3\x03\n\x0c\x46raudSignals\x12X\n\x0cuser_signals\x18\x01 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignalsB\x03\xe0\x41\x03\x12X\n\x0c\x63\x61rd_signals\x18\x02 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignalsB\x03\xe0\x41\x03\x1aP\n\x0bUserSignals\x12$\n\x17\x61\x63tive_days_lower_bound\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1b\n\x0esynthetic_risk\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xcc\x01\n\x0b\x43\x61rdSignals\x12\x61\n\x0b\x63\x61rd_labels\x18\x01 \x03(\x0e\x32G.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabelB\x03\xe0\x41\x03\"Z\n\tCardLabel\x12\x1a\n\x16\x43\x41RD_LABEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREPAID\x10\x01\x12\x0b\n\x07VIRTUAL\x10\x02\x12\x17\n\x13UNEXPECTED_LOCATION\x10\x03\"\xe2\x01\n\x13SmsTollFraudVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x61\n\x07reasons\x18\x02 \x03(\x0e\x32K.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReasonB\x03\xe0\x41\x03\"U\n\x12SmsTollFraudReason\x12%\n!SMS_TOLL_FRAUD_REASON_UNSPECIFIED\x10\x00\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x01\"u\n\x14PhoneFraudAssessment\x12]\n\x16sms_toll_fraud_verdict\x18\x01 \x01(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdictB\x03\xe0\x41\x03\"\xb8\n\n\x19\x41\x63\x63ountDefenderAssessment\x12h\n\x06labels\x18\x01 \x03(\x0e\x32S.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabelB\x03\xe0\x41\x03\x12|\n\x18\x61\x63\x63ount_takeover_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdictB\x03\xe0\x41\x03\x1a\x8d\x02\n\x16\x41\x63\x63ountTakeoverVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12n\n\x0crisk_reasons\x18\x04 \x03(\x0b\x32P.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReasonB\x06\xe0\x41\x03\xe0\x41\x06\x12p\n\rtrust_reasons\x18\x05 \x03(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReasonB\x06\xe0\x41\x03\xe0\x41\x06\x1a\xb9\x02\n\x11\x41\x63\x63ountRiskReason\x12p\n\x06reason\x18\x01 \x01(\x0e\x32[.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReasonB\x03\xe0\x41\x03\"\xb1\x01\n\nRiskReason\x12\x1b\n\x17RISK_REASON_UNSPECIFIED\x10\x00\x12\"\n\x1e\x43LIENT_HISTORICAL_BOT_ACTIVITY\x10\x01\x12\"\n\x1e\x41\x43\x43OUNT_IN_LARGE_RELATED_GROUP\x10\x02\x12!\n\x1d\x43LIENT_ACCESSED_MANY_ACCOUNTS\x10\x03\x12\x1b\n\x17\x44ISPOSABLE_EMAIL_DOMAIN\x10\x04\x1a\xb0\x02\n\x12\x41\x63\x63ountTrustReason\x12r\n\x06reason\x18\x01 \x01(\x0e\x32].google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReasonB\x03\xe0\x41\x03\"\xa5\x01\n\x0bTrustReason\x12\x1c\n\x18TRUST_REASON_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19\x41\x43\x43OUNT_HISTORY_REPUTABLE\x10\x02\x12&\n\"IDENTITY_GLOBAL_ACTIVITY_REPUTABLE\x10\x03\x12\x1e\n\x1aIDENTITY_HISTORY_REPUTABLE\x10\x04\"\xb3\x01\n\x14\x41\x63\x63ountDefenderLabel\x12&\n\"ACCOUNT_DEFENDER_LABEL_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19SUSPICIOUS_LOGIN_ACTIVITY\x10\x02\x12\x1f\n\x1bSUSPICIOUS_ACCOUNT_CREATION\x10\x03\x12 \n\x1cRELATED_ACCOUNTS_NUMBER_HIGH\x10\x04\"\x93\x01\n\x10\x43reateKeyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x03key\x18\x02 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\"\x87\x01\n\x0fListKeysRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"c\n\x10ListKeysResponse\x12\x36\n\x04keys\x18\x01 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.Key\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eRetrieveLegacySecretKeyRequest\x12;\n\x03key\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"M\n\rGetKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\x84\x01\n\x10UpdateKeyRequest\x12:\n\x03key\x18\x01 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"P\n\x10\x44\x65leteKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\xb5\x01\n\x1b\x43reateFirewallPolicyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12Q\n\x0f\x66irewall_policy\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\"\x93\x01\n\x1bListFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"\x87\x01\n\x1cListFirewallPoliciesResponse\x12N\n\x11\x66irewall_policies\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x18GetFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xa6\x01\n\x1bUpdateFirewallPolicyRequest\x12Q\n\x0f\x66irewall_policy\x18\x01 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x1b\x44\x65leteFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xaf\x01\n\x1eReorderFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x05names\x18\x02 \x03(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"!\n\x1fReorderFirewallPoliciesResponse\"r\n\x11MigrateKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12\x1f\n\x12skip_billing_check\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x11GetMetricsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*recaptchaenterprise.googleapis.com/Metrics\"\xd5\x02\n\x07Metrics\x12\x14\n\x04name\x18\x04 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\rscore_metrics\x18\x02 \x03(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.ScoreMetrics\x12P\n\x11\x63hallenge_metrics\x18\x03 \x03(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.ChallengeMetrics:h\xea\x41\x65\n*recaptchaenterprise.googleapis.com/Metrics\x12%projects/{project}/keys/{key}/metrics*\x07metrics2\x07metrics\"<\n\x1fRetrieveLegacySecretKeyResponse\x12\x19\n\x11legacy_secret_key\x18\x01 \x01(\t\"\x8c\x07\n\x03Key\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0cweb_settings\x18\x03 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.WebKeySettingsH\x00\x12S\n\x10\x61ndroid_settings\x18\x04 \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.AndroidKeySettingsH\x00\x12K\n\x0cios_settings\x18\x05 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IOSKeySettingsH\x00\x12S\n\x10\x65xpress_settings\x18\x0b \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ExpressKeySettingsH\x00\x12W\n\x12universal_settings\x18\r \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.UniversalKeySettingsH\x00\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.Key.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0ftesting_options\x18\t \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.TestingOptionsB\x03\xe0\x41\x01\x12K\n\x0cwaf_settings\x18\n \x01(\x0b\x32\x30.google.cloud.recaptchaenterprise.v1.WafSettingsB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:U\xea\x41R\n&recaptchaenterprise.googleapis.com/Key\x12\x1dprojects/{project}/keys/{key}*\x04keys2\x03keyB\x13\n\x11platform_settings\"\xf2\x01\n\x0eTestingOptions\x12\x1a\n\rtesting_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x64\n\x11testing_challenge\x18\x02 \x01(\x0e\x32\x44.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallengeB\x03\xe0\x41\x01\"^\n\x10TestingChallenge\x12!\n\x1dTESTING_CHALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\x18\n\x14UNSOLVABLE_CHALLENGE\x10\x02\"\xc5\x08\n\x0eWebKeySettings\x12\x1e\n\x11\x61llow_all_domains\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_amp_traffic\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x10integration_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationTypeB\x03\xe0\x41\x02\x12{\n\x1d\x63hallenge_security_preference\x18\x05 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x12\x66\n\x12\x63hallenge_settings\x18\x06 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettingsB\x03\xe0\x41\x01\x1a.\n\x0e\x41\x63tionSettings\x12\x1c\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x1a\xea\x02\n\x11\x43hallengeSettings\x12\x61\n\x10\x64\x65\x66\x61ult_settings\x18\x01 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettingsB\x03\xe0\x41\x02\x12w\n\x0f\x61\x63tion_settings\x18\x02 \x03(\x0b\x32Y.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings.ActionSettingsEntryB\x03\xe0\x41\x01\x1ay\n\x13\x41\x63tionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings:\x02\x38\x01\"w\n\x0fIntegrationType\x12 \n\x1cINTEGRATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SCORE\x10\x01\x12\x0c\n\x08\x43HECKBOX\x10\x02\x12\r\n\tINVISIBLE\x10\x03\x12\x1a\n\x16POLICY_BASED_CHALLENGE\x10\x05\"v\n\x1b\x43hallengeSecurityPreference\x12-\n)CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED\x10\x00\x12\r\n\tUSABILITY\x10\x01\x12\x0b\n\x07\x42\x41LANCE\x10\x02\x12\x0c\n\x08SECURITY\x10\x03\"\x96\x01\n\x12\x41ndroidKeySettings\x12$\n\x17\x61llow_all_package_names\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15\x61llowed_package_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x36\n)support_non_google_app_store_distribution\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xac\x01\n\x0eIOSKeySettings\x12!\n\x14\x61llow_all_bundle_ids\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x61llowed_bundle_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12V\n\x12\x61pple_developer_id\x18\x03 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.AppleDeveloperIdB\x03\xe0\x41\x01\"\x14\n\x12\x45xpressKeySettings\"\x16\n\x14UniversalKeySettings\"Z\n\x10\x41ppleDeveloperId\x12\x1b\n\x0bprivate_key\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07team_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x11ScoreDistribution\x12_\n\rscore_buckets\x18\x01 \x03(\x0b\x32H.google.cloud.recaptchaenterprise.v1.ScoreDistribution.ScoreBucketsEntry\x1a\x33\n\x11ScoreBucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xab\x02\n\x0cScoreMetrics\x12O\n\x0foverall_metrics\x18\x01 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution\x12\\\n\x0e\x61\x63tion_metrics\x18\x02 \x03(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.ScoreMetrics.ActionMetricsEntry\x1al\n\x12\x41\x63tionMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution:\x02\x38\x01\"o\n\x10\x43hallengeMetrics\x12\x16\n\x0epageload_count\x18\x01 \x01(\x03\x12\x17\n\x0fnocaptcha_count\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_count\x18\x03 \x01(\x03\x12\x14\n\x0cpassed_count\x18\x04 \x01(\x03\"\x95\x01\n\x18\x46irewallPolicyAssessment\x12&\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12Q\n\x0f\x66irewall_policy\x18\x08 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x03\"\x82\x06\n\x0e\x46irewallAction\x12P\n\x05\x61llow\x18\x01 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.AllowActionH\x00\x12P\n\x05\x62lock\x18\x02 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.BlockActionH\x00\x12t\n\x18include_recaptcha_script\x18\x06 \x01(\x0b\x32P.google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptActionH\x00\x12V\n\x08redirect\x18\x05 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectActionH\x00\x12Z\n\nsubstitute\x18\x03 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteActionH\x00\x12Y\n\nset_header\x18\x04 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderActionH\x00\x1a\r\n\x0b\x41llowAction\x1a\r\n\x0b\x42lockAction\x1a\x1e\n\x1cIncludeRecaptchaScriptAction\x1a\x10\n\x0eRedirectAction\x1a%\n\x10SubstituteAction\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\x0fSetHeaderAction\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x17\n\x15\x66irewall_action_oneof\"\xc5\x02\n\x0e\x46irewallPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcondition\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x61\x63tions\x18\x06 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallActionB\x03\xe0\x41\x01:\x8f\x01\xea\x41\x8b\x01\n1recaptchaenterprise.googleapis.com/FirewallPolicy\x12\x34projects/{project}/firewallpolicies/{firewallpolicy}*\x10\x66irewallPolicies2\x0e\x66irewallPolicy\"\xb6\x01\n)ListRelatedAccountGroupMembershipsRequest\x12X\n\x06parent\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\x12@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\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\"\xb4\x01\n*ListRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa2\x01\n\x1fListRelatedAccountGroupsRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36recaptchaenterprise.googleapis.com/RelatedAccountGroup\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\"\x95\x01\n ListRelatedAccountGroupsResponse\x12X\n\x16related_account_groups\x18\x01 \x03(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x01\n+SearchRelatedAccountGroupMembershipsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\naccount_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n,SearchRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x14\x41\x64\x64IpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x17\n\x15\x41\x64\x64IpOverrideResponse\"\xab\x01\n\x17RemoveIpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x1a\n\x18RemoveIpOverrideResponse\"\x89\x01\n\x16ListIpOverridesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\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\"}\n\x17ListIpOverridesResponse\x12I\n\x0cip_overrides\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideData\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc8\x02\n\x1dRelatedAccountGroupMembership\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\naccount_id\x18\x04 \x01(\t\x12\x1d\n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x02\x18\x01:\xdd\x01\xea\x41\xd9\x01\n@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\x12Vprojects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}*\x1erelatedAccountGroupMemberships2\x1drelatedAccountGroupMembership\"\xd4\x01\n\x13RelatedAccountGroup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02:\xa6\x01\xea\x41\xa2\x01\n6recaptchaenterprise.googleapis.com/RelatedAccountGroup\x12=projects/{project}/relatedaccountgroups/{relatedaccountgroup}*\x14relatedAccountGroups2\x13relatedAccountGroup\"\x8b\x03\n\x0bWafSettings\x12U\n\x0bwaf_service\x18\x01 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafServiceB\x03\xe0\x41\x02\x12U\n\x0bwaf_feature\x18\x02 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeatureB\x03\xe0\x41\x02\"s\n\nWafFeature\x12\x1b\n\x17WAF_FEATURE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HALLENGE_PAGE\x10\x01\x12\x11\n\rSESSION_TOKEN\x10\x02\x12\x10\n\x0c\x41\x43TION_TOKEN\x10\x03\x12\x0f\n\x07\x45XPRESS\x10\x05\x1a\x02\x08\x01\"Y\n\nWafService\x12\x1b\n\x17WAF_SERVICE_UNSPECIFIED\x10\x00\x12\x06\n\x02\x43\x41\x10\x01\x12\n\n\x06\x46\x41STLY\x10\x03\x12\x0e\n\nCLOUDFLARE\x10\x04\x12\n\n\x06\x41KAMAI\x10\x05\"B\n\x15\x41ssessmentEnvironment\x12\x13\n\x06\x63lient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n\x10PolicyEvaluation\x12\x64\n\x19\x63hallenge_rule_evaluation\x18\x01 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluationB\x03\xe0\x41\x03\"\x19\n\x17\x43hallengeRuleEvaluation\"\xc1\x01\n\x0eIpOverrideData\x12\x17\n\x02ip\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\\\n\roverride_type\x18\x03 \x01(\x0e\x32@.google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideTypeB\x03\xe0\x41\x02\"8\n\x0cOverrideType\x12\x1d\n\x19OVERRIDE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)recaptchaenterprise.googleapis.com/Policy\"\x8d\x01\n\x13UpdatePolicyRequest\x12@\n\x06policy\x18\x01 \x01(\x0b\x32+.google.cloud.recaptchaenterprise.v1.PolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb5\x02\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x0f\x63lient_settings\x18\x04 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.ClientSettingsB\x03\xe0\x41\x02\x12[\n\x15\x63hallenge_rule_groups\x18\x02 \x03(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ChallengeRuleGroupB\x03\xe0\x41\x01:h\xea\x41\x65\n)recaptchaenterprise.googleapis.com/Policy\x12$projects/{project}/keys/{key}/policy \x02*\x08policies2\x06policy\"|\n\x12\x43hallengeRuleGroup\x12\x14\n\x07\x61\x63tions\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12P\n\x0f\x63hallenge_rules\x18\x02 \x03(\x0b\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeRuleB\x03\xe0\x41\x02\"\xff\x02\n\rChallengeRule\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12]\n\x0cno_challenge\x18\x02 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcomeH\x00\x12X\n\tchallenge\x18\x03 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcomeH\x00\x1a\x14\n\x12NoChallengeOutcome\x1a|\n\x10\x43hallengeOutcome\x12h\n\ndifficulty\x18\x01 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x42\t\n\x07outcome\"\xb2\x01\n\x0e\x43lientSettings\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_all_domains\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x18protected_endpoint_group\x18\x03 \x01(\x0b\x32;.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroupB\x03\xe0\x41\x01\"r\n\x16ProtectedEndpointGroup\x12X\n\x13protected_endpoints\x18\x01 \x03(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ProtectedEndpointB\x03\xe0\x41\x01\";\n\x11ProtectedEndpoint\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tion\x18\x02 \x01(\tB\x03\xe0\x41\x02*d\n\rChallengeType\x12\x1e\n\x1a\x43HALLENGE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43HALLENGE_TYPE_VISUAL\x10\x01\x12\x18\n\x14\x43HALLENGE_TYPE_AUDIO\x10\x02\x32\xd4\'\n\x1aRecaptchaEnterpriseService\x12\xce\x01\n\x10\x43reateAssessment\x12<.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest\x1a/.google.cloud.recaptchaenterprise.v1.Assessment\"K\xda\x41\x11parent,assessment\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/assessments:\nassessment\x12\xe0\x01\n\x12\x41nnotateAssessment\x12>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest\x1a?.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse\"I\xda\x41\x0fname,annotation\x82\xd3\xe4\x93\x02\x31\",/v1/{name=projects/*/assessments/*}:annotate:\x01*\x12\xa4\x01\n\tCreateKey\x12\x35.google.cloud.recaptchaenterprise.v1.CreateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"6\xda\x41\nparent,key\x82\xd3\xe4\x93\x02#\"\x1c/v1/{parent=projects/*}/keys:\x03key\x12\xa6\x01\n\x08ListKeys\x12\x34.google.cloud.recaptchaenterprise.v1.ListKeysRequest\x1a\x35.google.cloud.recaptchaenterprise.v1.ListKeysResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=projects/*}/keys\x12\xe7\x01\n\x17RetrieveLegacySecretKey\x12\x43.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse\"A\xda\x41\x03key\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey\x12\x93\x01\n\x06GetKey\x12\x32.google.cloud.recaptchaenterprise.v1.GetKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/keys/*}\x12\xad\x01\n\tUpdateKey\x12\x35.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"?\xda\x41\x0fkey,update_mask\x82\xd3\xe4\x93\x02\'2 /v1/{key.name=projects/*/keys/*}:\x03key\x12\x87\x01\n\tDeleteKey\x12\x35.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest\x1a\x16.google.protobuf.Empty\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=projects/*/keys/*}\x12\x9f\x01\n\nMigrateKey\x12\x36.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"/\x82\xd3\xe4\x93\x02)\"$/v1/{name=projects/*/keys/*}:migrate:\x01*\x12\xd5\x01\n\rAddIpOverride\x12\x39.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest\x1a:.google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse\"M\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02/\"*/v1/{name=projects/*/keys/*}:addIpOverride:\x01*\x12\xe1\x01\n\x10RemoveIpOverride\x12<.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest\x1a=.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse\"P\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=projects/*/keys/*}:removeIpOverride:\x01*\x12\xcd\x01\n\x0fListIpOverrides\x12;.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest\x1a<.google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/keys/*}:listIpOverrides\x12\xa7\x01\n\nGetMetrics\x12\x36.google.cloud.recaptchaenterprise.v1.GetMetricsRequest\x1a,.google.cloud.recaptchaenterprise.v1.Metrics\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=projects/*/keys/*/metrics}\x12\xa3\x01\n\tGetPolicy\x12\x35.google.cloud.recaptchaenterprise.v1.GetPolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/keys/*/policy}\x12\xc6\x01\n\x0cUpdatePolicy\x12\x38.google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"O\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02\x34\x32*/v1/{policy.name=projects/*/keys/*/policy}:\x06policy\x12\xe9\x01\n\x14\x43reateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"Z\xda\x41\x16parent,firewall_policy\x82\xd3\xe4\x93\x02;\"(/v1/{parent=projects/*}/firewallpolicies:\x0f\x66irewall_policy\x12\xd6\x01\n\x14ListFirewallPolicies\x12@.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest\x1a\x41.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*}/firewallpolicies\x12\xc0\x01\n\x11GetFirewallPolicy\x12=.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/firewallpolicies/*}\x12\xfe\x01\n\x14UpdateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"o\xda\x41\x1b\x66irewall_policy,update_mask\x82\xd3\xe4\x93\x02K28/v1/{firewall_policy.name=projects/*/firewallpolicies/*}:\x0f\x66irewall_policy\x12\xa9\x01\n\x14\x44\x65leteFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/firewallpolicies/*}\x12\xf0\x01\n\x17ReorderFirewallPolicies\x12\x43.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse\"J\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=projects/*}/firewallpolicies:reorder:\x01*\x12\xe6\x01\n\x18ListRelatedAccountGroups\x12\x44.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest\x1a\x45.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*}/relatedaccountgroups\x12\x92\x02\n\"ListRelatedAccountGroupMemberships\x12N.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest\x1aO.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/relatedaccountgroups/*}/memberships\x12\xb2\x02\n$SearchRelatedAccountGroupMemberships\x12P.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest\x1aQ.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse\"e\xda\x41\x19project,hashed_account_id\x82\xd3\xe4\x93\x02\x43\">/v1/{project=projects/*}/relatedaccountgroupmemberships:search:\x01*\x1aV\xca\x41\"recaptchaenterprise.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n!com.google.recaptchaenterprise.v1B\x18RecaptchaEnterpriseProtoP\x01Z\\cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb\xa2\x02\x04GCRE\xaa\x02#Google.Cloud.RecaptchaEnterprise.V1\xca\x02#Google\\Cloud\\RecaptchaEnterprise\\V1\xea\x02&Google::Cloud::RecaptchaEnterprise::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module RecaptchaEnterprise + module V1 + CreateAssessmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest").msgclass + TransactionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionEvent").msgclass + TransactionEvent::TransactionEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType").enummodule + PhoneAuthenticationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEvent").msgclass + AnnotateAssessmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest").msgclass + AnnotateAssessmentRequest::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation").enummodule + AnnotateAssessmentRequest::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason").enummodule + AnnotateAssessmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse").msgclass + EndpointVerificationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo").msgclass + AccountVerificationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountVerificationInfo").msgclass + AccountVerificationInfo::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result").enummodule + PrivatePasswordLeakVerification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification").msgclass + Assessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Assessment").msgclass + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Event").msgclass + Event::FraudPrevention = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Event.FraudPrevention").enummodule + TransactionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData").msgclass + TransactionData::Address = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.Address").msgclass + TransactionData::User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.User").msgclass + TransactionData::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.Item").msgclass + TransactionData::GatewayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo").msgclass + UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UserInfo").msgclass + UserId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UserId").msgclass + RiskAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis").msgclass + RiskAnalysis::ClassificationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason").enummodule + RiskAnalysis::Challenge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge").enummodule + Bot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Bot").msgclass + Bot::BotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Bot.BotType").enummodule + TokenProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TokenProperties").msgclass + TokenProperties::InvalidReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason").enummodule + FraudPreventionAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment").msgclass + FraudPreventionAssessment::RiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason").msgclass + FraudPreventionAssessment::RiskReason::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.Reason").enummodule + FraudPreventionAssessment::StolenInstrumentVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict").msgclass + FraudPreventionAssessment::CardTestingVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict").msgclass + FraudPreventionAssessment::BehavioralTrustVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict").msgclass + FraudSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals").msgclass + FraudSignals::UserSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals").msgclass + FraudSignals::CardSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals").msgclass + FraudSignals::CardSignals::CardLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel").enummodule + SmsTollFraudVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict").msgclass + SmsTollFraudVerdict::SmsTollFraudReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason").enummodule + PhoneFraudAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment").msgclass + AccountDefenderAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment").msgclass + AccountDefenderAssessment::AccountTakeoverVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdict").msgclass + AccountDefenderAssessment::AccountRiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason").msgclass + AccountDefenderAssessment::AccountRiskReason::RiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReason").enummodule + AccountDefenderAssessment::AccountTrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason").msgclass + AccountDefenderAssessment::AccountTrustReason::TrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReason").enummodule + AccountDefenderAssessment::AccountDefenderLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel").enummodule + CreateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateKeyRequest").msgclass + ListKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListKeysRequest").msgclass + ListKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListKeysResponse").msgclass + RetrieveLegacySecretKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest").msgclass + GetKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetKeyRequest").msgclass + UpdateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdateKeyRequest").msgclass + DeleteKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.DeleteKeyRequest").msgclass + CreateFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest").msgclass + ListFirewallPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest").msgclass + ListFirewallPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse").msgclass + GetFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest").msgclass + UpdateFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest").msgclass + DeleteFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest").msgclass + ReorderFirewallPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest").msgclass + ReorderFirewallPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse").msgclass + MigrateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.MigrateKeyRequest").msgclass + GetMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetMetricsRequest").msgclass + Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Metrics").msgclass + RetrieveLegacySecretKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse").msgclass + Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Key").msgclass + TestingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TestingOptions").msgclass + TestingOptions::TestingChallenge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge").enummodule + WebKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings").msgclass + WebKeySettings::ActionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings").msgclass + WebKeySettings::ChallengeSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings").msgclass + WebKeySettings::IntegrationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType").enummodule + WebKeySettings::ChallengeSecurityPreference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference").enummodule + AndroidKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AndroidKeySettings").msgclass + IOSKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IOSKeySettings").msgclass + ExpressKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ExpressKeySettings").msgclass + UniversalKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UniversalKeySettings").msgclass + AppleDeveloperId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AppleDeveloperId").msgclass + ScoreDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreDistribution").msgclass + ScoreMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreMetrics").msgclass + ChallengeMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeMetrics").msgclass + FirewallPolicyAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment").msgclass + FirewallAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction").msgclass + FirewallAction::AllowAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction").msgclass + FirewallAction::BlockAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction").msgclass + FirewallAction::IncludeRecaptchaScriptAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction").msgclass + FirewallAction::RedirectAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction").msgclass + FirewallAction::SubstituteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction").msgclass + FirewallAction::SetHeaderAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction").msgclass + FirewallPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallPolicy").msgclass + ListRelatedAccountGroupMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest").msgclass + ListRelatedAccountGroupMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse").msgclass + ListRelatedAccountGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest").msgclass + ListRelatedAccountGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse").msgclass + SearchRelatedAccountGroupMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest").msgclass + SearchRelatedAccountGroupMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse").msgclass + AddIpOverrideRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest").msgclass + AddIpOverrideResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse").msgclass + RemoveIpOverrideRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest").msgclass + RemoveIpOverrideResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse").msgclass + ListIpOverridesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest").msgclass + ListIpOverridesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse").msgclass + RelatedAccountGroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership").msgclass + RelatedAccountGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RelatedAccountGroup").msgclass + WafSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings").msgclass + WafSettings::WafFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature").enummodule + WafSettings::WafService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafService").enummodule + AssessmentEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AssessmentEnvironment").msgclass + PolicyEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PolicyEvaluation").msgclass + ChallengeRuleEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluation").msgclass + IpOverrideData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData").msgclass + IpOverrideData::OverrideType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType").enummodule + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetPolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest").msgclass + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Policy").msgclass + ChallengeRuleGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup").msgclass + ChallengeRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule").msgclass + ChallengeRule::NoChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcome").msgclass + ChallengeRule::ChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcome").msgclass + ClientSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ClientSettings").msgclass + ProtectedEndpointGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup").msgclass + ProtectedEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpoint").msgclass + ChallengeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb new file mode 100644 index 000000000000..f763a1c45d5f --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb @@ -0,0 +1,109 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto for package 'Google.Cloud.RecaptchaEnterprise.V1' +# 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/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb' + +module Google + module Cloud + module RecaptchaEnterprise + module V1 + module RecaptchaEnterpriseService + # Service to determine the likelihood an event is legitimate. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' + + # Creates an Assessment of the likelihood an event is legitimate. + rpc :CreateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Assessment + # Annotates a previously created Assessment to provide additional information + # on whether the event turned out to be authentic or fraudulent. + rpc :AnnotateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse + # Creates a new reCAPTCHA Enterprise key. + rpc :CreateKey, ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key + # Returns the list of all keys that belong to a project. + rpc :ListKeys, ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse + # Returns the secret key related to the specified public key. + # You must use the legacy secret key only in a 3rd party integration with + # legacy reCAPTCHA. + rpc :RetrieveLegacySecretKey, ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse + # Returns the specified key. + rpc :GetKey, ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key + # Updates the specified key. + rpc :UpdateKey, ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key + # Deletes the specified key. + rpc :DeleteKey, ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, ::Google::Protobuf::Empty + # Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. + # Once a key is migrated, it can be used from either product. SiteVerify + # requests are billed as CreateAssessment calls. You must be + # authenticated as one of the current owners of the reCAPTCHA Key, and + # your user must have the reCAPTCHA Enterprise Admin IAM role in the + # destination project. + rpc :MigrateKey, ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key + # Adds an IP override to a key. The following restrictions hold: + # * The maximum number of IP overrides per key is 1000. + # * For any conflict (such as IP already exists or IP part of an existing + # IP range), an error is returned. + rpc :AddIpOverride, ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse + # Removes an IP override from a key. The following restrictions hold: + # * If the IP isn't found in an existing IP override, a `NOT_FOUND` error + # is returned. + # * If the IP is found in an existing IP override, but the + # override type does not match, a `NOT_FOUND` error is returned. + rpc :RemoveIpOverride, ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse + # Lists all IP overrides for a key. + rpc :ListIpOverrides, ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse + # Get some aggregated metrics for a Key. This data can be used to build + # dashboards. + rpc :GetMetrics, ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Metrics + # Get the policy for a key. + rpc :GetPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy + # Updates the policy for a key. + rpc :UpdatePolicy, ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy + # Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA + # Enterprise actions can be executed. + # A project may have a maximum of 1000 policies. + rpc :CreateFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy + # Returns the list of all firewall policies that belong to a project. + rpc :ListFirewallPolicies, ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse + # Returns the specified firewall policy. + rpc :GetFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy + # Updates the specified firewall policy. + rpc :UpdateFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy + # Deletes the specified firewall policy. + rpc :DeleteFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, ::Google::Protobuf::Empty + # Reorders all firewall policies. + rpc :ReorderFirewallPolicies, ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse + # List groups of related accounts. + rpc :ListRelatedAccountGroups, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse + # Get memberships in a group of related accounts. + rpc :ListRelatedAccountGroupMemberships, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse + # Search group memberships related to a given account. + rpc :SearchRelatedAccountGroupMemberships, ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md new file mode 100644 index 000000000000..5801e8b5fa14 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# reCAPTCHA Enterprise V1 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-recaptcha_enterprise-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb new file mode 100644 index 000000000000..514a0d0be353 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb @@ -0,0 +1,2587 @@ +# 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 RecaptchaEnterprise + module V1 + # The create assessment request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project in which the assessment is created, + # in the format `projects/{project}`. + # @!attribute [rw] assessment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] + # Required. The assessment details. + class CreateAssessmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes an event in the lifecycle of a payment transaction. + # @!attribute [rw] event_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent::TransactionEventType] + # Optional. The type of this transaction event. + # @!attribute [rw] reason + # @return [::String] + # Optional. The reason or standardized code that corresponds with this + # transaction event, if one exists. For example, a CHARGEBACK event with code + # 6005. + # @!attribute [rw] value + # @return [::Float] + # Optional. The value that corresponds with this transaction event, if one + # exists. For example, a refund event where $5.00 was refunded. Currency is + # obtained from the original transaction data. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp when this transaction event occurred; otherwise assumed + # to be the time of the API call. + class TransactionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents an event in the payment transaction lifecycle. + # Ensure that applications can handle values not explicitly listed. + module TransactionEventType + # Default, unspecified event type. + TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0 + + # Indicates that the transaction is approved by the merchant. The + # accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', + # 'CYBERSOURCE', or 'MANUAL_REVIEW'. + MERCHANT_APPROVE = 1 + + # Indicates that the transaction is denied and concluded due to risks + # detected by the merchant. The accompanying reasons can include terms such + # as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'. + MERCHANT_DENY = 2 + + # Indicates that the transaction is being evaluated by a human, due to + # suspicion or risk. + MANUAL_REVIEW = 3 + + # Indicates that the authorization attempt with the card issuer succeeded. + AUTHORIZATION = 4 + + # Indicates that the authorization attempt with the card issuer failed. + # The accompanying reasons can include Visa's '54' indicating that the card + # is expired, or '82' indicating that the CVV is incorrect. + AUTHORIZATION_DECLINE = 5 + + # Indicates that the transaction is completed because the funds were + # settled. + PAYMENT_CAPTURE = 6 + + # Indicates that the transaction could not be completed because the funds + # were not settled. + PAYMENT_CAPTURE_DECLINE = 7 + + # Indicates that the transaction has been canceled. Specify the reason + # for the cancellation. For example, 'INSUFFICIENT_INVENTORY'. + CANCEL = 8 + + # Indicates that the merchant has received a chargeback inquiry due to + # fraud for the transaction, requesting additional information before a + # fraud chargeback is officially issued and a formal chargeback + # notification is sent. + CHARGEBACK_INQUIRY = 9 + + # Indicates that the merchant has received a chargeback alert due to fraud + # for the transaction. The process of resolving the dispute without + # involving the payment network is started. + CHARGEBACK_ALERT = 10 + + # Indicates that a fraud notification is issued for the transaction, sent + # by the payment instrument's issuing bank because the transaction appears + # to be fraudulent. We recommend including TC40 or SAFE data in the + # `reason` field for this event type. For partial chargebacks, we recommend + # that you include an amount in the `value` field. + FRAUD_NOTIFICATION = 11 + + # Indicates that the merchant is informed by the payment network that the + # transaction has entered the chargeback process due to fraud. Reason code + # examples include Discover's '6005' and '6041'. For partial chargebacks, + # we recommend that you include an amount in the `value` field. + CHARGEBACK = 12 + + # Indicates that the transaction has entered the chargeback process due to + # fraud, and that the merchant has chosen to enter representment. Reason + # examples include Discover's '6005' and '6041'. For partial chargebacks, + # we recommend that you include an amount in the `value` field. + CHARGEBACK_REPRESENTMENT = 13 + + # Indicates that the transaction has had a fraud chargeback which was + # illegitimate and was reversed as a result. For partial chargebacks, we + # recommend that you include an amount in the `value` field. + CHARGEBACK_REVERSE = 14 + + # Indicates that the merchant has received a refund for a completed + # transaction. For partial refunds, we recommend that you include an amount + # in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of + # exempt tax) + REFUND_REQUEST = 15 + + # Indicates that the merchant has received a refund request for this + # transaction, but that they have declined it. For partial refunds, we + # recommend that you include an amount in the `value` field. Reason + # example: 'TAX_EXEMPT' (partial refund of exempt tax) + REFUND_DECLINE = 16 + + # Indicates that the completed transaction was refunded by the merchant. + # For partial refunds, we recommend that you include an amount in the + # `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt + # tax) + REFUND = 17 + + # Indicates that the completed transaction was refunded by the merchant, + # and that this refund was reversed. For partial refunds, we recommend that + # you include an amount in the `value` field. + REFUND_REVERSE = 18 + end + end + + # Details on a phone authentication event + # @!attribute [rw] phone_number + # @return [::String] + # Required. Phone number in E.164 format for which a multi-factor + # authentication challenge was initiated, succeeded, or failed. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time at which the multi-factor authentication event + # (challenge or verification) occurred. + class PhoneAuthenticationEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to annotate an Assessment. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Assessment, in the format + # `projects/{project}/assessments/{assessment}`. + # @!attribute [rw] annotation + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation] + # Optional. The annotation that is assigned to the Event. This field can be + # left empty to provide reasons that apply to an event without concluding + # whether the event is legitimate or fraudulent. + # @!attribute [rw] reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>] + # Optional. Reasons for the annotation that are assigned to the event. + # @!attribute [rw] account_id + # @return [::String] + # Optional. A stable account identifier to apply to the assessment. This is + # an alternative to setting `account_id` in `CreateAssessment`, for example + # when a stable account identifier is not yet known in the initial request. + # @!attribute [rw] hashed_account_id + # @return [::String] + # Optional. A stable hashed account identifier to apply to the assessment. + # This is an alternative to setting `hashed_account_id` in + # `CreateAssessment`, for example when a stable account identifier is not yet + # known in the initial request. + # @!attribute [rw] transaction_event + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent] + # Optional. If the assessment is part of a payment transaction, provide + # details on payment lifecycle events that occur in the transaction. + # @!attribute [rw] phone_authentication_event + # @return [::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent] + # Optional. If using an external multi-factor authentication provider, + # provide phone authentication details for fraud detection purposes. + class AnnotateAssessmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents the types of annotations. + module Annotation + # Default unspecified type. + ANNOTATION_UNSPECIFIED = 0 + + # Provides information that the event turned out to be legitimate. + LEGITIMATE = 1 + + # Provides information that the event turned out to be fraudulent. + FRAUDULENT = 2 + + # Provides information that the event was related to a login event in which + # the user typed the correct password. Deprecated, prefer indicating + # CORRECT_PASSWORD through the reasons field instead. + PASSWORD_CORRECT = 3 + + # Provides information that the event was related to a login event in which + # the user typed the incorrect password. Deprecated, prefer indicating + # INCORRECT_PASSWORD through the reasons field instead. + PASSWORD_INCORRECT = 4 + end + + # Enum that represents potential reasons for annotating an assessment. + module Reason + # Unspecified reason. Do not use. + REASON_UNSPECIFIED = 0 + + # Indicates that the transaction had a chargeback issued with no other + # details. When possible, specify the type by using CHARGEBACK_FRAUD or + # CHARGEBACK_DISPUTE instead. + CHARGEBACK = 1 + + # Indicates that the transaction had a chargeback issued related to an + # alleged unauthorized transaction from the cardholder's perspective (for + # example, the card number was stolen). + CHARGEBACK_FRAUD = 8 + + # Indicates that the transaction had a chargeback issued related to the + # cardholder having provided their card details but allegedly not being + # satisfied with the purchase (for example, misrepresentation, attempted + # cancellation). + CHARGEBACK_DISPUTE = 9 + + # Indicates that the completed payment transaction was refunded by the + # seller. + REFUND = 10 + + # Indicates that the completed payment transaction was determined to be + # fraudulent by the seller, and was cancelled and refunded as a result. + REFUND_FRAUD = 11 + + # Indicates that the payment transaction was accepted, and the user was + # charged. + TRANSACTION_ACCEPTED = 12 + + # Indicates that the payment transaction was declined, for example due to + # invalid card details. + TRANSACTION_DECLINED = 13 + + # Indicates the transaction associated with the assessment is suspected of + # being fraudulent based on the payment method, billing details, shipping + # address or other transaction information. + PAYMENT_HEURISTICS = 2 + + # Indicates that the user was served a 2FA challenge. An old assessment + # with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been + # overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. + # This is equivalent to `FAILED_TWO_FACTOR`. + INITIATED_TWO_FACTOR = 7 + + # Indicates that the user passed a 2FA challenge. + PASSED_TWO_FACTOR = 3 + + # Indicates that the user failed a 2FA challenge. + FAILED_TWO_FACTOR = 4 + + # Indicates the user provided the correct password. + CORRECT_PASSWORD = 5 + + # Indicates the user provided an incorrect password. + INCORRECT_PASSWORD = 6 + + # Indicates that the user sent unwanted and abusive messages to other users + # of the platform, such as spam, scams, phishing, or social engineering. + SOCIAL_SPAM = 14 + end + end + + # Empty response for AnnotateAssessment. + class AnnotateAssessmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a verification endpoint that can be used for 2FA. + # @!attribute [rw] email_address + # @return [::String] + # Email address for which to trigger a verification request. + # + # Note: The following fields are mutually exclusive: `email_address`, `phone_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] phone_number + # @return [::String] + # Phone number for which to trigger a verification request. Should be given + # in E.164 format. + # + # Note: The following fields are mutually exclusive: `phone_number`, `email_address`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] request_token + # @return [::String] + # Output only. Token to provide to the client to trigger endpoint + # verification. It must be used within 15 minutes. + # @!attribute [r] last_verification_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last successful verification for the + # endpoint, if any. + class EndpointVerificationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about account verification, used for identity verification. + # @!attribute [rw] endpoints + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::EndpointVerificationInfo>] + # Optional. Endpoints that can be used for identity verification. + # @!attribute [rw] language_code + # @return [::String] + # Optional. Language code preference for the verification message, set as a + # IETF BCP 47 language code. + # @!attribute [r] latest_verification_result + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountVerificationInfo::Result] + # Output only. Result of the latest account verification challenge. + # @!attribute [rw] username + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Username of the account that is being verified. Deprecated. Customers + # should now provide the `account_id` field in `event.user_info`. + class AccountVerificationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result of the account verification as contained in the verdict token issued + # at the end of the verification flow. + # Ensure that applications can handle values not explicitly listed. + module Result + # No information about the latest account verification. + RESULT_UNSPECIFIED = 0 + + # The user was successfully verified. This means the account verification + # challenge was successfully completed. + SUCCESS_USER_VERIFIED = 1 + + # The user failed the verification challenge. + ERROR_USER_NOT_VERIFIED = 2 + + # The site is not properly onboarded to use the account verification + # feature. + ERROR_SITE_ONBOARDING_INCOMPLETE = 3 + + # The recipient is not allowed for account verification. This can occur + # during integration but should not occur in production. + ERROR_RECIPIENT_NOT_ALLOWED = 4 + + # The recipient has already been sent too many verification codes in a + # short amount of time. + ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5 + + # The verification flow could not be completed due to a critical internal + # error. + ERROR_CRITICAL_INTERNAL = 6 + + # The client has exceeded their two factor request quota for this period of + # time. + ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7 + + # The request cannot be processed at the time because of an incident. This + # bypass can be restricted to a problematic destination email domain, a + # customer, or could affect the entire service. + ERROR_VERIFICATION_BYPASSED = 8 + + # The request parameters do not match with the token provided and cannot be + # processed. + ERROR_VERDICT_MISMATCH = 9 + end + end + + # Private password leak verification info. + # @!attribute [rw] lookup_hash_prefix + # @return [::String] + # Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + # username. It is used to look up password leaks associated with that hash + # prefix. + # @!attribute [rw] encrypted_user_credentials_hash + # @return [::String] + # Optional. Encrypted Scrypt hash of the canonicalized username+password. It + # is re-encrypted by the server and returned through + # `reencrypted_user_credentials_hash`. + # @!attribute [r] encrypted_leak_match_prefixes + # @return [::Array<::String>] + # Output only. List of prefixes of the encrypted potential password leaks + # that matched the given parameters. They must be compared with the + # client-side decryption prefix of `reencrypted_user_credentials_hash` + # @!attribute [r] reencrypted_user_credentials_hash + # @return [::String] + # Output only. Corresponds to the re-encryption of the + # `encrypted_user_credentials_hash` field. It is used to match potential + # password leaks within `encrypted_leak_match_prefixes`. + class PrivatePasswordLeakVerification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reCAPTCHA Enterprise assessment resource. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name for the Assessment in the format + # `projects/{project}/assessments/{assessment}`. + # @!attribute [rw] event + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Event] + # Optional. The event being assessed. + # @!attribute [r] risk_analysis + # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis] + # Output only. The risk analysis result for the event being assessed. + # @!attribute [r] token_properties + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties] + # Output only. Properties of the provided event token. + # @!attribute [rw] account_verification + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountVerificationInfo] + # Optional. Account verification information for identity verification. The + # assessment event must include a token and site key to use this feature. + # @!attribute [r] account_defender_assessment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment] + # Output only. Assessment returned by Account defense when an account + # identifier is provided. + # @!attribute [rw] private_password_leak_verification + # @return [::Google::Cloud::RecaptchaEnterprise::V1::PrivatePasswordLeakVerification] + # Optional. The private password leak verification field contains the + # parameters that are used to to check for leaks privately without sharing + # user credentials. + # @!attribute [r] firewall_policy_assessment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicyAssessment] + # Output only. Assessment returned when firewall policies belonging to the + # project are evaluated using the field firewall_policy_evaluation. + # @!attribute [r] fraud_prevention_assessment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment] + # Output only. Assessment returned by Fraud Prevention when TransactionData + # is provided. + # @!attribute [r] fraud_signals + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals] + # Output only. Fraud Signals specific to the users involved in a payment + # transaction. + # @!attribute [r] phone_fraud_assessment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::PhoneFraudAssessment] + # Output only. Assessment returned when a site key, a token, and a phone + # number as `user_id` are provided. SMS defense needs to be enabled. + # @!attribute [rw] assessment_environment + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AssessmentEnvironment] + # Optional. The environment creating the assessment. This describes your + # environment (the system invoking CreateAssessment), NOT the environment of + # your user. + # @!attribute [r] policy_evaluation + # @return [::Google::Cloud::RecaptchaEnterprise::V1::PolicyEvaluation] + # Output only. Provides information about the policy evaluation for this + # assessment. + class Assessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The event being assessed. + # @!attribute [rw] token + # @return [::String] + # Optional. The user response token provided by the reCAPTCHA Enterprise + # client-side integration on your site. + # @!attribute [rw] site_key + # @return [::String] + # Optional. The site key that was used to invoke reCAPTCHA Enterprise on your + # site and generate the token. + # @!attribute [rw] user_agent + # @return [::String] + # Optional. The user agent present in the request from the user's device + # related to this event. + # @!attribute [rw] user_ip_address + # @return [::String] + # Optional. The IP address in the request from the user's device related to + # this event. + # @!attribute [rw] expected_action + # @return [::String] + # Optional. The expected action for this type of event. This should be the + # same action provided at token generation time on client-side platforms + # already integrated with recaptcha enterprise. Required for Universal keys. + # @!attribute [rw] hashed_account_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated: use `user_info.account_id` instead. + # Unique stable hashed user identifier for the request. The identifier must + # be hashed using hmac-sha256 with stable secret. + # @!attribute [rw] express + # @return [::Boolean] + # Optional. Flag for a reCAPTCHA express request for an assessment without a + # token. If enabled, `site_key` must reference an Express site key. + # @!attribute [rw] requested_uri + # @return [::String] + # Optional. The URI resource the user requested that triggered an assessment. + # @!attribute [rw] waf_token_assessment + # @return [::Boolean] + # Optional. Flag for running Web Application Firewall (WAF) token assessment. + # If enabled, the token must be specified, and have been created by a + # WAF-enabled key. + # @!attribute [rw] ja3 + # @return [::String] + # Optional. JA3 fingerprint for SSL clients. To learn how to compute this + # fingerprint, please refer to https://github.com/salesforce/ja3. + # @!attribute [rw] ja4 + # @return [::String] + # Optional. JA4 fingerprint for SSL clients. To learn how to compute this + # fingerprint, please refer to https://github.com/FoxIO-LLC/ja4. + # @!attribute [rw] headers + # @return [::Array<::String>] + # Optional. HTTP header information about the request. + # @!attribute [rw] firewall_policy_evaluation + # @return [::Boolean] + # Optional. Flag for enabling firewall policy config assessment. + # If this flag is enabled, the firewall policy is evaluated and a + # suggested firewall action is returned in the response. + # @!attribute [rw] transaction_data + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData] + # Optional. Data describing a payment transaction to be assessed. Sending + # this data enables reCAPTCHA Enterprise Fraud Prevention and the + # FraudPreventionAssessment component in the response. + # @!attribute [rw] user_info + # @return [::Google::Cloud::RecaptchaEnterprise::V1::UserInfo] + # Optional. Information about the user that generates this event, when they + # can be identified. They are often identified through the use of an account + # for logged-in requests or login/registration requests, or by providing user + # identifiers for guest actions like checkout. + # @!attribute [rw] fraud_prevention + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Event::FraudPrevention] + # Optional. The Fraud Prevention setting for this assessment. + class Event + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setting that controls Fraud Prevention assessments. + # Ensure that applications can handle values not explicitly listed. + module FraudPrevention + # Default, unspecified setting. `fraud_prevention_assessment` is returned + # if `transaction_data` is present in `Event` and Fraud Prevention is + # enabled in the Google Cloud console. + FRAUD_PREVENTION_UNSPECIFIED = 0 + + # Enable Fraud Prevention for this assessment, if Fraud Prevention is + # enabled in the Google Cloud console. + ENABLED = 1 + + # Disable Fraud Prevention for this assessment, regardless of the Google + # Cloud console settings. + DISABLED = 2 + end + end + + # Transaction data associated with a payment protected by reCAPTCHA Enterprise. + # @!attribute [rw] transaction_id + # @return [::String] + # Unique identifier for the transaction. This custom identifier can be used + # to reference this transaction in the future, for example, labeling a refund + # or chargeback event. Two attempts at the same transaction should use the + # same transaction id. + # @!attribute [rw] payment_method + # @return [::String] + # Optional. The payment method for the transaction. The allowed values are: + # + # * credit-card + # * debit-card + # * gift-card + # * processor-\\{name} (If a third-party is used, for example, + # processor-paypal) + # * custom-\\{name} (If an alternative method is used, for example, + # custom-crypto) + # @!attribute [rw] card_bin + # @return [::String] + # Optional. The Bank Identification Number - generally the first 6 or 8 + # digits of the card. + # @!attribute [rw] card_last_four + # @return [::String] + # Optional. The last four digits of the card. + # @!attribute [rw] currency_code + # @return [::String] + # Optional. The currency code in ISO-4217 format. + # @!attribute [rw] value + # @return [::Float] + # Optional. The decimal value of the transaction in the specified currency. + # @!attribute [rw] shipping_value + # @return [::Float] + # Optional. The value of shipping in the specified currency. 0 for free or no + # shipping. + # @!attribute [rw] shipping_address + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Address] + # Optional. Destination address if this transaction involves shipping a + # physical item. + # @!attribute [rw] billing_address + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Address] + # Optional. Address associated with the payment method when applicable. + # @!attribute [rw] user + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::User] + # Optional. Information about the user paying/initiating the transaction. + # @!attribute [rw] merchants + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::User>] + # Optional. Information about the user or users fulfilling the transaction. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Item>] + # Optional. Items purchased in this transaction. + # @!attribute [rw] gateway_info + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::GatewayInfo] + # Optional. Information about the payment gateway's response to the + # transaction. + class TransactionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Structured address format for billing and shipping addresses. + # @!attribute [rw] recipient + # @return [::String] + # Optional. The recipient name, potentially including information such as + # "care of". + # @!attribute [rw] address + # @return [::Array<::String>] + # Optional. The first lines of the address. The first line generally + # contains the street name and number, and further lines may include + # information such as an apartment number. + # @!attribute [rw] locality + # @return [::String] + # Optional. The town/city of the address. + # @!attribute [rw] administrative_area + # @return [::String] + # Optional. The state, province, or otherwise administrative area of the + # address. + # @!attribute [rw] region_code + # @return [::String] + # Optional. The CLDR country/region of the address. + # @!attribute [rw] postal_code + # @return [::String] + # Optional. The postal or ZIP code of the address. + class Address + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about a user's account involved in the transaction. + # @!attribute [rw] account_id + # @return [::String] + # Optional. Unique account identifier for this user. If using Account + # defense, this should match the hashed_account_id field. Otherwise, a + # unique and persistent identifier for this account. + # @!attribute [rw] creation_ms + # @return [::Integer] + # Optional. The epoch milliseconds of the user's account creation. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address of the user. + # @!attribute [rw] email_verified + # @return [::Boolean] + # Optional. Whether the email has been verified to be accessible by the + # user (OTP or similar). + # @!attribute [rw] phone_number + # @return [::String] + # Optional. The phone number of the user, with country code. + # @!attribute [rw] phone_verified + # @return [::Boolean] + # Optional. Whether the phone number has been verified to be accessible by + # the user (OTP or similar). + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Line items being purchased in this transaction. + # @!attribute [rw] name + # @return [::String] + # Optional. The full name of the item. + # @!attribute [rw] value + # @return [::Float] + # Optional. The value per item that the user is paying, in the transaction + # currency, after discounts. + # @!attribute [rw] quantity + # @return [::Integer] + # Optional. The quantity of this item that is being purchased. + # @!attribute [rw] merchant_account_id + # @return [::String] + # Optional. When a merchant is specified, its corresponding account_id. + # Necessary to populate marketplace-style transactions. + class Item + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the transaction from the gateway. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the gateway service (for example, stripe, square, + # paypal). + # @!attribute [rw] gateway_response_code + # @return [::String] + # Optional. Gateway response code describing the state of the transaction. + # @!attribute [rw] avs_response_code + # @return [::String] + # Optional. AVS response code from the gateway + # (available only when reCAPTCHA Enterprise is called after authorization). + # @!attribute [rw] cvv_response_code + # @return [::String] + # Optional. CVV response code from the gateway + # (available only when reCAPTCHA Enterprise is called after authorization). + class GatewayInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User information associated with a request protected by reCAPTCHA Enterprise. + # @!attribute [rw] create_account_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Creation time for this account associated with this user. Leave + # blank for non logged-in actions, guest checkout, or when there is no + # account associated with the current user. + # @!attribute [rw] account_id + # @return [::String] + # Optional. For logged-in requests or login/registration requests, the unique + # account identifier associated with this user. You can use the username if + # it is stable (meaning it is the same for every request associated with the + # same user), or any stable user ID of your choice. Leave blank for non + # logged-in actions or guest checkout. + # @!attribute [rw] user_ids + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::UserId>] + # Optional. Identifiers associated with this user or request. + class UserInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An identifier associated with a user. + # @!attribute [rw] email + # @return [::String] + # Optional. An email address. + # + # Note: The following fields are mutually exclusive: `email`, `phone_number`, `username`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] phone_number + # @return [::String] + # Optional. A phone number. Should use the E.164 format. + # + # Note: The following fields are mutually exclusive: `phone_number`, `email`, `username`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] username + # @return [::String] + # Optional. A unique username, if different from all the other identifiers + # and `account_id` that are provided. Can be a unique login handle or + # display name for a user. + # + # Note: The following fields are mutually exclusive: `username`, `email`, `phone_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class UserId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Risk analysis result for an event. + # @!attribute [r] score + # @return [::Float] + # Output only. Legitimate event score from 0.0 to 1.0. + # (1.0 means very likely legitimate traffic while 0.0 means very likely + # non-legitimate traffic). + # @!attribute [r] reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::ClassificationReason>] + # Output only. Reasons contributing to the risk analysis verdict. + # @!attribute [r] extended_verdict_reasons + # @return [::Array<::String>] + # Output only. Additional reasons contributing to the risk analysis verdict. + # These reasons are available to Enterprise tier projects only. Contact sales + # for more information. + # The set of reasons is subject to change. + # @!attribute [r] last_challenge_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeType] + # Output only. Type of the last challenge presented to the user for + # Universal, `POLICY_BASED_CHALLENGE` and `INVISIBLE` keys. The field is only + # set when a challenge was presented to the user. + # @!attribute [r] challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::Challenge] + # Output only. Challenge information for Universal, `POLICY_BASED_CHALLENGE` + # and `INVISIBLE` keys. + # @!attribute [r] verified_bots + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Bot>] + # Output only. Bots with identities that have been verified by reCAPTCHA and + # detected in the event. + class RiskAnalysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reasons contributing to the risk analysis verdict. + # Ensure that applications can handle values not explicitly listed. + module ClassificationReason + # Default unspecified type. + CLASSIFICATION_REASON_UNSPECIFIED = 0 + + # Interactions matched the behavior of an automated agent. + AUTOMATION = 1 + + # The event originated from an illegitimate environment. + UNEXPECTED_ENVIRONMENT = 2 + + # Traffic volume from the event source is higher than normal. + TOO_MUCH_TRAFFIC = 3 + + # Interactions with the site were significantly different than expected + # patterns. + UNEXPECTED_USAGE_PATTERNS = 4 + + # Too little traffic has been received from this site thus far to generate + # quality risk analysis. + LOW_CONFIDENCE_SCORE = 5 + + # Deprecated: Use + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} + # and + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::EXCESSIVE_ENUMERATION_PATTERN FraudPreventionAssessment.RiskReason.Reason.EXCESSIVE_ENUMERATION_PATTERN} + # instead. + SUSPECTED_CARDING = 6 + + # Deprecated: Use + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} + # and + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::ASSOCIATED_WITH_FRAUD_CLUSTER FraudPreventionAssessment.RiskReason.Reason.ASSOCIATED_WITH_FRAUD_CLUSTER} + # instead. + SUSPECTED_CHARGEBACK = 7 + end + + # Challenge information for Universal, `POLICY_BASED_CHALLENGE` and + # `INVISIBLE` keys. Ensure that applications can handle values not explicitly + # listed. + module Challenge + # Default unspecified type. + CHALLENGE_UNSPECIFIED = 0 + + # No challenge was presented for solving. + NOCAPTCHA = 1 + + # A solution was submitted that was correct. + PASSED = 2 + + # A solution was submitted that was incorrect or otherwise + # deemed suspicious. + FAILED = 3 + end + end + + # Bot information and metadata. + # @!attribute [rw] name + # @return [::String] + # Optional. Enumerated string value that indicates the identity of the bot, + # formatted in kebab-case. Current example values include the following: + # + # * google-agent - AI_AGENT + # * browser-base - AI_AGENT + # * chat-gpt - AI_AGENT + # * aws-bedrock - AI_AGENT + # * cybaa-bot - AI_AGENT + # * cloudflare - AI_AGENT + # * payhawk - AI_AGENT + # * duck-duck-go - SEARCH_INDEXER + # * mediaboard - CONTENT_SCRAPER + # * marker-io - AI_AGENT + # * broadcom - AI_AGENT + # * anchor-browser - AI_AGENT + # * shopify - AI_AGENT + # * stackscope - CONTENT_SCRAPER + # * manus - AI_AGENT + # * kernel-sh - AI_AGENT + # * zvelo - SEARCH_INDEXER + # + # Ensure that your applications can handle identifier values not explicitly + # listed here. Deprecated values might take some time to stop showing + # up in responses. New values can be pushed so this list should be taken + # as non exhaustive. + # @!attribute [rw] bot_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Bot::BotType] + # Optional. Enumerated field representing the type of bot. + class Bot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of bots. + # Ensure that applications can handle values not explicitly listed. + module BotType + # Default unspecified type. + BOT_TYPE_UNSPECIFIED = 0 + + # Software program that interacts with a site and performs tasks + # autonomously. + AI_AGENT = 1 + + # Software that extracts specific data from sites for use. + CONTENT_SCRAPER = 2 + + # Software that crawls sites and stores content for the purpose of + # efficient retrieval, likely as part of a search engine. + SEARCH_INDEXER = 3 + end + end + + # Properties of the provided event token. + # @!attribute [r] valid + # @return [::Boolean] + # Output only. Indicates whether the provided user response token is valid. + # If `false`, the token is invalid, either because the user failed the + # challenge or for a reason provided in the `invalid_reason` field. + # @!attribute [r] invalid_reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason] + # Output only. Reason associated with the response when valid = false. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp corresponding to the generation of the token. + # @!attribute [r] hostname + # @return [::String] + # Output only. The hostname of the page on which the token was generated (Web + # keys only). + # @!attribute [r] android_package_name + # @return [::String] + # Output only. The name of the Android package with which the token was + # generated (Android keys only). + # @!attribute [r] ios_bundle_id + # @return [::String] + # Output only. The ID of the iOS bundle with which the token was generated + # (iOS keys only). + # @!attribute [r] action + # @return [::String] + # Output only. Action name provided at token generation. + class TokenProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents the types of invalid token reasons. + # Ensure that applications can handle values not explicitly listed. + module InvalidReason + # Default unspecified type. + INVALID_REASON_UNSPECIFIED = 0 + + # If the failure reason was not accounted for. + UNKNOWN_INVALID_REASON = 1 + + # The provided user verification token was malformed. + MALFORMED = 2 + + # The user verification token had expired. + EXPIRED = 3 + + # The user verification had already been seen. + DUPE = 4 + + # The user verification token was not present. + MISSING = 5 + + # A retriable error (such as network failure) occurred on the browser. + # Could easily be simulated by an attacker. + BROWSER_ERROR = 6 + + # The action provided at token generation was different than + # the `expected_action` in the assessment request. The comparison is + # case-insensitive. This reason can only be returned if all of the + # following are true: + # + # - your `site_key` has the POLICY_BASED_CHALLENGE integration type + # - you set an action score threshold higher than 0.0 + # - you provided a non-empty `expected_action` + UNEXPECTED_ACTION = 7 + + # The key used to generate the token does not match the `site_key`. + KEY_MISMATCH = 8 + + # The domain of the page on which the token was generated does not match + # the `allowed_domains` configured in the `site_key`. + DOMAIN_MISMATCH = 9 + end + end + + # Assessment for Fraud Prevention. + # @!attribute [r] transaction_risk + # @return [::Float] + # Output only. Probability of this transaction being fraudulent. Summarizes + # the combined risk of attack vectors below. Values are from 0.0 (lowest) + # to 1.0 (highest). + # @!attribute [r] risk_reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason>] + # Output only. Reasons why the transaction is probably fraudulent and + # received a high transaction risk score. + # @!attribute [r] stolen_instrument_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::StolenInstrumentVerdict] + # Output only. Assessment of this transaction for risk of a stolen + # instrument. + # @!attribute [r] card_testing_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::CardTestingVerdict] + # Output only. Assessment of this transaction for risk of being part of a + # card testing attack. + # @!attribute [r] behavioral_trust_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::BehavioralTrustVerdict] + # Output only. Assessment of this transaction for behavioral trust. + class FraudPreventionAssessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Risk reasons applicable to the Fraud Prevention assessment. + # @!attribute [r] reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason] + # Output only. Risk reasons applicable to the Fraud Prevention assessment. + class RiskReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Risk reasons applicable to the Fraud Prevention assessment. New risk + # reasons will be added over time. + module Reason + # Default unspecified type. + REASON_UNSPECIFIED = 0 + + # A suspiciously high number of recent transactions have used identifiers + # present in this transaction. + HIGH_TRANSACTION_VELOCITY = 1 + + # User is cycling through a suspiciously large number of identifiers, + # suggesting enumeration or validation attacks within a potential fraud + # network. + EXCESSIVE_ENUMERATION_PATTERN = 2 + + # User has a short history or no history in the reCAPTCHA network, + # suggesting the possibility of synthetic identity generation. + SHORT_IDENTITY_HISTORY = 3 + + # Identifiers used in this transaction originate from an unusual or + # conflicting set of geolocations. + GEOLOCATION_DISCREPANCY = 4 + + # This transaction is linked to a cluster of known fraudulent activity. + ASSOCIATED_WITH_FRAUD_CLUSTER = 5 + end + end + + # Information about stolen instrument fraud, where the user is not the + # legitimate owner of the instrument being used for the purchase. + # @!attribute [r] risk + # @return [::Float] + # Output only. Probability of this transaction being executed with a stolen + # instrument. Values are from 0.0 (lowest) to 1.0 (highest). + class StolenInstrumentVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about card testing fraud, where an adversary is testing + # fraudulently obtained cards or brute forcing their details. + # @!attribute [r] risk + # @return [::Float] + # Output only. Probability of this transaction attempt being part of a card + # testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + class CardTestingVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about behavioral trust of the transaction. + # @!attribute [r] trust + # @return [::Float] + # Output only. Probability of this transaction attempt being executed in a + # behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 + # (highest). + class BehavioralTrustVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Fraud signals describing users and cards involved in the transaction. + # @!attribute [r] user_signals + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::UserSignals] + # Output only. Signals describing the end user in this transaction. + # @!attribute [r] card_signals + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::CardSignals] + # Output only. Signals describing the payment card or cards used in this + # transaction. + class FraudSignals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Signals describing the user involved in this transaction. + # @!attribute [r] active_days_lower_bound + # @return [::Integer] + # Output only. This user (based on email, phone, and other identifiers) has + # been seen on the internet for at least this number of days. + # @!attribute [r] synthetic_risk + # @return [::Float] + # Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic + # components in their identity, such as a randomly generated email address, + # temporary phone number, or fake shipping address. + class UserSignals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Signals describing the payment card used in this transaction. + # @!attribute [r] card_labels + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::CardSignals::CardLabel>] + # Output only. The labels for the payment card in this transaction. + class CardSignals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Risk labels describing the card being assessed, such as its funding + # mechanism. + # Ensure that applications can handle values not explicitly listed. + module CardLabel + # No label specified. + CARD_LABEL_UNSPECIFIED = 0 + + # This card has been detected as prepaid. + PREPAID = 1 + + # This card has been detected as virtual, such as a card number generated + # for a single transaction or merchant. + VIRTUAL = 2 + + # This card has been detected as being used in an unexpected geographic + # location. + UNEXPECTED_LOCATION = 3 + end + end + end + + # Information about SMS toll fraud. + # @!attribute [r] risk + # @return [::Float] + # Output only. Probability of an SMS event being fraudulent. + # Values are from 0.0 (lowest) to 1.0 (highest). + # @!attribute [r] reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::SmsTollFraudVerdict::SmsTollFraudReason>] + # Output only. Reasons contributing to the SMS toll fraud verdict. + class SmsTollFraudVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reasons contributing to the SMS toll fraud verdict. + # Ensure that applications can handle values not explicitly listed. + module SmsTollFraudReason + # Default unspecified reason + SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0 + + # The provided phone number was invalid + INVALID_PHONE_NUMBER = 1 + end + end + + # Assessment for Phone Fraud + # @!attribute [r] sms_toll_fraud_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::SmsTollFraudVerdict] + # Output only. Assessment of this phone event for risk of SMS toll fraud. + class PhoneFraudAssessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Account defense risk assessment. + # @!attribute [r] labels + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountDefenderLabel>] + # Output only. Labels for this request. + # @!attribute [r] account_takeover_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTakeoverVerdict] + # Output only. Account takeover risk assessment for this request. + class AccountDefenderAssessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Account takeover risk assessment. + # @!attribute [r] risk + # @return [::Float] + # Output only. Account takeover attempt probability. + # Values are from 0.0 (lowest risk) to 1.0 (highest risk). + # @!attribute [r] risk_reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason>] + # Output only. Unordered list. Reasons why the request appears risky. Risk + # reasons can be returned even if the risk is low, as trustworthy requests + # can still have some risk signals. + # @!attribute [r] trust_reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason>] + # Output only. Unordered list. Reasons why the request appears trustworthy. + # Trust reasons can be returned even if the risk is high, as risky requests + # can still have some trust signals. + class AccountTakeoverVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Risk explainability reasons for Account defense. + # @!attribute [r] reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason::RiskReason] + # Output only. A risk reason associated with this request. + class AccountRiskReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Risk explainability reasons for Account defense. + # Ensure that applications can handle values not explicitly listed. + module RiskReason + # Default unspecified type. + RISK_REASON_UNSPECIFIED = 0 + + # The client has been observed sending bot-like traffic to this site in + # the past. This reason incorporates historical reputation and indicates + # that the client is known to use bots, even if the current request is + # being made by a human. + CLIENT_HISTORICAL_BOT_ACTIVITY = 1 + + # The account is part of a large group of related accounts, indicating + # that it may be part of a fraudulent network. Related accounts are + # identified based on having similar traffic patterns and request + # characteristics. + ACCOUNT_IN_LARGE_RELATED_GROUP = 2 + + # The client has been observed accessing many accounts on this site. + CLIENT_ACCESSED_MANY_ACCOUNTS = 3 + + # This email domain is a suspected provider of disposable email + # addresses. + DISPOSABLE_EMAIL_DOMAIN = 4 + end + end + + # Trust explainability reasons for Account defense. + # @!attribute [r] reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason::TrustReason] + # Output only. A trust reason associated with this request. + class AccountTrustReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Trust explainability reasons for Account defense. + # Ensure that applications can handle values not explicitly listed. + module TrustReason + # Default unspecified type. + TRUST_REASON_UNSPECIFIED = 0 + + # The request matches a trusted profile associated with this account. + # Equivalent to `AccountDefenderLabel.PROFILE_MATCH`. + PROFILE_MATCH = 1 + + # The account's historical activity is reputable. It is unlikely that the + # account has been compromised in the past. + ACCOUNT_HISTORY_REPUTABLE = 2 + + # The identity shows a global pattern of reputable activity based on + # `userInfo` and associated identifiers. + IDENTITY_GLOBAL_ACTIVITY_REPUTABLE = 3 + + # The identity shows a long-standing history of reputable activity based + # on `userInfo` and associated identifiers. + IDENTITY_HISTORY_REPUTABLE = 4 + end + end + + # Labels returned by Account defense for this request. + # Ensure that applications can handle values not explicitly listed. + module AccountDefenderLabel + # Default unspecified type. + ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0 + + # The request matches a trusted profile associated with this account. + PROFILE_MATCH = 1 + + # The request is potentially a suspicious login event and must be further + # verified either through multi-factor authentication or another system. + SUSPICIOUS_LOGIN_ACTIVITY = 2 + + # The request matched a profile that previously had suspicious account + # creation behavior. This can mean that this is a fake account. + SUSPICIOUS_ACCOUNT_CREATION = 3 + + # The account in the request has a high number of related accounts. It does + # not necessarily imply that the account is bad but can require further + # investigation. + RELATED_ACCOUNTS_NUMBER_HIGH = 4 + end + end + + # The create key request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project in which the key is created, in the + # format `projects/{project}`. + # @!attribute [rw] key + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # Required. Information to create a reCAPTCHA Enterprise key. + class CreateKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The list keys request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project that contains the keys that is + # listed, in the format `projects/{project}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of keys to return. Default is 10. Max limit is + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous. + # ListKeysRequest, if any. + class ListKeysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to request to list keys in a project. + # @!attribute [rw] keys + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Key>] + # Key details. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. It is set to empty if no keys + # remain in results. + class ListKeysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The retrieve legacy secret key request message. + # @!attribute [rw] key + # @return [::String] + # Required. The public key name linked to the requested secret key in the + # format `projects/{project}/keys/{key}`. + class RetrieveLegacySecretKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The get key request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested key, in the format + # `projects/{project}/keys/{key}`. + class GetKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The update key request message. + # @!attribute [rw] key + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] + # Required. The key to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The mask to control which fields of the key get updated. If the + # mask is not present, all fields are updated. + class UpdateKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The delete key request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the key to be deleted, in the format + # `projects/{project}/keys/{key}`. + class DeleteKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The create firewall policy request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project this policy applies to, in the format + # `projects/{project}`. + # @!attribute [rw] firewall_policy + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # Required. Information to create the policy. + class CreateFirewallPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The list firewall policies request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to list the policies for, in the format + # `projects/{project}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of policies to return. Default is 10. Max + # limit is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous. + # ListFirewallPoliciesRequest, if any. + class ListFirewallPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to request to list firewall policies belonging to a project. + # @!attribute [rw] firewall_policies + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] + # Policy details. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. It is set to empty if no + # policies remain in results. + class ListFirewallPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The get firewall policy request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested policy, in the format + # `projects/{project}/firewallpolicies/{firewallpolicy}`. + class GetFirewallPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The update firewall policy request message. + # @!attribute [rw] firewall_policy + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # Required. The policy to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + class UpdateFirewallPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The delete firewall policy request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy to be deleted, in the format + # `projects/{project}/firewallpolicies/{firewallpolicy}`. + class DeleteFirewallPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The reorder firewall policies request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to list the policies for, in the format + # `projects/{project}`. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. A list containing all policy names, in the new order. Each name + # is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + class ReorderFirewallPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The reorder firewall policies response message. + class ReorderFirewallPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The migrate key request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the key to be migrated, in the format + # `projects/{project}/keys/{key}`. + # @!attribute [rw] skip_billing_check + # @return [::Boolean] + # Optional. If true, skips the billing check. + # A reCAPTCHA Enterprise key or migrated key behaves differently than a + # reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see + # https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid + # any disruption of your usage, we check that a billing account is present. + # If your usage of reCAPTCHA is under the free quota, you can safely skip the + # billing check and proceed with the migration. See + # https://cloud.google.com/recaptcha/docs/billing-information. + class MigrateKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The get metrics request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested metrics, in the format + # `projects/{project}/keys/{key}/metrics`. + class GetMetricsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metrics for a single Key. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the metrics, in the format + # `projects/{project}/keys/{key}/metrics`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) + # timezone. + # @!attribute [rw] score_metrics + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ScoreMetrics>] + # Metrics are continuous and in order by dates, and in the granularity + # of day. All Key types should have score-based data. + # @!attribute [rw] challenge_metrics + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeMetrics>] + # Metrics are continuous and in order by dates, and in the granularity + # of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + # challenge-based data. + class Metrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party + # integration with legacy reCAPTCHA. + # @!attribute [rw] legacy_secret_key + # @return [::String] + # The secret key (also known as shared secret) authorizes communication + # between your application backend and the reCAPTCHA Enterprise server to + # create an assessment. + # The secret key needs to be kept safe for security purposes. + class RetrieveLegacySecretKeyResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A key used to identify and configure applications (web and/or mobile) that + # use reCAPTCHA Enterprise. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for the Key in the format + # `projects/{project}/keys/{key}`. + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of this key. Modifiable by user. + # @!attribute [rw] web_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings] + # Settings for keys that can be used by websites. + # + # Note: The following fields are mutually exclusive: `web_settings`, `android_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] android_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings] + # Settings for keys that can be used by Android apps. + # + # Note: The following fields are mutually exclusive: `android_settings`, `web_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ios_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings] + # Settings for keys that can be used by iOS apps. + # + # Note: The following fields are mutually exclusive: `ios_settings`, `web_settings`, `android_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] express_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ExpressKeySettings] + # Settings for keys that can be used by reCAPTCHA Express. + # + # Note: The following fields are mutually exclusive: `express_settings`, `web_settings`, `android_settings`, `ios_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] universal_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::UniversalKeySettings] + # Settings for keys that are configured through their Policy. + # + # Note: The following fields are mutually exclusive: `universal_settings`, `web_settings`, `android_settings`, `ios_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. See [Creating and managing labels] + # (https://cloud.google.com/recaptcha/docs/labels). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp corresponding to the creation of this key. + # @!attribute [rw] testing_options + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TestingOptions] + # Optional. Options for user acceptance testing. + # @!attribute [rw] waf_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings] + # Optional. Settings for Web Application Firewall (WAF). + class Key + 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 + + # Options for user acceptance testing. + # @!attribute [rw] testing_score + # @return [::Float] + # Optional. All assessments for this Key return this score. Must be between 0 + # (likely not legitimate) and 1 (likely legitimate) inclusive. + # @!attribute [rw] testing_challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::TestingOptions::TestingChallenge] + # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + # challenge requests for this site return nocaptcha if NOCAPTCHA, or an + # unsolvable challenge if CHALLENGE. + class TestingOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents the challenge option for challenge-based (for example, + # CHECKBOX and INVISIBLE) testing keys. + # Ensure that applications can handle values not explicitly listed. + module TestingChallenge + # Perform the normal risk analysis and return either nocaptcha or a + # challenge depending on risk and trust factors. + TESTING_CHALLENGE_UNSPECIFIED = 0 + + # Challenge requests for this key always return a nocaptcha, which + # does not require a solution. + NOCAPTCHA = 1 + + # Challenge requests for this key always return an unsolvable + # challenge. + UNSOLVABLE_CHALLENGE = 2 + end + end + + # Settings specific to keys that can be used by websites. + # @!attribute [rw] allow_all_domains + # @return [::Boolean] + # Optional. If set to true, it means allowed_domains are not enforced. + # @!attribute [rw] allowed_domains + # @return [::Array<::String>] + # Optional. Domains or subdomains of websites allowed to use the key. All + # subdomains of an allowed domain are automatically allowed. A valid domain + # requires a host and must not include any path, port, query or fragment. + # Examples: 'example.com' or 'subdomain.example.com' + # Each key supports a maximum of 250 domains. To use a key on more domains, + # set `allow_all_domains` to true. When this is set, you are responsible for + # validating the hostname by checking the `token_properties.hostname` field + # in each assessment response against your list of allowed domains. + # @!attribute [rw] allow_amp_traffic + # @return [::Boolean] + # Optional. If set to true, the key can be used on AMP (Accelerated Mobile + # Pages) websites. This is supported only for the SCORE integration type. + # @!attribute [rw] integration_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::IntegrationType] + # Required. Describes how this key is integrated with the website. + # @!attribute [rw] challenge_security_preference + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference] + # Optional. Settings for the frequency and difficulty at which this key + # triggers captcha challenges. This should only be specified for + # `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE. + # @!attribute [rw] challenge_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSettings] + # Optional. Challenge settings. + class WebKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Per-action challenge settings. + # @!attribute [rw] score_threshold + # @return [::Float] + # Required. A challenge is triggered if the end-user score is below that + # threshold. Value must be between 0 and 1 (inclusive). + class ActionSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is + # triggered. + # @!attribute [rw] default_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings] + # Required. Defines when a challenge is triggered (unless the default + # threshold is overridden for the given action, see `action_settings`). + # @!attribute [rw] action_settings + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings}] + # Optional. The action to score threshold map. + # The action name should be the same as the action name passed in the + # `data-action` attribute + # (see https://cloud.google.com/recaptcha/docs/actions-website). + # Action names are case-insensitive. + # There is a maximum of 100 action settings. + # An action name has a maximum length of 100. + class ChallengeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings] + class ActionSettingsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Enum that represents the integration types for web keys. + # Ensure that applications can handle values not explicitly listed. + module IntegrationType + # Default type that indicates this enum hasn't been specified. This is not + # a valid IntegrationType, one of the other types must be specified + # instead. + INTEGRATION_TYPE_UNSPECIFIED = 0 + + # Only used to produce scores. It doesn't display the "I'm not a robot" + # checkbox and never shows captcha challenges. + SCORE = 1 + + # Displays the "I'm not a robot" checkbox and may show captcha challenges + # after it is checked. + CHECKBOX = 2 + + # Doesn't display the "I'm not a robot" checkbox, but may show captcha + # challenges after risk analysis. + INVISIBLE = 3 + + # Displays a visual challenge or not depending on the user risk analysis + # score. + POLICY_BASED_CHALLENGE = 5 + end + + # Enum that represents the possible challenge frequency and difficulty + # configurations for a web key. + # Ensure that applications can handle values not explicitly listed. + module ChallengeSecurityPreference + # Default type that indicates this enum hasn't been specified. + CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0 + + # Key tends to show fewer and easier challenges. + USABILITY = 1 + + # Key tends to show balanced (in amount and difficulty) challenges. + BALANCE = 2 + + # Key tends to show more and harder challenges. + SECURITY = 3 + end + end + + # Settings specific to keys that can be used by Android apps. + # @!attribute [rw] allow_all_package_names + # @return [::Boolean] + # Optional. If set to true, allowed_package_names are not enforced. + # @!attribute [rw] allowed_package_names + # @return [::Array<::String>] + # Optional. Android package names of apps allowed to use the key. + # Example: 'com.companyname.appname' + # Each key supports a maximum of 250 package names. To use a key on more + # apps, set `allow_all_package_names` to true. When this is set, you + # are responsible for validating the package name by checking the + # `token_properties.android_package_name` field in each assessment response + # against your list of allowed package names. + # @!attribute [rw] support_non_google_app_store_distribution + # @return [::Boolean] + # Optional. Set to true for keys that are used in an Android application that + # is available for download in app stores in addition to the Google Play + # Store. + class AndroidKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to keys that can be used by iOS apps. + # @!attribute [rw] allow_all_bundle_ids + # @return [::Boolean] + # Optional. If set to true, allowed_bundle_ids are not enforced. + # @!attribute [rw] allowed_bundle_ids + # @return [::Array<::String>] + # Optional. iOS bundle IDs of apps allowed to use the key. + # Example: 'com.companyname.productname.appname' + # Each key supports a maximum of 250 bundle IDs. To use a key on more + # apps, set `allow_all_bundle_ids` to true. When this is set, you + # are responsible for validating the bundle id by checking the + # `token_properties.ios_bundle_id` field in each assessment response + # against your list of allowed bundle IDs. + # @!attribute [rw] apple_developer_id + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AppleDeveloperId] + # Optional. Apple Developer account details for the app that is protected by + # the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple + # App Attest and Apple DeviceCheck to protect your app from abuse. Providing + # these fields allows reCAPTCHA to get a better assessment of the integrity + # of your app. + class IOSKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to keys that can be used for reCAPTCHA Express. + class ExpressKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for keys that are configured through their Policy. + class UniversalKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains fields that are required to perform Apple-specific integrity checks. + # @!attribute [rw] private_key + # @return [::String] + # Required. Input only. A private key (downloaded as a text file with a .p8 + # file extension) generated for your Apple Developer account. Ensure that + # Apple DeviceCheck is enabled for the private key. + # @!attribute [rw] key_id + # @return [::String] + # Required. The Apple developer key ID (10-character string). + # @!attribute [rw] team_id + # @return [::String] + # Required. The Apple team ID (10-character string) owning the provisioning + # profile used to build your application. + class AppleDeveloperId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Score distribution. + # @!attribute [rw] score_buckets + # @return [::Google::Protobuf::Map{::Integer => ::Integer}] + # Map key is score value multiplied by 100. The scores are discrete values + # between [0, 1]. The maximum number of buckets is on order of a few dozen, + # but typically much lower (ie. 10). + class ScoreDistribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::Integer] + # @!attribute [rw] value + # @return [::Integer] + class ScoreBucketsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metrics related to scoring. + # @!attribute [rw] overall_metrics + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution] + # Aggregated score metrics for all traffic. + # @!attribute [rw] action_metrics + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution}] + # Action-based metrics. The map key is the action name which specified by the + # site owners at time of the "execute" client-side call. + class ScoreMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution] + class ActionMetricsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metrics related to challenges. + # @!attribute [rw] pageload_count + # @return [::Integer] + # Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent + # to a count of pageloads for pages that include reCAPTCHA. + # @!attribute [rw] nocaptcha_count + # @return [::Integer] + # Count of nocaptchas (successful verification without a challenge) issued. + # @!attribute [rw] failed_count + # @return [::Integer] + # Count of submitted challenge solutions that were incorrect or otherwise + # deemed suspicious such that a subsequent challenge was triggered. + # @!attribute [rw] passed_count + # @return [::Integer] + # Count of nocaptchas (successful verification without a challenge) plus + # submitted challenge solutions that were correct and resulted in + # verification. + class ChallengeMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Policy config assessment. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. If the processing of a policy config fails, an error is + # populated and the firewall_policy is left empty. + # @!attribute [r] firewall_policy + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] + # Output only. The policy that matched the request. If more than one policy + # may match, this is the first match. If no policy matches the incoming + # request, the policy field is left empty. + class FirewallPolicyAssessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An individual action. Each action represents what to do if a policy + # matches. + # @!attribute [rw] allow + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction] + # The user request did not match any policy and should be allowed + # access to the requested resource. + # + # Note: The following fields are mutually exclusive: `allow`, `block`, `include_recaptcha_script`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] block + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction] + # This action denies access to a given page. The user gets an HTTP + # error code. + # + # Note: The following fields are mutually exclusive: `block`, `allow`, `include_recaptcha_script`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] include_recaptcha_script + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction] + # This action injects reCAPTCHA JavaScript code into the HTML page + # returned by the site backend. + # + # Note: The following fields are mutually exclusive: `include_recaptcha_script`, `allow`, `block`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redirect + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction] + # This action redirects the request to a reCAPTCHA interstitial to + # attach a token. + # + # Note: The following fields are mutually exclusive: `redirect`, `allow`, `block`, `include_recaptcha_script`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] substitute + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction] + # This action transparently serves a different page to an offending + # user. + # + # Note: The following fields are mutually exclusive: `substitute`, `allow`, `block`, `include_recaptcha_script`, `redirect`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] set_header + # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction] + # This action sets a custom header but allow the request to continue + # to the customer backend. + # + # Note: The following fields are mutually exclusive: `set_header`, `allow`, `block`, `include_recaptcha_script`, `redirect`, `substitute`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class FirewallAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An allow action continues processing a request unimpeded. + class AllowAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A block action serves an HTTP error code a prevents the request from + # hitting the backend. + class BlockAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript + # code into the HTML returned by the site backend. This reCAPTCHA + # script is tasked with collecting user signals on the requested web page, + # issuing tokens as a cookie within the site domain, and enabling their + # utilization in subsequent page requests. + class IncludeRecaptchaScriptAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A redirect action returns a 307 (temporary redirect) response, pointing + # the user to a reCAPTCHA interstitial page to attach a token. + class RedirectAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A substitute action transparently serves a different page than the one + # requested. + # @!attribute [rw] path + # @return [::String] + # Optional. The address to redirect to. The target is a relative path in + # the current host. Example: "/blog/404.html". + class SubstituteAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set header action sets a header and forwards the request to the + # backend. This can be used to trigger custom protection implemented on the + # backend. + # @!attribute [rw] key + # @return [::String] + # Optional. The header key to set in the request to the backend server. + # @!attribute [rw] value + # @return [::String] + # Optional. The header value to set in the request to the backend server. + class SetHeaderAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A FirewallPolicy represents a single matching pattern and resulting actions + # to take. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for the FirewallPolicy in the format + # `projects/{project}/firewallpolicies/{firewallpolicy}`. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of what this policy aims to achieve, for + # convenience purposes. The description can at most include 256 UTF-8 + # characters. + # @!attribute [rw] path + # @return [::String] + # Optional. The path for which this policy applies, specified as a glob + # pattern. For more information on glob, see the [manual + # page](https://man7.org/linux/man-pages/man7/glob.7.html). + # A path has a max length of 200 characters. + # @!attribute [rw] condition + # @return [::String] + # Optional. A CEL (Common Expression Language) conditional expression that + # specifies if this policy applies to an incoming user request. If this + # condition evaluates to true and the requested path matched the path + # pattern, the associated actions should be executed by the caller. The + # condition string is checked for CEL syntax correctness on creation. For + # more information, see the [CEL spec](https://github.com/google/cel-spec) + # and its [language + # definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). + # A condition has a max length of 500 characters. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction>] + # Optional. The actions that the caller should take regarding user access. + # There should be at most one terminal action. A terminal action is any + # action that forces a response, such as `AllowAction`, + # `BlockAction` or `SubstituteAction`. + # Zero or more non-terminal actions such as `SetHeader` might be + # specified. A single policy can contain up to 16 actions. + class FirewallPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to list memberships in a related account group. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name for the related account group in the format + # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of accounts to return. The service might + # return fewer than this value. If unspecified, at most 50 accounts are + # returned. The maximum value is 1000; values above 1000 are coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListRelatedAccountGroupMemberships` call. + # + # When paginating, all other parameters provided to + # `ListRelatedAccountGroupMemberships` must match the call that provided the + # page token. + class ListRelatedAccountGroupMembershipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a `ListRelatedAccountGroupMemberships` call. + # @!attribute [rw] related_account_group_memberships + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # The memberships listed by the query. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRelatedAccountGroupMembershipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to list related account groups. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to list related account groups from, in + # the format `projects/{project}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of groups to return. The service might return + # fewer than this value. If unspecified, at most 50 groups are returned. The + # maximum value is 1000; values above 1000 are coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListRelatedAccountGroups` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListRelatedAccountGroups` must match the call that provided the page + # token. + class ListRelatedAccountGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a `ListRelatedAccountGroups` call. + # @!attribute [rw] related_account_groups + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] + # The groups of related accounts listed by the query. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRelatedAccountGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to search related account group memberships. + # @!attribute [rw] project + # @return [::String] + # Required. The name of the project to search related account group + # memberships from. Specify the project name in the following format: + # `projects/{project}`. + # @!attribute [rw] account_id + # @return [::String] + # Optional. The unique stable account identifier used to search connections. + # The identifier should correspond to an `account_id` provided in a previous + # `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + # or account_id must be set, but not both. + # @!attribute [rw] hashed_account_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. Deprecated: use `account_id` instead. + # The unique stable hashed account identifier used to search connections. The + # identifier should correspond to a `hashed_account_id` provided in a + # previous `CreateAssessment` or `AnnotateAssessment` call. Either + # hashed_account_id or account_id must be set, but not both. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of groups to return. The service might return + # fewer than this value. If unspecified, at most 50 groups are returned. The + # maximum value is 1000; values above 1000 are coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `SearchRelatedAccountGroupMemberships` must match the call that provided + # the page token. + class SearchRelatedAccountGroupMembershipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a `SearchRelatedAccountGroupMemberships` call. + # @!attribute [rw] related_account_group_memberships + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] + # The queried memberships. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class SearchRelatedAccountGroupMembershipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The AddIpOverride request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the key to which the IP override is added, in the + # format `projects/{project}/keys/{key}`. + # @!attribute [rw] ip_override_data + # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData] + # Required. IP override added to the key. + class AddIpOverrideRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for AddIpOverride. + class AddIpOverrideResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The RemoveIpOverride request message. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the key from which the IP override is removed, in the + # format `projects/{project}/keys/{key}`. + # @!attribute [rw] ip_override_data + # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData] + # Required. IP override to be removed from the key. + class RemoveIpOverrideRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for RemoveIpOverride. + class RemoveIpOverrideResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ListIpOverrides request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent key for which the IP overrides are listed, in the + # format `projects/{project}/keys/{key}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of overrides to return. Default is 10. Max + # limit is 100. If the number of overrides is less than the page_size, all + # overrides are returned. If the page size is more than 100, it is coerced to + # 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous + # ListIpOverridesRequest, if any. + class ListIpOverridesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListIpOverrides. + # @!attribute [rw] ip_overrides + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] + # IP Overrides details. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results. If this field is empty, no keys + # remain in the results. + class ListIpOverridesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A membership in a group of related accounts. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The resource name for this membership in the format + # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + # @!attribute [rw] account_id + # @return [::String] + # The unique stable account identifier of the member. The identifier + # corresponds to an `account_id` provided in a previous `CreateAssessment` or + # `AnnotateAssessment` call. + # @!attribute [rw] hashed_account_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: use `account_id` instead. + # The unique stable hashed account identifier of the member. The identifier + # corresponds to a `hashed_account_id` provided in a previous + # `CreateAssessment` or `AnnotateAssessment` call. + class RelatedAccountGroupMembership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A group of related accounts. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The resource name for the related account group in + # the format + # `projects/{project}/relatedaccountgroups/{related_account_group}`. + class RelatedAccountGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings specific to keys that can be used for WAF (Web Application + # Firewall). + # @!attribute [rw] waf_service + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings::WafService] + # Required. The Web Application Firewall (WAF) service that uses this key. + # @!attribute [rw] waf_feature + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings::WafFeature] + # Required. The Web Application Firewall (WAF) feature for which this key is + # enabled. + class WafSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported WAF features. For more information, see + # https://cloud.google.com/recaptcha/docs/usecase#comparison_of_features. + # Ensure that applications can handle values not explicitly listed. + module WafFeature + # Undefined feature. + WAF_FEATURE_UNSPECIFIED = 0 + + # Redirects suspicious traffic to reCAPTCHA. + CHALLENGE_PAGE = 1 + + # Use reCAPTCHA session-tokens to protect the whole user session on the + # site's domain. + SESSION_TOKEN = 2 + + # Use reCAPTCHA action-tokens to protect user actions. + ACTION_TOKEN = 3 + + # Deprecated: Use `express_settings` instead. + EXPRESS = 5 + end + + # Web Application Firewalls that reCAPTCHA supports. + # Ensure that applications can handle values not explicitly listed. + module WafService + # Undefined WAF + WAF_SERVICE_UNSPECIFIED = 0 + + # Cloud Armor + CA = 1 + + # Fastly + FASTLY = 3 + + # Cloudflare + CLOUDFLARE = 4 + + # Akamai + AKAMAI = 5 + end + end + + # The environment creating the assessment. This describes your environment + # (the system invoking CreateAssessment), NOT the environment of your user. + # @!attribute [rw] client + # @return [::String] + # Optional. Identifies the client module initiating the CreateAssessment + # request. This can be the link to the client module's project. Examples + # include: + # + # - + # "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" + # - "wordpress.org/plugins/recaptcha-something" + # @!attribute [rw] version + # @return [::String] + # Optional. The version of the client module. For example, "1.0.0". + class AssessmentEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the policy evaluation. + # @!attribute [r] challenge_rule_evaluation + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleEvaluation] + # Output only. Populated if one or more Challenge rules were matched. + # Its presence in the assessment indicates that at least one challenge rule + # was matched and determined whether a challenge was presented to the user. + class PolicyEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the evaluation of a `ChallengeRule`. + class ChallengeRuleEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the IP or IP range override. + # @!attribute [rw] ip + # @return [::String] + # Required. The IP address to override (can be IPv4, IPv6 or CIDR). + # The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. + # The IP override must be a public IP address. + # Example of IPv4: 168.192.5.6 + # Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B + # Example of IPv4 with CIDR: 168.192.5.0/24 + # Example of IPv6 with CIDR: 2001:0DB8:1234::/48 + # @!attribute [rw] override_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData::OverrideType] + # Required. Describes the type of IP override. + class IpOverrideData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents the type of IP override. + # Ensure that applications can handle values not explicitly listed. + module OverrideType + # Default override type that indicates this enum hasn't been specified. + OVERRIDE_TYPE_UNSPECIFIED = 0 + + # Allowlist the IP address; i.e. give a `risk_analysis.score` of 0.9 for + # all valid assessments. + ALLOW = 1 + end + end + + # The request message to get a policy. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy to get, in the format + # `projects/{project}/keys/{key}/policy`. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to update a policy. + # @!attribute [rw] policy + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # Required. The Policy's name is used to identify the policy to update, in + # the format `projects/{project}/keys/{key}/policy`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A complete configuration set containing multiple grouped rules defining the + # behavior of reCAPTCHA for fraud detection and prevention. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name for this policy. + # Format: "projects/\\{project}/keys/\\{key}/policy" for a policy under a key. + # @!attribute [rw] client_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ClientSettings] + # Required. Configuration for clients protected by this policy. + # @!attribute [rw] challenge_rule_groups + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleGroup>] + # Optional. Rules to configure the behavior of reCAPTCHA for showing a + # challenge. Rule groups are evaluated in order. Evaluation stops when the + # first matching rule group is found. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of challenge rules that applies to one or more actions. + # @!attribute [rw] actions + # @return [::Array<::String>] + # Required. Action name provided at token generation. The action name is not + # case-sensitive and can only contain alphanumeric characters, slashes, and + # underscores. If "*" is provided, the rule group applies to all actions. If + # multiple actions are provided, the rule group is applied to all of + # them. This field is required. + # @!attribute [rw] challenge_rules + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule>] + # Required. A list of rules that configure when and how reCAPTCHA presents a + # challenge. reCAPTCHA evaluates these rules in order and applies the first + # one that matches. + class ChallengeRuleGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule to configure the behavior of reCAPTCHA for conditionally presenting a + # challenge. + # @!attribute [rw] condition + # @return [::String] + # Optional. A CEL condition that must be met for this rule to apply. + # If unspecified, the rule applies unconditionally. + # The following fields can be referenced in the condition: + # * `score` + # * `user_ip_address` + # * `user_asn` + # * `user_agent` + # * `verified_bots.name` + # * `verified_bots.bot_type` + # + # Examples: + # * `score < 0.5` + # * `user_ip_address == "123.45.67.89"` + # * `user_agent.contains("Chrome")` + # * `score < 0.5 && user_ip_address == "123.45.67.89"` + # @!attribute [rw] no_challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::NoChallengeOutcome] + # Do not present a challenge to the user. + # + # Note: The following fields are mutually exclusive: `no_challenge`, `challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::ChallengeOutcome] + # Present a challenge to the user. + # + # Note: The following fields are mutually exclusive: `challenge`, `no_challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ChallengeRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An outcome that indicates that no challenge should be presented to the + # user. + class NoChallengeOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An outcome that indicates that a challenge of a specified difficulty should + # be presented to the user. + # @!attribute [rw] difficulty + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference] + # Optional. The difficulty of the challenge to present to the user. + # If unspecified, `BALANCE` is used. + class ChallengeOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for clients to protect with reCAPTCHA. + # @!attribute [rw] allowed_domains + # @return [::Array<::String>] + # Optional. Domains or subdomains of websites allowed to use the policy. All + # subdomains of an allowed domain are automatically allowed. A valid domain + # requires a host and must not include any path, port, query or fragment. + # Examples: 'example.com' or 'subdomain.example.com' + # Each policy supports a maximum of 250 domains. To use a policy on more + # domains, set `allow_all_domains` to true. When this is set, you are + # responsible for validating the hostname by checking the + # `token_properties.hostname` field in each assessment response against your + # list of allowed domains. + # @!attribute [rw] allow_all_domains + # @return [::Boolean] + # Optional. If set to true, it means allowed_domains are not enforced. + # @!attribute [rw] protected_endpoint_group + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpointGroup] + # Optional. Configuration for all API endpoints to protect with reCAPTCHA. If + # this field is not set, reCAPTCHA will not automatically request tokens on + # any API endpoints. + class ClientSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for API endpoints to protect with reCAPTCHA. + # @!attribute [rw] protected_endpoints + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpoint>] + # Optional. List of API endpoints to automatically protect with reCAPTCHA. If + # any of these endpoints is invoked from a page where a key bound to this + # policy is installed, a reCAPTCHA token is automatically generated and + # attached to the request. If multiple protected endpoints match a given API + # endpoint, the first one in the list is used. + class ProtectedEndpointGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for an API endpoint to protect with reCAPTCHA. + # @!attribute [rw] path + # @return [::String] + # Required. URI path of the API endpoint to protect. Must start with '/'. + # Supports glob characters '*' to match a single path segment and '**' to + # match multiple path segments. Standalone root catch-alls ('/*' and '/**') + # are invalid because it can negatively impact performance to trigger + # reCAPTCHA on every single request to your backend. + # + # Matching is evaluated against the URL path only (domain, scheme, and query + # parameters are ignored). + # + # Examples: + # - `/login` matches `/login`, `https://example.com/login`, and + # `/login?query=1`, but not `/login/step1`. + # - `/products/*` matches `/products/123`, but not `/products/123/456`. + # - `/content/**` matches `/content/articles/2024/01/01`. + # @!attribute [rw] action + # @return [::String] + # Required. Action name to be used for token generation for this endpoint. + # The action name can only contain alphanumeric characters, slashes, and + # underscores. + class ProtectedEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum of challenge types for Universal, `POLICY_BASED_CHALLENGE` and + # `INVISIBLE` keys. Ensure that applications can handle values not explicitly + # listed. + module ChallengeType + # Default unspecified type. + CHALLENGE_TYPE_UNSPECIFIED = 0 + + # A visual challenge. + CHALLENGE_TYPE_VISUAL = 1 + + # An audio challenge. + CHALLENGE_TYPE_AUDIO = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/Gemfile new file mode 100644 index 000000000000..ecbdc5a6605c --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1", path: "../" +else + gem "google-cloud-recaptcha_enterprise-v1" +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-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb new file mode 100644 index 000000000000..2cd93faef1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the add_ip_override call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override. +# +def add_ip_override + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new + + # Call the add_ip_override method. + result = client.add_ip_override request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb new file mode 100644 index 000000000000..a4e7cfd8ae7e --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the annotate_assessment call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment. +# +def annotate_assessment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new + + # Call the annotate_assessment method. + result = client.annotate_assessment request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb new file mode 100644 index 000000000000..0faeb6dd26ee --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the create_assessment call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment. +# +def create_assessment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new + + # Call the create_assessment method. + result = client.create_assessment request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb new file mode 100644 index 000000000000..6161259992c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the create_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy. +# +def create_firewall_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new + + # Call the create_firewall_policy method. + result = client.create_firewall_policy request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb new file mode 100644 index 000000000000..17732dc4f67e --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the create_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key. +# +def create_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new + + # Call the create_key method. + result = client.create_key request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb new file mode 100644 index 000000000000..4043f5b69b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the delete_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy. +# +def delete_firewall_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new + + # Call the delete_firewall_policy method. + result = client.delete_firewall_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb new file mode 100644 index 000000000000..5303f077ca44 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the delete_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key. +# +def delete_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new + + # Call the delete_key method. + result = client.delete_key request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb new file mode 100644 index 000000000000..20c22a7354d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the get_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy. +# +def get_firewall_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new + + # Call the get_firewall_policy method. + result = client.get_firewall_policy request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb new file mode 100644 index 000000000000..4c3b7da228bb --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the get_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key. +# +def get_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new + + # Call the get_key method. + result = client.get_key request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb new file mode 100644 index 000000000000..e70958bdf776 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the get_metrics call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics. +# +def get_metrics + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new + + # Call the get_metrics method. + result = client.get_metrics request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb new file mode 100644 index 000000000000..bdbebde00f5d --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetPolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the get_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy. +# +def get_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new + + # Call the get_policy method. + result = client.get_policy request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb new file mode 100644 index 000000000000..cac6a23ab90f --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the list_firewall_policies call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies. +# +def list_firewall_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new + + # Call the list_firewall_policies method. + result = client.list_firewall_policies 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::RecaptchaEnterprise::V1::FirewallPolicy. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb new file mode 100644 index 000000000000..b028a8f6caa4 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the list_ip_overrides call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides. +# +def list_ip_overrides + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new + + # Call the list_ip_overrides method. + result = client.list_ip_overrides 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::RecaptchaEnterprise::V1::IpOverrideData. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb new file mode 100644 index 000000000000..7e6a4cabb356 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the list_keys call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys. +# +def list_keys + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new + + # Call the list_keys method. + result = client.list_keys 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::RecaptchaEnterprise::V1::Key. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb new file mode 100644 index 000000000000..ece30d40559d --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the list_related_account_group_memberships call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships. +# +def list_related_account_group_memberships + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new + + # Call the list_related_account_group_memberships method. + result = client.list_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb new file mode 100644 index 000000000000..d19c5f95a161 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the list_related_account_groups call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups. +# +def list_related_account_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new + + # Call the list_related_account_groups method. + result = client.list_related_account_groups 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::RecaptchaEnterprise::V1::RelatedAccountGroup. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb new file mode 100644 index 000000000000..3790cc8bf22d --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the migrate_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key. +# +def migrate_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new + + # Call the migrate_key method. + result = client.migrate_key request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb new file mode 100644 index 000000000000..775dae1c3506 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the remove_ip_override call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override. +# +def remove_ip_override + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new + + # Call the remove_ip_override method. + result = client.remove_ip_override request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb new file mode 100644 index 000000000000..0785a8c5770d --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the reorder_firewall_policies call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies. +# +def reorder_firewall_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new + + # Call the reorder_firewall_policies method. + result = client.reorder_firewall_policies request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb new file mode 100644 index 000000000000..a5aff30875f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the retrieve_legacy_secret_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key. +# +def retrieve_legacy_secret_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new + + # Call the retrieve_legacy_secret_key method. + result = client.retrieve_legacy_secret_key request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb new file mode 100644 index 000000000000..8ca6af8cafde --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the search_related_account_group_memberships call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships. +# +def search_related_account_group_memberships + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new + + # Call the search_related_account_group_memberships method. + result = client.search_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. + p item + end +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb new file mode 100644 index 000000000000..1c0edac34c62 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the update_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy. +# +def update_firewall_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new + + # Call the update_firewall_policy method. + result = client.update_firewall_policy request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb new file mode 100644 index 000000000000..f6b0ed5da093 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the update_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key. +# +def update_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new + + # Call the update_key method. + result = client.update_key request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb new file mode 100644 index 000000000000..a015974d3704 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdatePolicy_sync] +require "google/cloud/recaptcha_enterprise/v1" + +## +# Snippet for the update_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy. +# +def update_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new + + # Call the update_policy method. + result = client.update_policy request + + # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + p result +end +# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json new file mode 100644 index 000000000000..4152b477e378 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json @@ -0,0 +1,975 @@ +{ + "client_library": { + "name": "google-cloud-recaptcha_enterprise-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.recaptchaenterprise.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync", + "title": "Snippet for the create_assessment call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment.", + "file": "recaptcha_enterprise_service/create_assessment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_assessment", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Assessment", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "CreateAssessment", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessment", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync", + "title": "Snippet for the annotate_assessment call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment.", + "file": "recaptcha_enterprise_service/annotate_assessment.rb", + "language": "RUBY", + "client_method": { + "short_name": "annotate_assessment", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "AnnotateAssessment", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessment", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync", + "title": "Snippet for the create_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key.", + "file": "recaptcha_enterprise_service/create_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "CreateKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync", + "title": "Snippet for the list_keys call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys.", + "file": "recaptcha_enterprise_service/list_keys.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_keys", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ListKeys", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeys", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync", + "title": "Snippet for the retrieve_legacy_secret_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key.", + "file": "recaptcha_enterprise_service/retrieve_legacy_secret_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "retrieve_legacy_secret_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "RetrieveLegacySecretKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync", + "title": "Snippet for the get_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key.", + "file": "recaptcha_enterprise_service/get_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "GetKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync", + "title": "Snippet for the update_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key.", + "file": "recaptcha_enterprise_service/update_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "UpdateKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync", + "title": "Snippet for the delete_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key.", + "file": "recaptcha_enterprise_service/delete_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "DeleteKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync", + "title": "Snippet for the migrate_key call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key.", + "file": "recaptcha_enterprise_service/migrate_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "migrate_key", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "MigrateKey", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKey", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync", + "title": "Snippet for the add_ip_override call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override.", + "file": "recaptcha_enterprise_service/add_ip_override.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_ip_override", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "AddIpOverride", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AddIpOverride", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync", + "title": "Snippet for the remove_ip_override call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override.", + "file": "recaptcha_enterprise_service/remove_ip_override.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_ip_override", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "RemoveIpOverride", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RemoveIpOverride", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync", + "title": "Snippet for the list_ip_overrides call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides.", + "file": "recaptcha_enterprise_service/list_ip_overrides.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ip_overrides", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ListIpOverrides", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListIpOverrides", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync", + "title": "Snippet for the get_metrics call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics.", + "file": "recaptcha_enterprise_service/get_metrics.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_metrics", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Metrics", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "GetMetrics", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetrics", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetPolicy_sync", + "title": "Snippet for the get_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy.", + "file": "recaptcha_enterprise_service/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy.", + "file": "recaptcha_enterprise_service/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdatePolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync", + "title": "Snippet for the create_firewall_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy.", + "file": "recaptcha_enterprise_service/create_firewall_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_firewall_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "CreateFirewallPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateFirewallPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync", + "title": "Snippet for the list_firewall_policies call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies.", + "file": "recaptcha_enterprise_service/list_firewall_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_firewall_policies", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ListFirewallPolicies", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListFirewallPolicies", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync", + "title": "Snippet for the get_firewall_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy.", + "file": "recaptcha_enterprise_service/get_firewall_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_firewall_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "GetFirewallPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetFirewallPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync", + "title": "Snippet for the update_firewall_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy.", + "file": "recaptcha_enterprise_service/update_firewall_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_firewall_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "UpdateFirewallPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateFirewallPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync", + "title": "Snippet for the delete_firewall_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy.", + "file": "recaptcha_enterprise_service/delete_firewall_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_firewall_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "DeleteFirewallPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteFirewallPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync", + "title": "Snippet for the reorder_firewall_policies call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies.", + "file": "recaptcha_enterprise_service/reorder_firewall_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "reorder_firewall_policies", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ReorderFirewallPolicies", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ReorderFirewallPolicies", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync", + "title": "Snippet for the list_related_account_groups call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups.", + "file": "recaptcha_enterprise_service/list_related_account_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_related_account_groups", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ListRelatedAccountGroups", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroups", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync", + "title": "Snippet for the list_related_account_group_memberships call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships.", + "file": "recaptcha_enterprise_service/list_related_account_group_memberships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_related_account_group_memberships", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "ListRelatedAccountGroupMemberships", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMemberships", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync", + "title": "Snippet for the search_related_account_group_memberships call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships.", + "file": "recaptcha_enterprise_service/search_related_account_group_memberships.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_related_account_group_memberships", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "SearchRelatedAccountGroupMemberships", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMemberships", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb new file mode 100644 index 000000000000..085d2844f8a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" + +class ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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_assessment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.assessment_path project: "value0", assessment: "value1" + assert_equal "projects/value0/assessments/value1", path + end + end + + def test_firewall_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.firewall_policy_path project: "value0", firewallpolicy: "value1" + assert_equal "projects/value0/firewallpolicies/value1", path + end + end + + def test_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.key_path project: "value0", key: "value1" + assert_equal "projects/value0/keys/value1", path + end + end + + def test_metrics_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.metrics_path project: "value0", key: "value1" + assert_equal "projects/value0/keys/value1/metrics", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0", key: "value1" + assert_equal "projects/value0/keys/value1/policy", 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_related_account_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.related_account_group_path project: "value0", relatedaccountgroup: "value1" + assert_equal "projects/value0/relatedaccountgroups/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb new file mode 100644 index 000000000000..0aff9beeb849 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb @@ -0,0 +1,1586 @@ +# 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/recaptchaenterprise/v1/recaptchaenterprise_pb" +require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" + +class ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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_create_assessment + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Assessment.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" + assessment = {} + + create_assessment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_assessment, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Assessment), request["assessment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_assessment_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_assessment({ parent: parent, assessment: assessment }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_assessment parent: parent, assessment: assessment do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_assessment ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new(parent: parent, assessment: assessment) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_assessment({ parent: parent, assessment: assessment }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_assessment(::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new(parent: parent, assessment: assessment), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_assessment_client_stub.call_rpc_count + end + end + + def test_annotate_assessment + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse.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" + annotation = :ANNOTATION_UNSPECIFIED + reasons = [:REASON_UNSPECIFIED] + account_id = "hello world" + hashed_account_id = "hello world" + transaction_event = {} + phone_authentication_event = {} + + annotate_assessment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :annotate_assessment, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, request + assert_equal "hello world", request["name"] + assert_equal :ANNOTATION_UNSPECIFIED, request["annotation"] + assert_equal [:REASON_UNSPECIFIED], request["reasons"] + assert_equal "hello world", request["account_id"] + assert_equal "hello world", request["hashed_account_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent), request["transaction_event"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent), request["phone_authentication_event"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, annotate_assessment_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.annotate_assessment({ name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.annotate_assessment name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.annotate_assessment ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new(name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.annotate_assessment({ name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.annotate_assessment(::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new(name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, annotate_assessment_client_stub.call_rpc_count + end + end + + def test_create_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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" + key = {} + + create_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Key), request["key"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_key({ parent: parent, key: key }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_key parent: parent, key: key do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_key ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new(parent: parent, key: key) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_key({ parent: parent, key: key }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_key(::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new(parent: parent, key: key), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_key_client_stub.call_rpc_count + end + end + + def test_list_keys + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse.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" + + list_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_keys, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_keys_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_keys parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_keys ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 + c.list_keys({ parent: parent, page_size: page_size, page_token: page_token }, 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 + c.list_keys(::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_keys_client_stub.call_rpc_count + end + end + + def test_retrieve_legacy_secret_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse.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. + key = "hello world" + + retrieve_legacy_secret_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retrieve_legacy_secret_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, request + assert_equal "hello world", request["key"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retrieve_legacy_secret_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.retrieve_legacy_secret_key({ key: key }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.retrieve_legacy_secret_key key: key do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.retrieve_legacy_secret_key ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new(key: key) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.retrieve_legacy_secret_key({ key: key }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.retrieve_legacy_secret_key(::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new(key: key), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, retrieve_legacy_secret_key_client_stub.call_rpc_count + end + end + + def test_get_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_key({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_key name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_key ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_key({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_key(::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.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_key_client_stub.call_rpc_count + end + end + + def test_update_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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. + key = {} + update_mask = {} + + update_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Key), request["key"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_key({ key: key, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_key key: key, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_key ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new(key: key, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_key({ key: key, 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 + c.update_key(::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new(key: key, 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_key_client_stub.call_rpc_count + end + end + + def test_delete_key + # 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_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_key({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_key name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_key ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_key({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_key(::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.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_key_client_stub.call_rpc_count + end + end + + def test_migrate_key + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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" + skip_billing_check = true + + migrate_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :migrate_key, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["skip_billing_check"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, migrate_key_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.migrate_key({ name: name, skip_billing_check: skip_billing_check }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.migrate_key name: name, skip_billing_check: skip_billing_check do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.migrate_key ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new(name: name, skip_billing_check: skip_billing_check) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.migrate_key({ name: name, skip_billing_check: skip_billing_check }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.migrate_key(::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new(name: name, skip_billing_check: skip_billing_check), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, migrate_key_client_stub.call_rpc_count + end + end + + def test_add_ip_override + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse.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" + ip_override_data = {} + + add_ip_override_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_ip_override, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData), request["ip_override_data"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_ip_override_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.add_ip_override({ name: name, ip_override_data: ip_override_data }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.add_ip_override name: name, ip_override_data: ip_override_data do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.add_ip_override ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new(name: name, ip_override_data: ip_override_data) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.add_ip_override({ name: name, ip_override_data: ip_override_data }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.add_ip_override(::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new(name: name, ip_override_data: ip_override_data), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_ip_override_client_stub.call_rpc_count + end + end + + def test_remove_ip_override + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse.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" + ip_override_data = {} + + remove_ip_override_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_ip_override, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData), request["ip_override_data"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_ip_override_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.remove_ip_override({ name: name, ip_override_data: ip_override_data }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.remove_ip_override name: name, ip_override_data: ip_override_data do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.remove_ip_override ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new(name: name, ip_override_data: ip_override_data) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.remove_ip_override({ name: name, ip_override_data: ip_override_data }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.remove_ip_override(::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new(name: name, ip_override_data: ip_override_data), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_ip_override_client_stub.call_rpc_count + end + end + + def test_list_ip_overrides + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse.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" + + list_ip_overrides_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_ip_overrides, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_ip_overrides_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_ip_overrides({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_ip_overrides parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_ip_overrides ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 + c.list_ip_overrides({ parent: parent, page_size: page_size, page_token: page_token }, 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 + c.list_ip_overrides(::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_ip_overrides_client_stub.call_rpc_count + end + end + + def test_get_metrics + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Metrics.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_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_metrics, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_metrics_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_metrics({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_metrics name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_metrics ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_metrics({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_metrics(::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.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_metrics_client_stub.call_rpc_count + end + end + + def test_get_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_policy(::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.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_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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. + policy = {} + update_mask = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy({ policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy({ policy: policy, 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 + c.update_policy(::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, 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_policy_client_stub.call_rpc_count + end + end + + def test_create_firewall_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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" + firewall_policy = {} + + create_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_firewall_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy), request["firewall_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_firewall_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_firewall_policy({ parent: parent, firewall_policy: firewall_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_firewall_policy parent: parent, firewall_policy: firewall_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new(parent: parent, firewall_policy: firewall_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_firewall_policy({ parent: parent, firewall_policy: firewall_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new(parent: parent, firewall_policy: firewall_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_firewall_policy_client_stub.call_rpc_count + end + end + + def test_list_firewall_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse.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" + + list_firewall_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_firewall_policies, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_firewall_policies_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_firewall_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_firewall_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_firewall_policies ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 + c.list_firewall_policies({ parent: parent, page_size: page_size, page_token: page_token }, 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 + c.list_firewall_policies(::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_firewall_policies_client_stub.call_rpc_count + end + end + + def test_get_firewall_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_firewall_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_firewall_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_firewall_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_firewall_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_firewall_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.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_firewall_policy_client_stub.call_rpc_count + end + end + + def test_update_firewall_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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. + firewall_policy = {} + update_mask = {} + + update_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_firewall_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy), request["firewall_policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_firewall_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_firewall_policy({ firewall_policy: firewall_policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_firewall_policy firewall_policy: firewall_policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new(firewall_policy: firewall_policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_firewall_policy({ firewall_policy: firewall_policy, 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 + c.update_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new(firewall_policy: firewall_policy, 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_firewall_policy_client_stub.call_rpc_count + end + end + + def test_delete_firewall_policy + # 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_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_firewall_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_firewall_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_firewall_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_firewall_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_firewall_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.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_firewall_policy_client_stub.call_rpc_count + end + end + + def test_reorder_firewall_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse.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" + names = ["hello world"] + + reorder_firewall_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reorder_firewall_policies, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reorder_firewall_policies_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.reorder_firewall_policies({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.reorder_firewall_policies parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.reorder_firewall_policies ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.reorder_firewall_policies({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.reorder_firewall_policies(::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, reorder_firewall_policies_client_stub.call_rpc_count + end + end + + def test_list_related_account_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse.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" + + list_related_account_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_related_account_groups, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_related_account_groups_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_related_account_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_related_account_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_related_account_groups ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 + c.list_related_account_groups({ parent: parent, page_size: page_size, page_token: page_token }, 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 + c.list_related_account_groups(::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_related_account_groups_client_stub.call_rpc_count + end + end + + def test_list_related_account_group_memberships + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse.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" + + list_related_account_group_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_related_account_group_memberships, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_related_account_group_memberships_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_related_account_group_memberships({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_related_account_group_memberships parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_related_account_group_memberships ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 + c.list_related_account_group_memberships({ parent: parent, page_size: page_size, page_token: page_token }, 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 + c.list_related_account_group_memberships(::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_related_account_group_memberships_client_stub.call_rpc_count + end + end + + def test_search_related_account_group_memberships + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse.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. + project = "hello world" + account_id = "hello world" + hashed_account_id = "hello world" + page_size = 42 + page_token = "hello world" + + search_related_account_group_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_related_account_group_memberships, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, request + assert_equal "hello world", request["project"] + assert_equal "hello world", request["account_id"] + assert_equal "hello world", request["hashed_account_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_related_account_group_memberships_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search_related_account_group_memberships({ project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search_related_account_group_memberships project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search_related_account_group_memberships ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new(project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token) 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 + c.search_related_account_group_memberships({ project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token }, 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 + c.search_related_account_group_memberships(::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new(project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token), 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_related_account_group_memberships_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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb @@ -0,0 +1,35 @@ +# 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! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 786960ad4e11b07037a648dd1fd2225be0d39cfb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 11 Aug 2026 16:03:13 +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 --- .../.owlbot-manifest.json | 2 + .../gapic_metadata.json | 10 + .../v1/recaptcha_enterprise_service/client.rb | 189 ++ .../v1/recaptcha_enterprise_service/paths.rb | 17 + .../v1/recaptchaenterprise_pb.rb | 21 +- .../v1/recaptchaenterprise_services_pb.rb | 6 +- .../v1/recaptchaenterprise.rb | 411 ++- .../get_policy.rb | 0 .../update_policy.rb | 0 ...a_google.cloud.recaptchaenterprise.v1.json | 80 + ...recaptcha_enterprise_service_paths_test.rb | 12 + .../v1/recaptcha_enterprise_service_test.rb | 118 + .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 138 - ...ogle-cloud-recaptcha_enterprise-v1.gemspec | 28 - .../google-cloud-recaptcha_enterprise-v1.rb | 21 - .../google/cloud/recaptcha_enterprise/v1.rb | 40 - .../v1/recaptcha_enterprise_service.rb | 49 - .../v1/recaptcha_enterprise_service/client.rb | 2800 ----------------- .../credentials.rb | 51 - .../v1/recaptcha_enterprise_service/paths.rb | 149 - .../cloud/recaptcha_enterprise/v1/version.rb | 28 - .../v1/recaptchaenterprise_pb.rb | 156 - .../v1/recaptchaenterprise_services_pb.rb | 109 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1/recaptchaenterprise.rb | 2587 --------------- .../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 | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../add_ip_override.rb | 47 - .../annotate_assessment.rb | 47 - .../create_assessment.rb | 47 - .../create_firewall_policy.rb | 47 - .../create_key.rb | 47 - .../delete_firewall_policy.rb | 47 - .../delete_key.rb | 47 - .../get_firewall_policy.rb | 47 - .../recaptcha_enterprise_service/get_key.rb | 47 - .../get_metrics.rb | 47 - .../list_firewall_policies.rb | 51 - .../list_ip_overrides.rb | 51 - .../recaptcha_enterprise_service/list_keys.rb | 51 - .../list_related_account_group_memberships.rb | 51 - .../list_related_account_groups.rb | 51 - .../migrate_key.rb | 47 - .../remove_ip_override.rb | 47 - .../reorder_firewall_policies.rb | 47 - .../retrieve_legacy_secret_key.rb | 47 - ...earch_related_account_group_memberships.rb | 51 - .../update_firewall_policy.rb | 47 - .../update_key.rb | 47 - ...a_google.cloud.recaptchaenterprise.v1.json | 975 ------ ...recaptcha_enterprise_service_paths_test.rb | 127 - .../v1/recaptcha_enterprise_service_test.rb | 1586 ---------- .../test/helper.rb | 35 - 74 files changed, 837 insertions(+), 12522 deletions(-) rename {owl-bot-staging/google-cloud-recaptcha_enterprise-v1 => google-cloud-recaptcha_enterprise-v1}/snippets/recaptcha_enterprise_service/get_policy.rb (100%) rename {owl-bot-staging/google-cloud-recaptcha_enterprise-v1 => google-cloud-recaptcha_enterprise-v1}/snippets/recaptcha_enterprise_service/update_policy.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb diff --git a/google-cloud-recaptcha_enterprise-v1/.owlbot-manifest.json b/google-cloud-recaptcha_enterprise-v1/.owlbot-manifest.json index 72320530d198..639ab9a2a79b 100644 --- a/google-cloud-recaptcha_enterprise-v1/.owlbot-manifest.json +++ b/google-cloud-recaptcha_enterprise-v1/.owlbot-manifest.json @@ -46,6 +46,7 @@ "snippets/recaptcha_enterprise_service/get_firewall_policy.rb", "snippets/recaptcha_enterprise_service/get_key.rb", "snippets/recaptcha_enterprise_service/get_metrics.rb", + "snippets/recaptcha_enterprise_service/get_policy.rb", "snippets/recaptcha_enterprise_service/list_firewall_policies.rb", "snippets/recaptcha_enterprise_service/list_ip_overrides.rb", "snippets/recaptcha_enterprise_service/list_keys.rb", @@ -58,6 +59,7 @@ "snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb", "snippets/recaptcha_enterprise_service/update_firewall_policy.rb", "snippets/recaptcha_enterprise_service/update_key.rb", + "snippets/recaptcha_enterprise_service/update_policy.rb", "snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json", "test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb", "test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb", diff --git a/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json b/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json index 401c9dadcea7..1c3c335bc5d7 100644 --- a/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json +++ b/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json @@ -75,6 +75,16 @@ "get_metrics" ] }, + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, "CreateFirewallPolicy": { "methods": [ "create_firewall_policy" diff --git a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb index 3ebc22f3f04a..4b9f9d5cfd4e 100644 --- a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb +++ b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb @@ -1397,6 +1397,181 @@ def get_metrics request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Get the policy for a key. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::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_policy(name: nil) + # Pass arguments to `get_policy` 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 policy to get, in the format + # `projects/{project}/keys/{key}/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest + + # 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_policy.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::RecaptchaEnterprise::V1::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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :get_policy, 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 policy for a key. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::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_policy(policy: nil, update_mask: nil) + # Pass arguments to `update_policy` 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 policy [::Google::Cloud::RecaptchaEnterprise::V1::Policy, ::Hash] + # Required. The Policy's name is used to identify the policy to update, in + # the format `projects/{project}/keys/{key}/policy`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/recaptcha_enterprise/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest + + # 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_policy.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::RecaptchaEnterprise::V1::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.policy&.name + header_params["policy.name"] = request.policy.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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recaptcha_enterprise_service_stub.call_rpc :update_policy, 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 FirewallPolicy, specifying conditions at which reCAPTCHA # Enterprise actions can be executed. @@ -2507,6 +2682,16 @@ class Rpcs # attr_reader :get_metrics ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## # RPC-specific configuration for `create_firewall_policy` # @return [::Gapic::Config::Method] # @@ -2580,6 +2765,10 @@ def initialize parent_rpcs = nil @list_ip_overrides = ::Gapic::Config::Method.new list_ip_overrides_config get_metrics_config = parent_rpcs.get_metrics if parent_rpcs.respond_to? :get_metrics @get_metrics = ::Gapic::Config::Method.new get_metrics_config + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config create_firewall_policy_config = parent_rpcs.create_firewall_policy if parent_rpcs.respond_to? :create_firewall_policy @create_firewall_policy = ::Gapic::Config::Method.new create_firewall_policy_config list_firewall_policies_config = parent_rpcs.list_firewall_policies if parent_rpcs.respond_to? :list_firewall_policies diff --git a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb index 7a41dbacecdb..764baa008be0 100644 --- a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb +++ b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb @@ -92,6 +92,23 @@ def metrics_path project:, key: "projects/#{project}/keys/#{key}/metrics" end + ## + # Create a fully-qualified Policy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/keys/{key}/policy` + # + # @param project [String] + # @param key [String] + # + # @return [::String] + def policy_path project:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/keys/#{key}/policy" + end + ## # Create a fully-qualified Project resource string. # diff --git a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb index 89c5c47420f8..a6447a580b63 100644 --- a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb +++ b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb @@ -15,7 +15,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n=google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto\x12#google.cloud.recaptchaenterprise.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\x17\x43reateAssessmentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\nassessment\x18\x02 \x01(\x0b\x32/.google.cloud.recaptchaenterprise.v1.AssessmentB\x03\xe0\x41\x02\"\x92\x05\n\x10TransactionEvent\x12\x63\n\nevent_type\x18\x01 \x01(\x0e\x32J.google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventTypeB\x03\xe0\x41\x01\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x33\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xba\x03\n\x14TransactionEventType\x12&\n\"TRANSACTION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MERCHANT_APPROVE\x10\x01\x12\x11\n\rMERCHANT_DENY\x10\x02\x12\x11\n\rMANUAL_REVIEW\x10\x03\x12\x11\n\rAUTHORIZATION\x10\x04\x12\x19\n\x15\x41UTHORIZATION_DECLINE\x10\x05\x12\x13\n\x0fPAYMENT_CAPTURE\x10\x06\x12\x1b\n\x17PAYMENT_CAPTURE_DECLINE\x10\x07\x12\n\n\x06\x43\x41NCEL\x10\x08\x12\x16\n\x12\x43HARGEBACK_INQUIRY\x10\t\x12\x14\n\x10\x43HARGEBACK_ALERT\x10\n\x12\x16\n\x12\x46RAUD_NOTIFICATION\x10\x0b\x12\x0e\n\nCHARGEBACK\x10\x0c\x12\x1c\n\x18\x43HARGEBACK_REPRESENTMENT\x10\r\x12\x16\n\x12\x43HARGEBACK_REVERSE\x10\x0e\x12\x12\n\x0eREFUND_REQUEST\x10\x0f\x12\x12\n\x0eREFUND_DECLINE\x10\x10\x12\n\n\x06REFUND\x10\x11\x12\x12\n\x0eREFUND_REVERSE\x10\x12\"j\n\x18PhoneAuthenticationEvent\x12\x19\n\x0cphone_number\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xeb\x07\n\x19\x41nnotateAssessmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-recaptchaenterprise.googleapis.com/Assessment\x12\x62\n\nannotation\x18\x02 \x01(\x0e\x32I.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.AnnotationB\x03\xe0\x41\x01\x12[\n\x07reasons\x18\x03 \x03(\x0e\x32\x45.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.ReasonB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11hashed_account_id\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x12U\n\x11transaction_event\x18\x05 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.TransactionEventB\x03\xe0\x41\x01\x12\x66\n\x1aphone_authentication_event\x18\x06 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEventB\x03\xe0\x41\x01\"~\n\nAnnotation\x12\x1a\n\x16\x41NNOTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nLEGITIMATE\x10\x01\x12\x0e\n\nFRAUDULENT\x10\x02\x12\x18\n\x10PASSWORD_CORRECT\x10\x03\x1a\x02\x08\x01\x12\x1a\n\x12PASSWORD_INCORRECT\x10\x04\x1a\x02\x08\x01\"\xcf\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nCHARGEBACK\x10\x01\x12\x14\n\x10\x43HARGEBACK_FRAUD\x10\x08\x12\x16\n\x12\x43HARGEBACK_DISPUTE\x10\t\x12\n\n\x06REFUND\x10\n\x12\x10\n\x0cREFUND_FRAUD\x10\x0b\x12\x18\n\x14TRANSACTION_ACCEPTED\x10\x0c\x12\x18\n\x14TRANSACTION_DECLINED\x10\r\x12\x16\n\x12PAYMENT_HEURISTICS\x10\x02\x12\x18\n\x14INITIATED_TWO_FACTOR\x10\x07\x12\x15\n\x11PASSED_TWO_FACTOR\x10\x03\x12\x15\n\x11\x46\x41ILED_TWO_FACTOR\x10\x04\x12\x14\n\x10\x43ORRECT_PASSWORD\x10\x05\x12\x16\n\x12INCORRECT_PASSWORD\x10\x06\x12\x0f\n\x0bSOCIAL_SPAM\x10\x0e\"\x1c\n\x1a\x41nnotateAssessmentResponse\"\xb4\x01\n\x18\x45ndpointVerificationInfo\x12\x17\n\remail_address\x18\x01 \x01(\tH\x00\x12\x16\n\x0cphone_number\x18\x02 \x01(\tH\x00\x12\x1a\n\rrequest_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x16last_verification_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\n\n\x08\x65ndpoint\"\xdb\x04\n\x17\x41\x63\x63ountVerificationInfo\x12U\n\tendpoints\x18\x01 \x03(\x0b\x32=.google.cloud.recaptchaenterprise.v1.EndpointVerificationInfoB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12l\n\x1alatest_verification_result\x18\x07 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.ResultB\x03\xe0\x41\x03\x12\x14\n\x08username\x18\x02 \x01(\tB\x02\x18\x01\"\xc8\x02\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x19\n\x15SUCCESS_USER_VERIFIED\x10\x01\x12\x1b\n\x17\x45RROR_USER_NOT_VERIFIED\x10\x02\x12$\n ERROR_SITE_ONBOARDING_INCOMPLETE\x10\x03\x12\x1f\n\x1b\x45RROR_RECIPIENT_NOT_ALLOWED\x10\x04\x12)\n%ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED\x10\x05\x12\x1b\n\x17\x45RROR_CRITICAL_INTERNAL\x10\x06\x12\"\n\x1e\x45RROR_CUSTOMER_QUOTA_EXHAUSTED\x10\x07\x12\x1f\n\x1b\x45RROR_VERIFICATION_BYPASSED\x10\x08\x12\x1a\n\x16\x45RROR_VERDICT_MISMATCH\x10\t\"\xcc\x01\n\x1fPrivatePasswordLeakVerification\x12\x1f\n\x12lookup_hash_prefix\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12,\n\x1f\x65ncrypted_user_credentials_hash\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\x12*\n\x1d\x65ncrypted_leak_match_prefixes\x18\x03 \x03(\x0c\x42\x03\xe0\x41\x03\x12.\n!reencrypted_user_credentials_hash\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x03\"\xa4\t\n\nAssessment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05\x65vent\x18\x02 \x01(\x0b\x32*.google.cloud.recaptchaenterprise.v1.EventB\x03\xe0\x41\x01\x12M\n\rrisk_analysis\x18\x03 \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.RiskAnalysisB\x03\xe0\x41\x03\x12S\n\x10token_properties\x18\x04 \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TokenPropertiesB\x03\xe0\x41\x03\x12_\n\x14\x61\x63\x63ount_verification\x18\x05 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.AccountVerificationInfoB\x03\xe0\x41\x01\x12h\n\x1b\x61\x63\x63ount_defender_assessment\x18\x06 \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessmentB\x03\xe0\x41\x03\x12u\n\"private_password_leak_verification\x18\x08 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerificationB\x03\xe0\x41\x01\x12\x66\n\x1a\x66irewall_policy_assessment\x18\n \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessmentB\x03\xe0\x41\x03\x12h\n\x1b\x66raud_prevention_assessment\x18\x0b \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessmentB\x03\xe0\x41\x03\x12M\n\rfraud_signals\x18\r \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.FraudSignalsB\x03\xe0\x41\x03\x12^\n\x16phone_fraud_assessment\x18\x0c \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.PhoneFraudAssessmentB\x03\xe0\x41\x03\x12_\n\x16\x61ssessment_environment\x18\x0e \x01(\x0b\x32:.google.cloud.recaptchaenterprise.v1.AssessmentEnvironmentB\x03\xe0\x41\x01:x\xea\x41u\n-recaptchaenterprise.googleapis.com/Assessment\x12+projects/{project}/assessments/{assessment}*\x0b\x61ssessments2\nassessment\"\xb0\x05\n\x05\x45vent\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08site_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nuser_agent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12$\n\x0fuser_ip_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x1c\n\x0f\x65xpected_action\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x06 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x14\n\x07\x65xpress\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rrequested_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14waf_token_assessment\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x10\n\x03ja3\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03ja4\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07headers\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x66irewall_policy_evaluation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\x10transaction_data\x18\r \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TransactionDataB\x03\xe0\x41\x01\x12\x45\n\tuser_info\x18\x0f \x01(\x0b\x32-.google.cloud.recaptchaenterprise.v1.UserInfoB\x03\xe0\x41\x01\x12Y\n\x10\x66raud_prevention\x18\x11 \x01(\x0e\x32:.google.cloud.recaptchaenterprise.v1.Event.FraudPreventionB\x03\xe0\x41\x01\"N\n\x0f\x46raudPrevention\x12 \n\x1c\x46RAUD_PREVENTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\xa0\n\n\x0fTransactionData\x12\x1b\n\x0etransaction_id\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61rd_bin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x63\x61rd_last_four\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1b\n\x0eshipping_value\x18\x0c \x01(\x01\x42\x03\xe0\x41\x01\x12[\n\x10shipping_address\x18\x06 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12Z\n\x0f\x62illing_address\x18\x07 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12L\n\x04user\x18\x08 \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12Q\n\tmerchants\x18\r \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12M\n\x05items\x18\x0e \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.ItemB\x03\xe0\x41\x01\x12[\n\x0cgateway_info\x18\n \x01(\x0b\x32@.google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfoB\x03\xe0\x41\x01\x1a\xa4\x01\n\x07\x41\x64\x64ress\x12\x16\n\trecipient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08locality\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x61\x64ministrative_area\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpostal_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04User\x12\x17\n\naccount_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x63reation_ms\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cphone_number\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ephone_verified\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x66\n\x04Item\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12 \n\x13merchant_account_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x0bGatewayInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15gateway_response_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61vs_response_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63vv_response_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f_transaction_id\"\xa5\x01\n\x08UserInfo\x12<\n\x13\x63reate_account_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x08user_ids\x18\x03 \x03(\x0b\x32+.google.cloud.recaptchaenterprise.v1.UserIdB\x03\xe0\x41\x01\"`\n\x06UserId\x12\x14\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x17\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x42\n\n\x08id_oneof\"\xfd\x04\n\x0cRiskAnalysis\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\\\n\x07reasons\x18\x02 \x03(\x0e\x32\x46.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReasonB\x03\xe0\x41\x03\x12%\n\x18\x65xtended_verdict_reasons\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12S\n\tchallenge\x18\x04 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ChallengeB\x03\xe0\x41\x03\x12\x44\n\rverified_bots\x18\x05 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.BotB\x03\xe0\x41\x03\"\xe9\x01\n\x14\x43lassificationReason\x12%\n!CLASSIFICATION_REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMATION\x10\x01\x12\x1a\n\x16UNEXPECTED_ENVIRONMENT\x10\x02\x12\x14\n\x10TOO_MUCH_TRAFFIC\x10\x03\x12\x1d\n\x19UNEXPECTED_USAGE_PATTERNS\x10\x04\x12\x18\n\x14LOW_CONFIDENCE_SCORE\x10\x05\x12\x15\n\x11SUSPECTED_CARDING\x10\x06\x12\x18\n\x14SUSPECTED_CHARGEBACK\x10\x07\"M\n\tChallenge\x12\x19\n\x15\x43HALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\n\n\x06PASSED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\xbd\x01\n\x03\x42ot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08\x62ot_type\x18\x02 \x01(\x0e\x32\x30.google.cloud.recaptchaenterprise.v1.Bot.BotTypeB\x03\xe0\x41\x01\"Z\n\x07\x42otType\x12\x18\n\x14\x42OT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41I_AGENT\x10\x01\x12\x13\n\x0f\x43ONTENT_SCRAPER\x10\x02\x12\x12\n\x0eSEARCH_INDEXER\x10\x03\"\xd2\x03\n\x0fTokenProperties\x12\x12\n\x05valid\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0einvalid_reason\x18\x02 \x01(\x0e\x32\x42.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReasonB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08hostname\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61ndroid_package_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rios_bundle_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xa8\x01\n\rInvalidReason\x12\x1e\n\x1aINVALID_REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16UNKNOWN_INVALID_REASON\x10\x01\x12\r\n\tMALFORMED\x10\x02\x12\x0b\n\x07\x45XPIRED\x10\x03\x12\x08\n\x04\x44UPE\x10\x04\x12\x0b\n\x07MISSING\x10\x05\x12\x11\n\rBROWSER_ERROR\x10\x06\x12\x15\n\x11UNEXPECTED_ACTION\x10\x07\"\xd0\x07\n\x19\x46raudPreventionAssessment\x12\x1d\n\x10transaction_risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x64\n\x0crisk_reasons\x18\x06 \x03(\x0b\x32I.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReasonB\x03\xe0\x41\x03\x12~\n\x19stolen_instrument_verdict\x18\x02 \x01(\x0b\x32V.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdictB\x03\xe0\x41\x03\x12t\n\x14\x63\x61rd_testing_verdict\x18\x03 \x01(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictB\x03\xe0\x41\x03\x12|\n\x18\x62\x65havioral_trust_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictB\x03\xe0\x41\x03\x1a\xb4\x02\n\nRiskReason\x12\x65\n\x06reason\x18\x01 \x01(\x0e\x32P.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.ReasonB\x03\xe0\x41\x03\"\xbe\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19HIGH_TRANSACTION_VELOCITY\x10\x01\x12!\n\x1d\x45XCESSIVE_ENUMERATION_PATTERN\x10\x02\x12\x1a\n\x16SHORT_IDENTITY_HISTORY\x10\x03\x12\x1b\n\x17GEOLOCATION_DISCREPANCY\x10\x04\x12!\n\x1d\x41SSOCIATED_WITH_FRAUD_CLUSTER\x10\x05\x1a,\n\x17StolenInstrumentVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\'\n\x12\x43\x61rdTestingVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a,\n\x16\x42\x65havioralTrustVerdict\x12\x12\n\x05trust\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\"\xe3\x03\n\x0c\x46raudSignals\x12X\n\x0cuser_signals\x18\x01 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignalsB\x03\xe0\x41\x03\x12X\n\x0c\x63\x61rd_signals\x18\x02 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignalsB\x03\xe0\x41\x03\x1aP\n\x0bUserSignals\x12$\n\x17\x61\x63tive_days_lower_bound\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1b\n\x0esynthetic_risk\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xcc\x01\n\x0b\x43\x61rdSignals\x12\x61\n\x0b\x63\x61rd_labels\x18\x01 \x03(\x0e\x32G.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabelB\x03\xe0\x41\x03\"Z\n\tCardLabel\x12\x1a\n\x16\x43\x41RD_LABEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREPAID\x10\x01\x12\x0b\n\x07VIRTUAL\x10\x02\x12\x17\n\x13UNEXPECTED_LOCATION\x10\x03\"\xe2\x01\n\x13SmsTollFraudVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x61\n\x07reasons\x18\x02 \x03(\x0e\x32K.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReasonB\x03\xe0\x41\x03\"U\n\x12SmsTollFraudReason\x12%\n!SMS_TOLL_FRAUD_REASON_UNSPECIFIED\x10\x00\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x01\"u\n\x14PhoneFraudAssessment\x12]\n\x16sms_toll_fraud_verdict\x18\x01 \x01(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdictB\x03\xe0\x41\x03\"\xbb\x02\n\x19\x41\x63\x63ountDefenderAssessment\x12h\n\x06labels\x18\x01 \x03(\x0e\x32S.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabelB\x03\xe0\x41\x03\"\xb3\x01\n\x14\x41\x63\x63ountDefenderLabel\x12&\n\"ACCOUNT_DEFENDER_LABEL_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19SUSPICIOUS_LOGIN_ACTIVITY\x10\x02\x12\x1f\n\x1bSUSPICIOUS_ACCOUNT_CREATION\x10\x03\x12 \n\x1cRELATED_ACCOUNTS_NUMBER_HIGH\x10\x04\"\x93\x01\n\x10\x43reateKeyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x03key\x18\x02 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\"\x87\x01\n\x0fListKeysRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"c\n\x10ListKeysResponse\x12\x36\n\x04keys\x18\x01 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.Key\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eRetrieveLegacySecretKeyRequest\x12;\n\x03key\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"M\n\rGetKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\x84\x01\n\x10UpdateKeyRequest\x12:\n\x03key\x18\x01 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"P\n\x10\x44\x65leteKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\xb5\x01\n\x1b\x43reateFirewallPolicyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12Q\n\x0f\x66irewall_policy\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\"\x93\x01\n\x1bListFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"\x87\x01\n\x1cListFirewallPoliciesResponse\x12N\n\x11\x66irewall_policies\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x18GetFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xa6\x01\n\x1bUpdateFirewallPolicyRequest\x12Q\n\x0f\x66irewall_policy\x18\x01 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x1b\x44\x65leteFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xaf\x01\n\x1eReorderFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x05names\x18\x02 \x03(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"!\n\x1fReorderFirewallPoliciesResponse\"r\n\x11MigrateKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12\x1f\n\x12skip_billing_check\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x11GetMetricsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*recaptchaenterprise.googleapis.com/Metrics\"\xd5\x02\n\x07Metrics\x12\x14\n\x04name\x18\x04 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\rscore_metrics\x18\x02 \x03(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.ScoreMetrics\x12P\n\x11\x63hallenge_metrics\x18\x03 \x03(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.ChallengeMetrics:h\xea\x41\x65\n*recaptchaenterprise.googleapis.com/Metrics\x12%projects/{project}/keys/{key}/metrics*\x07metrics2\x07metrics\"<\n\x1fRetrieveLegacySecretKeyResponse\x12\x19\n\x11legacy_secret_key\x18\x01 \x01(\t\"\xb3\x06\n\x03Key\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0cweb_settings\x18\x03 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.WebKeySettingsH\x00\x12S\n\x10\x61ndroid_settings\x18\x04 \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.AndroidKeySettingsH\x00\x12K\n\x0cios_settings\x18\x05 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IOSKeySettingsH\x00\x12S\n\x10\x65xpress_settings\x18\x0b \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ExpressKeySettingsH\x00\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.Key.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0ftesting_options\x18\t \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.TestingOptionsB\x03\xe0\x41\x01\x12K\n\x0cwaf_settings\x18\n \x01(\x0b\x32\x30.google.cloud.recaptchaenterprise.v1.WafSettingsB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:U\xea\x41R\n&recaptchaenterprise.googleapis.com/Key\x12\x1dprojects/{project}/keys/{key}*\x04keys2\x03keyB\x13\n\x11platform_settings\"\xf2\x01\n\x0eTestingOptions\x12\x1a\n\rtesting_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x64\n\x11testing_challenge\x18\x02 \x01(\x0e\x32\x44.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallengeB\x03\xe0\x41\x01\"^\n\x10TestingChallenge\x12!\n\x1dTESTING_CHALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\x18\n\x14UNSOLVABLE_CHALLENGE\x10\x02\"\xc5\x08\n\x0eWebKeySettings\x12\x1e\n\x11\x61llow_all_domains\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_amp_traffic\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x10integration_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationTypeB\x03\xe0\x41\x02\x12{\n\x1d\x63hallenge_security_preference\x18\x05 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x12\x66\n\x12\x63hallenge_settings\x18\x06 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettingsB\x03\xe0\x41\x01\x1a.\n\x0e\x41\x63tionSettings\x12\x1c\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x1a\xea\x02\n\x11\x43hallengeSettings\x12\x61\n\x10\x64\x65\x66\x61ult_settings\x18\x01 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettingsB\x03\xe0\x41\x02\x12w\n\x0f\x61\x63tion_settings\x18\x02 \x03(\x0b\x32Y.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings.ActionSettingsEntryB\x03\xe0\x41\x01\x1ay\n\x13\x41\x63tionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings:\x02\x38\x01\"w\n\x0fIntegrationType\x12 \n\x1cINTEGRATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SCORE\x10\x01\x12\x0c\n\x08\x43HECKBOX\x10\x02\x12\r\n\tINVISIBLE\x10\x03\x12\x1a\n\x16POLICY_BASED_CHALLENGE\x10\x05\"v\n\x1b\x43hallengeSecurityPreference\x12-\n)CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED\x10\x00\x12\r\n\tUSABILITY\x10\x01\x12\x0b\n\x07\x42\x41LANCE\x10\x02\x12\x0c\n\x08SECURITY\x10\x03\"\x96\x01\n\x12\x41ndroidKeySettings\x12$\n\x17\x61llow_all_package_names\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15\x61llowed_package_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x36\n)support_non_google_app_store_distribution\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xac\x01\n\x0eIOSKeySettings\x12!\n\x14\x61llow_all_bundle_ids\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x61llowed_bundle_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12V\n\x12\x61pple_developer_id\x18\x03 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.AppleDeveloperIdB\x03\xe0\x41\x01\"\x14\n\x12\x45xpressKeySettings\"Z\n\x10\x41ppleDeveloperId\x12\x1b\n\x0bprivate_key\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07team_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x11ScoreDistribution\x12_\n\rscore_buckets\x18\x01 \x03(\x0b\x32H.google.cloud.recaptchaenterprise.v1.ScoreDistribution.ScoreBucketsEntry\x1a\x33\n\x11ScoreBucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xab\x02\n\x0cScoreMetrics\x12O\n\x0foverall_metrics\x18\x01 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution\x12\\\n\x0e\x61\x63tion_metrics\x18\x02 \x03(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.ScoreMetrics.ActionMetricsEntry\x1al\n\x12\x41\x63tionMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution:\x02\x38\x01\"o\n\x10\x43hallengeMetrics\x12\x16\n\x0epageload_count\x18\x01 \x01(\x03\x12\x17\n\x0fnocaptcha_count\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_count\x18\x03 \x01(\x03\x12\x14\n\x0cpassed_count\x18\x04 \x01(\x03\"\x95\x01\n\x18\x46irewallPolicyAssessment\x12&\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12Q\n\x0f\x66irewall_policy\x18\x08 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x03\"\x82\x06\n\x0e\x46irewallAction\x12P\n\x05\x61llow\x18\x01 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.AllowActionH\x00\x12P\n\x05\x62lock\x18\x02 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.BlockActionH\x00\x12t\n\x18include_recaptcha_script\x18\x06 \x01(\x0b\x32P.google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptActionH\x00\x12V\n\x08redirect\x18\x05 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectActionH\x00\x12Z\n\nsubstitute\x18\x03 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteActionH\x00\x12Y\n\nset_header\x18\x04 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderActionH\x00\x1a\r\n\x0b\x41llowAction\x1a\r\n\x0b\x42lockAction\x1a\x1e\n\x1cIncludeRecaptchaScriptAction\x1a\x10\n\x0eRedirectAction\x1a%\n\x10SubstituteAction\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\x0fSetHeaderAction\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x17\n\x15\x66irewall_action_oneof\"\xc5\x02\n\x0e\x46irewallPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcondition\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x61\x63tions\x18\x06 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallActionB\x03\xe0\x41\x01:\x8f\x01\xea\x41\x8b\x01\n1recaptchaenterprise.googleapis.com/FirewallPolicy\x12\x34projects/{project}/firewallpolicies/{firewallpolicy}*\x10\x66irewallPolicies2\x0e\x66irewallPolicy\"\xb6\x01\n)ListRelatedAccountGroupMembershipsRequest\x12X\n\x06parent\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\x12@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\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\"\xb4\x01\n*ListRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa2\x01\n\x1fListRelatedAccountGroupsRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36recaptchaenterprise.googleapis.com/RelatedAccountGroup\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\"\x95\x01\n ListRelatedAccountGroupsResponse\x12X\n\x16related_account_groups\x18\x01 \x03(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x01\n+SearchRelatedAccountGroupMembershipsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\naccount_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n,SearchRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x14\x41\x64\x64IpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x17\n\x15\x41\x64\x64IpOverrideResponse\"\xab\x01\n\x17RemoveIpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x1a\n\x18RemoveIpOverrideResponse\"\x89\x01\n\x16ListIpOverridesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\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\"}\n\x17ListIpOverridesResponse\x12I\n\x0cip_overrides\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideData\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc8\x02\n\x1dRelatedAccountGroupMembership\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\naccount_id\x18\x04 \x01(\t\x12\x1d\n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x02\x18\x01:\xdd\x01\xea\x41\xd9\x01\n@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\x12Vprojects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}*\x1erelatedAccountGroupMemberships2\x1drelatedAccountGroupMembership\"\xd4\x01\n\x13RelatedAccountGroup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02:\xa6\x01\xea\x41\xa2\x01\n6recaptchaenterprise.googleapis.com/RelatedAccountGroup\x12=projects/{project}/relatedaccountgroups/{relatedaccountgroup}*\x14relatedAccountGroups2\x13relatedAccountGroup\"\x8b\x03\n\x0bWafSettings\x12U\n\x0bwaf_service\x18\x01 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafServiceB\x03\xe0\x41\x02\x12U\n\x0bwaf_feature\x18\x02 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeatureB\x03\xe0\x41\x02\"s\n\nWafFeature\x12\x1b\n\x17WAF_FEATURE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HALLENGE_PAGE\x10\x01\x12\x11\n\rSESSION_TOKEN\x10\x02\x12\x10\n\x0c\x41\x43TION_TOKEN\x10\x03\x12\x0f\n\x07\x45XPRESS\x10\x05\x1a\x02\x08\x01\"Y\n\nWafService\x12\x1b\n\x17WAF_SERVICE_UNSPECIFIED\x10\x00\x12\x06\n\x02\x43\x41\x10\x01\x12\n\n\x06\x46\x41STLY\x10\x03\x12\x0e\n\nCLOUDFLARE\x10\x04\x12\n\n\x06\x41KAMAI\x10\x05\"B\n\x15\x41ssessmentEnvironment\x12\x13\n\x06\x63lient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc1\x01\n\x0eIpOverrideData\x12\x17\n\x02ip\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\\\n\roverride_type\x18\x03 \x01(\x0e\x32@.google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideTypeB\x03\xe0\x41\x02\"8\n\x0cOverrideType\x12\x1d\n\x19OVERRIDE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x32\xe5$\n\x1aRecaptchaEnterpriseService\x12\xce\x01\n\x10\x43reateAssessment\x12<.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest\x1a/.google.cloud.recaptchaenterprise.v1.Assessment\"K\xda\x41\x11parent,assessment\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/assessments:\nassessment\x12\xe0\x01\n\x12\x41nnotateAssessment\x12>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest\x1a?.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse\"I\xda\x41\x0fname,annotation\x82\xd3\xe4\x93\x02\x31\",/v1/{name=projects/*/assessments/*}:annotate:\x01*\x12\xa4\x01\n\tCreateKey\x12\x35.google.cloud.recaptchaenterprise.v1.CreateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"6\xda\x41\nparent,key\x82\xd3\xe4\x93\x02#\"\x1c/v1/{parent=projects/*}/keys:\x03key\x12\xa6\x01\n\x08ListKeys\x12\x34.google.cloud.recaptchaenterprise.v1.ListKeysRequest\x1a\x35.google.cloud.recaptchaenterprise.v1.ListKeysResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=projects/*}/keys\x12\xe7\x01\n\x17RetrieveLegacySecretKey\x12\x43.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse\"A\xda\x41\x03key\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey\x12\x93\x01\n\x06GetKey\x12\x32.google.cloud.recaptchaenterprise.v1.GetKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/keys/*}\x12\xad\x01\n\tUpdateKey\x12\x35.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"?\xda\x41\x0fkey,update_mask\x82\xd3\xe4\x93\x02\'2 /v1/{key.name=projects/*/keys/*}:\x03key\x12\x87\x01\n\tDeleteKey\x12\x35.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest\x1a\x16.google.protobuf.Empty\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=projects/*/keys/*}\x12\x9f\x01\n\nMigrateKey\x12\x36.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"/\x82\xd3\xe4\x93\x02)\"$/v1/{name=projects/*/keys/*}:migrate:\x01*\x12\xd5\x01\n\rAddIpOverride\x12\x39.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest\x1a:.google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse\"M\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02/\"*/v1/{name=projects/*/keys/*}:addIpOverride:\x01*\x12\xe1\x01\n\x10RemoveIpOverride\x12<.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest\x1a=.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse\"P\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=projects/*/keys/*}:removeIpOverride:\x01*\x12\xcd\x01\n\x0fListIpOverrides\x12;.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest\x1a<.google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/keys/*}:listIpOverrides\x12\xa7\x01\n\nGetMetrics\x12\x36.google.cloud.recaptchaenterprise.v1.GetMetricsRequest\x1a,.google.cloud.recaptchaenterprise.v1.Metrics\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=projects/*/keys/*/metrics}\x12\xe9\x01\n\x14\x43reateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"Z\xda\x41\x16parent,firewall_policy\x82\xd3\xe4\x93\x02;\"(/v1/{parent=projects/*}/firewallpolicies:\x0f\x66irewall_policy\x12\xd6\x01\n\x14ListFirewallPolicies\x12@.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest\x1a\x41.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*}/firewallpolicies\x12\xc0\x01\n\x11GetFirewallPolicy\x12=.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/firewallpolicies/*}\x12\xfe\x01\n\x14UpdateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"o\xda\x41\x1b\x66irewall_policy,update_mask\x82\xd3\xe4\x93\x02K28/v1/{firewall_policy.name=projects/*/firewallpolicies/*}:\x0f\x66irewall_policy\x12\xa9\x01\n\x14\x44\x65leteFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/firewallpolicies/*}\x12\xf0\x01\n\x17ReorderFirewallPolicies\x12\x43.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse\"J\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=projects/*}/firewallpolicies:reorder:\x01*\x12\xe6\x01\n\x18ListRelatedAccountGroups\x12\x44.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest\x1a\x45.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*}/relatedaccountgroups\x12\x92\x02\n\"ListRelatedAccountGroupMemberships\x12N.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest\x1aO.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/relatedaccountgroups/*}/memberships\x12\xb2\x02\n$SearchRelatedAccountGroupMemberships\x12P.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest\x1aQ.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse\"e\xda\x41\x19project,hashed_account_id\x82\xd3\xe4\x93\x02\x43\">/v1/{project=projects/*}/relatedaccountgroupmemberships:search:\x01*\x1aV\xca\x41\"recaptchaenterprise.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n!com.google.recaptchaenterprise.v1B\x18RecaptchaEnterpriseProtoP\x01Z\\cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb\xa2\x02\x04GCRE\xaa\x02#Google.Cloud.RecaptchaEnterprise.V1\xca\x02#Google\\Cloud\\RecaptchaEnterprise\\V1\xea\x02&Google::Cloud::RecaptchaEnterprise::V1b\x06proto3" +descriptor_data = "\n=google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto\x12#google.cloud.recaptchaenterprise.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\x17\x43reateAssessmentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\nassessment\x18\x02 \x01(\x0b\x32/.google.cloud.recaptchaenterprise.v1.AssessmentB\x03\xe0\x41\x02\"\x92\x05\n\x10TransactionEvent\x12\x63\n\nevent_type\x18\x01 \x01(\x0e\x32J.google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventTypeB\x03\xe0\x41\x01\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x33\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xba\x03\n\x14TransactionEventType\x12&\n\"TRANSACTION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MERCHANT_APPROVE\x10\x01\x12\x11\n\rMERCHANT_DENY\x10\x02\x12\x11\n\rMANUAL_REVIEW\x10\x03\x12\x11\n\rAUTHORIZATION\x10\x04\x12\x19\n\x15\x41UTHORIZATION_DECLINE\x10\x05\x12\x13\n\x0fPAYMENT_CAPTURE\x10\x06\x12\x1b\n\x17PAYMENT_CAPTURE_DECLINE\x10\x07\x12\n\n\x06\x43\x41NCEL\x10\x08\x12\x16\n\x12\x43HARGEBACK_INQUIRY\x10\t\x12\x14\n\x10\x43HARGEBACK_ALERT\x10\n\x12\x16\n\x12\x46RAUD_NOTIFICATION\x10\x0b\x12\x0e\n\nCHARGEBACK\x10\x0c\x12\x1c\n\x18\x43HARGEBACK_REPRESENTMENT\x10\r\x12\x16\n\x12\x43HARGEBACK_REVERSE\x10\x0e\x12\x12\n\x0eREFUND_REQUEST\x10\x0f\x12\x12\n\x0eREFUND_DECLINE\x10\x10\x12\n\n\x06REFUND\x10\x11\x12\x12\n\x0eREFUND_REVERSE\x10\x12\"j\n\x18PhoneAuthenticationEvent\x12\x19\n\x0cphone_number\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xeb\x07\n\x19\x41nnotateAssessmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-recaptchaenterprise.googleapis.com/Assessment\x12\x62\n\nannotation\x18\x02 \x01(\x0e\x32I.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.AnnotationB\x03\xe0\x41\x01\x12[\n\x07reasons\x18\x03 \x03(\x0e\x32\x45.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.ReasonB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11hashed_account_id\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x12U\n\x11transaction_event\x18\x05 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.TransactionEventB\x03\xe0\x41\x01\x12\x66\n\x1aphone_authentication_event\x18\x06 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEventB\x03\xe0\x41\x01\"~\n\nAnnotation\x12\x1a\n\x16\x41NNOTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nLEGITIMATE\x10\x01\x12\x0e\n\nFRAUDULENT\x10\x02\x12\x18\n\x10PASSWORD_CORRECT\x10\x03\x1a\x02\x08\x01\x12\x1a\n\x12PASSWORD_INCORRECT\x10\x04\x1a\x02\x08\x01\"\xcf\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nCHARGEBACK\x10\x01\x12\x14\n\x10\x43HARGEBACK_FRAUD\x10\x08\x12\x16\n\x12\x43HARGEBACK_DISPUTE\x10\t\x12\n\n\x06REFUND\x10\n\x12\x10\n\x0cREFUND_FRAUD\x10\x0b\x12\x18\n\x14TRANSACTION_ACCEPTED\x10\x0c\x12\x18\n\x14TRANSACTION_DECLINED\x10\r\x12\x16\n\x12PAYMENT_HEURISTICS\x10\x02\x12\x18\n\x14INITIATED_TWO_FACTOR\x10\x07\x12\x15\n\x11PASSED_TWO_FACTOR\x10\x03\x12\x15\n\x11\x46\x41ILED_TWO_FACTOR\x10\x04\x12\x14\n\x10\x43ORRECT_PASSWORD\x10\x05\x12\x16\n\x12INCORRECT_PASSWORD\x10\x06\x12\x0f\n\x0bSOCIAL_SPAM\x10\x0e\"\x1c\n\x1a\x41nnotateAssessmentResponse\"\xb4\x01\n\x18\x45ndpointVerificationInfo\x12\x17\n\remail_address\x18\x01 \x01(\tH\x00\x12\x16\n\x0cphone_number\x18\x02 \x01(\tH\x00\x12\x1a\n\rrequest_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x16last_verification_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\n\n\x08\x65ndpoint\"\xdb\x04\n\x17\x41\x63\x63ountVerificationInfo\x12U\n\tendpoints\x18\x01 \x03(\x0b\x32=.google.cloud.recaptchaenterprise.v1.EndpointVerificationInfoB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12l\n\x1alatest_verification_result\x18\x07 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.ResultB\x03\xe0\x41\x03\x12\x14\n\x08username\x18\x02 \x01(\tB\x02\x18\x01\"\xc8\x02\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x19\n\x15SUCCESS_USER_VERIFIED\x10\x01\x12\x1b\n\x17\x45RROR_USER_NOT_VERIFIED\x10\x02\x12$\n ERROR_SITE_ONBOARDING_INCOMPLETE\x10\x03\x12\x1f\n\x1b\x45RROR_RECIPIENT_NOT_ALLOWED\x10\x04\x12)\n%ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED\x10\x05\x12\x1b\n\x17\x45RROR_CRITICAL_INTERNAL\x10\x06\x12\"\n\x1e\x45RROR_CUSTOMER_QUOTA_EXHAUSTED\x10\x07\x12\x1f\n\x1b\x45RROR_VERIFICATION_BYPASSED\x10\x08\x12\x1a\n\x16\x45RROR_VERDICT_MISMATCH\x10\t\"\xcc\x01\n\x1fPrivatePasswordLeakVerification\x12\x1f\n\x12lookup_hash_prefix\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12,\n\x1f\x65ncrypted_user_credentials_hash\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\x12*\n\x1d\x65ncrypted_leak_match_prefixes\x18\x03 \x03(\x0c\x42\x03\xe0\x41\x03\x12.\n!reencrypted_user_credentials_hash\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x03\"\xfb\t\n\nAssessment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05\x65vent\x18\x02 \x01(\x0b\x32*.google.cloud.recaptchaenterprise.v1.EventB\x03\xe0\x41\x01\x12M\n\rrisk_analysis\x18\x03 \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.RiskAnalysisB\x03\xe0\x41\x03\x12S\n\x10token_properties\x18\x04 \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TokenPropertiesB\x03\xe0\x41\x03\x12_\n\x14\x61\x63\x63ount_verification\x18\x05 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.AccountVerificationInfoB\x03\xe0\x41\x01\x12h\n\x1b\x61\x63\x63ount_defender_assessment\x18\x06 \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessmentB\x03\xe0\x41\x03\x12u\n\"private_password_leak_verification\x18\x08 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerificationB\x03\xe0\x41\x01\x12\x66\n\x1a\x66irewall_policy_assessment\x18\n \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessmentB\x03\xe0\x41\x03\x12h\n\x1b\x66raud_prevention_assessment\x18\x0b \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessmentB\x03\xe0\x41\x03\x12M\n\rfraud_signals\x18\r \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.FraudSignalsB\x03\xe0\x41\x03\x12^\n\x16phone_fraud_assessment\x18\x0c \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.PhoneFraudAssessmentB\x03\xe0\x41\x03\x12_\n\x16\x61ssessment_environment\x18\x0e \x01(\x0b\x32:.google.cloud.recaptchaenterprise.v1.AssessmentEnvironmentB\x03\xe0\x41\x01\x12U\n\x11policy_evaluation\x18\x10 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.PolicyEvaluationB\x03\xe0\x41\x03:x\xea\x41u\n-recaptchaenterprise.googleapis.com/Assessment\x12+projects/{project}/assessments/{assessment}*\x0b\x61ssessments2\nassessment\"\xb0\x05\n\x05\x45vent\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08site_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nuser_agent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12$\n\x0fuser_ip_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x1c\n\x0f\x65xpected_action\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x06 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x14\n\x07\x65xpress\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rrequested_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14waf_token_assessment\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x10\n\x03ja3\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03ja4\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07headers\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x66irewall_policy_evaluation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\x10transaction_data\x18\r \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TransactionDataB\x03\xe0\x41\x01\x12\x45\n\tuser_info\x18\x0f \x01(\x0b\x32-.google.cloud.recaptchaenterprise.v1.UserInfoB\x03\xe0\x41\x01\x12Y\n\x10\x66raud_prevention\x18\x11 \x01(\x0e\x32:.google.cloud.recaptchaenterprise.v1.Event.FraudPreventionB\x03\xe0\x41\x01\"N\n\x0f\x46raudPrevention\x12 \n\x1c\x46RAUD_PREVENTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\xa0\n\n\x0fTransactionData\x12\x1b\n\x0etransaction_id\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61rd_bin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x63\x61rd_last_four\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1b\n\x0eshipping_value\x18\x0c \x01(\x01\x42\x03\xe0\x41\x01\x12[\n\x10shipping_address\x18\x06 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12Z\n\x0f\x62illing_address\x18\x07 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12L\n\x04user\x18\x08 \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12Q\n\tmerchants\x18\r \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12M\n\x05items\x18\x0e \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.ItemB\x03\xe0\x41\x01\x12[\n\x0cgateway_info\x18\n \x01(\x0b\x32@.google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfoB\x03\xe0\x41\x01\x1a\xa4\x01\n\x07\x41\x64\x64ress\x12\x16\n\trecipient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08locality\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x61\x64ministrative_area\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpostal_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04User\x12\x17\n\naccount_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x63reation_ms\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cphone_number\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ephone_verified\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x66\n\x04Item\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12 \n\x13merchant_account_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x0bGatewayInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15gateway_response_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61vs_response_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63vv_response_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f_transaction_id\"\xa5\x01\n\x08UserInfo\x12<\n\x13\x63reate_account_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x08user_ids\x18\x03 \x03(\x0b\x32+.google.cloud.recaptchaenterprise.v1.UserIdB\x03\xe0\x41\x01\"`\n\x06UserId\x12\x14\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x17\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x42\n\n\x08id_oneof\"\xdb\x05\n\x0cRiskAnalysis\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\\\n\x07reasons\x18\x02 \x03(\x0e\x32\x46.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReasonB\x03\xe0\x41\x03\x12%\n\x18\x65xtended_verdict_reasons\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12T\n\x13last_challenge_type\x18\x06 \x01(\x0e\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeTypeB\x03\xe0\x41\x03\x12S\n\tchallenge\x18\x04 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ChallengeB\x03\xe0\x41\x03\x12\x44\n\rverified_bots\x18\x05 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.BotB\x03\xe0\x41\x03\"\xf1\x01\n\x14\x43lassificationReason\x12%\n!CLASSIFICATION_REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMATION\x10\x01\x12\x1a\n\x16UNEXPECTED_ENVIRONMENT\x10\x02\x12\x14\n\x10TOO_MUCH_TRAFFIC\x10\x03\x12\x1d\n\x19UNEXPECTED_USAGE_PATTERNS\x10\x04\x12\x18\n\x14LOW_CONFIDENCE_SCORE\x10\x05\x12\x19\n\x11SUSPECTED_CARDING\x10\x06\x1a\x02\x08\x01\x12\x1c\n\x14SUSPECTED_CHARGEBACK\x10\x07\x1a\x02\x08\x01\"M\n\tChallenge\x12\x19\n\x15\x43HALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\n\n\x06PASSED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\xbd\x01\n\x03\x42ot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08\x62ot_type\x18\x02 \x01(\x0e\x32\x30.google.cloud.recaptchaenterprise.v1.Bot.BotTypeB\x03\xe0\x41\x01\"Z\n\x07\x42otType\x12\x18\n\x14\x42OT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41I_AGENT\x10\x01\x12\x13\n\x0f\x43ONTENT_SCRAPER\x10\x02\x12\x12\n\x0eSEARCH_INDEXER\x10\x03\"\xf9\x03\n\x0fTokenProperties\x12\x12\n\x05valid\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0einvalid_reason\x18\x02 \x01(\x0e\x32\x42.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReasonB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08hostname\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61ndroid_package_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rios_bundle_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\rInvalidReason\x12\x1e\n\x1aINVALID_REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16UNKNOWN_INVALID_REASON\x10\x01\x12\r\n\tMALFORMED\x10\x02\x12\x0b\n\x07\x45XPIRED\x10\x03\x12\x08\n\x04\x44UPE\x10\x04\x12\x0b\n\x07MISSING\x10\x05\x12\x11\n\rBROWSER_ERROR\x10\x06\x12\x15\n\x11UNEXPECTED_ACTION\x10\x07\x12\x10\n\x0cKEY_MISMATCH\x10\x08\x12\x13\n\x0f\x44OMAIN_MISMATCH\x10\t\"\xd0\x07\n\x19\x46raudPreventionAssessment\x12\x1d\n\x10transaction_risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x64\n\x0crisk_reasons\x18\x06 \x03(\x0b\x32I.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReasonB\x03\xe0\x41\x03\x12~\n\x19stolen_instrument_verdict\x18\x02 \x01(\x0b\x32V.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdictB\x03\xe0\x41\x03\x12t\n\x14\x63\x61rd_testing_verdict\x18\x03 \x01(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictB\x03\xe0\x41\x03\x12|\n\x18\x62\x65havioral_trust_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictB\x03\xe0\x41\x03\x1a\xb4\x02\n\nRiskReason\x12\x65\n\x06reason\x18\x01 \x01(\x0e\x32P.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.ReasonB\x03\xe0\x41\x03\"\xbe\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19HIGH_TRANSACTION_VELOCITY\x10\x01\x12!\n\x1d\x45XCESSIVE_ENUMERATION_PATTERN\x10\x02\x12\x1a\n\x16SHORT_IDENTITY_HISTORY\x10\x03\x12\x1b\n\x17GEOLOCATION_DISCREPANCY\x10\x04\x12!\n\x1d\x41SSOCIATED_WITH_FRAUD_CLUSTER\x10\x05\x1a,\n\x17StolenInstrumentVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\'\n\x12\x43\x61rdTestingVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a,\n\x16\x42\x65havioralTrustVerdict\x12\x12\n\x05trust\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\"\xe3\x03\n\x0c\x46raudSignals\x12X\n\x0cuser_signals\x18\x01 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignalsB\x03\xe0\x41\x03\x12X\n\x0c\x63\x61rd_signals\x18\x02 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignalsB\x03\xe0\x41\x03\x1aP\n\x0bUserSignals\x12$\n\x17\x61\x63tive_days_lower_bound\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1b\n\x0esynthetic_risk\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xcc\x01\n\x0b\x43\x61rdSignals\x12\x61\n\x0b\x63\x61rd_labels\x18\x01 \x03(\x0e\x32G.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabelB\x03\xe0\x41\x03\"Z\n\tCardLabel\x12\x1a\n\x16\x43\x41RD_LABEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREPAID\x10\x01\x12\x0b\n\x07VIRTUAL\x10\x02\x12\x17\n\x13UNEXPECTED_LOCATION\x10\x03\"\xe2\x01\n\x13SmsTollFraudVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x61\n\x07reasons\x18\x02 \x03(\x0e\x32K.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReasonB\x03\xe0\x41\x03\"U\n\x12SmsTollFraudReason\x12%\n!SMS_TOLL_FRAUD_REASON_UNSPECIFIED\x10\x00\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x01\"u\n\x14PhoneFraudAssessment\x12]\n\x16sms_toll_fraud_verdict\x18\x01 \x01(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdictB\x03\xe0\x41\x03\"\xb8\n\n\x19\x41\x63\x63ountDefenderAssessment\x12h\n\x06labels\x18\x01 \x03(\x0e\x32S.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabelB\x03\xe0\x41\x03\x12|\n\x18\x61\x63\x63ount_takeover_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdictB\x03\xe0\x41\x03\x1a\x8d\x02\n\x16\x41\x63\x63ountTakeoverVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12n\n\x0crisk_reasons\x18\x04 \x03(\x0b\x32P.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReasonB\x06\xe0\x41\x03\xe0\x41\x06\x12p\n\rtrust_reasons\x18\x05 \x03(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReasonB\x06\xe0\x41\x03\xe0\x41\x06\x1a\xb9\x02\n\x11\x41\x63\x63ountRiskReason\x12p\n\x06reason\x18\x01 \x01(\x0e\x32[.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReasonB\x03\xe0\x41\x03\"\xb1\x01\n\nRiskReason\x12\x1b\n\x17RISK_REASON_UNSPECIFIED\x10\x00\x12\"\n\x1e\x43LIENT_HISTORICAL_BOT_ACTIVITY\x10\x01\x12\"\n\x1e\x41\x43\x43OUNT_IN_LARGE_RELATED_GROUP\x10\x02\x12!\n\x1d\x43LIENT_ACCESSED_MANY_ACCOUNTS\x10\x03\x12\x1b\n\x17\x44ISPOSABLE_EMAIL_DOMAIN\x10\x04\x1a\xb0\x02\n\x12\x41\x63\x63ountTrustReason\x12r\n\x06reason\x18\x01 \x01(\x0e\x32].google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReasonB\x03\xe0\x41\x03\"\xa5\x01\n\x0bTrustReason\x12\x1c\n\x18TRUST_REASON_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19\x41\x43\x43OUNT_HISTORY_REPUTABLE\x10\x02\x12&\n\"IDENTITY_GLOBAL_ACTIVITY_REPUTABLE\x10\x03\x12\x1e\n\x1aIDENTITY_HISTORY_REPUTABLE\x10\x04\"\xb3\x01\n\x14\x41\x63\x63ountDefenderLabel\x12&\n\"ACCOUNT_DEFENDER_LABEL_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19SUSPICIOUS_LOGIN_ACTIVITY\x10\x02\x12\x1f\n\x1bSUSPICIOUS_ACCOUNT_CREATION\x10\x03\x12 \n\x1cRELATED_ACCOUNTS_NUMBER_HIGH\x10\x04\"\x93\x01\n\x10\x43reateKeyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x03key\x18\x02 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\"\x87\x01\n\x0fListKeysRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"c\n\x10ListKeysResponse\x12\x36\n\x04keys\x18\x01 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.Key\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eRetrieveLegacySecretKeyRequest\x12;\n\x03key\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"M\n\rGetKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\x84\x01\n\x10UpdateKeyRequest\x12:\n\x03key\x18\x01 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"P\n\x10\x44\x65leteKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\xb5\x01\n\x1b\x43reateFirewallPolicyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12Q\n\x0f\x66irewall_policy\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\"\x93\x01\n\x1bListFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"\x87\x01\n\x1cListFirewallPoliciesResponse\x12N\n\x11\x66irewall_policies\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x18GetFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xa6\x01\n\x1bUpdateFirewallPolicyRequest\x12Q\n\x0f\x66irewall_policy\x18\x01 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x1b\x44\x65leteFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xaf\x01\n\x1eReorderFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x05names\x18\x02 \x03(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"!\n\x1fReorderFirewallPoliciesResponse\"r\n\x11MigrateKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12\x1f\n\x12skip_billing_check\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x11GetMetricsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*recaptchaenterprise.googleapis.com/Metrics\"\xd5\x02\n\x07Metrics\x12\x14\n\x04name\x18\x04 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\rscore_metrics\x18\x02 \x03(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.ScoreMetrics\x12P\n\x11\x63hallenge_metrics\x18\x03 \x03(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.ChallengeMetrics:h\xea\x41\x65\n*recaptchaenterprise.googleapis.com/Metrics\x12%projects/{project}/keys/{key}/metrics*\x07metrics2\x07metrics\"<\n\x1fRetrieveLegacySecretKeyResponse\x12\x19\n\x11legacy_secret_key\x18\x01 \x01(\t\"\x8c\x07\n\x03Key\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0cweb_settings\x18\x03 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.WebKeySettingsH\x00\x12S\n\x10\x61ndroid_settings\x18\x04 \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.AndroidKeySettingsH\x00\x12K\n\x0cios_settings\x18\x05 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IOSKeySettingsH\x00\x12S\n\x10\x65xpress_settings\x18\x0b \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ExpressKeySettingsH\x00\x12W\n\x12universal_settings\x18\r \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.UniversalKeySettingsH\x00\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.Key.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0ftesting_options\x18\t \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.TestingOptionsB\x03\xe0\x41\x01\x12K\n\x0cwaf_settings\x18\n \x01(\x0b\x32\x30.google.cloud.recaptchaenterprise.v1.WafSettingsB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:U\xea\x41R\n&recaptchaenterprise.googleapis.com/Key\x12\x1dprojects/{project}/keys/{key}*\x04keys2\x03keyB\x13\n\x11platform_settings\"\xf2\x01\n\x0eTestingOptions\x12\x1a\n\rtesting_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x64\n\x11testing_challenge\x18\x02 \x01(\x0e\x32\x44.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallengeB\x03\xe0\x41\x01\"^\n\x10TestingChallenge\x12!\n\x1dTESTING_CHALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\x18\n\x14UNSOLVABLE_CHALLENGE\x10\x02\"\xc5\x08\n\x0eWebKeySettings\x12\x1e\n\x11\x61llow_all_domains\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_amp_traffic\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x10integration_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationTypeB\x03\xe0\x41\x02\x12{\n\x1d\x63hallenge_security_preference\x18\x05 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x12\x66\n\x12\x63hallenge_settings\x18\x06 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettingsB\x03\xe0\x41\x01\x1a.\n\x0e\x41\x63tionSettings\x12\x1c\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x1a\xea\x02\n\x11\x43hallengeSettings\x12\x61\n\x10\x64\x65\x66\x61ult_settings\x18\x01 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettingsB\x03\xe0\x41\x02\x12w\n\x0f\x61\x63tion_settings\x18\x02 \x03(\x0b\x32Y.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings.ActionSettingsEntryB\x03\xe0\x41\x01\x1ay\n\x13\x41\x63tionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings:\x02\x38\x01\"w\n\x0fIntegrationType\x12 \n\x1cINTEGRATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SCORE\x10\x01\x12\x0c\n\x08\x43HECKBOX\x10\x02\x12\r\n\tINVISIBLE\x10\x03\x12\x1a\n\x16POLICY_BASED_CHALLENGE\x10\x05\"v\n\x1b\x43hallengeSecurityPreference\x12-\n)CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED\x10\x00\x12\r\n\tUSABILITY\x10\x01\x12\x0b\n\x07\x42\x41LANCE\x10\x02\x12\x0c\n\x08SECURITY\x10\x03\"\x96\x01\n\x12\x41ndroidKeySettings\x12$\n\x17\x61llow_all_package_names\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15\x61llowed_package_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x36\n)support_non_google_app_store_distribution\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xac\x01\n\x0eIOSKeySettings\x12!\n\x14\x61llow_all_bundle_ids\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x61llowed_bundle_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12V\n\x12\x61pple_developer_id\x18\x03 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.AppleDeveloperIdB\x03\xe0\x41\x01\"\x14\n\x12\x45xpressKeySettings\"\x16\n\x14UniversalKeySettings\"Z\n\x10\x41ppleDeveloperId\x12\x1b\n\x0bprivate_key\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07team_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x11ScoreDistribution\x12_\n\rscore_buckets\x18\x01 \x03(\x0b\x32H.google.cloud.recaptchaenterprise.v1.ScoreDistribution.ScoreBucketsEntry\x1a\x33\n\x11ScoreBucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xab\x02\n\x0cScoreMetrics\x12O\n\x0foverall_metrics\x18\x01 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution\x12\\\n\x0e\x61\x63tion_metrics\x18\x02 \x03(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.ScoreMetrics.ActionMetricsEntry\x1al\n\x12\x41\x63tionMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution:\x02\x38\x01\"o\n\x10\x43hallengeMetrics\x12\x16\n\x0epageload_count\x18\x01 \x01(\x03\x12\x17\n\x0fnocaptcha_count\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_count\x18\x03 \x01(\x03\x12\x14\n\x0cpassed_count\x18\x04 \x01(\x03\"\x95\x01\n\x18\x46irewallPolicyAssessment\x12&\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12Q\n\x0f\x66irewall_policy\x18\x08 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x03\"\x82\x06\n\x0e\x46irewallAction\x12P\n\x05\x61llow\x18\x01 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.AllowActionH\x00\x12P\n\x05\x62lock\x18\x02 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.BlockActionH\x00\x12t\n\x18include_recaptcha_script\x18\x06 \x01(\x0b\x32P.google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptActionH\x00\x12V\n\x08redirect\x18\x05 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectActionH\x00\x12Z\n\nsubstitute\x18\x03 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteActionH\x00\x12Y\n\nset_header\x18\x04 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderActionH\x00\x1a\r\n\x0b\x41llowAction\x1a\r\n\x0b\x42lockAction\x1a\x1e\n\x1cIncludeRecaptchaScriptAction\x1a\x10\n\x0eRedirectAction\x1a%\n\x10SubstituteAction\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\x0fSetHeaderAction\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x17\n\x15\x66irewall_action_oneof\"\xc5\x02\n\x0e\x46irewallPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcondition\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x61\x63tions\x18\x06 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallActionB\x03\xe0\x41\x01:\x8f\x01\xea\x41\x8b\x01\n1recaptchaenterprise.googleapis.com/FirewallPolicy\x12\x34projects/{project}/firewallpolicies/{firewallpolicy}*\x10\x66irewallPolicies2\x0e\x66irewallPolicy\"\xb6\x01\n)ListRelatedAccountGroupMembershipsRequest\x12X\n\x06parent\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\x12@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\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\"\xb4\x01\n*ListRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa2\x01\n\x1fListRelatedAccountGroupsRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36recaptchaenterprise.googleapis.com/RelatedAccountGroup\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\"\x95\x01\n ListRelatedAccountGroupsResponse\x12X\n\x16related_account_groups\x18\x01 \x03(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x01\n+SearchRelatedAccountGroupMembershipsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\naccount_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n,SearchRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x14\x41\x64\x64IpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x17\n\x15\x41\x64\x64IpOverrideResponse\"\xab\x01\n\x17RemoveIpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x1a\n\x18RemoveIpOverrideResponse\"\x89\x01\n\x16ListIpOverridesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\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\"}\n\x17ListIpOverridesResponse\x12I\n\x0cip_overrides\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideData\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc8\x02\n\x1dRelatedAccountGroupMembership\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\naccount_id\x18\x04 \x01(\t\x12\x1d\n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x02\x18\x01:\xdd\x01\xea\x41\xd9\x01\n@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\x12Vprojects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}*\x1erelatedAccountGroupMemberships2\x1drelatedAccountGroupMembership\"\xd4\x01\n\x13RelatedAccountGroup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02:\xa6\x01\xea\x41\xa2\x01\n6recaptchaenterprise.googleapis.com/RelatedAccountGroup\x12=projects/{project}/relatedaccountgroups/{relatedaccountgroup}*\x14relatedAccountGroups2\x13relatedAccountGroup\"\x8b\x03\n\x0bWafSettings\x12U\n\x0bwaf_service\x18\x01 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafServiceB\x03\xe0\x41\x02\x12U\n\x0bwaf_feature\x18\x02 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeatureB\x03\xe0\x41\x02\"s\n\nWafFeature\x12\x1b\n\x17WAF_FEATURE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HALLENGE_PAGE\x10\x01\x12\x11\n\rSESSION_TOKEN\x10\x02\x12\x10\n\x0c\x41\x43TION_TOKEN\x10\x03\x12\x0f\n\x07\x45XPRESS\x10\x05\x1a\x02\x08\x01\"Y\n\nWafService\x12\x1b\n\x17WAF_SERVICE_UNSPECIFIED\x10\x00\x12\x06\n\x02\x43\x41\x10\x01\x12\n\n\x06\x46\x41STLY\x10\x03\x12\x0e\n\nCLOUDFLARE\x10\x04\x12\n\n\x06\x41KAMAI\x10\x05\"B\n\x15\x41ssessmentEnvironment\x12\x13\n\x06\x63lient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n\x10PolicyEvaluation\x12\x64\n\x19\x63hallenge_rule_evaluation\x18\x01 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluationB\x03\xe0\x41\x03\"\x19\n\x17\x43hallengeRuleEvaluation\"\xc1\x01\n\x0eIpOverrideData\x12\x17\n\x02ip\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\\\n\roverride_type\x18\x03 \x01(\x0e\x32@.google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideTypeB\x03\xe0\x41\x02\"8\n\x0cOverrideType\x12\x1d\n\x19OVERRIDE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)recaptchaenterprise.googleapis.com/Policy\"\x8d\x01\n\x13UpdatePolicyRequest\x12@\n\x06policy\x18\x01 \x01(\x0b\x32+.google.cloud.recaptchaenterprise.v1.PolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb5\x02\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x0f\x63lient_settings\x18\x04 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.ClientSettingsB\x03\xe0\x41\x02\x12[\n\x15\x63hallenge_rule_groups\x18\x02 \x03(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ChallengeRuleGroupB\x03\xe0\x41\x01:h\xea\x41\x65\n)recaptchaenterprise.googleapis.com/Policy\x12$projects/{project}/keys/{key}/policy \x02*\x08policies2\x06policy\"|\n\x12\x43hallengeRuleGroup\x12\x14\n\x07\x61\x63tions\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12P\n\x0f\x63hallenge_rules\x18\x02 \x03(\x0b\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeRuleB\x03\xe0\x41\x02\"\xff\x02\n\rChallengeRule\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12]\n\x0cno_challenge\x18\x02 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcomeH\x00\x12X\n\tchallenge\x18\x03 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcomeH\x00\x1a\x14\n\x12NoChallengeOutcome\x1a|\n\x10\x43hallengeOutcome\x12h\n\ndifficulty\x18\x01 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x42\t\n\x07outcome\"\xb2\x01\n\x0e\x43lientSettings\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_all_domains\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x18protected_endpoint_group\x18\x03 \x01(\x0b\x32;.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroupB\x03\xe0\x41\x01\"r\n\x16ProtectedEndpointGroup\x12X\n\x13protected_endpoints\x18\x01 \x03(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ProtectedEndpointB\x03\xe0\x41\x01\";\n\x11ProtectedEndpoint\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tion\x18\x02 \x01(\tB\x03\xe0\x41\x02*d\n\rChallengeType\x12\x1e\n\x1a\x43HALLENGE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43HALLENGE_TYPE_VISUAL\x10\x01\x12\x18\n\x14\x43HALLENGE_TYPE_AUDIO\x10\x02\x32\xd4\'\n\x1aRecaptchaEnterpriseService\x12\xce\x01\n\x10\x43reateAssessment\x12<.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest\x1a/.google.cloud.recaptchaenterprise.v1.Assessment\"K\xda\x41\x11parent,assessment\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/assessments:\nassessment\x12\xe0\x01\n\x12\x41nnotateAssessment\x12>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest\x1a?.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse\"I\xda\x41\x0fname,annotation\x82\xd3\xe4\x93\x02\x31\",/v1/{name=projects/*/assessments/*}:annotate:\x01*\x12\xa4\x01\n\tCreateKey\x12\x35.google.cloud.recaptchaenterprise.v1.CreateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"6\xda\x41\nparent,key\x82\xd3\xe4\x93\x02#\"\x1c/v1/{parent=projects/*}/keys:\x03key\x12\xa6\x01\n\x08ListKeys\x12\x34.google.cloud.recaptchaenterprise.v1.ListKeysRequest\x1a\x35.google.cloud.recaptchaenterprise.v1.ListKeysResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=projects/*}/keys\x12\xe7\x01\n\x17RetrieveLegacySecretKey\x12\x43.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse\"A\xda\x41\x03key\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey\x12\x93\x01\n\x06GetKey\x12\x32.google.cloud.recaptchaenterprise.v1.GetKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/keys/*}\x12\xad\x01\n\tUpdateKey\x12\x35.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"?\xda\x41\x0fkey,update_mask\x82\xd3\xe4\x93\x02\'2 /v1/{key.name=projects/*/keys/*}:\x03key\x12\x87\x01\n\tDeleteKey\x12\x35.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest\x1a\x16.google.protobuf.Empty\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=projects/*/keys/*}\x12\x9f\x01\n\nMigrateKey\x12\x36.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"/\x82\xd3\xe4\x93\x02)\"$/v1/{name=projects/*/keys/*}:migrate:\x01*\x12\xd5\x01\n\rAddIpOverride\x12\x39.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest\x1a:.google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse\"M\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02/\"*/v1/{name=projects/*/keys/*}:addIpOverride:\x01*\x12\xe1\x01\n\x10RemoveIpOverride\x12<.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest\x1a=.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse\"P\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=projects/*/keys/*}:removeIpOverride:\x01*\x12\xcd\x01\n\x0fListIpOverrides\x12;.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest\x1a<.google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/keys/*}:listIpOverrides\x12\xa7\x01\n\nGetMetrics\x12\x36.google.cloud.recaptchaenterprise.v1.GetMetricsRequest\x1a,.google.cloud.recaptchaenterprise.v1.Metrics\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=projects/*/keys/*/metrics}\x12\xa3\x01\n\tGetPolicy\x12\x35.google.cloud.recaptchaenterprise.v1.GetPolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/keys/*/policy}\x12\xc6\x01\n\x0cUpdatePolicy\x12\x38.google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"O\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02\x34\x32*/v1/{policy.name=projects/*/keys/*/policy}:\x06policy\x12\xe9\x01\n\x14\x43reateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"Z\xda\x41\x16parent,firewall_policy\x82\xd3\xe4\x93\x02;\"(/v1/{parent=projects/*}/firewallpolicies:\x0f\x66irewall_policy\x12\xd6\x01\n\x14ListFirewallPolicies\x12@.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest\x1a\x41.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*}/firewallpolicies\x12\xc0\x01\n\x11GetFirewallPolicy\x12=.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/firewallpolicies/*}\x12\xfe\x01\n\x14UpdateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"o\xda\x41\x1b\x66irewall_policy,update_mask\x82\xd3\xe4\x93\x02K28/v1/{firewall_policy.name=projects/*/firewallpolicies/*}:\x0f\x66irewall_policy\x12\xa9\x01\n\x14\x44\x65leteFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/firewallpolicies/*}\x12\xf0\x01\n\x17ReorderFirewallPolicies\x12\x43.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse\"J\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=projects/*}/firewallpolicies:reorder:\x01*\x12\xe6\x01\n\x18ListRelatedAccountGroups\x12\x44.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest\x1a\x45.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*}/relatedaccountgroups\x12\x92\x02\n\"ListRelatedAccountGroupMemberships\x12N.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest\x1aO.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/relatedaccountgroups/*}/memberships\x12\xb2\x02\n$SearchRelatedAccountGroupMemberships\x12P.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest\x1aQ.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse\"e\xda\x41\x19project,hashed_account_id\x82\xd3\xe4\x93\x02\x43\">/v1/{project=projects/*}/relatedaccountgroupmemberships:search:\x01*\x1aV\xca\x41\"recaptchaenterprise.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n!com.google.recaptchaenterprise.v1B\x18RecaptchaEnterpriseProtoP\x01Z\\cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb\xa2\x02\x04GCRE\xaa\x02#Google.Cloud.RecaptchaEnterprise.V1\xca\x02#Google\\Cloud\\RecaptchaEnterprise\\V1\xea\x02&Google::Cloud::RecaptchaEnterprise::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -67,6 +67,11 @@ module V1 SmsTollFraudVerdict::SmsTollFraudReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason").enummodule PhoneFraudAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment").msgclass AccountDefenderAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment").msgclass + AccountDefenderAssessment::AccountTakeoverVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdict").msgclass + AccountDefenderAssessment::AccountRiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason").msgclass + AccountDefenderAssessment::AccountRiskReason::RiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReason").enummodule + AccountDefenderAssessment::AccountTrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason").msgclass + AccountDefenderAssessment::AccountTrustReason::TrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReason").enummodule AccountDefenderAssessment::AccountDefenderLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel").enummodule CreateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateKeyRequest").msgclass ListKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListKeysRequest").msgclass @@ -98,6 +103,7 @@ module V1 AndroidKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AndroidKeySettings").msgclass IOSKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IOSKeySettings").msgclass ExpressKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ExpressKeySettings").msgclass + UniversalKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UniversalKeySettings").msgclass AppleDeveloperId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AppleDeveloperId").msgclass ScoreDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreDistribution").msgclass ScoreMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreMetrics").msgclass @@ -129,8 +135,21 @@ module V1 WafSettings::WafFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature").enummodule WafSettings::WafService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafService").enummodule AssessmentEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AssessmentEnvironment").msgclass + PolicyEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PolicyEvaluation").msgclass + ChallengeRuleEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluation").msgclass IpOverrideData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData").msgclass IpOverrideData::OverrideType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType").enummodule + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetPolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest").msgclass + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Policy").msgclass + ChallengeRuleGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup").msgclass + ChallengeRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule").msgclass + ChallengeRule::NoChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcome").msgclass + ChallengeRule::ChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcome").msgclass + ClientSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ClientSettings").msgclass + ProtectedEndpointGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup").msgclass + ProtectedEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpoint").msgclass + ChallengeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeType").enummodule end end end diff --git a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb index 86e7915c82df..f763a1c45d5f 100644 --- a/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb +++ b/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto for package 'Google.Cloud.RecaptchaEnterprise.V1' # Original file comments: -# Copyright 2025 Google LLC +# 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. @@ -75,6 +75,10 @@ class Service # Get some aggregated metrics for a Key. This data can be used to build # dashboards. rpc :GetMetrics, ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Metrics + # Get the policy for a key. + rpc :GetPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy + # Updates the policy for a key. + rpc :UpdatePolicy, ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy # Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA # Enterprise actions can be executed. # A project may have a maximum of 1000 policies. diff --git a/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb b/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb index 56c8b1952bff..514a0d0be353 100644 --- a/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb +++ b/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb @@ -436,7 +436,7 @@ class PrivatePasswordLeakVerification # assessment event must include a token and site key to use this feature. # @!attribute [r] account_defender_assessment # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment] - # Output only. Assessment returned by account defender when an account + # Output only. Assessment returned by Account defense when an account # identifier is provided. # @!attribute [rw] private_password_leak_verification # @return [::Google::Cloud::RecaptchaEnterprise::V1::PrivatePasswordLeakVerification] @@ -458,13 +458,16 @@ class PrivatePasswordLeakVerification # @!attribute [r] phone_fraud_assessment # @return [::Google::Cloud::RecaptchaEnterprise::V1::PhoneFraudAssessment] # Output only. Assessment returned when a site key, a token, and a phone - # number as `user_id` are provided. Account defender and SMS toll fraud - # protection need to be enabled. + # number as `user_id` are provided. SMS defense needs to be enabled. # @!attribute [rw] assessment_environment # @return [::Google::Cloud::RecaptchaEnterprise::V1::AssessmentEnvironment] # Optional. The environment creating the assessment. This describes your # environment (the system invoking CreateAssessment), NOT the environment of # your user. + # @!attribute [r] policy_evaluation + # @return [::Google::Cloud::RecaptchaEnterprise::V1::PolicyEvaluation] + # Output only. Provides information about the policy evaluation for this + # assessment. class Assessment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -491,7 +494,7 @@ class Assessment # @return [::String] # Optional. The expected action for this type of event. This should be the # same action provided at token generation time on client-side platforms - # already integrated with recaptcha enterprise. + # already integrated with recaptcha enterprise. Required for Universal keys. # @!attribute [rw] hashed_account_id # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] @@ -652,8 +655,8 @@ class Address # Details about a user's account involved in the transaction. # @!attribute [rw] account_id # @return [::String] - # Optional. Unique account identifier for this user. If using account - # defender, this should match the hashed_account_id field. Otherwise, a + # Optional. Unique account identifier for this user. If using Account + # defense, this should match the hashed_account_id field. Otherwise, a # unique and persistent identifier for this account. # @!attribute [rw] creation_ms # @return [::Integer] @@ -774,12 +777,19 @@ class UserId # Output only. Reasons contributing to the risk analysis verdict. # @!attribute [r] extended_verdict_reasons # @return [::Array<::String>] - # Output only. Extended verdict reasons to be used for experimentation only. - # The set of possible reasons is subject to change. + # Output only. Additional reasons contributing to the risk analysis verdict. + # These reasons are available to Enterprise tier projects only. Contact sales + # for more information. + # The set of reasons is subject to change. + # @!attribute [r] last_challenge_type + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeType] + # Output only. Type of the last challenge presented to the user for + # Universal, `POLICY_BASED_CHALLENGE` and `INVISIBLE` keys. The field is only + # set when a challenge was presented to the user. # @!attribute [r] challenge # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::Challenge] - # Output only. Challenge information for POLICY_BASED_CHALLENGE and INVISIBLE - # keys. + # Output only. Challenge information for Universal, `POLICY_BASED_CHALLENGE` + # and `INVISIBLE` keys. # @!attribute [r] verified_bots # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Bot>] # Output only. Bots with identities that have been verified by reCAPTCHA and @@ -811,15 +821,24 @@ module ClassificationReason # quality risk analysis. LOW_CONFIDENCE_SCORE = 5 - # The request matches behavioral characteristics of a carding attack. + # Deprecated: Use + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} + # and + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::EXCESSIVE_ENUMERATION_PATTERN FraudPreventionAssessment.RiskReason.Reason.EXCESSIVE_ENUMERATION_PATTERN} + # instead. SUSPECTED_CARDING = 6 - # The request matches behavioral characteristics of chargebacks for fraud. + # Deprecated: Use + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} + # and + # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::ASSOCIATED_WITH_FRAUD_CLUSTER FraudPreventionAssessment.RiskReason.Reason.ASSOCIATED_WITH_FRAUD_CLUSTER} + # instead. SUSPECTED_CHARGEBACK = 7 end - # Challenge information for POLICY_BASED_CHALLENGE and INVISIBLE keys. - # Ensure that applications can handle values not explicitly listed. + # Challenge information for Universal, `POLICY_BASED_CHALLENGE` and + # `INVISIBLE` keys. Ensure that applications can handle values not explicitly + # listed. module Challenge # Default unspecified type. CHALLENGE_UNSPECIFIED = 0 @@ -840,7 +859,30 @@ module Challenge # @!attribute [rw] name # @return [::String] # Optional. Enumerated string value that indicates the identity of the bot, - # formatted in kebab-case. + # formatted in kebab-case. Current example values include the following: + # + # * google-agent - AI_AGENT + # * browser-base - AI_AGENT + # * chat-gpt - AI_AGENT + # * aws-bedrock - AI_AGENT + # * cybaa-bot - AI_AGENT + # * cloudflare - AI_AGENT + # * payhawk - AI_AGENT + # * duck-duck-go - SEARCH_INDEXER + # * mediaboard - CONTENT_SCRAPER + # * marker-io - AI_AGENT + # * broadcom - AI_AGENT + # * anchor-browser - AI_AGENT + # * shopify - AI_AGENT + # * stackscope - CONTENT_SCRAPER + # * manus - AI_AGENT + # * kernel-sh - AI_AGENT + # * zvelo - SEARCH_INDEXER + # + # Ensure that your applications can handle identifier values not explicitly + # listed here. Deprecated values might take some time to stop showing + # up in responses. New values can be pushed so this list should be taken + # as non exhaustive. # @!attribute [rw] bot_type # @return [::Google::Cloud::RecaptchaEnterprise::V1::Bot::BotType] # Optional. Enumerated field representing the type of bot. @@ -870,11 +912,9 @@ module BotType # Properties of the provided event token. # @!attribute [r] valid # @return [::Boolean] - # Output only. Whether the provided user response token is valid. When valid - # = false, the reason could be specified in invalid_reason or it could also - # be due to a user failing to solve a challenge or a sitekey mismatch (i.e - # the sitekey used to generate the token was different than the one specified - # in the assessment). + # Output only. Indicates whether the provided user response token is valid. + # If `false`, the token is invalid, either because the user failed the + # challenge or for a reason provided in the `invalid_reason` field. # @!attribute [r] invalid_reason # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason] # Output only. Reason associated with the response when valid = false. @@ -934,6 +974,13 @@ module InvalidReason # - you set an action score threshold higher than 0.0 # - you provided a non-empty `expected_action` UNEXPECTED_ACTION = 7 + + # The key used to generate the token does not match the `site_key`. + KEY_MISMATCH = 8 + + # The domain of the page on which the token was generated does not match + # the `allowed_domains` configured in the `site_key`. + DOMAIN_MISMATCH = 9 end end @@ -1120,21 +1167,111 @@ class PhoneFraudAssessment extend ::Google::Protobuf::MessageExts::ClassMethods end - # Account defender risk assessment. + # Account defense risk assessment. # @!attribute [r] labels # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountDefenderLabel>] # Output only. Labels for this request. + # @!attribute [r] account_takeover_verdict + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTakeoverVerdict] + # Output only. Account takeover risk assessment for this request. class AccountDefenderAssessment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods - # Labels returned by account defender for this request. + # Account takeover risk assessment. + # @!attribute [r] risk + # @return [::Float] + # Output only. Account takeover attempt probability. + # Values are from 0.0 (lowest risk) to 1.0 (highest risk). + # @!attribute [r] risk_reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason>] + # Output only. Unordered list. Reasons why the request appears risky. Risk + # reasons can be returned even if the risk is low, as trustworthy requests + # can still have some risk signals. + # @!attribute [r] trust_reasons + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason>] + # Output only. Unordered list. Reasons why the request appears trustworthy. + # Trust reasons can be returned even if the risk is high, as risky requests + # can still have some trust signals. + class AccountTakeoverVerdict + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Risk explainability reasons for Account defense. + # @!attribute [r] reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason::RiskReason] + # Output only. A risk reason associated with this request. + class AccountRiskReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Risk explainability reasons for Account defense. + # Ensure that applications can handle values not explicitly listed. + module RiskReason + # Default unspecified type. + RISK_REASON_UNSPECIFIED = 0 + + # The client has been observed sending bot-like traffic to this site in + # the past. This reason incorporates historical reputation and indicates + # that the client is known to use bots, even if the current request is + # being made by a human. + CLIENT_HISTORICAL_BOT_ACTIVITY = 1 + + # The account is part of a large group of related accounts, indicating + # that it may be part of a fraudulent network. Related accounts are + # identified based on having similar traffic patterns and request + # characteristics. + ACCOUNT_IN_LARGE_RELATED_GROUP = 2 + + # The client has been observed accessing many accounts on this site. + CLIENT_ACCESSED_MANY_ACCOUNTS = 3 + + # This email domain is a suspected provider of disposable email + # addresses. + DISPOSABLE_EMAIL_DOMAIN = 4 + end + end + + # Trust explainability reasons for Account defense. + # @!attribute [r] reason + # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason::TrustReason] + # Output only. A trust reason associated with this request. + class AccountTrustReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Trust explainability reasons for Account defense. + # Ensure that applications can handle values not explicitly listed. + module TrustReason + # Default unspecified type. + TRUST_REASON_UNSPECIFIED = 0 + + # The request matches a trusted profile associated with this account. + # Equivalent to `AccountDefenderLabel.PROFILE_MATCH`. + PROFILE_MATCH = 1 + + # The account's historical activity is reputable. It is unlikely that the + # account has been compromised in the past. + ACCOUNT_HISTORY_REPUTABLE = 2 + + # The identity shows a global pattern of reputable activity based on + # `userInfo` and associated identifiers. + IDENTITY_GLOBAL_ACTIVITY_REPUTABLE = 3 + + # The identity shows a long-standing history of reputable activity based + # on `userInfo` and associated identifiers. + IDENTITY_HISTORY_REPUTABLE = 4 + end + end + + # Labels returned by Account defense for this request. # Ensure that applications can handle values not explicitly listed. module AccountDefenderLabel # Default unspecified type. ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0 - # The request matches a known good profile for the user. + # The request matches a trusted profile associated with this account. PROFILE_MATCH = 1 # The request is potentially a suspicious login event and must be further @@ -1415,22 +1552,27 @@ class RetrieveLegacySecretKeyResponse # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings] # Settings for keys that can be used by websites. # - # Note: The following fields are mutually exclusive: `web_settings`, `android_settings`, `ios_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `web_settings`, `android_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] android_settings # @return [::Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings] # Settings for keys that can be used by Android apps. # - # Note: The following fields are mutually exclusive: `android_settings`, `web_settings`, `ios_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `android_settings`, `web_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] ios_settings # @return [::Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings] # Settings for keys that can be used by iOS apps. # - # Note: The following fields are mutually exclusive: `ios_settings`, `web_settings`, `android_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `ios_settings`, `web_settings`, `android_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] express_settings # @return [::Google::Cloud::RecaptchaEnterprise::V1::ExpressKeySettings] # Settings for keys that can be used by reCAPTCHA Express. # - # Note: The following fields are mutually exclusive: `express_settings`, `web_settings`, `android_settings`, `ios_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `express_settings`, `web_settings`, `android_settings`, `ios_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] universal_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::UniversalKeySettings] + # Settings for keys that are configured through their Policy. + # + # Note: The following fields are mutually exclusive: `universal_settings`, `web_settings`, `android_settings`, `ios_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. See [Creating and managing labels] @@ -1659,6 +1801,12 @@ class ExpressKeySettings extend ::Google::Protobuf::MessageExts::ClassMethods end + # Settings for keys that are configured through their Policy. + class UniversalKeySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Contains fields that are required to perform Apple-specific integrity checks. # @!attribute [rw] private_key # @return [::String] @@ -2196,6 +2344,23 @@ class AssessmentEnvironment extend ::Google::Protobuf::MessageExts::ClassMethods end + # Information about the policy evaluation. + # @!attribute [r] challenge_rule_evaluation + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleEvaluation] + # Output only. Populated if one or more Challenge rules were matched. + # Its presence in the assessment indicates that at least one challenge rule + # was matched and determined whether a challenge was presented to the user. + class PolicyEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the evaluation of a `ChallengeRule`. + class ChallengeRuleEvaluation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Information about the IP or IP range override. # @!attribute [rw] ip # @return [::String] @@ -2224,6 +2389,198 @@ module OverrideType ALLOW = 1 end end + + # The request message to get a policy. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the policy to get, in the format + # `projects/{project}/keys/{key}/policy`. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to update a policy. + # @!attribute [rw] policy + # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] + # Required. The Policy's name is used to identify the policy to update, in + # the format `projects/{project}/keys/{key}/policy`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The mask to control which fields of the policy get updated. If + # the mask is not present, all fields are updated. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A complete configuration set containing multiple grouped rules defining the + # behavior of reCAPTCHA for fraud detection and prevention. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name for this policy. + # Format: "projects/\\{project}/keys/\\{key}/policy" for a policy under a key. + # @!attribute [rw] client_settings + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ClientSettings] + # Required. Configuration for clients protected by this policy. + # @!attribute [rw] challenge_rule_groups + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleGroup>] + # Optional. Rules to configure the behavior of reCAPTCHA for showing a + # challenge. Rule groups are evaluated in order. Evaluation stops when the + # first matching rule group is found. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of challenge rules that applies to one or more actions. + # @!attribute [rw] actions + # @return [::Array<::String>] + # Required. Action name provided at token generation. The action name is not + # case-sensitive and can only contain alphanumeric characters, slashes, and + # underscores. If "*" is provided, the rule group applies to all actions. If + # multiple actions are provided, the rule group is applied to all of + # them. This field is required. + # @!attribute [rw] challenge_rules + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule>] + # Required. A list of rules that configure when and how reCAPTCHA presents a + # challenge. reCAPTCHA evaluates these rules in order and applies the first + # one that matches. + class ChallengeRuleGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule to configure the behavior of reCAPTCHA for conditionally presenting a + # challenge. + # @!attribute [rw] condition + # @return [::String] + # Optional. A CEL condition that must be met for this rule to apply. + # If unspecified, the rule applies unconditionally. + # The following fields can be referenced in the condition: + # * `score` + # * `user_ip_address` + # * `user_asn` + # * `user_agent` + # * `verified_bots.name` + # * `verified_bots.bot_type` + # + # Examples: + # * `score < 0.5` + # * `user_ip_address == "123.45.67.89"` + # * `user_agent.contains("Chrome")` + # * `score < 0.5 && user_ip_address == "123.45.67.89"` + # @!attribute [rw] no_challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::NoChallengeOutcome] + # Do not present a challenge to the user. + # + # Note: The following fields are mutually exclusive: `no_challenge`, `challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] challenge + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::ChallengeOutcome] + # Present a challenge to the user. + # + # Note: The following fields are mutually exclusive: `challenge`, `no_challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ChallengeRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An outcome that indicates that no challenge should be presented to the + # user. + class NoChallengeOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An outcome that indicates that a challenge of a specified difficulty should + # be presented to the user. + # @!attribute [rw] difficulty + # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference] + # Optional. The difficulty of the challenge to present to the user. + # If unspecified, `BALANCE` is used. + class ChallengeOutcome + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for clients to protect with reCAPTCHA. + # @!attribute [rw] allowed_domains + # @return [::Array<::String>] + # Optional. Domains or subdomains of websites allowed to use the policy. All + # subdomains of an allowed domain are automatically allowed. A valid domain + # requires a host and must not include any path, port, query or fragment. + # Examples: 'example.com' or 'subdomain.example.com' + # Each policy supports a maximum of 250 domains. To use a policy on more + # domains, set `allow_all_domains` to true. When this is set, you are + # responsible for validating the hostname by checking the + # `token_properties.hostname` field in each assessment response against your + # list of allowed domains. + # @!attribute [rw] allow_all_domains + # @return [::Boolean] + # Optional. If set to true, it means allowed_domains are not enforced. + # @!attribute [rw] protected_endpoint_group + # @return [::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpointGroup] + # Optional. Configuration for all API endpoints to protect with reCAPTCHA. If + # this field is not set, reCAPTCHA will not automatically request tokens on + # any API endpoints. + class ClientSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for API endpoints to protect with reCAPTCHA. + # @!attribute [rw] protected_endpoints + # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpoint>] + # Optional. List of API endpoints to automatically protect with reCAPTCHA. If + # any of these endpoints is invoked from a page where a key bound to this + # policy is installed, a reCAPTCHA token is automatically generated and + # attached to the request. If multiple protected endpoints match a given API + # endpoint, the first one in the list is used. + class ProtectedEndpointGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for an API endpoint to protect with reCAPTCHA. + # @!attribute [rw] path + # @return [::String] + # Required. URI path of the API endpoint to protect. Must start with '/'. + # Supports glob characters '*' to match a single path segment and '**' to + # match multiple path segments. Standalone root catch-alls ('/*' and '/**') + # are invalid because it can negatively impact performance to trigger + # reCAPTCHA on every single request to your backend. + # + # Matching is evaluated against the URL path only (domain, scheme, and query + # parameters are ignored). + # + # Examples: + # - `/login` matches `/login`, `https://example.com/login`, and + # `/login?query=1`, but not `/login/step1`. + # - `/products/*` matches `/products/123`, but not `/products/123/456`. + # - `/content/**` matches `/content/articles/2024/01/01`. + # @!attribute [rw] action + # @return [::String] + # Required. Action name to be used for token generation for this endpoint. + # The action name can only contain alphanumeric characters, slashes, and + # underscores. + class ProtectedEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum of challenge types for Universal, `POLICY_BASED_CHALLENGE` and + # `INVISIBLE` keys. Ensure that applications can handle values not explicitly + # listed. + module ChallengeType + # Default unspecified type. + CHALLENGE_TYPE_UNSPECIFIED = 0 + + # A visual challenge. + CHALLENGE_TYPE_VISUAL = 1 + + # An audio challenge. + CHALLENGE_TYPE_AUDIO = 2 + end end end end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb b/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb similarity index 100% rename from owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb rename to google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_policy.rb diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb b/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb similarity index 100% rename from owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb rename to google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_policy.rb diff --git a/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json b/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json index d932d264a4ec..ecbb3f6a138b 100644 --- a/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json +++ b/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json @@ -531,6 +531,86 @@ } ] }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetPolicy_sync", + "title": "Snippet for the get_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy.", + "file": "recaptcha_enterprise_service/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetPolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the RecaptchaEnterpriseService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy.", + "file": "recaptcha_enterprise_service/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", + "client": { + "short_name": "RecaptchaEnterpriseService::Client", + "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdatePolicy", + "service": { + "short_name": "RecaptchaEnterpriseService", + "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync", "title": "Snippet for the create_firewall_policy call in the RecaptchaEnterpriseService service", diff --git a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb index 5ace4590a74e..085d2844f8a4 100644 --- a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb +++ b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb @@ -89,6 +89,18 @@ def test_metrics_path end end + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0", key: "value1" + assert_equal "projects/value0/keys/value1/policy", 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 diff --git a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb index 1b4f08c7c462..0aff9beeb849 100644 --- a/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb +++ b/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb @@ -859,6 +859,124 @@ def test_get_metrics end end + def test_get_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_policy(::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.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_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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. + policy = {} + update_mask = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy({ policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy({ policy: policy, 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 + c.update_policy(::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, 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_policy_client_stub.call_rpc_count + end + end + def test_create_firewall_policy # Create GRPC objects. grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.new diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-recaptcha_enterprise-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json deleted file mode 100644 index 3e4db3422126..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "recaptchaenterprise.googleapis.com", - "api_shortname": "recaptchaenterprise", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest", - "distribution_name": "google-cloud-recaptcha_enterprise-v1", - "is_cloud": true, - "language": "ruby", - "name": "recaptchaenterprise", - "name_pretty": "reCAPTCHA Enterprise V1 API", - "product_documentation": "https://cloud.google.com/recaptcha-enterprise", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "reCAPTCHA Enterprise is a service that protects your site from spam and abuse. Note that google-cloud-recaptcha_enterprise-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-recaptcha_enterprise instead. See the readme for more details.", - "ruby-cloud-env-prefix": "RECAPTCHA_ENTERPRISE", - "ruby-cloud-product-url": "https://cloud.google.com/recaptcha-enterprise", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml deleted file mode 100644 index 8ef5ef06ddf8..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-recaptcha_enterprise-v1.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-recaptcha_enterprise-v1.rb" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.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-recaptcha_enterprise-v1/.yardopts b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts deleted file mode 100644 index b645b56b6f54..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="reCAPTCHA Enterprise V1 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-recaptcha_enterprise-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md deleted file mode 100644 index 5c2af6e5e391..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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/recaptcha_enterprise/v1" - -client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/recaptcha_enterprise/v1" - -::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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-recaptcha_enterprise-v1 -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/recaptcha_enterprise/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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-recaptcha_enterprise-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-recaptcha_enterprise-v1/LICENSE.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md deleted file mode 100644 index 7fa9c915cfab..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the reCAPTCHA Enterprise V1 API - -Help protect your website from fraudulent activity, spam, and abuse without creating friction. - -reCAPTCHA Enterprise is a service that protects your site from spam and abuse. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the reCAPTCHA Enterprise V1 API. Most users should consider using -the main client gem, -[google-cloud-recaptcha_enterprise](https://rubygems.org/gems/google-cloud-recaptcha_enterprise). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-recaptcha_enterprise-v1 -``` - -## 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/recaptchaenterprise.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/recaptcha_enterprise/v1" - -client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new -request = ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new # (request fields as keyword arguments...) -response = client.create_assessment request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise) -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/recaptcha_enterprise/v1" -require "logger" - -client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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.2+. - -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-recaptcha_enterprise`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-recaptcha_enterprise-v1`. -_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-recaptcha_enterprise`. -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-recaptcha_enterprise-v1`. - -### 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-recaptcha_enterprise-v1/Rakefile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/Rakefile deleted file mode 100644 index 5d19c638aa73..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["RECAPTCHA_ENTERPRISE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["RECAPTCHA_ENTERPRISE_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 RECAPTCHA_ENTERPRISE_TEST_PROJECT=test123 RECAPTCHA_ENTERPRISE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" - ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["RECAPTCHA_ENTERPRISE_PROJECT"] = project - ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] = project - ENV["RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-recaptcha_enterprise-v1" - header "google-cloud-recaptcha_enterprise-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-recaptcha_enterprise-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1 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-recaptcha_enterprise-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json deleted file mode 100644 index 1c3c335bc5d7..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/gapic_metadata.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.recaptchaenterprise.v1", - "libraryPackage": "::Google::Cloud::RecaptchaEnterprise::V1", - "services": { - "RecaptchaEnterpriseService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client", - "rpcs": { - "CreateAssessment": { - "methods": [ - "create_assessment" - ] - }, - "AnnotateAssessment": { - "methods": [ - "annotate_assessment" - ] - }, - "CreateKey": { - "methods": [ - "create_key" - ] - }, - "ListKeys": { - "methods": [ - "list_keys" - ] - }, - "RetrieveLegacySecretKey": { - "methods": [ - "retrieve_legacy_secret_key" - ] - }, - "GetKey": { - "methods": [ - "get_key" - ] - }, - "UpdateKey": { - "methods": [ - "update_key" - ] - }, - "DeleteKey": { - "methods": [ - "delete_key" - ] - }, - "MigrateKey": { - "methods": [ - "migrate_key" - ] - }, - "AddIpOverride": { - "methods": [ - "add_ip_override" - ] - }, - "RemoveIpOverride": { - "methods": [ - "remove_ip_override" - ] - }, - "ListIpOverrides": { - "methods": [ - "list_ip_overrides" - ] - }, - "GetMetrics": { - "methods": [ - "get_metrics" - ] - }, - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "CreateFirewallPolicy": { - "methods": [ - "create_firewall_policy" - ] - }, - "ListFirewallPolicies": { - "methods": [ - "list_firewall_policies" - ] - }, - "GetFirewallPolicy": { - "methods": [ - "get_firewall_policy" - ] - }, - "UpdateFirewallPolicy": { - "methods": [ - "update_firewall_policy" - ] - }, - "DeleteFirewallPolicy": { - "methods": [ - "delete_firewall_policy" - ] - }, - "ReorderFirewallPolicies": { - "methods": [ - "reorder_firewall_policies" - ] - }, - "ListRelatedAccountGroups": { - "methods": [ - "list_related_account_groups" - ] - }, - "ListRelatedAccountGroupMemberships": { - "methods": [ - "list_related_account_group_memberships" - ] - }, - "SearchRelatedAccountGroupMemberships": { - "methods": [ - "search_related_account_group_memberships" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec deleted file mode 100644 index 6deb6e2d1d41..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/google-cloud-recaptcha_enterprise-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/recaptcha_enterprise/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-recaptcha_enterprise-v1" - gem.version = Google::Cloud::RecaptchaEnterprise::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "reCAPTCHA Enterprise is a service that protects your site from spam and abuse. Note that google-cloud-recaptcha_enterprise-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-recaptcha_enterprise instead. See the readme for more details." - gem.summary = "Help protect your website from fraudulent activity, spam, and abuse without creating friction." - 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.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.rb deleted file mode 100644 index 709bd158bdb6..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google-cloud-recaptcha_enterprise-v1.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/recaptcha_enterprise/v1" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb deleted file mode 100644 index c0a5bb548e00..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1.rb +++ /dev/null @@ -1,40 +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/recaptcha_enterprise/v1/recaptcha_enterprise_service" -require "google/cloud/recaptcha_enterprise/v1/version" - -module Google - module Cloud - module RecaptchaEnterprise - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/recaptcha_enterprise/v1" - # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/recaptcha_enterprise/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb deleted file mode 100644 index 2bbbe6309445..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/recaptcha_enterprise/v1/version" - -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths" -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client" - -module Google - module Cloud - module RecaptchaEnterprise - module V1 - ## - # Service to determine the likelihood an event is legitimate. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" - # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - module RecaptchaEnterpriseService - end - end - end - end -end - -helper_path = ::File.join __dir__, "recaptcha_enterprise_service", "helpers.rb" -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb deleted file mode 100644 index 4b9f9d5cfd4e..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb +++ /dev/null @@ -1,2800 +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/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb" - -module Google - module Cloud - module RecaptchaEnterprise - module V1 - module RecaptchaEnterpriseService - ## - # Client for the RecaptchaEnterpriseService service. - # - # Service to determine the likelihood an event is legitimate. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "recaptchaenterprise.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :recaptcha_enterprise_service_stub - - ## - # Configure the RecaptchaEnterpriseService Client class. - # - # See {::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RecaptchaEnterpriseService clients - # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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", "RecaptchaEnterprise", "V1"] - 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.create_assessment.timeout = 600.0 - - default_config.rpcs.annotate_assessment.timeout = 600.0 - - default_config.rpcs.create_key.timeout = 600.0 - - default_config.rpcs.list_keys.timeout = 600.0 - - default_config.rpcs.get_key.timeout = 600.0 - - default_config.rpcs.update_key.timeout = 600.0 - - default_config.rpcs.delete_key.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 - @recaptcha_enterprise_service_stub.universe_domain - end - - ## - # Create a new RecaptchaEnterpriseService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RecaptchaEnterpriseService 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/cloud/recaptchaenterprise/v1/recaptchaenterprise_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 - - @recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 - ) - - @recaptcha_enterprise_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @recaptcha_enterprise_service_stub.logger - end - - # Service calls - - ## - # Creates an Assessment of the likelihood an event is legitimate. - # - # @overload create_assessment(request, options = nil) - # Pass arguments to `create_assessment` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, ::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_assessment(parent: nil, assessment: nil) - # Pass arguments to `create_assessment` 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. The name of the project in which the assessment is created, - # in the format `projects/{project}`. - # @param assessment [::Google::Cloud::RecaptchaEnterprise::V1::Assessment, ::Hash] - # Required. The assessment details. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new - # - # # Call the create_assessment method. - # result = client.create_assessment request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment. - # p result - # - def create_assessment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest - - # 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_assessment.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::RecaptchaEnterprise::V1::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_assessment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_assessment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :create_assessment, 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 - - ## - # Annotates a previously created Assessment to provide additional information - # on whether the event turned out to be authentic or fraudulent. - # - # @overload annotate_assessment(request, options = nil) - # Pass arguments to `annotate_assessment` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, ::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 annotate_assessment(name: nil, annotation: nil, reasons: nil, account_id: nil, hashed_account_id: nil, transaction_event: nil, phone_authentication_event: nil) - # Pass arguments to `annotate_assessment` 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 resource name of the Assessment, in the format - # `projects/{project}/assessments/{assessment}`. - # @param annotation [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation] - # Optional. The annotation that is assigned to the Event. This field can be - # left empty to provide reasons that apply to an event without concluding - # whether the event is legitimate or fraudulent. - # @param reasons [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>] - # Optional. Reasons for the annotation that are assigned to the event. - # @param account_id [::String] - # Optional. A stable account identifier to apply to the assessment. This is - # an alternative to setting `account_id` in `CreateAssessment`, for example - # when a stable account identifier is not yet known in the initial request. - # @param hashed_account_id [::String] - # Optional. A stable hashed account identifier to apply to the assessment. - # This is an alternative to setting `hashed_account_id` in - # `CreateAssessment`, for example when a stable account identifier is not yet - # known in the initial request. - # @param transaction_event [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent, ::Hash] - # Optional. If the assessment is part of a payment transaction, provide - # details on payment lifecycle events that occur in the transaction. - # @param phone_authentication_event [::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent, ::Hash] - # Optional. If using an external multi-factor authentication provider, - # provide phone authentication details for fraud detection purposes. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new - # - # # Call the annotate_assessment method. - # result = client.annotate_assessment request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse. - # p result - # - def annotate_assessment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest - - # 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.annotate_assessment.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::RecaptchaEnterprise::V1::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.annotate_assessment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.annotate_assessment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, 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 reCAPTCHA Enterprise key. - # - # @overload create_key(request, options = nil) - # Pass arguments to `create_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, ::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_key(parent: nil, key: nil) - # Pass arguments to `create_key` 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. The name of the project in which the key is created, in the - # format `projects/{project}`. - # @param key [::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash] - # Required. Information to create a reCAPTCHA Enterprise key. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new - # - # # Call the create_key method. - # result = client.create_key request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - # p result - # - def create_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest - - # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :create_key, 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 the list of all keys that belong to a project. - # - # @overload list_keys(request, options = nil) - # Pass arguments to `list_keys` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, ::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_keys(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_keys` 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. The name of the project that contains the keys that is - # listed, in the format `projects/{project}`. - # @param page_size [::Integer] - # Optional. The maximum number of keys to return. Default is 10. Max limit is - # 1000. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous. - # ListKeysRequest, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new - # - # # Call the list_keys method. - # result = client.list_keys 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::RecaptchaEnterprise::V1::Key. - # p item - # end - # - def list_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest - - # 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_keys.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::RecaptchaEnterprise::V1::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_keys.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, 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 - - ## - # Returns the secret key related to the specified public key. - # You must use the legacy secret key only in a 3rd party integration with - # legacy reCAPTCHA. - # - # @overload retrieve_legacy_secret_key(request, options = nil) - # Pass arguments to `retrieve_legacy_secret_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, ::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 retrieve_legacy_secret_key(key: nil) - # Pass arguments to `retrieve_legacy_secret_key` 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 key [::String] - # Required. The public key name linked to the requested secret key in the - # format `projects/{project}/keys/{key}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new - # - # # Call the retrieve_legacy_secret_key method. - # result = client.retrieve_legacy_secret_key request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse. - # p result - # - def retrieve_legacy_secret_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest - - # 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.retrieve_legacy_secret_key.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::RecaptchaEnterprise::V1::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.key - header_params["key"] = request.key - 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.retrieve_legacy_secret_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retrieve_legacy_secret_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :retrieve_legacy_secret_key, 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 the specified key. - # - # @overload get_key(request, options = nil) - # Pass arguments to `get_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, ::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_key(name: nil) - # Pass arguments to `get_key` 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 requested key, in the format - # `projects/{project}/keys/{key}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new - # - # # Call the get_key method. - # result = client.get_key request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - # p result - # - def get_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest - - # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :get_key, 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 specified key. - # - # @overload update_key(request, options = nil) - # Pass arguments to `update_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, ::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_key(key: nil, update_mask: nil) - # Pass arguments to `update_key` 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 key [::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash] - # Required. The key to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The mask to control which fields of the key get updated. If the - # mask is not present, all fields are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new - # - # # Call the update_key method. - # result = client.update_key request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - # p result - # - def update_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest - - # 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_key.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::RecaptchaEnterprise::V1::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.key&.name - header_params["key.name"] = request.key.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_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :update_key, 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 the specified key. - # - # @overload delete_key(request, options = nil) - # Pass arguments to `delete_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, ::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_key(name: nil) - # Pass arguments to `delete_key` 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 key to be deleted, in the format - # `projects/{project}/keys/{key}`. - # - # @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/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new - # - # # Call the delete_key method. - # result = client.delete_key request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest - - # 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_key.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::RecaptchaEnterprise::V1::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_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :delete_key, 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 - - ## - # Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. - # Once a key is migrated, it can be used from either product. SiteVerify - # requests are billed as CreateAssessment calls. You must be - # authenticated as one of the current owners of the reCAPTCHA Key, and - # your user must have the reCAPTCHA Enterprise Admin IAM role in the - # destination project. - # - # @overload migrate_key(request, options = nil) - # Pass arguments to `migrate_key` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::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 migrate_key(name: nil, skip_billing_check: nil) - # Pass arguments to `migrate_key` 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 key to be migrated, in the format - # `projects/{project}/keys/{key}`. - # @param skip_billing_check [::Boolean] - # Optional. If true, skips the billing check. - # A reCAPTCHA Enterprise key or migrated key behaves differently than a - # reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - # https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid - # any disruption of your usage, we check that a billing account is present. - # If your usage of reCAPTCHA is under the free quota, you can safely skip the - # billing check and proceed with the migration. See - # https://cloud.google.com/recaptcha/docs/billing-information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new - # - # # Call the migrate_key method. - # result = client.migrate_key request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - # p result - # - def migrate_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest - - # 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.migrate_key.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::RecaptchaEnterprise::V1::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.migrate_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.migrate_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :migrate_key, 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 - - ## - # Adds an IP override to a key. The following restrictions hold: - # * The maximum number of IP overrides per key is 1000. - # * For any conflict (such as IP already exists or IP part of an existing - # IP range), an error is returned. - # - # @overload add_ip_override(request, options = nil) - # Pass arguments to `add_ip_override` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, ::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 add_ip_override(name: nil, ip_override_data: nil) - # Pass arguments to `add_ip_override` 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 key to which the IP override is added, in the - # format `projects/{project}/keys/{key}`. - # @param ip_override_data [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData, ::Hash] - # Required. IP override added to the key. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new - # - # # Call the add_ip_override method. - # result = client.add_ip_override request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse. - # p result - # - def add_ip_override request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest - - # 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.add_ip_override.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::RecaptchaEnterprise::V1::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.add_ip_override.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_ip_override.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :add_ip_override, 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 - - ## - # Removes an IP override from a key. The following restrictions hold: - # * If the IP isn't found in an existing IP override, a `NOT_FOUND` error - # is returned. - # * If the IP is found in an existing IP override, but the - # override type does not match, a `NOT_FOUND` error is returned. - # - # @overload remove_ip_override(request, options = nil) - # Pass arguments to `remove_ip_override` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, ::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 remove_ip_override(name: nil, ip_override_data: nil) - # Pass arguments to `remove_ip_override` 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 key from which the IP override is removed, in the - # format `projects/{project}/keys/{key}`. - # @param ip_override_data [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData, ::Hash] - # Required. IP override to be removed from the key. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new - # - # # Call the remove_ip_override method. - # result = client.remove_ip_override request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse. - # p result - # - def remove_ip_override request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest - - # 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.remove_ip_override.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::RecaptchaEnterprise::V1::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.remove_ip_override.timeout, - metadata: metadata, - retry_policy: @config.rpcs.remove_ip_override.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :remove_ip_override, 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 all IP overrides for a key. - # - # @overload list_ip_overrides(request, options = nil) - # Pass arguments to `list_ip_overrides` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, ::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_ip_overrides(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_ip_overrides` 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. The parent key for which the IP overrides are listed, in the - # format `projects/{project}/keys/{key}`. - # @param page_size [::Integer] - # Optional. The maximum number of overrides to return. Default is 10. Max - # limit is 100. If the number of overrides is less than the page_size, all - # overrides are returned. If the page size is more than 100, it is coerced to - # 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous - # ListIpOverridesRequest, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new - # - # # Call the list_ip_overrides method. - # result = client.list_ip_overrides 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::RecaptchaEnterprise::V1::IpOverrideData. - # p item - # end - # - def list_ip_overrides request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest - - # 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_ip_overrides.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::RecaptchaEnterprise::V1::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_ip_overrides.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_ip_overrides.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :list_ip_overrides, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_ip_overrides, 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 - - ## - # Get some aggregated metrics for a Key. This data can be used to build - # dashboards. - # - # @overload get_metrics(request, options = nil) - # Pass arguments to `get_metrics` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::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_metrics(name: nil) - # Pass arguments to `get_metrics` 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 requested metrics, in the format - # `projects/{project}/keys/{key}/metrics`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Metrics] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Metrics] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new - # - # # Call the get_metrics method. - # result = client.get_metrics request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics. - # p result - # - def get_metrics request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest - - # 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_metrics.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::RecaptchaEnterprise::V1::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_metrics.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_metrics.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :get_metrics, 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 the policy for a key. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::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_policy(name: nil) - # Pass arguments to `get_policy` 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 policy to get, in the format - # `projects/{project}/keys/{key}/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest - - # 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_policy.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::RecaptchaEnterprise::V1::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_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :get_policy, 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 policy for a key. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::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_policy(policy: nil, update_mask: nil) - # Pass arguments to `update_policy` 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 policy [::Google::Cloud::RecaptchaEnterprise::V1::Policy, ::Hash] - # Required. The Policy's name is used to identify the policy to update, in - # the format `projects/{project}/keys/{key}/policy`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The mask to control which fields of the policy get updated. If - # the mask is not present, all fields are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest - - # 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_policy.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::RecaptchaEnterprise::V1::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.policy&.name - header_params["policy.name"] = request.policy.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_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :update_policy, 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 FirewallPolicy, specifying conditions at which reCAPTCHA - # Enterprise actions can be executed. - # A project may have a maximum of 1000 policies. - # - # @overload create_firewall_policy(request, options = nil) - # Pass arguments to `create_firewall_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, ::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_firewall_policy(parent: nil, firewall_policy: nil) - # Pass arguments to `create_firewall_policy` 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. The name of the project this policy applies to, in the format - # `projects/{project}`. - # @param firewall_policy [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy, ::Hash] - # Required. Information to create the policy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new - # - # # Call the create_firewall_policy method. - # result = client.create_firewall_policy request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - # p result - # - def create_firewall_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest - - # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_firewall_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :create_firewall_policy, 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 the list of all firewall policies that belong to a project. - # - # @overload list_firewall_policies(request, options = nil) - # Pass arguments to `list_firewall_policies` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, ::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_firewall_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_firewall_policies` 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. The name of the project to list the policies for, in the format - # `projects/{project}`. - # @param page_size [::Integer] - # Optional. The maximum number of policies to return. Default is 10. Max - # limit is 1000. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous. - # ListFirewallPoliciesRequest, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new - # - # # Call the list_firewall_policies method. - # result = client.list_firewall_policies 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::RecaptchaEnterprise::V1::FirewallPolicy. - # p item - # end - # - def list_firewall_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest - - # 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_firewall_policies.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::RecaptchaEnterprise::V1::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_firewall_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_firewall_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :list_firewall_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_firewall_policies, 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 - - ## - # Returns the specified firewall policy. - # - # @overload get_firewall_policy(request, options = nil) - # Pass arguments to `get_firewall_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, ::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_firewall_policy(name: nil) - # Pass arguments to `get_firewall_policy` 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 requested policy, in the format - # `projects/{project}/firewallpolicies/{firewallpolicy}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new - # - # # Call the get_firewall_policy method. - # result = client.get_firewall_policy request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - # p result - # - def get_firewall_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest - - # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_firewall_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :get_firewall_policy, 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 specified firewall policy. - # - # @overload update_firewall_policy(request, options = nil) - # Pass arguments to `update_firewall_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, ::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_firewall_policy(firewall_policy: nil, update_mask: nil) - # Pass arguments to `update_firewall_policy` 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 firewall_policy [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy, ::Hash] - # Required. The policy to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The mask to control which fields of the policy get updated. If - # the mask is not present, all fields are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new - # - # # Call the update_firewall_policy method. - # result = client.update_firewall_policy request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - # p result - # - def update_firewall_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest - - # 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_firewall_policy.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::RecaptchaEnterprise::V1::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.firewall_policy&.name - header_params["firewall_policy.name"] = request.firewall_policy.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_firewall_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_firewall_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :update_firewall_policy, 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 the specified firewall policy. - # - # @overload delete_firewall_policy(request, options = nil) - # Pass arguments to `delete_firewall_policy` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, ::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_firewall_policy(name: nil) - # Pass arguments to `delete_firewall_policy` 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 policy to be deleted, in the format - # `projects/{project}/firewallpolicies/{firewallpolicy}`. - # - # @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/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new - # - # # Call the delete_firewall_policy method. - # result = client.delete_firewall_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_firewall_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest - - # 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_firewall_policy.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::RecaptchaEnterprise::V1::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_firewall_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_firewall_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :delete_firewall_policy, 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 - - ## - # Reorders all firewall policies. - # - # @overload reorder_firewall_policies(request, options = nil) - # Pass arguments to `reorder_firewall_policies` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, ::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 reorder_firewall_policies(parent: nil, names: nil) - # Pass arguments to `reorder_firewall_policies` 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. The name of the project to list the policies for, in the format - # `projects/{project}`. - # @param names [::Array<::String>] - # Required. A list containing all policy names, in the new order. Each name - # is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new - # - # # Call the reorder_firewall_policies method. - # result = client.reorder_firewall_policies request - # - # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse. - # p result - # - def reorder_firewall_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest - - # 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.reorder_firewall_policies.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::RecaptchaEnterprise::V1::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.reorder_firewall_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reorder_firewall_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :reorder_firewall_policies, 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 - - ## - # List groups of related accounts. - # - # @overload list_related_account_groups(request, options = nil) - # Pass arguments to `list_related_account_groups` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::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_related_account_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_related_account_groups` 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. The name of the project to list related account groups from, in - # the format `projects/{project}`. - # @param page_size [::Integer] - # Optional. The maximum number of groups to return. The service might return - # fewer than this value. If unspecified, at most 50 groups are returned. The - # maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListRelatedAccountGroups` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListRelatedAccountGroups` must match the call that provided the page - # token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new - # - # # Call the list_related_account_groups method. - # result = client.list_related_account_groups 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::RecaptchaEnterprise::V1::RelatedAccountGroup. - # p item - # end - # - def list_related_account_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest - - # 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_related_account_groups.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::RecaptchaEnterprise::V1::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_related_account_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_related_account_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :list_related_account_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_groups, 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 - - ## - # Get memberships in a group of related accounts. - # - # @overload list_related_account_group_memberships(request, options = nil) - # Pass arguments to `list_related_account_group_memberships` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::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_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_related_account_group_memberships` 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. The resource name for the related account group in the format - # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - # @param page_size [::Integer] - # Optional. The maximum number of accounts to return. The service might - # return fewer than this value. If unspecified, at most 50 accounts are - # returned. The maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListRelatedAccountGroupMemberships` call. - # - # When paginating, all other parameters provided to - # `ListRelatedAccountGroupMemberships` must match the call that provided the - # page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new - # - # # Call the list_related_account_group_memberships method. - # result = client.list_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. - # p item - # end - # - def list_related_account_group_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest - - # 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_related_account_group_memberships.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::RecaptchaEnterprise::V1::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_related_account_group_memberships.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_related_account_group_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :list_related_account_group_memberships, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_group_memberships, 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 - - ## - # Search group memberships related to a given account. - # - # @overload search_related_account_group_memberships(request, options = nil) - # Pass arguments to `search_related_account_group_memberships` via a request object, either of type - # {::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::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_related_account_group_memberships(project: nil, account_id: nil, hashed_account_id: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_related_account_group_memberships` 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 project [::String] - # Required. The name of the project to search related account group - # memberships from. Specify the project name in the following format: - # `projects/{project}`. - # @param account_id [::String] - # Optional. The unique stable account identifier used to search connections. - # The identifier should correspond to an `account_id` provided in a previous - # `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - # or account_id must be set, but not both. - # @param hashed_account_id [::String] - # Optional. Deprecated: use `account_id` instead. - # The unique stable hashed account identifier used to search connections. The - # identifier should correspond to a `hashed_account_id` provided in a - # previous `CreateAssessment` or `AnnotateAssessment` call. Either - # hashed_account_id or account_id must be set, but not both. - # @param page_size [::Integer] - # Optional. The maximum number of groups to return. The service might return - # fewer than this value. If unspecified, at most 50 groups are returned. The - # maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchRelatedAccountGroupMemberships` must match the call that provided - # the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/recaptcha_enterprise/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new - # - # # Call the search_related_account_group_memberships method. - # result = client.search_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. - # p item - # end - # - def search_related_account_group_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest - - # 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_related_account_group_memberships.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::RecaptchaEnterprise::V1::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.project - header_params["project"] = request.project - 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_related_account_group_memberships.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_related_account_group_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @recaptcha_enterprise_service_stub.call_rpc :search_related_account_group_memberships, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :search_related_account_group_memberships, 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 - - ## - # Configuration class for the RecaptchaEnterpriseService API. - # - # This class represents the configuration for RecaptchaEnterpriseService, - # 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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 - # # create_assessment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_assessment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_assessment.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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "recaptchaenterprise.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 RecaptchaEnterpriseService 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_assessment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_assessment - ## - # RPC-specific configuration for `annotate_assessment` - # @return [::Gapic::Config::Method] - # - attr_reader :annotate_assessment - ## - # RPC-specific configuration for `create_key` - # @return [::Gapic::Config::Method] - # - attr_reader :create_key - ## - # RPC-specific configuration for `list_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :list_keys - ## - # RPC-specific configuration for `retrieve_legacy_secret_key` - # @return [::Gapic::Config::Method] - # - attr_reader :retrieve_legacy_secret_key - ## - # RPC-specific configuration for `get_key` - # @return [::Gapic::Config::Method] - # - attr_reader :get_key - ## - # RPC-specific configuration for `update_key` - # @return [::Gapic::Config::Method] - # - attr_reader :update_key - ## - # RPC-specific configuration for `delete_key` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_key - ## - # RPC-specific configuration for `migrate_key` - # @return [::Gapic::Config::Method] - # - attr_reader :migrate_key - ## - # RPC-specific configuration for `add_ip_override` - # @return [::Gapic::Config::Method] - # - attr_reader :add_ip_override - ## - # RPC-specific configuration for `remove_ip_override` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_ip_override - ## - # RPC-specific configuration for `list_ip_overrides` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ip_overrides - ## - # RPC-specific configuration for `get_metrics` - # @return [::Gapic::Config::Method] - # - attr_reader :get_metrics - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_firewall_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_firewall_policy - ## - # RPC-specific configuration for `list_firewall_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_firewall_policies - ## - # RPC-specific configuration for `get_firewall_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_firewall_policy - ## - # RPC-specific configuration for `update_firewall_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_firewall_policy - ## - # RPC-specific configuration for `delete_firewall_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_firewall_policy - ## - # RPC-specific configuration for `reorder_firewall_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :reorder_firewall_policies - ## - # RPC-specific configuration for `list_related_account_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_related_account_groups - ## - # RPC-specific configuration for `list_related_account_group_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_related_account_group_memberships - ## - # RPC-specific configuration for `search_related_account_group_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :search_related_account_group_memberships - - # @private - def initialize parent_rpcs = nil - create_assessment_config = parent_rpcs.create_assessment if parent_rpcs.respond_to? :create_assessment - @create_assessment = ::Gapic::Config::Method.new create_assessment_config - annotate_assessment_config = parent_rpcs.annotate_assessment if parent_rpcs.respond_to? :annotate_assessment - @annotate_assessment = ::Gapic::Config::Method.new annotate_assessment_config - create_key_config = parent_rpcs.create_key if parent_rpcs.respond_to? :create_key - @create_key = ::Gapic::Config::Method.new create_key_config - list_keys_config = parent_rpcs.list_keys if parent_rpcs.respond_to? :list_keys - @list_keys = ::Gapic::Config::Method.new list_keys_config - retrieve_legacy_secret_key_config = parent_rpcs.retrieve_legacy_secret_key if parent_rpcs.respond_to? :retrieve_legacy_secret_key - @retrieve_legacy_secret_key = ::Gapic::Config::Method.new retrieve_legacy_secret_key_config - get_key_config = parent_rpcs.get_key if parent_rpcs.respond_to? :get_key - @get_key = ::Gapic::Config::Method.new get_key_config - update_key_config = parent_rpcs.update_key if parent_rpcs.respond_to? :update_key - @update_key = ::Gapic::Config::Method.new update_key_config - delete_key_config = parent_rpcs.delete_key if parent_rpcs.respond_to? :delete_key - @delete_key = ::Gapic::Config::Method.new delete_key_config - migrate_key_config = parent_rpcs.migrate_key if parent_rpcs.respond_to? :migrate_key - @migrate_key = ::Gapic::Config::Method.new migrate_key_config - add_ip_override_config = parent_rpcs.add_ip_override if parent_rpcs.respond_to? :add_ip_override - @add_ip_override = ::Gapic::Config::Method.new add_ip_override_config - remove_ip_override_config = parent_rpcs.remove_ip_override if parent_rpcs.respond_to? :remove_ip_override - @remove_ip_override = ::Gapic::Config::Method.new remove_ip_override_config - list_ip_overrides_config = parent_rpcs.list_ip_overrides if parent_rpcs.respond_to? :list_ip_overrides - @list_ip_overrides = ::Gapic::Config::Method.new list_ip_overrides_config - get_metrics_config = parent_rpcs.get_metrics if parent_rpcs.respond_to? :get_metrics - @get_metrics = ::Gapic::Config::Method.new get_metrics_config - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_firewall_policy_config = parent_rpcs.create_firewall_policy if parent_rpcs.respond_to? :create_firewall_policy - @create_firewall_policy = ::Gapic::Config::Method.new create_firewall_policy_config - list_firewall_policies_config = parent_rpcs.list_firewall_policies if parent_rpcs.respond_to? :list_firewall_policies - @list_firewall_policies = ::Gapic::Config::Method.new list_firewall_policies_config - get_firewall_policy_config = parent_rpcs.get_firewall_policy if parent_rpcs.respond_to? :get_firewall_policy - @get_firewall_policy = ::Gapic::Config::Method.new get_firewall_policy_config - update_firewall_policy_config = parent_rpcs.update_firewall_policy if parent_rpcs.respond_to? :update_firewall_policy - @update_firewall_policy = ::Gapic::Config::Method.new update_firewall_policy_config - delete_firewall_policy_config = parent_rpcs.delete_firewall_policy if parent_rpcs.respond_to? :delete_firewall_policy - @delete_firewall_policy = ::Gapic::Config::Method.new delete_firewall_policy_config - reorder_firewall_policies_config = parent_rpcs.reorder_firewall_policies if parent_rpcs.respond_to? :reorder_firewall_policies - @reorder_firewall_policies = ::Gapic::Config::Method.new reorder_firewall_policies_config - list_related_account_groups_config = parent_rpcs.list_related_account_groups if parent_rpcs.respond_to? :list_related_account_groups - @list_related_account_groups = ::Gapic::Config::Method.new list_related_account_groups_config - list_related_account_group_memberships_config = parent_rpcs.list_related_account_group_memberships if parent_rpcs.respond_to? :list_related_account_group_memberships - @list_related_account_group_memberships = ::Gapic::Config::Method.new list_related_account_group_memberships_config - search_related_account_group_memberships_config = parent_rpcs.search_related_account_group_memberships if parent_rpcs.respond_to? :search_related_account_group_memberships - @search_related_account_group_memberships = ::Gapic::Config::Method.new search_related_account_group_memberships_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb deleted file mode 100644 index 5bad44dfdcb2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_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 RecaptchaEnterprise - module V1 - module RecaptchaEnterpriseService - # Credentials for the RecaptchaEnterpriseService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "RECAPTCHA_ENTERPRISE_CREDENTIALS", - "RECAPTCHA_ENTERPRISE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "RECAPTCHA_ENTERPRISE_CREDENTIALS_JSON", - "RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb deleted file mode 100644 index 764baa008be0..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb +++ /dev/null @@ -1,149 +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 RecaptchaEnterprise - module V1 - module RecaptchaEnterpriseService - # Path helper methods for the RecaptchaEnterpriseService API. - module Paths - ## - # Create a fully-qualified Assessment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/assessments/{assessment}` - # - # @param project [String] - # @param assessment [String] - # - # @return [::String] - def assessment_path project:, assessment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/assessments/#{assessment}" - end - - ## - # Create a fully-qualified FirewallPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/firewallpolicies/{firewallpolicy}` - # - # @param project [String] - # @param firewallpolicy [String] - # - # @return [::String] - def firewall_policy_path project:, firewallpolicy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/firewallpolicies/#{firewallpolicy}" - end - - ## - # Create a fully-qualified Key resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/keys/{key}` - # - # @param project [String] - # @param key [String] - # - # @return [::String] - def key_path project:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/keys/#{key}" - end - - ## - # Create a fully-qualified Metrics resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/keys/{key}/metrics` - # - # @param project [String] - # @param key [String] - # - # @return [::String] - def metrics_path project:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/keys/#{key}/metrics" - end - - ## - # Create a fully-qualified Policy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/keys/{key}/policy` - # - # @param project [String] - # @param key [String] - # - # @return [::String] - def policy_path project:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/keys/#{key}/policy" - 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 RelatedAccountGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}` - # - # @param project [String] - # @param relatedaccountgroup [String] - # - # @return [::String] - def related_account_group_path project:, relatedaccountgroup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/relatedaccountgroups/#{relatedaccountgroup}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/version.rb deleted file mode 100644 index 6d793f226301..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptcha_enterprise/v1/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 RecaptchaEnterprise - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb deleted file mode 100644 index a6447a580b63..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n=google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto\x12#google.cloud.recaptchaenterprise.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\x17\x43reateAssessmentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\nassessment\x18\x02 \x01(\x0b\x32/.google.cloud.recaptchaenterprise.v1.AssessmentB\x03\xe0\x41\x02\"\x92\x05\n\x10TransactionEvent\x12\x63\n\nevent_type\x18\x01 \x01(\x0e\x32J.google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventTypeB\x03\xe0\x41\x01\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x33\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xba\x03\n\x14TransactionEventType\x12&\n\"TRANSACTION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MERCHANT_APPROVE\x10\x01\x12\x11\n\rMERCHANT_DENY\x10\x02\x12\x11\n\rMANUAL_REVIEW\x10\x03\x12\x11\n\rAUTHORIZATION\x10\x04\x12\x19\n\x15\x41UTHORIZATION_DECLINE\x10\x05\x12\x13\n\x0fPAYMENT_CAPTURE\x10\x06\x12\x1b\n\x17PAYMENT_CAPTURE_DECLINE\x10\x07\x12\n\n\x06\x43\x41NCEL\x10\x08\x12\x16\n\x12\x43HARGEBACK_INQUIRY\x10\t\x12\x14\n\x10\x43HARGEBACK_ALERT\x10\n\x12\x16\n\x12\x46RAUD_NOTIFICATION\x10\x0b\x12\x0e\n\nCHARGEBACK\x10\x0c\x12\x1c\n\x18\x43HARGEBACK_REPRESENTMENT\x10\r\x12\x16\n\x12\x43HARGEBACK_REVERSE\x10\x0e\x12\x12\n\x0eREFUND_REQUEST\x10\x0f\x12\x12\n\x0eREFUND_DECLINE\x10\x10\x12\n\n\x06REFUND\x10\x11\x12\x12\n\x0eREFUND_REVERSE\x10\x12\"j\n\x18PhoneAuthenticationEvent\x12\x19\n\x0cphone_number\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xeb\x07\n\x19\x41nnotateAssessmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-recaptchaenterprise.googleapis.com/Assessment\x12\x62\n\nannotation\x18\x02 \x01(\x0e\x32I.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.AnnotationB\x03\xe0\x41\x01\x12[\n\x07reasons\x18\x03 \x03(\x0e\x32\x45.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.ReasonB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11hashed_account_id\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x12U\n\x11transaction_event\x18\x05 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.TransactionEventB\x03\xe0\x41\x01\x12\x66\n\x1aphone_authentication_event\x18\x06 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEventB\x03\xe0\x41\x01\"~\n\nAnnotation\x12\x1a\n\x16\x41NNOTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nLEGITIMATE\x10\x01\x12\x0e\n\nFRAUDULENT\x10\x02\x12\x18\n\x10PASSWORD_CORRECT\x10\x03\x1a\x02\x08\x01\x12\x1a\n\x12PASSWORD_INCORRECT\x10\x04\x1a\x02\x08\x01\"\xcf\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nCHARGEBACK\x10\x01\x12\x14\n\x10\x43HARGEBACK_FRAUD\x10\x08\x12\x16\n\x12\x43HARGEBACK_DISPUTE\x10\t\x12\n\n\x06REFUND\x10\n\x12\x10\n\x0cREFUND_FRAUD\x10\x0b\x12\x18\n\x14TRANSACTION_ACCEPTED\x10\x0c\x12\x18\n\x14TRANSACTION_DECLINED\x10\r\x12\x16\n\x12PAYMENT_HEURISTICS\x10\x02\x12\x18\n\x14INITIATED_TWO_FACTOR\x10\x07\x12\x15\n\x11PASSED_TWO_FACTOR\x10\x03\x12\x15\n\x11\x46\x41ILED_TWO_FACTOR\x10\x04\x12\x14\n\x10\x43ORRECT_PASSWORD\x10\x05\x12\x16\n\x12INCORRECT_PASSWORD\x10\x06\x12\x0f\n\x0bSOCIAL_SPAM\x10\x0e\"\x1c\n\x1a\x41nnotateAssessmentResponse\"\xb4\x01\n\x18\x45ndpointVerificationInfo\x12\x17\n\remail_address\x18\x01 \x01(\tH\x00\x12\x16\n\x0cphone_number\x18\x02 \x01(\tH\x00\x12\x1a\n\rrequest_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x16last_verification_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\n\n\x08\x65ndpoint\"\xdb\x04\n\x17\x41\x63\x63ountVerificationInfo\x12U\n\tendpoints\x18\x01 \x03(\x0b\x32=.google.cloud.recaptchaenterprise.v1.EndpointVerificationInfoB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12l\n\x1alatest_verification_result\x18\x07 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.ResultB\x03\xe0\x41\x03\x12\x14\n\x08username\x18\x02 \x01(\tB\x02\x18\x01\"\xc8\x02\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x19\n\x15SUCCESS_USER_VERIFIED\x10\x01\x12\x1b\n\x17\x45RROR_USER_NOT_VERIFIED\x10\x02\x12$\n ERROR_SITE_ONBOARDING_INCOMPLETE\x10\x03\x12\x1f\n\x1b\x45RROR_RECIPIENT_NOT_ALLOWED\x10\x04\x12)\n%ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED\x10\x05\x12\x1b\n\x17\x45RROR_CRITICAL_INTERNAL\x10\x06\x12\"\n\x1e\x45RROR_CUSTOMER_QUOTA_EXHAUSTED\x10\x07\x12\x1f\n\x1b\x45RROR_VERIFICATION_BYPASSED\x10\x08\x12\x1a\n\x16\x45RROR_VERDICT_MISMATCH\x10\t\"\xcc\x01\n\x1fPrivatePasswordLeakVerification\x12\x1f\n\x12lookup_hash_prefix\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12,\n\x1f\x65ncrypted_user_credentials_hash\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\x12*\n\x1d\x65ncrypted_leak_match_prefixes\x18\x03 \x03(\x0c\x42\x03\xe0\x41\x03\x12.\n!reencrypted_user_credentials_hash\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x03\"\xfb\t\n\nAssessment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12>\n\x05\x65vent\x18\x02 \x01(\x0b\x32*.google.cloud.recaptchaenterprise.v1.EventB\x03\xe0\x41\x01\x12M\n\rrisk_analysis\x18\x03 \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.RiskAnalysisB\x03\xe0\x41\x03\x12S\n\x10token_properties\x18\x04 \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TokenPropertiesB\x03\xe0\x41\x03\x12_\n\x14\x61\x63\x63ount_verification\x18\x05 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.AccountVerificationInfoB\x03\xe0\x41\x01\x12h\n\x1b\x61\x63\x63ount_defender_assessment\x18\x06 \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessmentB\x03\xe0\x41\x03\x12u\n\"private_password_leak_verification\x18\x08 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerificationB\x03\xe0\x41\x01\x12\x66\n\x1a\x66irewall_policy_assessment\x18\n \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessmentB\x03\xe0\x41\x03\x12h\n\x1b\x66raud_prevention_assessment\x18\x0b \x01(\x0b\x32>.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessmentB\x03\xe0\x41\x03\x12M\n\rfraud_signals\x18\r \x01(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.FraudSignalsB\x03\xe0\x41\x03\x12^\n\x16phone_fraud_assessment\x18\x0c \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.PhoneFraudAssessmentB\x03\xe0\x41\x03\x12_\n\x16\x61ssessment_environment\x18\x0e \x01(\x0b\x32:.google.cloud.recaptchaenterprise.v1.AssessmentEnvironmentB\x03\xe0\x41\x01\x12U\n\x11policy_evaluation\x18\x10 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.PolicyEvaluationB\x03\xe0\x41\x03:x\xea\x41u\n-recaptchaenterprise.googleapis.com/Assessment\x12+projects/{project}/assessments/{assessment}*\x0b\x61ssessments2\nassessment\"\xb0\x05\n\x05\x45vent\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08site_key\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nuser_agent\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12$\n\x0fuser_ip_address\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x1c\n\x0f\x65xpected_action\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x06 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x14\n\x07\x65xpress\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rrequested_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14waf_token_assessment\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x10\n\x03ja3\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03ja4\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07headers\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\'\n\x1a\x66irewall_policy_evaluation\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\x10transaction_data\x18\r \x01(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.TransactionDataB\x03\xe0\x41\x01\x12\x45\n\tuser_info\x18\x0f \x01(\x0b\x32-.google.cloud.recaptchaenterprise.v1.UserInfoB\x03\xe0\x41\x01\x12Y\n\x10\x66raud_prevention\x18\x11 \x01(\x0e\x32:.google.cloud.recaptchaenterprise.v1.Event.FraudPreventionB\x03\xe0\x41\x01\"N\n\x0f\x46raudPrevention\x12 \n\x1c\x46RAUD_PREVENTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\xa0\n\n\x0fTransactionData\x12\x1b\n\x0etransaction_id\x18\x0b \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61rd_bin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x63\x61rd_last_four\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1b\n\x0eshipping_value\x18\x0c \x01(\x01\x42\x03\xe0\x41\x01\x12[\n\x10shipping_address\x18\x06 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12Z\n\x0f\x62illing_address\x18\x07 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.TransactionData.AddressB\x03\xe0\x41\x01\x12L\n\x04user\x18\x08 \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12Q\n\tmerchants\x18\r \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.UserB\x03\xe0\x41\x01\x12M\n\x05items\x18\x0e \x03(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.TransactionData.ItemB\x03\xe0\x41\x01\x12[\n\x0cgateway_info\x18\n \x01(\x0b\x32@.google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfoB\x03\xe0\x41\x01\x1a\xa4\x01\n\x07\x41\x64\x64ress\x12\x16\n\trecipient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08locality\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13\x61\x64ministrative_area\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bpostal_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xa2\x01\n\x04User\x12\x17\n\naccount_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x63reation_ms\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cphone_number\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0ephone_verified\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x66\n\x04Item\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12 \n\x13merchant_account_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x0bGatewayInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15gateway_response_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61vs_response_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63vv_response_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0f_transaction_id\"\xa5\x01\n\x08UserInfo\x12<\n\x13\x63reate_account_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x17\n\naccount_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x08user_ids\x18\x03 \x03(\x0b\x32+.google.cloud.recaptchaenterprise.v1.UserIdB\x03\xe0\x41\x01\"`\n\x06UserId\x12\x14\n\x05\x65mail\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x17\n\x08username\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x42\n\n\x08id_oneof\"\xdb\x05\n\x0cRiskAnalysis\x12\x12\n\x05score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\\\n\x07reasons\x18\x02 \x03(\x0e\x32\x46.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReasonB\x03\xe0\x41\x03\x12%\n\x18\x65xtended_verdict_reasons\x18\x03 \x03(\tB\x03\xe0\x41\x03\x12T\n\x13last_challenge_type\x18\x06 \x01(\x0e\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeTypeB\x03\xe0\x41\x03\x12S\n\tchallenge\x18\x04 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ChallengeB\x03\xe0\x41\x03\x12\x44\n\rverified_bots\x18\x05 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.BotB\x03\xe0\x41\x03\"\xf1\x01\n\x14\x43lassificationReason\x12%\n!CLASSIFICATION_REASON_UNSPECIFIED\x10\x00\x12\x0e\n\nAUTOMATION\x10\x01\x12\x1a\n\x16UNEXPECTED_ENVIRONMENT\x10\x02\x12\x14\n\x10TOO_MUCH_TRAFFIC\x10\x03\x12\x1d\n\x19UNEXPECTED_USAGE_PATTERNS\x10\x04\x12\x18\n\x14LOW_CONFIDENCE_SCORE\x10\x05\x12\x19\n\x11SUSPECTED_CARDING\x10\x06\x1a\x02\x08\x01\x12\x1c\n\x14SUSPECTED_CHARGEBACK\x10\x07\x1a\x02\x08\x01\"M\n\tChallenge\x12\x19\n\x15\x43HALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\n\n\x06PASSED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\"\xbd\x01\n\x03\x42ot\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12G\n\x08\x62ot_type\x18\x02 \x01(\x0e\x32\x30.google.cloud.recaptchaenterprise.v1.Bot.BotTypeB\x03\xe0\x41\x01\"Z\n\x07\x42otType\x12\x18\n\x14\x42OT_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41I_AGENT\x10\x01\x12\x13\n\x0f\x43ONTENT_SCRAPER\x10\x02\x12\x12\n\x0eSEARCH_INDEXER\x10\x03\"\xf9\x03\n\x0fTokenProperties\x12\x12\n\x05valid\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0einvalid_reason\x18\x02 \x01(\x0e\x32\x42.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReasonB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08hostname\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61ndroid_package_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rios_bundle_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x61\x63tion\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\rInvalidReason\x12\x1e\n\x1aINVALID_REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16UNKNOWN_INVALID_REASON\x10\x01\x12\r\n\tMALFORMED\x10\x02\x12\x0b\n\x07\x45XPIRED\x10\x03\x12\x08\n\x04\x44UPE\x10\x04\x12\x0b\n\x07MISSING\x10\x05\x12\x11\n\rBROWSER_ERROR\x10\x06\x12\x15\n\x11UNEXPECTED_ACTION\x10\x07\x12\x10\n\x0cKEY_MISMATCH\x10\x08\x12\x13\n\x0f\x44OMAIN_MISMATCH\x10\t\"\xd0\x07\n\x19\x46raudPreventionAssessment\x12\x1d\n\x10transaction_risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x64\n\x0crisk_reasons\x18\x06 \x03(\x0b\x32I.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReasonB\x03\xe0\x41\x03\x12~\n\x19stolen_instrument_verdict\x18\x02 \x01(\x0b\x32V.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdictB\x03\xe0\x41\x03\x12t\n\x14\x63\x61rd_testing_verdict\x18\x03 \x01(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictB\x03\xe0\x41\x03\x12|\n\x18\x62\x65havioral_trust_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictB\x03\xe0\x41\x03\x1a\xb4\x02\n\nRiskReason\x12\x65\n\x06reason\x18\x01 \x01(\x0e\x32P.google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.ReasonB\x03\xe0\x41\x03\"\xbe\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19HIGH_TRANSACTION_VELOCITY\x10\x01\x12!\n\x1d\x45XCESSIVE_ENUMERATION_PATTERN\x10\x02\x12\x1a\n\x16SHORT_IDENTITY_HISTORY\x10\x03\x12\x1b\n\x17GEOLOCATION_DISCREPANCY\x10\x04\x12!\n\x1d\x41SSOCIATED_WITH_FRAUD_CLUSTER\x10\x05\x1a,\n\x17StolenInstrumentVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a\'\n\x12\x43\x61rdTestingVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x1a,\n\x16\x42\x65havioralTrustVerdict\x12\x12\n\x05trust\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\"\xe3\x03\n\x0c\x46raudSignals\x12X\n\x0cuser_signals\x18\x01 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignalsB\x03\xe0\x41\x03\x12X\n\x0c\x63\x61rd_signals\x18\x02 \x01(\x0b\x32=.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignalsB\x03\xe0\x41\x03\x1aP\n\x0bUserSignals\x12$\n\x17\x61\x63tive_days_lower_bound\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1b\n\x0esynthetic_risk\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03\x1a\xcc\x01\n\x0b\x43\x61rdSignals\x12\x61\n\x0b\x63\x61rd_labels\x18\x01 \x03(\x0e\x32G.google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabelB\x03\xe0\x41\x03\"Z\n\tCardLabel\x12\x1a\n\x16\x43\x41RD_LABEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREPAID\x10\x01\x12\x0b\n\x07VIRTUAL\x10\x02\x12\x17\n\x13UNEXPECTED_LOCATION\x10\x03\"\xe2\x01\n\x13SmsTollFraudVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12\x61\n\x07reasons\x18\x02 \x03(\x0e\x32K.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReasonB\x03\xe0\x41\x03\"U\n\x12SmsTollFraudReason\x12%\n!SMS_TOLL_FRAUD_REASON_UNSPECIFIED\x10\x00\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x01\"u\n\x14PhoneFraudAssessment\x12]\n\x16sms_toll_fraud_verdict\x18\x01 \x01(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdictB\x03\xe0\x41\x03\"\xb8\n\n\x19\x41\x63\x63ountDefenderAssessment\x12h\n\x06labels\x18\x01 \x03(\x0e\x32S.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabelB\x03\xe0\x41\x03\x12|\n\x18\x61\x63\x63ount_takeover_verdict\x18\x04 \x01(\x0b\x32U.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdictB\x03\xe0\x41\x03\x1a\x8d\x02\n\x16\x41\x63\x63ountTakeoverVerdict\x12\x11\n\x04risk\x18\x01 \x01(\x02\x42\x03\xe0\x41\x03\x12n\n\x0crisk_reasons\x18\x04 \x03(\x0b\x32P.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReasonB\x06\xe0\x41\x03\xe0\x41\x06\x12p\n\rtrust_reasons\x18\x05 \x03(\x0b\x32Q.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReasonB\x06\xe0\x41\x03\xe0\x41\x06\x1a\xb9\x02\n\x11\x41\x63\x63ountRiskReason\x12p\n\x06reason\x18\x01 \x01(\x0e\x32[.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReasonB\x03\xe0\x41\x03\"\xb1\x01\n\nRiskReason\x12\x1b\n\x17RISK_REASON_UNSPECIFIED\x10\x00\x12\"\n\x1e\x43LIENT_HISTORICAL_BOT_ACTIVITY\x10\x01\x12\"\n\x1e\x41\x43\x43OUNT_IN_LARGE_RELATED_GROUP\x10\x02\x12!\n\x1d\x43LIENT_ACCESSED_MANY_ACCOUNTS\x10\x03\x12\x1b\n\x17\x44ISPOSABLE_EMAIL_DOMAIN\x10\x04\x1a\xb0\x02\n\x12\x41\x63\x63ountTrustReason\x12r\n\x06reason\x18\x01 \x01(\x0e\x32].google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReasonB\x03\xe0\x41\x03\"\xa5\x01\n\x0bTrustReason\x12\x1c\n\x18TRUST_REASON_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19\x41\x43\x43OUNT_HISTORY_REPUTABLE\x10\x02\x12&\n\"IDENTITY_GLOBAL_ACTIVITY_REPUTABLE\x10\x03\x12\x1e\n\x1aIDENTITY_HISTORY_REPUTABLE\x10\x04\"\xb3\x01\n\x14\x41\x63\x63ountDefenderLabel\x12&\n\"ACCOUNT_DEFENDER_LABEL_UNSPECIFIED\x10\x00\x12\x11\n\rPROFILE_MATCH\x10\x01\x12\x1d\n\x19SUSPICIOUS_LOGIN_ACTIVITY\x10\x02\x12\x1f\n\x1bSUSPICIOUS_ACCOUNT_CREATION\x10\x03\x12 \n\x1cRELATED_ACCOUNTS_NUMBER_HIGH\x10\x04\"\x93\x01\n\x10\x43reateKeyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12:\n\x03key\x18\x02 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\"\x87\x01\n\x0fListKeysRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"c\n\x10ListKeysResponse\x12\x36\n\x04keys\x18\x01 \x03(\x0b\x32(.google.cloud.recaptchaenterprise.v1.Key\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eRetrieveLegacySecretKeyRequest\x12;\n\x03key\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"M\n\rGetKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\x84\x01\n\x10UpdateKeyRequest\x12:\n\x03key\x18\x01 \x01(\x0b\x32(.google.cloud.recaptchaenterprise.v1.KeyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"P\n\x10\x44\x65leteKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\"\xb5\x01\n\x1b\x43reateFirewallPolicyRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12Q\n\x0f\x66irewall_policy\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\"\x93\x01\n\x1bListFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\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\"\x87\x01\n\x1cListFirewallPoliciesResponse\x12N\n\x11\x66irewall_policies\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x18GetFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xa6\x01\n\x1bUpdateFirewallPolicyRequest\x12Q\n\x0f\x66irewall_policy\x18\x01 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x1b\x44\x65leteFirewallPolicyRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"\xaf\x01\n\x1eReorderFirewallPoliciesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x05names\x18\x02 \x03(\tB9\xe0\x41\x02\xfa\x41\x33\n1recaptchaenterprise.googleapis.com/FirewallPolicy\"!\n\x1fReorderFirewallPoliciesResponse\"r\n\x11MigrateKeyRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12\x1f\n\x12skip_billing_check\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x11GetMetricsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*recaptchaenterprise.googleapis.com/Metrics\"\xd5\x02\n\x07Metrics\x12\x14\n\x04name\x18\x04 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\rscore_metrics\x18\x02 \x03(\x0b\x32\x31.google.cloud.recaptchaenterprise.v1.ScoreMetrics\x12P\n\x11\x63hallenge_metrics\x18\x03 \x03(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.ChallengeMetrics:h\xea\x41\x65\n*recaptchaenterprise.googleapis.com/Metrics\x12%projects/{project}/keys/{key}/metrics*\x07metrics2\x07metrics\"<\n\x1fRetrieveLegacySecretKeyResponse\x12\x19\n\x11legacy_secret_key\x18\x01 \x01(\t\"\x8c\x07\n\x03Key\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0cweb_settings\x18\x03 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.WebKeySettingsH\x00\x12S\n\x10\x61ndroid_settings\x18\x04 \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.AndroidKeySettingsH\x00\x12K\n\x0cios_settings\x18\x05 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IOSKeySettingsH\x00\x12S\n\x10\x65xpress_settings\x18\x0b \x01(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ExpressKeySettingsH\x00\x12W\n\x12universal_settings\x18\r \x01(\x0b\x32\x39.google.cloud.recaptchaenterprise.v1.UniversalKeySettingsH\x00\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.recaptchaenterprise.v1.Key.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x0ftesting_options\x18\t \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.TestingOptionsB\x03\xe0\x41\x01\x12K\n\x0cwaf_settings\x18\n \x01(\x0b\x32\x30.google.cloud.recaptchaenterprise.v1.WafSettingsB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:U\xea\x41R\n&recaptchaenterprise.googleapis.com/Key\x12\x1dprojects/{project}/keys/{key}*\x04keys2\x03keyB\x13\n\x11platform_settings\"\xf2\x01\n\x0eTestingOptions\x12\x1a\n\rtesting_score\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x64\n\x11testing_challenge\x18\x02 \x01(\x0e\x32\x44.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallengeB\x03\xe0\x41\x01\"^\n\x10TestingChallenge\x12!\n\x1dTESTING_CHALLENGE_UNSPECIFIED\x10\x00\x12\r\n\tNOCAPTCHA\x10\x01\x12\x18\n\x14UNSOLVABLE_CHALLENGE\x10\x02\"\xc5\x08\n\x0eWebKeySettings\x12\x1e\n\x11\x61llow_all_domains\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_amp_traffic\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x10integration_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationTypeB\x03\xe0\x41\x02\x12{\n\x1d\x63hallenge_security_preference\x18\x05 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x12\x66\n\x12\x63hallenge_settings\x18\x06 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettingsB\x03\xe0\x41\x01\x1a.\n\x0e\x41\x63tionSettings\x12\x1c\n\x0fscore_threshold\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x1a\xea\x02\n\x11\x43hallengeSettings\x12\x61\n\x10\x64\x65\x66\x61ult_settings\x18\x01 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettingsB\x03\xe0\x41\x02\x12w\n\x0f\x61\x63tion_settings\x18\x02 \x03(\x0b\x32Y.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings.ActionSettingsEntryB\x03\xe0\x41\x01\x1ay\n\x13\x41\x63tionSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings:\x02\x38\x01\"w\n\x0fIntegrationType\x12 \n\x1cINTEGRATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SCORE\x10\x01\x12\x0c\n\x08\x43HECKBOX\x10\x02\x12\r\n\tINVISIBLE\x10\x03\x12\x1a\n\x16POLICY_BASED_CHALLENGE\x10\x05\"v\n\x1b\x43hallengeSecurityPreference\x12-\n)CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED\x10\x00\x12\r\n\tUSABILITY\x10\x01\x12\x0b\n\x07\x42\x41LANCE\x10\x02\x12\x0c\n\x08SECURITY\x10\x03\"\x96\x01\n\x12\x41ndroidKeySettings\x12$\n\x17\x61llow_all_package_names\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\"\n\x15\x61llowed_package_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x36\n)support_non_google_app_store_distribution\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xac\x01\n\x0eIOSKeySettings\x12!\n\x14\x61llow_all_bundle_ids\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x61llowed_bundle_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12V\n\x12\x61pple_developer_id\x18\x03 \x01(\x0b\x32\x35.google.cloud.recaptchaenterprise.v1.AppleDeveloperIdB\x03\xe0\x41\x01\"\x14\n\x12\x45xpressKeySettings\"\x16\n\x14UniversalKeySettings\"Z\n\x10\x41ppleDeveloperId\x12\x1b\n\x0bprivate_key\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x13\n\x06key_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07team_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x11ScoreDistribution\x12_\n\rscore_buckets\x18\x01 \x03(\x0b\x32H.google.cloud.recaptchaenterprise.v1.ScoreDistribution.ScoreBucketsEntry\x1a\x33\n\x11ScoreBucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\xab\x02\n\x0cScoreMetrics\x12O\n\x0foverall_metrics\x18\x01 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution\x12\\\n\x0e\x61\x63tion_metrics\x18\x02 \x03(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.ScoreMetrics.ActionMetricsEntry\x1al\n\x12\x41\x63tionMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ScoreDistribution:\x02\x38\x01\"o\n\x10\x43hallengeMetrics\x12\x16\n\x0epageload_count\x18\x01 \x01(\x03\x12\x17\n\x0fnocaptcha_count\x18\x02 \x01(\x03\x12\x14\n\x0c\x66\x61iled_count\x18\x03 \x01(\x03\x12\x14\n\x0cpassed_count\x18\x04 \x01(\x03\"\x95\x01\n\x18\x46irewallPolicyAssessment\x12&\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12Q\n\x0f\x66irewall_policy\x18\x08 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicyB\x03\xe0\x41\x03\"\x82\x06\n\x0e\x46irewallAction\x12P\n\x05\x61llow\x18\x01 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.AllowActionH\x00\x12P\n\x05\x62lock\x18\x02 \x01(\x0b\x32?.google.cloud.recaptchaenterprise.v1.FirewallAction.BlockActionH\x00\x12t\n\x18include_recaptcha_script\x18\x06 \x01(\x0b\x32P.google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptActionH\x00\x12V\n\x08redirect\x18\x05 \x01(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectActionH\x00\x12Z\n\nsubstitute\x18\x03 \x01(\x0b\x32\x44.google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteActionH\x00\x12Y\n\nset_header\x18\x04 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderActionH\x00\x1a\r\n\x0b\x41llowAction\x1a\r\n\x0b\x42lockAction\x1a\x1e\n\x1cIncludeRecaptchaScriptAction\x1a\x10\n\x0eRedirectAction\x1a%\n\x10SubstituteAction\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x37\n\x0fSetHeaderAction\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x17\n\x15\x66irewall_action_oneof\"\xc5\x02\n\x0e\x46irewallPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tcondition\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x61\x63tions\x18\x06 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.FirewallActionB\x03\xe0\x41\x01:\x8f\x01\xea\x41\x8b\x01\n1recaptchaenterprise.googleapis.com/FirewallPolicy\x12\x34projects/{project}/firewallpolicies/{firewallpolicy}*\x10\x66irewallPolicies2\x0e\x66irewallPolicy\"\xb6\x01\n)ListRelatedAccountGroupMembershipsRequest\x12X\n\x06parent\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\x12@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\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\"\xb4\x01\n*ListRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa2\x01\n\x1fListRelatedAccountGroupsRequest\x12N\n\x06parent\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\x12\x36recaptchaenterprise.googleapis.com/RelatedAccountGroup\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\"\x95\x01\n ListRelatedAccountGroupsResponse\x12X\n\x16related_account_groups\x18\x01 \x03(\x0b\x32\x38.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdf\x01\n+SearchRelatedAccountGroupMembershipsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\naccount_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12 \n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb6\x01\n,SearchRelatedAccountGroupMembershipsResponse\x12m\n!related_account_group_memberships\x18\x01 \x03(\x0b\x32\x42.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x14\x41\x64\x64IpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x17\n\x15\x41\x64\x64IpOverrideResponse\"\xab\x01\n\x17RemoveIpOverrideRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\x12R\n\x10ip_override_data\x18\x02 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideDataB\x03\xe0\x41\x02\"\x1a\n\x18RemoveIpOverrideResponse\"\x89\x01\n\x16ListIpOverridesRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&recaptchaenterprise.googleapis.com/Key\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\"}\n\x17ListIpOverridesResponse\x12I\n\x0cip_overrides\x18\x01 \x03(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.IpOverrideData\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc8\x02\n\x1dRelatedAccountGroupMembership\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02\x12\x12\n\naccount_id\x18\x04 \x01(\t\x12\x1d\n\x11hashed_account_id\x18\x02 \x01(\x0c\x42\x02\x18\x01:\xdd\x01\xea\x41\xd9\x01\n@recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership\x12Vprojects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}*\x1erelatedAccountGroupMemberships2\x1drelatedAccountGroupMembership\"\xd4\x01\n\x13RelatedAccountGroup\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x02:\xa6\x01\xea\x41\xa2\x01\n6recaptchaenterprise.googleapis.com/RelatedAccountGroup\x12=projects/{project}/relatedaccountgroups/{relatedaccountgroup}*\x14relatedAccountGroups2\x13relatedAccountGroup\"\x8b\x03\n\x0bWafSettings\x12U\n\x0bwaf_service\x18\x01 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafServiceB\x03\xe0\x41\x02\x12U\n\x0bwaf_feature\x18\x02 \x01(\x0e\x32;.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeatureB\x03\xe0\x41\x02\"s\n\nWafFeature\x12\x1b\n\x17WAF_FEATURE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43HALLENGE_PAGE\x10\x01\x12\x11\n\rSESSION_TOKEN\x10\x02\x12\x10\n\x0c\x41\x43TION_TOKEN\x10\x03\x12\x0f\n\x07\x45XPRESS\x10\x05\x1a\x02\x08\x01\"Y\n\nWafService\x12\x1b\n\x17WAF_SERVICE_UNSPECIFIED\x10\x00\x12\x06\n\x02\x43\x41\x10\x01\x12\n\n\x06\x46\x41STLY\x10\x03\x12\x0e\n\nCLOUDFLARE\x10\x04\x12\n\n\x06\x41KAMAI\x10\x05\"B\n\x15\x41ssessmentEnvironment\x12\x13\n\x06\x63lient\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n\x10PolicyEvaluation\x12\x64\n\x19\x63hallenge_rule_evaluation\x18\x01 \x01(\x0b\x32<.google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluationB\x03\xe0\x41\x03\"\x19\n\x17\x43hallengeRuleEvaluation\"\xc1\x01\n\x0eIpOverrideData\x12\x17\n\x02ip\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\\\n\roverride_type\x18\x03 \x01(\x0e\x32@.google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideTypeB\x03\xe0\x41\x02\"8\n\x0cOverrideType\x12\x1d\n\x19OVERRIDE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)recaptchaenterprise.googleapis.com/Policy\"\x8d\x01\n\x13UpdatePolicyRequest\x12@\n\x06policy\x18\x01 \x01(\x0b\x32+.google.cloud.recaptchaenterprise.v1.PolicyB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb5\x02\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x0f\x63lient_settings\x18\x04 \x01(\x0b\x32\x33.google.cloud.recaptchaenterprise.v1.ClientSettingsB\x03\xe0\x41\x02\x12[\n\x15\x63hallenge_rule_groups\x18\x02 \x03(\x0b\x32\x37.google.cloud.recaptchaenterprise.v1.ChallengeRuleGroupB\x03\xe0\x41\x01:h\xea\x41\x65\n)recaptchaenterprise.googleapis.com/Policy\x12$projects/{project}/keys/{key}/policy \x02*\x08policies2\x06policy\"|\n\x12\x43hallengeRuleGroup\x12\x14\n\x07\x61\x63tions\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12P\n\x0f\x63hallenge_rules\x18\x02 \x03(\x0b\x32\x32.google.cloud.recaptchaenterprise.v1.ChallengeRuleB\x03\xe0\x41\x02\"\xff\x02\n\rChallengeRule\x12\x16\n\tcondition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12]\n\x0cno_challenge\x18\x02 \x01(\x0b\x32\x45.google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcomeH\x00\x12X\n\tchallenge\x18\x03 \x01(\x0b\x32\x43.google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcomeH\x00\x1a\x14\n\x12NoChallengeOutcome\x1a|\n\x10\x43hallengeOutcome\x12h\n\ndifficulty\x18\x01 \x01(\x0e\x32O.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreferenceB\x03\xe0\x41\x01\x42\t\n\x07outcome\"\xb2\x01\n\x0e\x43lientSettings\x12\x1c\n\x0f\x61llowed_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_all_domains\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x62\n\x18protected_endpoint_group\x18\x03 \x01(\x0b\x32;.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroupB\x03\xe0\x41\x01\"r\n\x16ProtectedEndpointGroup\x12X\n\x13protected_endpoints\x18\x01 \x03(\x0b\x32\x36.google.cloud.recaptchaenterprise.v1.ProtectedEndpointB\x03\xe0\x41\x01\";\n\x11ProtectedEndpoint\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61\x63tion\x18\x02 \x01(\tB\x03\xe0\x41\x02*d\n\rChallengeType\x12\x1e\n\x1a\x43HALLENGE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43HALLENGE_TYPE_VISUAL\x10\x01\x12\x18\n\x14\x43HALLENGE_TYPE_AUDIO\x10\x02\x32\xd4\'\n\x1aRecaptchaEnterpriseService\x12\xce\x01\n\x10\x43reateAssessment\x12<.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest\x1a/.google.cloud.recaptchaenterprise.v1.Assessment\"K\xda\x41\x11parent,assessment\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/assessments:\nassessment\x12\xe0\x01\n\x12\x41nnotateAssessment\x12>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest\x1a?.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse\"I\xda\x41\x0fname,annotation\x82\xd3\xe4\x93\x02\x31\",/v1/{name=projects/*/assessments/*}:annotate:\x01*\x12\xa4\x01\n\tCreateKey\x12\x35.google.cloud.recaptchaenterprise.v1.CreateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"6\xda\x41\nparent,key\x82\xd3\xe4\x93\x02#\"\x1c/v1/{parent=projects/*}/keys:\x03key\x12\xa6\x01\n\x08ListKeys\x12\x34.google.cloud.recaptchaenterprise.v1.ListKeysRequest\x1a\x35.google.cloud.recaptchaenterprise.v1.ListKeysResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=projects/*}/keys\x12\xe7\x01\n\x17RetrieveLegacySecretKey\x12\x43.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse\"A\xda\x41\x03key\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey\x12\x93\x01\n\x06GetKey\x12\x32.google.cloud.recaptchaenterprise.v1.GetKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/keys/*}\x12\xad\x01\n\tUpdateKey\x12\x35.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"?\xda\x41\x0fkey,update_mask\x82\xd3\xe4\x93\x02\'2 /v1/{key.name=projects/*/keys/*}:\x03key\x12\x87\x01\n\tDeleteKey\x12\x35.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest\x1a\x16.google.protobuf.Empty\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=projects/*/keys/*}\x12\x9f\x01\n\nMigrateKey\x12\x36.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest\x1a(.google.cloud.recaptchaenterprise.v1.Key\"/\x82\xd3\xe4\x93\x02)\"$/v1/{name=projects/*/keys/*}:migrate:\x01*\x12\xd5\x01\n\rAddIpOverride\x12\x39.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest\x1a:.google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse\"M\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02/\"*/v1/{name=projects/*/keys/*}:addIpOverride:\x01*\x12\xe1\x01\n\x10RemoveIpOverride\x12<.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest\x1a=.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse\"P\xda\x41\x15name,ip_override_data\x82\xd3\xe4\x93\x02\x32\"-/v1/{name=projects/*/keys/*}:removeIpOverride:\x01*\x12\xcd\x01\n\x0fListIpOverrides\x12;.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest\x1a<.google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/keys/*}:listIpOverrides\x12\xa7\x01\n\nGetMetrics\x12\x36.google.cloud.recaptchaenterprise.v1.GetMetricsRequest\x1a,.google.cloud.recaptchaenterprise.v1.Metrics\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=projects/*/keys/*/metrics}\x12\xa3\x01\n\tGetPolicy\x12\x35.google.cloud.recaptchaenterprise.v1.GetPolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"2\xda\x41\x04name\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/keys/*/policy}\x12\xc6\x01\n\x0cUpdatePolicy\x12\x38.google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest\x1a+.google.cloud.recaptchaenterprise.v1.Policy\"O\xda\x41\x12policy,update_mask\x82\xd3\xe4\x93\x02\x34\x32*/v1/{policy.name=projects/*/keys/*/policy}:\x06policy\x12\xe9\x01\n\x14\x43reateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"Z\xda\x41\x16parent,firewall_policy\x82\xd3\xe4\x93\x02;\"(/v1/{parent=projects/*}/firewallpolicies:\x0f\x66irewall_policy\x12\xd6\x01\n\x14ListFirewallPolicies\x12@.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest\x1a\x41.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*}/firewallpolicies\x12\xc0\x01\n\x11GetFirewallPolicy\x12=.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/firewallpolicies/*}\x12\xfe\x01\n\x14UpdateFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest\x1a\x33.google.cloud.recaptchaenterprise.v1.FirewallPolicy\"o\xda\x41\x1b\x66irewall_policy,update_mask\x82\xd3\xe4\x93\x02K28/v1/{firewall_policy.name=projects/*/firewallpolicies/*}:\x0f\x66irewall_policy\x12\xa9\x01\n\x14\x44\x65leteFirewallPolicy\x12@.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/firewallpolicies/*}\x12\xf0\x01\n\x17ReorderFirewallPolicies\x12\x43.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest\x1a\x44.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse\"J\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=projects/*}/firewallpolicies:reorder:\x01*\x12\xe6\x01\n\x18ListRelatedAccountGroups\x12\x44.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest\x1a\x45.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*}/relatedaccountgroups\x12\x92\x02\n\"ListRelatedAccountGroupMemberships\x12N.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest\x1aO.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/relatedaccountgroups/*}/memberships\x12\xb2\x02\n$SearchRelatedAccountGroupMemberships\x12P.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest\x1aQ.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse\"e\xda\x41\x19project,hashed_account_id\x82\xd3\xe4\x93\x02\x43\">/v1/{project=projects/*}/relatedaccountgroupmemberships:search:\x01*\x1aV\xca\x41\"recaptchaenterprise.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n!com.google.recaptchaenterprise.v1B\x18RecaptchaEnterpriseProtoP\x01Z\\cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb\xa2\x02\x04GCRE\xaa\x02#Google.Cloud.RecaptchaEnterprise.V1\xca\x02#Google\\Cloud\\RecaptchaEnterprise\\V1\xea\x02&Google::Cloud::RecaptchaEnterprise::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module RecaptchaEnterprise - module V1 - CreateAssessmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest").msgclass - TransactionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionEvent").msgclass - TransactionEvent::TransactionEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType").enummodule - PhoneAuthenticationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEvent").msgclass - AnnotateAssessmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest").msgclass - AnnotateAssessmentRequest::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation").enummodule - AnnotateAssessmentRequest::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason").enummodule - AnnotateAssessmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse").msgclass - EndpointVerificationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo").msgclass - AccountVerificationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountVerificationInfo").msgclass - AccountVerificationInfo::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.Result").enummodule - PrivatePasswordLeakVerification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification").msgclass - Assessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Assessment").msgclass - Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Event").msgclass - Event::FraudPrevention = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Event.FraudPrevention").enummodule - TransactionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData").msgclass - TransactionData::Address = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.Address").msgclass - TransactionData::User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.User").msgclass - TransactionData::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.Item").msgclass - TransactionData::GatewayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo").msgclass - UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UserInfo").msgclass - UserId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UserId").msgclass - RiskAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis").msgclass - RiskAnalysis::ClassificationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason").enummodule - RiskAnalysis::Challenge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge").enummodule - Bot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Bot").msgclass - Bot::BotType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Bot.BotType").enummodule - TokenProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TokenProperties").msgclass - TokenProperties::InvalidReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason").enummodule - FraudPreventionAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment").msgclass - FraudPreventionAssessment::RiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason").msgclass - FraudPreventionAssessment::RiskReason::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.RiskReason.Reason").enummodule - FraudPreventionAssessment::StolenInstrumentVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict").msgclass - FraudPreventionAssessment::CardTestingVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict").msgclass - FraudPreventionAssessment::BehavioralTrustVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict").msgclass - FraudSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals").msgclass - FraudSignals::UserSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals").msgclass - FraudSignals::CardSignals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals").msgclass - FraudSignals::CardSignals::CardLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel").enummodule - SmsTollFraudVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict").msgclass - SmsTollFraudVerdict::SmsTollFraudReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SmsTollFraudVerdict.SmsTollFraudReason").enummodule - PhoneFraudAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment").msgclass - AccountDefenderAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment").msgclass - AccountDefenderAssessment::AccountTakeoverVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTakeoverVerdict").msgclass - AccountDefenderAssessment::AccountRiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason").msgclass - AccountDefenderAssessment::AccountRiskReason::RiskReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountRiskReason.RiskReason").enummodule - AccountDefenderAssessment::AccountTrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason").msgclass - AccountDefenderAssessment::AccountTrustReason::TrustReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountTrustReason.TrustReason").enummodule - AccountDefenderAssessment::AccountDefenderLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel").enummodule - CreateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateKeyRequest").msgclass - ListKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListKeysRequest").msgclass - ListKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListKeysResponse").msgclass - RetrieveLegacySecretKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest").msgclass - GetKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetKeyRequest").msgclass - UpdateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdateKeyRequest").msgclass - DeleteKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.DeleteKeyRequest").msgclass - CreateFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest").msgclass - ListFirewallPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest").msgclass - ListFirewallPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse").msgclass - GetFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest").msgclass - UpdateFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest").msgclass - DeleteFirewallPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest").msgclass - ReorderFirewallPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest").msgclass - ReorderFirewallPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse").msgclass - MigrateKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.MigrateKeyRequest").msgclass - GetMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetMetricsRequest").msgclass - Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Metrics").msgclass - RetrieveLegacySecretKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse").msgclass - Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Key").msgclass - TestingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TestingOptions").msgclass - TestingOptions::TestingChallenge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge").enummodule - WebKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings").msgclass - WebKeySettings::ActionSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings").msgclass - WebKeySettings::ChallengeSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings").msgclass - WebKeySettings::IntegrationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType").enummodule - WebKeySettings::ChallengeSecurityPreference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference").enummodule - AndroidKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AndroidKeySettings").msgclass - IOSKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IOSKeySettings").msgclass - ExpressKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ExpressKeySettings").msgclass - UniversalKeySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UniversalKeySettings").msgclass - AppleDeveloperId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AppleDeveloperId").msgclass - ScoreDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreDistribution").msgclass - ScoreMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ScoreMetrics").msgclass - ChallengeMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeMetrics").msgclass - FirewallPolicyAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment").msgclass - FirewallAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction").msgclass - FirewallAction::AllowAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction").msgclass - FirewallAction::BlockAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction").msgclass - FirewallAction::IncludeRecaptchaScriptAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.IncludeRecaptchaScriptAction").msgclass - FirewallAction::RedirectAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction").msgclass - FirewallAction::SubstituteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction").msgclass - FirewallAction::SetHeaderAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction").msgclass - FirewallPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.FirewallPolicy").msgclass - ListRelatedAccountGroupMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest").msgclass - ListRelatedAccountGroupMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse").msgclass - ListRelatedAccountGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest").msgclass - ListRelatedAccountGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse").msgclass - SearchRelatedAccountGroupMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest").msgclass - SearchRelatedAccountGroupMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse").msgclass - AddIpOverrideRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest").msgclass - AddIpOverrideResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse").msgclass - RemoveIpOverrideRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest").msgclass - RemoveIpOverrideResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse").msgclass - ListIpOverridesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest").msgclass - ListIpOverridesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse").msgclass - RelatedAccountGroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership").msgclass - RelatedAccountGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.RelatedAccountGroup").msgclass - WafSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings").msgclass - WafSettings::WafFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature").enummodule - WafSettings::WafService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.WafSettings.WafService").enummodule - AssessmentEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.AssessmentEnvironment").msgclass - PolicyEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.PolicyEvaluation").msgclass - ChallengeRuleEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleEvaluation").msgclass - IpOverrideData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData").msgclass - IpOverrideData::OverrideType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.IpOverrideData.OverrideType").enummodule - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.GetPolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.UpdatePolicyRequest").msgclass - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.Policy").msgclass - ChallengeRuleGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup").msgclass - ChallengeRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule").msgclass - ChallengeRule::NoChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.NoChallengeOutcome").msgclass - ChallengeRule::ChallengeOutcome = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeRule.ChallengeOutcome").msgclass - ClientSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ClientSettings").msgclass - ProtectedEndpointGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup").msgclass - ProtectedEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ProtectedEndpoint").msgclass - ChallengeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recaptchaenterprise.v1.ChallengeType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb deleted file mode 100644 index f763a1c45d5f..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb +++ /dev/null @@ -1,109 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto for package 'Google.Cloud.RecaptchaEnterprise.V1' -# 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/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb' - -module Google - module Cloud - module RecaptchaEnterprise - module V1 - module RecaptchaEnterpriseService - # Service to determine the likelihood an event is legitimate. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' - - # Creates an Assessment of the likelihood an event is legitimate. - rpc :CreateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Assessment - # Annotates a previously created Assessment to provide additional information - # on whether the event turned out to be authentic or fraudulent. - rpc :AnnotateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse - # Creates a new reCAPTCHA Enterprise key. - rpc :CreateKey, ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key - # Returns the list of all keys that belong to a project. - rpc :ListKeys, ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse - # Returns the secret key related to the specified public key. - # You must use the legacy secret key only in a 3rd party integration with - # legacy reCAPTCHA. - rpc :RetrieveLegacySecretKey, ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse - # Returns the specified key. - rpc :GetKey, ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key - # Updates the specified key. - rpc :UpdateKey, ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key - # Deletes the specified key. - rpc :DeleteKey, ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, ::Google::Protobuf::Empty - # Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. - # Once a key is migrated, it can be used from either product. SiteVerify - # requests are billed as CreateAssessment calls. You must be - # authenticated as one of the current owners of the reCAPTCHA Key, and - # your user must have the reCAPTCHA Enterprise Admin IAM role in the - # destination project. - rpc :MigrateKey, ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Key - # Adds an IP override to a key. The following restrictions hold: - # * The maximum number of IP overrides per key is 1000. - # * For any conflict (such as IP already exists or IP part of an existing - # IP range), an error is returned. - rpc :AddIpOverride, ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse - # Removes an IP override from a key. The following restrictions hold: - # * If the IP isn't found in an existing IP override, a `NOT_FOUND` error - # is returned. - # * If the IP is found in an existing IP override, but the - # override type does not match, a `NOT_FOUND` error is returned. - rpc :RemoveIpOverride, ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse - # Lists all IP overrides for a key. - rpc :ListIpOverrides, ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse - # Get some aggregated metrics for a Key. This data can be used to build - # dashboards. - rpc :GetMetrics, ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Metrics - # Get the policy for a key. - rpc :GetPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy - # Updates the policy for a key. - rpc :UpdatePolicy, ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::Policy - # Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA - # Enterprise actions can be executed. - # A project may have a maximum of 1000 policies. - rpc :CreateFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy - # Returns the list of all firewall policies that belong to a project. - rpc :ListFirewallPolicies, ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse - # Returns the specified firewall policy. - rpc :GetFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy - # Updates the specified firewall policy. - rpc :UpdateFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy - # Deletes the specified firewall policy. - rpc :DeleteFirewallPolicy, ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, ::Google::Protobuf::Empty - # Reorders all firewall policies. - rpc :ReorderFirewallPolicies, ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse - # List groups of related accounts. - rpc :ListRelatedAccountGroups, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse - # Get memberships in a group of related accounts. - rpc :ListRelatedAccountGroupMemberships, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse - # Search group memberships related to a given account. - rpc :SearchRelatedAccountGroupMemberships, ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md deleted file mode 100644 index 5801e8b5fa14..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# reCAPTCHA Enterprise V1 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-recaptcha_enterprise-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +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 - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb deleted file mode 100644 index 514a0d0be353..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb +++ /dev/null @@ -1,2587 +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 RecaptchaEnterprise - module V1 - # The create assessment request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project in which the assessment is created, - # in the format `projects/{project}`. - # @!attribute [rw] assessment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Assessment] - # Required. The assessment details. - class CreateAssessmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes an event in the lifecycle of a payment transaction. - # @!attribute [rw] event_type - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent::TransactionEventType] - # Optional. The type of this transaction event. - # @!attribute [rw] reason - # @return [::String] - # Optional. The reason or standardized code that corresponds with this - # transaction event, if one exists. For example, a CHARGEBACK event with code - # 6005. - # @!attribute [rw] value - # @return [::Float] - # Optional. The value that corresponds with this transaction event, if one - # exists. For example, a refund event where $5.00 was refunded. Currency is - # obtained from the original transaction data. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp when this transaction event occurred; otherwise assumed - # to be the time of the API call. - class TransactionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents an event in the payment transaction lifecycle. - # Ensure that applications can handle values not explicitly listed. - module TransactionEventType - # Default, unspecified event type. - TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0 - - # Indicates that the transaction is approved by the merchant. The - # accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', - # 'CYBERSOURCE', or 'MANUAL_REVIEW'. - MERCHANT_APPROVE = 1 - - # Indicates that the transaction is denied and concluded due to risks - # detected by the merchant. The accompanying reasons can include terms such - # as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'. - MERCHANT_DENY = 2 - - # Indicates that the transaction is being evaluated by a human, due to - # suspicion or risk. - MANUAL_REVIEW = 3 - - # Indicates that the authorization attempt with the card issuer succeeded. - AUTHORIZATION = 4 - - # Indicates that the authorization attempt with the card issuer failed. - # The accompanying reasons can include Visa's '54' indicating that the card - # is expired, or '82' indicating that the CVV is incorrect. - AUTHORIZATION_DECLINE = 5 - - # Indicates that the transaction is completed because the funds were - # settled. - PAYMENT_CAPTURE = 6 - - # Indicates that the transaction could not be completed because the funds - # were not settled. - PAYMENT_CAPTURE_DECLINE = 7 - - # Indicates that the transaction has been canceled. Specify the reason - # for the cancellation. For example, 'INSUFFICIENT_INVENTORY'. - CANCEL = 8 - - # Indicates that the merchant has received a chargeback inquiry due to - # fraud for the transaction, requesting additional information before a - # fraud chargeback is officially issued and a formal chargeback - # notification is sent. - CHARGEBACK_INQUIRY = 9 - - # Indicates that the merchant has received a chargeback alert due to fraud - # for the transaction. The process of resolving the dispute without - # involving the payment network is started. - CHARGEBACK_ALERT = 10 - - # Indicates that a fraud notification is issued for the transaction, sent - # by the payment instrument's issuing bank because the transaction appears - # to be fraudulent. We recommend including TC40 or SAFE data in the - # `reason` field for this event type. For partial chargebacks, we recommend - # that you include an amount in the `value` field. - FRAUD_NOTIFICATION = 11 - - # Indicates that the merchant is informed by the payment network that the - # transaction has entered the chargeback process due to fraud. Reason code - # examples include Discover's '6005' and '6041'. For partial chargebacks, - # we recommend that you include an amount in the `value` field. - CHARGEBACK = 12 - - # Indicates that the transaction has entered the chargeback process due to - # fraud, and that the merchant has chosen to enter representment. Reason - # examples include Discover's '6005' and '6041'. For partial chargebacks, - # we recommend that you include an amount in the `value` field. - CHARGEBACK_REPRESENTMENT = 13 - - # Indicates that the transaction has had a fraud chargeback which was - # illegitimate and was reversed as a result. For partial chargebacks, we - # recommend that you include an amount in the `value` field. - CHARGEBACK_REVERSE = 14 - - # Indicates that the merchant has received a refund for a completed - # transaction. For partial refunds, we recommend that you include an amount - # in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of - # exempt tax) - REFUND_REQUEST = 15 - - # Indicates that the merchant has received a refund request for this - # transaction, but that they have declined it. For partial refunds, we - # recommend that you include an amount in the `value` field. Reason - # example: 'TAX_EXEMPT' (partial refund of exempt tax) - REFUND_DECLINE = 16 - - # Indicates that the completed transaction was refunded by the merchant. - # For partial refunds, we recommend that you include an amount in the - # `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt - # tax) - REFUND = 17 - - # Indicates that the completed transaction was refunded by the merchant, - # and that this refund was reversed. For partial refunds, we recommend that - # you include an amount in the `value` field. - REFUND_REVERSE = 18 - end - end - - # Details on a phone authentication event - # @!attribute [rw] phone_number - # @return [::String] - # Required. Phone number in E.164 format for which a multi-factor - # authentication challenge was initiated, succeeded, or failed. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time at which the multi-factor authentication event - # (challenge or verification) occurred. - class PhoneAuthenticationEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message to annotate an Assessment. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Assessment, in the format - # `projects/{project}/assessments/{assessment}`. - # @!attribute [rw] annotation - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation] - # Optional. The annotation that is assigned to the Event. This field can be - # left empty to provide reasons that apply to an event without concluding - # whether the event is legitimate or fraudulent. - # @!attribute [rw] reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>] - # Optional. Reasons for the annotation that are assigned to the event. - # @!attribute [rw] account_id - # @return [::String] - # Optional. A stable account identifier to apply to the assessment. This is - # an alternative to setting `account_id` in `CreateAssessment`, for example - # when a stable account identifier is not yet known in the initial request. - # @!attribute [rw] hashed_account_id - # @return [::String] - # Optional. A stable hashed account identifier to apply to the assessment. - # This is an alternative to setting `hashed_account_id` in - # `CreateAssessment`, for example when a stable account identifier is not yet - # known in the initial request. - # @!attribute [rw] transaction_event - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent] - # Optional. If the assessment is part of a payment transaction, provide - # details on payment lifecycle events that occur in the transaction. - # @!attribute [rw] phone_authentication_event - # @return [::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent] - # Optional. If using an external multi-factor authentication provider, - # provide phone authentication details for fraud detection purposes. - class AnnotateAssessmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents the types of annotations. - module Annotation - # Default unspecified type. - ANNOTATION_UNSPECIFIED = 0 - - # Provides information that the event turned out to be legitimate. - LEGITIMATE = 1 - - # Provides information that the event turned out to be fraudulent. - FRAUDULENT = 2 - - # Provides information that the event was related to a login event in which - # the user typed the correct password. Deprecated, prefer indicating - # CORRECT_PASSWORD through the reasons field instead. - PASSWORD_CORRECT = 3 - - # Provides information that the event was related to a login event in which - # the user typed the incorrect password. Deprecated, prefer indicating - # INCORRECT_PASSWORD through the reasons field instead. - PASSWORD_INCORRECT = 4 - end - - # Enum that represents potential reasons for annotating an assessment. - module Reason - # Unspecified reason. Do not use. - REASON_UNSPECIFIED = 0 - - # Indicates that the transaction had a chargeback issued with no other - # details. When possible, specify the type by using CHARGEBACK_FRAUD or - # CHARGEBACK_DISPUTE instead. - CHARGEBACK = 1 - - # Indicates that the transaction had a chargeback issued related to an - # alleged unauthorized transaction from the cardholder's perspective (for - # example, the card number was stolen). - CHARGEBACK_FRAUD = 8 - - # Indicates that the transaction had a chargeback issued related to the - # cardholder having provided their card details but allegedly not being - # satisfied with the purchase (for example, misrepresentation, attempted - # cancellation). - CHARGEBACK_DISPUTE = 9 - - # Indicates that the completed payment transaction was refunded by the - # seller. - REFUND = 10 - - # Indicates that the completed payment transaction was determined to be - # fraudulent by the seller, and was cancelled and refunded as a result. - REFUND_FRAUD = 11 - - # Indicates that the payment transaction was accepted, and the user was - # charged. - TRANSACTION_ACCEPTED = 12 - - # Indicates that the payment transaction was declined, for example due to - # invalid card details. - TRANSACTION_DECLINED = 13 - - # Indicates the transaction associated with the assessment is suspected of - # being fraudulent based on the payment method, billing details, shipping - # address or other transaction information. - PAYMENT_HEURISTICS = 2 - - # Indicates that the user was served a 2FA challenge. An old assessment - # with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been - # overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. - # This is equivalent to `FAILED_TWO_FACTOR`. - INITIATED_TWO_FACTOR = 7 - - # Indicates that the user passed a 2FA challenge. - PASSED_TWO_FACTOR = 3 - - # Indicates that the user failed a 2FA challenge. - FAILED_TWO_FACTOR = 4 - - # Indicates the user provided the correct password. - CORRECT_PASSWORD = 5 - - # Indicates the user provided an incorrect password. - INCORRECT_PASSWORD = 6 - - # Indicates that the user sent unwanted and abusive messages to other users - # of the platform, such as spam, scams, phishing, or social engineering. - SOCIAL_SPAM = 14 - end - end - - # Empty response for AnnotateAssessment. - class AnnotateAssessmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a verification endpoint that can be used for 2FA. - # @!attribute [rw] email_address - # @return [::String] - # Email address for which to trigger a verification request. - # - # Note: The following fields are mutually exclusive: `email_address`, `phone_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] phone_number - # @return [::String] - # Phone number for which to trigger a verification request. Should be given - # in E.164 format. - # - # Note: The following fields are mutually exclusive: `phone_number`, `email_address`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] request_token - # @return [::String] - # Output only. Token to provide to the client to trigger endpoint - # verification. It must be used within 15 minutes. - # @!attribute [r] last_verification_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last successful verification for the - # endpoint, if any. - class EndpointVerificationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about account verification, used for identity verification. - # @!attribute [rw] endpoints - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::EndpointVerificationInfo>] - # Optional. Endpoints that can be used for identity verification. - # @!attribute [rw] language_code - # @return [::String] - # Optional. Language code preference for the verification message, set as a - # IETF BCP 47 language code. - # @!attribute [r] latest_verification_result - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountVerificationInfo::Result] - # Output only. Result of the latest account verification challenge. - # @!attribute [rw] username - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Username of the account that is being verified. Deprecated. Customers - # should now provide the `account_id` field in `event.user_info`. - class AccountVerificationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result of the account verification as contained in the verdict token issued - # at the end of the verification flow. - # Ensure that applications can handle values not explicitly listed. - module Result - # No information about the latest account verification. - RESULT_UNSPECIFIED = 0 - - # The user was successfully verified. This means the account verification - # challenge was successfully completed. - SUCCESS_USER_VERIFIED = 1 - - # The user failed the verification challenge. - ERROR_USER_NOT_VERIFIED = 2 - - # The site is not properly onboarded to use the account verification - # feature. - ERROR_SITE_ONBOARDING_INCOMPLETE = 3 - - # The recipient is not allowed for account verification. This can occur - # during integration but should not occur in production. - ERROR_RECIPIENT_NOT_ALLOWED = 4 - - # The recipient has already been sent too many verification codes in a - # short amount of time. - ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED = 5 - - # The verification flow could not be completed due to a critical internal - # error. - ERROR_CRITICAL_INTERNAL = 6 - - # The client has exceeded their two factor request quota for this period of - # time. - ERROR_CUSTOMER_QUOTA_EXHAUSTED = 7 - - # The request cannot be processed at the time because of an incident. This - # bypass can be restricted to a problematic destination email domain, a - # customer, or could affect the entire service. - ERROR_VERIFICATION_BYPASSED = 8 - - # The request parameters do not match with the token provided and cannot be - # processed. - ERROR_VERDICT_MISMATCH = 9 - end - end - - # Private password leak verification info. - # @!attribute [rw] lookup_hash_prefix - # @return [::String] - # Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized - # username. It is used to look up password leaks associated with that hash - # prefix. - # @!attribute [rw] encrypted_user_credentials_hash - # @return [::String] - # Optional. Encrypted Scrypt hash of the canonicalized username+password. It - # is re-encrypted by the server and returned through - # `reencrypted_user_credentials_hash`. - # @!attribute [r] encrypted_leak_match_prefixes - # @return [::Array<::String>] - # Output only. List of prefixes of the encrypted potential password leaks - # that matched the given parameters. They must be compared with the - # client-side decryption prefix of `reencrypted_user_credentials_hash` - # @!attribute [r] reencrypted_user_credentials_hash - # @return [::String] - # Output only. Corresponds to the re-encryption of the - # `encrypted_user_credentials_hash` field. It is used to match potential - # password leaks within `encrypted_leak_match_prefixes`. - class PrivatePasswordLeakVerification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reCAPTCHA Enterprise assessment resource. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name for the Assessment in the format - # `projects/{project}/assessments/{assessment}`. - # @!attribute [rw] event - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Event] - # Optional. The event being assessed. - # @!attribute [r] risk_analysis - # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis] - # Output only. The risk analysis result for the event being assessed. - # @!attribute [r] token_properties - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties] - # Output only. Properties of the provided event token. - # @!attribute [rw] account_verification - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountVerificationInfo] - # Optional. Account verification information for identity verification. The - # assessment event must include a token and site key to use this feature. - # @!attribute [r] account_defender_assessment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment] - # Output only. Assessment returned by Account defense when an account - # identifier is provided. - # @!attribute [rw] private_password_leak_verification - # @return [::Google::Cloud::RecaptchaEnterprise::V1::PrivatePasswordLeakVerification] - # Optional. The private password leak verification field contains the - # parameters that are used to to check for leaks privately without sharing - # user credentials. - # @!attribute [r] firewall_policy_assessment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicyAssessment] - # Output only. Assessment returned when firewall policies belonging to the - # project are evaluated using the field firewall_policy_evaluation. - # @!attribute [r] fraud_prevention_assessment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment] - # Output only. Assessment returned by Fraud Prevention when TransactionData - # is provided. - # @!attribute [r] fraud_signals - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals] - # Output only. Fraud Signals specific to the users involved in a payment - # transaction. - # @!attribute [r] phone_fraud_assessment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::PhoneFraudAssessment] - # Output only. Assessment returned when a site key, a token, and a phone - # number as `user_id` are provided. SMS defense needs to be enabled. - # @!attribute [rw] assessment_environment - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AssessmentEnvironment] - # Optional. The environment creating the assessment. This describes your - # environment (the system invoking CreateAssessment), NOT the environment of - # your user. - # @!attribute [r] policy_evaluation - # @return [::Google::Cloud::RecaptchaEnterprise::V1::PolicyEvaluation] - # Output only. Provides information about the policy evaluation for this - # assessment. - class Assessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The event being assessed. - # @!attribute [rw] token - # @return [::String] - # Optional. The user response token provided by the reCAPTCHA Enterprise - # client-side integration on your site. - # @!attribute [rw] site_key - # @return [::String] - # Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - # site and generate the token. - # @!attribute [rw] user_agent - # @return [::String] - # Optional. The user agent present in the request from the user's device - # related to this event. - # @!attribute [rw] user_ip_address - # @return [::String] - # Optional. The IP address in the request from the user's device related to - # this event. - # @!attribute [rw] expected_action - # @return [::String] - # Optional. The expected action for this type of event. This should be the - # same action provided at token generation time on client-side platforms - # already integrated with recaptcha enterprise. Required for Universal keys. - # @!attribute [rw] hashed_account_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated: use `user_info.account_id` instead. - # Unique stable hashed user identifier for the request. The identifier must - # be hashed using hmac-sha256 with stable secret. - # @!attribute [rw] express - # @return [::Boolean] - # Optional. Flag for a reCAPTCHA express request for an assessment without a - # token. If enabled, `site_key` must reference an Express site key. - # @!attribute [rw] requested_uri - # @return [::String] - # Optional. The URI resource the user requested that triggered an assessment. - # @!attribute [rw] waf_token_assessment - # @return [::Boolean] - # Optional. Flag for running Web Application Firewall (WAF) token assessment. - # If enabled, the token must be specified, and have been created by a - # WAF-enabled key. - # @!attribute [rw] ja3 - # @return [::String] - # Optional. JA3 fingerprint for SSL clients. To learn how to compute this - # fingerprint, please refer to https://github.com/salesforce/ja3. - # @!attribute [rw] ja4 - # @return [::String] - # Optional. JA4 fingerprint for SSL clients. To learn how to compute this - # fingerprint, please refer to https://github.com/FoxIO-LLC/ja4. - # @!attribute [rw] headers - # @return [::Array<::String>] - # Optional. HTTP header information about the request. - # @!attribute [rw] firewall_policy_evaluation - # @return [::Boolean] - # Optional. Flag for enabling firewall policy config assessment. - # If this flag is enabled, the firewall policy is evaluated and a - # suggested firewall action is returned in the response. - # @!attribute [rw] transaction_data - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData] - # Optional. Data describing a payment transaction to be assessed. Sending - # this data enables reCAPTCHA Enterprise Fraud Prevention and the - # FraudPreventionAssessment component in the response. - # @!attribute [rw] user_info - # @return [::Google::Cloud::RecaptchaEnterprise::V1::UserInfo] - # Optional. Information about the user that generates this event, when they - # can be identified. They are often identified through the use of an account - # for logged-in requests or login/registration requests, or by providing user - # identifiers for guest actions like checkout. - # @!attribute [rw] fraud_prevention - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Event::FraudPrevention] - # Optional. The Fraud Prevention setting for this assessment. - class Event - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setting that controls Fraud Prevention assessments. - # Ensure that applications can handle values not explicitly listed. - module FraudPrevention - # Default, unspecified setting. `fraud_prevention_assessment` is returned - # if `transaction_data` is present in `Event` and Fraud Prevention is - # enabled in the Google Cloud console. - FRAUD_PREVENTION_UNSPECIFIED = 0 - - # Enable Fraud Prevention for this assessment, if Fraud Prevention is - # enabled in the Google Cloud console. - ENABLED = 1 - - # Disable Fraud Prevention for this assessment, regardless of the Google - # Cloud console settings. - DISABLED = 2 - end - end - - # Transaction data associated with a payment protected by reCAPTCHA Enterprise. - # @!attribute [rw] transaction_id - # @return [::String] - # Unique identifier for the transaction. This custom identifier can be used - # to reference this transaction in the future, for example, labeling a refund - # or chargeback event. Two attempts at the same transaction should use the - # same transaction id. - # @!attribute [rw] payment_method - # @return [::String] - # Optional. The payment method for the transaction. The allowed values are: - # - # * credit-card - # * debit-card - # * gift-card - # * processor-\\{name} (If a third-party is used, for example, - # processor-paypal) - # * custom-\\{name} (If an alternative method is used, for example, - # custom-crypto) - # @!attribute [rw] card_bin - # @return [::String] - # Optional. The Bank Identification Number - generally the first 6 or 8 - # digits of the card. - # @!attribute [rw] card_last_four - # @return [::String] - # Optional. The last four digits of the card. - # @!attribute [rw] currency_code - # @return [::String] - # Optional. The currency code in ISO-4217 format. - # @!attribute [rw] value - # @return [::Float] - # Optional. The decimal value of the transaction in the specified currency. - # @!attribute [rw] shipping_value - # @return [::Float] - # Optional. The value of shipping in the specified currency. 0 for free or no - # shipping. - # @!attribute [rw] shipping_address - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Address] - # Optional. Destination address if this transaction involves shipping a - # physical item. - # @!attribute [rw] billing_address - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Address] - # Optional. Address associated with the payment method when applicable. - # @!attribute [rw] user - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::User] - # Optional. Information about the user paying/initiating the transaction. - # @!attribute [rw] merchants - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::User>] - # Optional. Information about the user or users fulfilling the transaction. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::Item>] - # Optional. Items purchased in this transaction. - # @!attribute [rw] gateway_info - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TransactionData::GatewayInfo] - # Optional. Information about the payment gateway's response to the - # transaction. - class TransactionData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Structured address format for billing and shipping addresses. - # @!attribute [rw] recipient - # @return [::String] - # Optional. The recipient name, potentially including information such as - # "care of". - # @!attribute [rw] address - # @return [::Array<::String>] - # Optional. The first lines of the address. The first line generally - # contains the street name and number, and further lines may include - # information such as an apartment number. - # @!attribute [rw] locality - # @return [::String] - # Optional. The town/city of the address. - # @!attribute [rw] administrative_area - # @return [::String] - # Optional. The state, province, or otherwise administrative area of the - # address. - # @!attribute [rw] region_code - # @return [::String] - # Optional. The CLDR country/region of the address. - # @!attribute [rw] postal_code - # @return [::String] - # Optional. The postal or ZIP code of the address. - class Address - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about a user's account involved in the transaction. - # @!attribute [rw] account_id - # @return [::String] - # Optional. Unique account identifier for this user. If using Account - # defense, this should match the hashed_account_id field. Otherwise, a - # unique and persistent identifier for this account. - # @!attribute [rw] creation_ms - # @return [::Integer] - # Optional. The epoch milliseconds of the user's account creation. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address of the user. - # @!attribute [rw] email_verified - # @return [::Boolean] - # Optional. Whether the email has been verified to be accessible by the - # user (OTP or similar). - # @!attribute [rw] phone_number - # @return [::String] - # Optional. The phone number of the user, with country code. - # @!attribute [rw] phone_verified - # @return [::Boolean] - # Optional. Whether the phone number has been verified to be accessible by - # the user (OTP or similar). - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Line items being purchased in this transaction. - # @!attribute [rw] name - # @return [::String] - # Optional. The full name of the item. - # @!attribute [rw] value - # @return [::Float] - # Optional. The value per item that the user is paying, in the transaction - # currency, after discounts. - # @!attribute [rw] quantity - # @return [::Integer] - # Optional. The quantity of this item that is being purchased. - # @!attribute [rw] merchant_account_id - # @return [::String] - # Optional. When a merchant is specified, its corresponding account_id. - # Necessary to populate marketplace-style transactions. - class Item - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the transaction from the gateway. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the gateway service (for example, stripe, square, - # paypal). - # @!attribute [rw] gateway_response_code - # @return [::String] - # Optional. Gateway response code describing the state of the transaction. - # @!attribute [rw] avs_response_code - # @return [::String] - # Optional. AVS response code from the gateway - # (available only when reCAPTCHA Enterprise is called after authorization). - # @!attribute [rw] cvv_response_code - # @return [::String] - # Optional. CVV response code from the gateway - # (available only when reCAPTCHA Enterprise is called after authorization). - class GatewayInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User information associated with a request protected by reCAPTCHA Enterprise. - # @!attribute [rw] create_account_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Creation time for this account associated with this user. Leave - # blank for non logged-in actions, guest checkout, or when there is no - # account associated with the current user. - # @!attribute [rw] account_id - # @return [::String] - # Optional. For logged-in requests or login/registration requests, the unique - # account identifier associated with this user. You can use the username if - # it is stable (meaning it is the same for every request associated with the - # same user), or any stable user ID of your choice. Leave blank for non - # logged-in actions or guest checkout. - # @!attribute [rw] user_ids - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::UserId>] - # Optional. Identifiers associated with this user or request. - class UserInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An identifier associated with a user. - # @!attribute [rw] email - # @return [::String] - # Optional. An email address. - # - # Note: The following fields are mutually exclusive: `email`, `phone_number`, `username`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] phone_number - # @return [::String] - # Optional. A phone number. Should use the E.164 format. - # - # Note: The following fields are mutually exclusive: `phone_number`, `email`, `username`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] username - # @return [::String] - # Optional. A unique username, if different from all the other identifiers - # and `account_id` that are provided. Can be a unique login handle or - # display name for a user. - # - # Note: The following fields are mutually exclusive: `username`, `email`, `phone_number`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class UserId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Risk analysis result for an event. - # @!attribute [r] score - # @return [::Float] - # Output only. Legitimate event score from 0.0 to 1.0. - # (1.0 means very likely legitimate traffic while 0.0 means very likely - # non-legitimate traffic). - # @!attribute [r] reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::ClassificationReason>] - # Output only. Reasons contributing to the risk analysis verdict. - # @!attribute [r] extended_verdict_reasons - # @return [::Array<::String>] - # Output only. Additional reasons contributing to the risk analysis verdict. - # These reasons are available to Enterprise tier projects only. Contact sales - # for more information. - # The set of reasons is subject to change. - # @!attribute [r] last_challenge_type - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeType] - # Output only. Type of the last challenge presented to the user for - # Universal, `POLICY_BASED_CHALLENGE` and `INVISIBLE` keys. The field is only - # set when a challenge was presented to the user. - # @!attribute [r] challenge - # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::Challenge] - # Output only. Challenge information for Universal, `POLICY_BASED_CHALLENGE` - # and `INVISIBLE` keys. - # @!attribute [r] verified_bots - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Bot>] - # Output only. Bots with identities that have been verified by reCAPTCHA and - # detected in the event. - class RiskAnalysis - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reasons contributing to the risk analysis verdict. - # Ensure that applications can handle values not explicitly listed. - module ClassificationReason - # Default unspecified type. - CLASSIFICATION_REASON_UNSPECIFIED = 0 - - # Interactions matched the behavior of an automated agent. - AUTOMATION = 1 - - # The event originated from an illegitimate environment. - UNEXPECTED_ENVIRONMENT = 2 - - # Traffic volume from the event source is higher than normal. - TOO_MUCH_TRAFFIC = 3 - - # Interactions with the site were significantly different than expected - # patterns. - UNEXPECTED_USAGE_PATTERNS = 4 - - # Too little traffic has been received from this site thus far to generate - # quality risk analysis. - LOW_CONFIDENCE_SCORE = 5 - - # Deprecated: Use - # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} - # and - # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::EXCESSIVE_ENUMERATION_PATTERN FraudPreventionAssessment.RiskReason.Reason.EXCESSIVE_ENUMERATION_PATTERN} - # instead. - SUSPECTED_CARDING = 6 - - # Deprecated: Use - # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment#transaction_risk FraudPreventionAssessment.transaction_risk} - # and - # {::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason::ASSOCIATED_WITH_FRAUD_CLUSTER FraudPreventionAssessment.RiskReason.Reason.ASSOCIATED_WITH_FRAUD_CLUSTER} - # instead. - SUSPECTED_CHARGEBACK = 7 - end - - # Challenge information for Universal, `POLICY_BASED_CHALLENGE` and - # `INVISIBLE` keys. Ensure that applications can handle values not explicitly - # listed. - module Challenge - # Default unspecified type. - CHALLENGE_UNSPECIFIED = 0 - - # No challenge was presented for solving. - NOCAPTCHA = 1 - - # A solution was submitted that was correct. - PASSED = 2 - - # A solution was submitted that was incorrect or otherwise - # deemed suspicious. - FAILED = 3 - end - end - - # Bot information and metadata. - # @!attribute [rw] name - # @return [::String] - # Optional. Enumerated string value that indicates the identity of the bot, - # formatted in kebab-case. Current example values include the following: - # - # * google-agent - AI_AGENT - # * browser-base - AI_AGENT - # * chat-gpt - AI_AGENT - # * aws-bedrock - AI_AGENT - # * cybaa-bot - AI_AGENT - # * cloudflare - AI_AGENT - # * payhawk - AI_AGENT - # * duck-duck-go - SEARCH_INDEXER - # * mediaboard - CONTENT_SCRAPER - # * marker-io - AI_AGENT - # * broadcom - AI_AGENT - # * anchor-browser - AI_AGENT - # * shopify - AI_AGENT - # * stackscope - CONTENT_SCRAPER - # * manus - AI_AGENT - # * kernel-sh - AI_AGENT - # * zvelo - SEARCH_INDEXER - # - # Ensure that your applications can handle identifier values not explicitly - # listed here. Deprecated values might take some time to stop showing - # up in responses. New values can be pushed so this list should be taken - # as non exhaustive. - # @!attribute [rw] bot_type - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Bot::BotType] - # Optional. Enumerated field representing the type of bot. - class Bot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of bots. - # Ensure that applications can handle values not explicitly listed. - module BotType - # Default unspecified type. - BOT_TYPE_UNSPECIFIED = 0 - - # Software program that interacts with a site and performs tasks - # autonomously. - AI_AGENT = 1 - - # Software that extracts specific data from sites for use. - CONTENT_SCRAPER = 2 - - # Software that crawls sites and stores content for the purpose of - # efficient retrieval, likely as part of a search engine. - SEARCH_INDEXER = 3 - end - end - - # Properties of the provided event token. - # @!attribute [r] valid - # @return [::Boolean] - # Output only. Indicates whether the provided user response token is valid. - # If `false`, the token is invalid, either because the user failed the - # challenge or for a reason provided in the `invalid_reason` field. - # @!attribute [r] invalid_reason - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason] - # Output only. Reason associated with the response when valid = false. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp corresponding to the generation of the token. - # @!attribute [r] hostname - # @return [::String] - # Output only. The hostname of the page on which the token was generated (Web - # keys only). - # @!attribute [r] android_package_name - # @return [::String] - # Output only. The name of the Android package with which the token was - # generated (Android keys only). - # @!attribute [r] ios_bundle_id - # @return [::String] - # Output only. The ID of the iOS bundle with which the token was generated - # (iOS keys only). - # @!attribute [r] action - # @return [::String] - # Output only. Action name provided at token generation. - class TokenProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents the types of invalid token reasons. - # Ensure that applications can handle values not explicitly listed. - module InvalidReason - # Default unspecified type. - INVALID_REASON_UNSPECIFIED = 0 - - # If the failure reason was not accounted for. - UNKNOWN_INVALID_REASON = 1 - - # The provided user verification token was malformed. - MALFORMED = 2 - - # The user verification token had expired. - EXPIRED = 3 - - # The user verification had already been seen. - DUPE = 4 - - # The user verification token was not present. - MISSING = 5 - - # A retriable error (such as network failure) occurred on the browser. - # Could easily be simulated by an attacker. - BROWSER_ERROR = 6 - - # The action provided at token generation was different than - # the `expected_action` in the assessment request. The comparison is - # case-insensitive. This reason can only be returned if all of the - # following are true: - # - # - your `site_key` has the POLICY_BASED_CHALLENGE integration type - # - you set an action score threshold higher than 0.0 - # - you provided a non-empty `expected_action` - UNEXPECTED_ACTION = 7 - - # The key used to generate the token does not match the `site_key`. - KEY_MISMATCH = 8 - - # The domain of the page on which the token was generated does not match - # the `allowed_domains` configured in the `site_key`. - DOMAIN_MISMATCH = 9 - end - end - - # Assessment for Fraud Prevention. - # @!attribute [r] transaction_risk - # @return [::Float] - # Output only. Probability of this transaction being fraudulent. Summarizes - # the combined risk of attack vectors below. Values are from 0.0 (lowest) - # to 1.0 (highest). - # @!attribute [r] risk_reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason>] - # Output only. Reasons why the transaction is probably fraudulent and - # received a high transaction risk score. - # @!attribute [r] stolen_instrument_verdict - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::StolenInstrumentVerdict] - # Output only. Assessment of this transaction for risk of a stolen - # instrument. - # @!attribute [r] card_testing_verdict - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::CardTestingVerdict] - # Output only. Assessment of this transaction for risk of being part of a - # card testing attack. - # @!attribute [r] behavioral_trust_verdict - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::BehavioralTrustVerdict] - # Output only. Assessment of this transaction for behavioral trust. - class FraudPreventionAssessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Risk reasons applicable to the Fraud Prevention assessment. - # @!attribute [r] reason - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudPreventionAssessment::RiskReason::Reason] - # Output only. Risk reasons applicable to the Fraud Prevention assessment. - class RiskReason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Risk reasons applicable to the Fraud Prevention assessment. New risk - # reasons will be added over time. - module Reason - # Default unspecified type. - REASON_UNSPECIFIED = 0 - - # A suspiciously high number of recent transactions have used identifiers - # present in this transaction. - HIGH_TRANSACTION_VELOCITY = 1 - - # User is cycling through a suspiciously large number of identifiers, - # suggesting enumeration or validation attacks within a potential fraud - # network. - EXCESSIVE_ENUMERATION_PATTERN = 2 - - # User has a short history or no history in the reCAPTCHA network, - # suggesting the possibility of synthetic identity generation. - SHORT_IDENTITY_HISTORY = 3 - - # Identifiers used in this transaction originate from an unusual or - # conflicting set of geolocations. - GEOLOCATION_DISCREPANCY = 4 - - # This transaction is linked to a cluster of known fraudulent activity. - ASSOCIATED_WITH_FRAUD_CLUSTER = 5 - end - end - - # Information about stolen instrument fraud, where the user is not the - # legitimate owner of the instrument being used for the purchase. - # @!attribute [r] risk - # @return [::Float] - # Output only. Probability of this transaction being executed with a stolen - # instrument. Values are from 0.0 (lowest) to 1.0 (highest). - class StolenInstrumentVerdict - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about card testing fraud, where an adversary is testing - # fraudulently obtained cards or brute forcing their details. - # @!attribute [r] risk - # @return [::Float] - # Output only. Probability of this transaction attempt being part of a card - # testing attack. Values are from 0.0 (lowest) to 1.0 (highest). - class CardTestingVerdict - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about behavioral trust of the transaction. - # @!attribute [r] trust - # @return [::Float] - # Output only. Probability of this transaction attempt being executed in a - # behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 - # (highest). - class BehavioralTrustVerdict - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Fraud signals describing users and cards involved in the transaction. - # @!attribute [r] user_signals - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::UserSignals] - # Output only. Signals describing the end user in this transaction. - # @!attribute [r] card_signals - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::CardSignals] - # Output only. Signals describing the payment card or cards used in this - # transaction. - class FraudSignals - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Signals describing the user involved in this transaction. - # @!attribute [r] active_days_lower_bound - # @return [::Integer] - # Output only. This user (based on email, phone, and other identifiers) has - # been seen on the internet for at least this number of days. - # @!attribute [r] synthetic_risk - # @return [::Float] - # Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic - # components in their identity, such as a randomly generated email address, - # temporary phone number, or fake shipping address. - class UserSignals - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signals describing the payment card used in this transaction. - # @!attribute [r] card_labels - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FraudSignals::CardSignals::CardLabel>] - # Output only. The labels for the payment card in this transaction. - class CardSignals - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Risk labels describing the card being assessed, such as its funding - # mechanism. - # Ensure that applications can handle values not explicitly listed. - module CardLabel - # No label specified. - CARD_LABEL_UNSPECIFIED = 0 - - # This card has been detected as prepaid. - PREPAID = 1 - - # This card has been detected as virtual, such as a card number generated - # for a single transaction or merchant. - VIRTUAL = 2 - - # This card has been detected as being used in an unexpected geographic - # location. - UNEXPECTED_LOCATION = 3 - end - end - end - - # Information about SMS toll fraud. - # @!attribute [r] risk - # @return [::Float] - # Output only. Probability of an SMS event being fraudulent. - # Values are from 0.0 (lowest) to 1.0 (highest). - # @!attribute [r] reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::SmsTollFraudVerdict::SmsTollFraudReason>] - # Output only. Reasons contributing to the SMS toll fraud verdict. - class SmsTollFraudVerdict - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reasons contributing to the SMS toll fraud verdict. - # Ensure that applications can handle values not explicitly listed. - module SmsTollFraudReason - # Default unspecified reason - SMS_TOLL_FRAUD_REASON_UNSPECIFIED = 0 - - # The provided phone number was invalid - INVALID_PHONE_NUMBER = 1 - end - end - - # Assessment for Phone Fraud - # @!attribute [r] sms_toll_fraud_verdict - # @return [::Google::Cloud::RecaptchaEnterprise::V1::SmsTollFraudVerdict] - # Output only. Assessment of this phone event for risk of SMS toll fraud. - class PhoneFraudAssessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Account defense risk assessment. - # @!attribute [r] labels - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountDefenderLabel>] - # Output only. Labels for this request. - # @!attribute [r] account_takeover_verdict - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTakeoverVerdict] - # Output only. Account takeover risk assessment for this request. - class AccountDefenderAssessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Account takeover risk assessment. - # @!attribute [r] risk - # @return [::Float] - # Output only. Account takeover attempt probability. - # Values are from 0.0 (lowest risk) to 1.0 (highest risk). - # @!attribute [r] risk_reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason>] - # Output only. Unordered list. Reasons why the request appears risky. Risk - # reasons can be returned even if the risk is low, as trustworthy requests - # can still have some risk signals. - # @!attribute [r] trust_reasons - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason>] - # Output only. Unordered list. Reasons why the request appears trustworthy. - # Trust reasons can be returned even if the risk is high, as risky requests - # can still have some trust signals. - class AccountTakeoverVerdict - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Risk explainability reasons for Account defense. - # @!attribute [r] reason - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountRiskReason::RiskReason] - # Output only. A risk reason associated with this request. - class AccountRiskReason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Risk explainability reasons for Account defense. - # Ensure that applications can handle values not explicitly listed. - module RiskReason - # Default unspecified type. - RISK_REASON_UNSPECIFIED = 0 - - # The client has been observed sending bot-like traffic to this site in - # the past. This reason incorporates historical reputation and indicates - # that the client is known to use bots, even if the current request is - # being made by a human. - CLIENT_HISTORICAL_BOT_ACTIVITY = 1 - - # The account is part of a large group of related accounts, indicating - # that it may be part of a fraudulent network. Related accounts are - # identified based on having similar traffic patterns and request - # characteristics. - ACCOUNT_IN_LARGE_RELATED_GROUP = 2 - - # The client has been observed accessing many accounts on this site. - CLIENT_ACCESSED_MANY_ACCOUNTS = 3 - - # This email domain is a suspected provider of disposable email - # addresses. - DISPOSABLE_EMAIL_DOMAIN = 4 - end - end - - # Trust explainability reasons for Account defense. - # @!attribute [r] reason - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AccountDefenderAssessment::AccountTrustReason::TrustReason] - # Output only. A trust reason associated with this request. - class AccountTrustReason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Trust explainability reasons for Account defense. - # Ensure that applications can handle values not explicitly listed. - module TrustReason - # Default unspecified type. - TRUST_REASON_UNSPECIFIED = 0 - - # The request matches a trusted profile associated with this account. - # Equivalent to `AccountDefenderLabel.PROFILE_MATCH`. - PROFILE_MATCH = 1 - - # The account's historical activity is reputable. It is unlikely that the - # account has been compromised in the past. - ACCOUNT_HISTORY_REPUTABLE = 2 - - # The identity shows a global pattern of reputable activity based on - # `userInfo` and associated identifiers. - IDENTITY_GLOBAL_ACTIVITY_REPUTABLE = 3 - - # The identity shows a long-standing history of reputable activity based - # on `userInfo` and associated identifiers. - IDENTITY_HISTORY_REPUTABLE = 4 - end - end - - # Labels returned by Account defense for this request. - # Ensure that applications can handle values not explicitly listed. - module AccountDefenderLabel - # Default unspecified type. - ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0 - - # The request matches a trusted profile associated with this account. - PROFILE_MATCH = 1 - - # The request is potentially a suspicious login event and must be further - # verified either through multi-factor authentication or another system. - SUSPICIOUS_LOGIN_ACTIVITY = 2 - - # The request matched a profile that previously had suspicious account - # creation behavior. This can mean that this is a fake account. - SUSPICIOUS_ACCOUNT_CREATION = 3 - - # The account in the request has a high number of related accounts. It does - # not necessarily imply that the account is bad but can require further - # investigation. - RELATED_ACCOUNTS_NUMBER_HIGH = 4 - end - end - - # The create key request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project in which the key is created, in the - # format `projects/{project}`. - # @!attribute [rw] key - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # Required. Information to create a reCAPTCHA Enterprise key. - class CreateKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The list keys request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project that contains the keys that is - # listed, in the format `projects/{project}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of keys to return. Default is 10. Max limit is - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous. - # ListKeysRequest, if any. - class ListKeysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to request to list keys in a project. - # @!attribute [rw] keys - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Key>] - # Key details. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. It is set to empty if no keys - # remain in results. - class ListKeysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The retrieve legacy secret key request message. - # @!attribute [rw] key - # @return [::String] - # Required. The public key name linked to the requested secret key in the - # format `projects/{project}/keys/{key}`. - class RetrieveLegacySecretKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The get key request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested key, in the format - # `projects/{project}/keys/{key}`. - class GetKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The update key request message. - # @!attribute [rw] key - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key] - # Required. The key to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The mask to control which fields of the key get updated. If the - # mask is not present, all fields are updated. - class UpdateKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The delete key request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the key to be deleted, in the format - # `projects/{project}/keys/{key}`. - class DeleteKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The create firewall policy request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project this policy applies to, in the format - # `projects/{project}`. - # @!attribute [rw] firewall_policy - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # Required. Information to create the policy. - class CreateFirewallPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The list firewall policies request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to list the policies for, in the format - # `projects/{project}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of policies to return. Default is 10. Max - # limit is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous. - # ListFirewallPoliciesRequest, if any. - class ListFirewallPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to request to list firewall policies belonging to a project. - # @!attribute [rw] firewall_policies - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>] - # Policy details. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. It is set to empty if no - # policies remain in results. - class ListFirewallPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The get firewall policy request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested policy, in the format - # `projects/{project}/firewallpolicies/{firewallpolicy}`. - class GetFirewallPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The update firewall policy request message. - # @!attribute [rw] firewall_policy - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # Required. The policy to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The mask to control which fields of the policy get updated. If - # the mask is not present, all fields are updated. - class UpdateFirewallPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The delete firewall policy request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy to be deleted, in the format - # `projects/{project}/firewallpolicies/{firewallpolicy}`. - class DeleteFirewallPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The reorder firewall policies request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to list the policies for, in the format - # `projects/{project}`. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. A list containing all policy names, in the new order. Each name - # is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. - class ReorderFirewallPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The reorder firewall policies response message. - class ReorderFirewallPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The migrate key request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the key to be migrated, in the format - # `projects/{project}/keys/{key}`. - # @!attribute [rw] skip_billing_check - # @return [::Boolean] - # Optional. If true, skips the billing check. - # A reCAPTCHA Enterprise key or migrated key behaves differently than a - # reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see - # https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid - # any disruption of your usage, we check that a billing account is present. - # If your usage of reCAPTCHA is under the free quota, you can safely skip the - # billing check and proceed with the migration. See - # https://cloud.google.com/recaptcha/docs/billing-information. - class MigrateKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The get metrics request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested metrics, in the format - # `projects/{project}/keys/{key}/metrics`. - class GetMetricsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metrics for a single Key. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the metrics, in the format - # `projects/{project}/keys/{key}/metrics`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) - # timezone. - # @!attribute [rw] score_metrics - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ScoreMetrics>] - # Metrics are continuous and in order by dates, and in the granularity - # of day. All Key types should have score-based data. - # @!attribute [rw] challenge_metrics - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeMetrics>] - # Metrics are continuous and in order by dates, and in the granularity - # of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have - # challenge-based data. - class Metrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party - # integration with legacy reCAPTCHA. - # @!attribute [rw] legacy_secret_key - # @return [::String] - # The secret key (also known as shared secret) authorizes communication - # between your application backend and the reCAPTCHA Enterprise server to - # create an assessment. - # The secret key needs to be kept safe for security purposes. - class RetrieveLegacySecretKeyResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A key used to identify and configure applications (web and/or mobile) that - # use reCAPTCHA Enterprise. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for the Key in the format - # `projects/{project}/keys/{key}`. - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of this key. Modifiable by user. - # @!attribute [rw] web_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings] - # Settings for keys that can be used by websites. - # - # Note: The following fields are mutually exclusive: `web_settings`, `android_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] android_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings] - # Settings for keys that can be used by Android apps. - # - # Note: The following fields are mutually exclusive: `android_settings`, `web_settings`, `ios_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ios_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings] - # Settings for keys that can be used by iOS apps. - # - # Note: The following fields are mutually exclusive: `ios_settings`, `web_settings`, `android_settings`, `express_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] express_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ExpressKeySettings] - # Settings for keys that can be used by reCAPTCHA Express. - # - # Note: The following fields are mutually exclusive: `express_settings`, `web_settings`, `android_settings`, `ios_settings`, `universal_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] universal_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::UniversalKeySettings] - # Settings for keys that are configured through their Policy. - # - # Note: The following fields are mutually exclusive: `universal_settings`, `web_settings`, `android_settings`, `ios_settings`, `express_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. See [Creating and managing labels] - # (https://cloud.google.com/recaptcha/docs/labels). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp corresponding to the creation of this key. - # @!attribute [rw] testing_options - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TestingOptions] - # Optional. Options for user acceptance testing. - # @!attribute [rw] waf_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings] - # Optional. Settings for Web Application Firewall (WAF). - class Key - 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 - - # Options for user acceptance testing. - # @!attribute [rw] testing_score - # @return [::Float] - # Optional. All assessments for this Key return this score. Must be between 0 - # (likely not legitimate) and 1 (likely legitimate) inclusive. - # @!attribute [rw] testing_challenge - # @return [::Google::Cloud::RecaptchaEnterprise::V1::TestingOptions::TestingChallenge] - # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all - # challenge requests for this site return nocaptcha if NOCAPTCHA, or an - # unsolvable challenge if CHALLENGE. - class TestingOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents the challenge option for challenge-based (for example, - # CHECKBOX and INVISIBLE) testing keys. - # Ensure that applications can handle values not explicitly listed. - module TestingChallenge - # Perform the normal risk analysis and return either nocaptcha or a - # challenge depending on risk and trust factors. - TESTING_CHALLENGE_UNSPECIFIED = 0 - - # Challenge requests for this key always return a nocaptcha, which - # does not require a solution. - NOCAPTCHA = 1 - - # Challenge requests for this key always return an unsolvable - # challenge. - UNSOLVABLE_CHALLENGE = 2 - end - end - - # Settings specific to keys that can be used by websites. - # @!attribute [rw] allow_all_domains - # @return [::Boolean] - # Optional. If set to true, it means allowed_domains are not enforced. - # @!attribute [rw] allowed_domains - # @return [::Array<::String>] - # Optional. Domains or subdomains of websites allowed to use the key. All - # subdomains of an allowed domain are automatically allowed. A valid domain - # requires a host and must not include any path, port, query or fragment. - # Examples: 'example.com' or 'subdomain.example.com' - # Each key supports a maximum of 250 domains. To use a key on more domains, - # set `allow_all_domains` to true. When this is set, you are responsible for - # validating the hostname by checking the `token_properties.hostname` field - # in each assessment response against your list of allowed domains. - # @!attribute [rw] allow_amp_traffic - # @return [::Boolean] - # Optional. If set to true, the key can be used on AMP (Accelerated Mobile - # Pages) websites. This is supported only for the SCORE integration type. - # @!attribute [rw] integration_type - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::IntegrationType] - # Required. Describes how this key is integrated with the website. - # @!attribute [rw] challenge_security_preference - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference] - # Optional. Settings for the frequency and difficulty at which this key - # triggers captcha challenges. This should only be specified for - # `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE. - # @!attribute [rw] challenge_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSettings] - # Optional. Challenge settings. - class WebKeySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Per-action challenge settings. - # @!attribute [rw] score_threshold - # @return [::Float] - # Required. A challenge is triggered if the end-user score is below that - # threshold. Value must be between 0 and 1 (inclusive). - class ActionSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is - # triggered. - # @!attribute [rw] default_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings] - # Required. Defines when a challenge is triggered (unless the default - # threshold is overridden for the given action, see `action_settings`). - # @!attribute [rw] action_settings - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings}] - # Optional. The action to score threshold map. - # The action name should be the same as the action name passed in the - # `data-action` attribute - # (see https://cloud.google.com/recaptcha/docs/actions-website). - # Action names are case-insensitive. - # There is a maximum of 100 action settings. - # An action name has a maximum length of 100. - class ChallengeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ActionSettings] - class ActionSettingsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Enum that represents the integration types for web keys. - # Ensure that applications can handle values not explicitly listed. - module IntegrationType - # Default type that indicates this enum hasn't been specified. This is not - # a valid IntegrationType, one of the other types must be specified - # instead. - INTEGRATION_TYPE_UNSPECIFIED = 0 - - # Only used to produce scores. It doesn't display the "I'm not a robot" - # checkbox and never shows captcha challenges. - SCORE = 1 - - # Displays the "I'm not a robot" checkbox and may show captcha challenges - # after it is checked. - CHECKBOX = 2 - - # Doesn't display the "I'm not a robot" checkbox, but may show captcha - # challenges after risk analysis. - INVISIBLE = 3 - - # Displays a visual challenge or not depending on the user risk analysis - # score. - POLICY_BASED_CHALLENGE = 5 - end - - # Enum that represents the possible challenge frequency and difficulty - # configurations for a web key. - # Ensure that applications can handle values not explicitly listed. - module ChallengeSecurityPreference - # Default type that indicates this enum hasn't been specified. - CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0 - - # Key tends to show fewer and easier challenges. - USABILITY = 1 - - # Key tends to show balanced (in amount and difficulty) challenges. - BALANCE = 2 - - # Key tends to show more and harder challenges. - SECURITY = 3 - end - end - - # Settings specific to keys that can be used by Android apps. - # @!attribute [rw] allow_all_package_names - # @return [::Boolean] - # Optional. If set to true, allowed_package_names are not enforced. - # @!attribute [rw] allowed_package_names - # @return [::Array<::String>] - # Optional. Android package names of apps allowed to use the key. - # Example: 'com.companyname.appname' - # Each key supports a maximum of 250 package names. To use a key on more - # apps, set `allow_all_package_names` to true. When this is set, you - # are responsible for validating the package name by checking the - # `token_properties.android_package_name` field in each assessment response - # against your list of allowed package names. - # @!attribute [rw] support_non_google_app_store_distribution - # @return [::Boolean] - # Optional. Set to true for keys that are used in an Android application that - # is available for download in app stores in addition to the Google Play - # Store. - class AndroidKeySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to keys that can be used by iOS apps. - # @!attribute [rw] allow_all_bundle_ids - # @return [::Boolean] - # Optional. If set to true, allowed_bundle_ids are not enforced. - # @!attribute [rw] allowed_bundle_ids - # @return [::Array<::String>] - # Optional. iOS bundle IDs of apps allowed to use the key. - # Example: 'com.companyname.productname.appname' - # Each key supports a maximum of 250 bundle IDs. To use a key on more - # apps, set `allow_all_bundle_ids` to true. When this is set, you - # are responsible for validating the bundle id by checking the - # `token_properties.ios_bundle_id` field in each assessment response - # against your list of allowed bundle IDs. - # @!attribute [rw] apple_developer_id - # @return [::Google::Cloud::RecaptchaEnterprise::V1::AppleDeveloperId] - # Optional. Apple Developer account details for the app that is protected by - # the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple - # App Attest and Apple DeviceCheck to protect your app from abuse. Providing - # these fields allows reCAPTCHA to get a better assessment of the integrity - # of your app. - class IOSKeySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to keys that can be used for reCAPTCHA Express. - class ExpressKeySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for keys that are configured through their Policy. - class UniversalKeySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains fields that are required to perform Apple-specific integrity checks. - # @!attribute [rw] private_key - # @return [::String] - # Required. Input only. A private key (downloaded as a text file with a .p8 - # file extension) generated for your Apple Developer account. Ensure that - # Apple DeviceCheck is enabled for the private key. - # @!attribute [rw] key_id - # @return [::String] - # Required. The Apple developer key ID (10-character string). - # @!attribute [rw] team_id - # @return [::String] - # Required. The Apple team ID (10-character string) owning the provisioning - # profile used to build your application. - class AppleDeveloperId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Score distribution. - # @!attribute [rw] score_buckets - # @return [::Google::Protobuf::Map{::Integer => ::Integer}] - # Map key is score value multiplied by 100. The scores are discrete values - # between [0, 1]. The maximum number of buckets is on order of a few dozen, - # but typically much lower (ie. 10). - class ScoreDistribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::Integer] - # @!attribute [rw] value - # @return [::Integer] - class ScoreBucketsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metrics related to scoring. - # @!attribute [rw] overall_metrics - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution] - # Aggregated score metrics for all traffic. - # @!attribute [rw] action_metrics - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution}] - # Action-based metrics. The map key is the action name which specified by the - # site owners at time of the "execute" client-side call. - class ScoreMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ScoreDistribution] - class ActionMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metrics related to challenges. - # @!attribute [rw] pageload_count - # @return [::Integer] - # Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent - # to a count of pageloads for pages that include reCAPTCHA. - # @!attribute [rw] nocaptcha_count - # @return [::Integer] - # Count of nocaptchas (successful verification without a challenge) issued. - # @!attribute [rw] failed_count - # @return [::Integer] - # Count of submitted challenge solutions that were incorrect or otherwise - # deemed suspicious such that a subsequent challenge was triggered. - # @!attribute [rw] passed_count - # @return [::Integer] - # Count of nocaptchas (successful verification without a challenge) plus - # submitted challenge solutions that were correct and resulted in - # verification. - class ChallengeMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Policy config assessment. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. If the processing of a policy config fails, an error is - # populated and the firewall_policy is left empty. - # @!attribute [r] firewall_policy - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy] - # Output only. The policy that matched the request. If more than one policy - # may match, this is the first match. If no policy matches the incoming - # request, the policy field is left empty. - class FirewallPolicyAssessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An individual action. Each action represents what to do if a policy - # matches. - # @!attribute [rw] allow - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction] - # The user request did not match any policy and should be allowed - # access to the requested resource. - # - # Note: The following fields are mutually exclusive: `allow`, `block`, `include_recaptcha_script`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] block - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction] - # This action denies access to a given page. The user gets an HTTP - # error code. - # - # Note: The following fields are mutually exclusive: `block`, `allow`, `include_recaptcha_script`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] include_recaptcha_script - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction] - # This action injects reCAPTCHA JavaScript code into the HTML page - # returned by the site backend. - # - # Note: The following fields are mutually exclusive: `include_recaptcha_script`, `allow`, `block`, `redirect`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redirect - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction] - # This action redirects the request to a reCAPTCHA interstitial to - # attach a token. - # - # Note: The following fields are mutually exclusive: `redirect`, `allow`, `block`, `include_recaptcha_script`, `substitute`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] substitute - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction] - # This action transparently serves a different page to an offending - # user. - # - # Note: The following fields are mutually exclusive: `substitute`, `allow`, `block`, `include_recaptcha_script`, `redirect`, `set_header`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] set_header - # @return [::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction] - # This action sets a custom header but allow the request to continue - # to the customer backend. - # - # Note: The following fields are mutually exclusive: `set_header`, `allow`, `block`, `include_recaptcha_script`, `redirect`, `substitute`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class FirewallAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An allow action continues processing a request unimpeded. - class AllowAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A block action serves an HTTP error code a prevents the request from - # hitting the backend. - class BlockAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript - # code into the HTML returned by the site backend. This reCAPTCHA - # script is tasked with collecting user signals on the requested web page, - # issuing tokens as a cookie within the site domain, and enabling their - # utilization in subsequent page requests. - class IncludeRecaptchaScriptAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A redirect action returns a 307 (temporary redirect) response, pointing - # the user to a reCAPTCHA interstitial page to attach a token. - class RedirectAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A substitute action transparently serves a different page than the one - # requested. - # @!attribute [rw] path - # @return [::String] - # Optional. The address to redirect to. The target is a relative path in - # the current host. Example: "/blog/404.html". - class SubstituteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set header action sets a header and forwards the request to the - # backend. This can be used to trigger custom protection implemented on the - # backend. - # @!attribute [rw] key - # @return [::String] - # Optional. The header key to set in the request to the backend server. - # @!attribute [rw] value - # @return [::String] - # Optional. The header value to set in the request to the backend server. - class SetHeaderAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A FirewallPolicy represents a single matching pattern and resulting actions - # to take. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for the FirewallPolicy in the format - # `projects/{project}/firewallpolicies/{firewallpolicy}`. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of what this policy aims to achieve, for - # convenience purposes. The description can at most include 256 UTF-8 - # characters. - # @!attribute [rw] path - # @return [::String] - # Optional. The path for which this policy applies, specified as a glob - # pattern. For more information on glob, see the [manual - # page](https://man7.org/linux/man-pages/man7/glob.7.html). - # A path has a max length of 200 characters. - # @!attribute [rw] condition - # @return [::String] - # Optional. A CEL (Common Expression Language) conditional expression that - # specifies if this policy applies to an incoming user request. If this - # condition evaluates to true and the requested path matched the path - # pattern, the associated actions should be executed by the caller. The - # condition string is checked for CEL syntax correctness on creation. For - # more information, see the [CEL spec](https://github.com/google/cel-spec) - # and its [language - # definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). - # A condition has a max length of 500 characters. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction>] - # Optional. The actions that the caller should take regarding user access. - # There should be at most one terminal action. A terminal action is any - # action that forces a response, such as `AllowAction`, - # `BlockAction` or `SubstituteAction`. - # Zero or more non-terminal actions such as `SetHeader` might be - # specified. A single policy can contain up to 16 actions. - class FirewallPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message to list memberships in a related account group. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name for the related account group in the format - # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of accounts to return. The service might - # return fewer than this value. If unspecified, at most 50 accounts are - # returned. The maximum value is 1000; values above 1000 are coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListRelatedAccountGroupMemberships` call. - # - # When paginating, all other parameters provided to - # `ListRelatedAccountGroupMemberships` must match the call that provided the - # page token. - class ListRelatedAccountGroupMembershipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a `ListRelatedAccountGroupMemberships` call. - # @!attribute [rw] related_account_group_memberships - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # The memberships listed by the query. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRelatedAccountGroupMembershipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message to list related account groups. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to list related account groups from, in - # the format `projects/{project}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of groups to return. The service might return - # fewer than this value. If unspecified, at most 50 groups are returned. The - # maximum value is 1000; values above 1000 are coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListRelatedAccountGroups` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListRelatedAccountGroups` must match the call that provided the page - # token. - class ListRelatedAccountGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a `ListRelatedAccountGroups` call. - # @!attribute [rw] related_account_groups - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>] - # The groups of related accounts listed by the query. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRelatedAccountGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message to search related account group memberships. - # @!attribute [rw] project - # @return [::String] - # Required. The name of the project to search related account group - # memberships from. Specify the project name in the following format: - # `projects/{project}`. - # @!attribute [rw] account_id - # @return [::String] - # Optional. The unique stable account identifier used to search connections. - # The identifier should correspond to an `account_id` provided in a previous - # `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id - # or account_id must be set, but not both. - # @!attribute [rw] hashed_account_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. Deprecated: use `account_id` instead. - # The unique stable hashed account identifier used to search connections. The - # identifier should correspond to a `hashed_account_id` provided in a - # previous `CreateAssessment` or `AnnotateAssessment` call. Either - # hashed_account_id or account_id must be set, but not both. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of groups to return. The service might return - # fewer than this value. If unspecified, at most 50 groups are returned. The - # maximum value is 1000; values above 1000 are coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `SearchRelatedAccountGroupMemberships` must match the call that provided - # the page token. - class SearchRelatedAccountGroupMembershipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a `SearchRelatedAccountGroupMemberships` call. - # @!attribute [rw] related_account_group_memberships - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>] - # The queried memberships. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class SearchRelatedAccountGroupMembershipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The AddIpOverride request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the key to which the IP override is added, in the - # format `projects/{project}/keys/{key}`. - # @!attribute [rw] ip_override_data - # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData] - # Required. IP override added to the key. - class AddIpOverrideRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for AddIpOverride. - class AddIpOverrideResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The RemoveIpOverride request message. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the key from which the IP override is removed, in the - # format `projects/{project}/keys/{key}`. - # @!attribute [rw] ip_override_data - # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData] - # Required. IP override to be removed from the key. - class RemoveIpOverrideRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for RemoveIpOverride. - class RemoveIpOverrideResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ListIpOverrides request message. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent key for which the IP overrides are listed, in the - # format `projects/{project}/keys/{key}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of overrides to return. Default is 10. Max - # limit is 100. If the number of overrides is less than the page_size, all - # overrides are returned. If the page size is more than 100, it is coerced to - # 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous - # ListIpOverridesRequest, if any. - class ListIpOverridesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListIpOverrides. - # @!attribute [rw] ip_overrides - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>] - # IP Overrides details. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results. If this field is empty, no keys - # remain in the results. - class ListIpOverridesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A membership in a group of related accounts. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. The resource name for this membership in the format - # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - # @!attribute [rw] account_id - # @return [::String] - # The unique stable account identifier of the member. The identifier - # corresponds to an `account_id` provided in a previous `CreateAssessment` or - # `AnnotateAssessment` call. - # @!attribute [rw] hashed_account_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: use `account_id` instead. - # The unique stable hashed account identifier of the member. The identifier - # corresponds to a `hashed_account_id` provided in a previous - # `CreateAssessment` or `AnnotateAssessment` call. - class RelatedAccountGroupMembership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A group of related accounts. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. The resource name for the related account group in - # the format - # `projects/{project}/relatedaccountgroups/{related_account_group}`. - class RelatedAccountGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to keys that can be used for WAF (Web Application - # Firewall). - # @!attribute [rw] waf_service - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings::WafService] - # Required. The Web Application Firewall (WAF) service that uses this key. - # @!attribute [rw] waf_feature - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WafSettings::WafFeature] - # Required. The Web Application Firewall (WAF) feature for which this key is - # enabled. - class WafSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported WAF features. For more information, see - # https://cloud.google.com/recaptcha/docs/usecase#comparison_of_features. - # Ensure that applications can handle values not explicitly listed. - module WafFeature - # Undefined feature. - WAF_FEATURE_UNSPECIFIED = 0 - - # Redirects suspicious traffic to reCAPTCHA. - CHALLENGE_PAGE = 1 - - # Use reCAPTCHA session-tokens to protect the whole user session on the - # site's domain. - SESSION_TOKEN = 2 - - # Use reCAPTCHA action-tokens to protect user actions. - ACTION_TOKEN = 3 - - # Deprecated: Use `express_settings` instead. - EXPRESS = 5 - end - - # Web Application Firewalls that reCAPTCHA supports. - # Ensure that applications can handle values not explicitly listed. - module WafService - # Undefined WAF - WAF_SERVICE_UNSPECIFIED = 0 - - # Cloud Armor - CA = 1 - - # Fastly - FASTLY = 3 - - # Cloudflare - CLOUDFLARE = 4 - - # Akamai - AKAMAI = 5 - end - end - - # The environment creating the assessment. This describes your environment - # (the system invoking CreateAssessment), NOT the environment of your user. - # @!attribute [rw] client - # @return [::String] - # Optional. Identifies the client module initiating the CreateAssessment - # request. This can be the link to the client module's project. Examples - # include: - # - # - - # "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - # - "wordpress.org/plugins/recaptcha-something" - # @!attribute [rw] version - # @return [::String] - # Optional. The version of the client module. For example, "1.0.0". - class AssessmentEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the policy evaluation. - # @!attribute [r] challenge_rule_evaluation - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleEvaluation] - # Output only. Populated if one or more Challenge rules were matched. - # Its presence in the assessment indicates that at least one challenge rule - # was matched and determined whether a challenge was presented to the user. - class PolicyEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the evaluation of a `ChallengeRule`. - class ChallengeRuleEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the IP or IP range override. - # @!attribute [rw] ip - # @return [::String] - # Required. The IP address to override (can be IPv4, IPv6 or CIDR). - # The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. - # The IP override must be a public IP address. - # Example of IPv4: 168.192.5.6 - # Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B - # Example of IPv4 with CIDR: 168.192.5.0/24 - # Example of IPv6 with CIDR: 2001:0DB8:1234::/48 - # @!attribute [rw] override_type - # @return [::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData::OverrideType] - # Required. Describes the type of IP override. - class IpOverrideData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents the type of IP override. - # Ensure that applications can handle values not explicitly listed. - module OverrideType - # Default override type that indicates this enum hasn't been specified. - OVERRIDE_TYPE_UNSPECIFIED = 0 - - # Allowlist the IP address; i.e. give a `risk_analysis.score` of 0.9 for - # all valid assessments. - ALLOW = 1 - end - end - - # The request message to get a policy. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the policy to get, in the format - # `projects/{project}/keys/{key}/policy`. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message to update a policy. - # @!attribute [rw] policy - # @return [::Google::Cloud::RecaptchaEnterprise::V1::Policy] - # Required. The Policy's name is used to identify the policy to update, in - # the format `projects/{project}/keys/{key}/policy`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The mask to control which fields of the policy get updated. If - # the mask is not present, all fields are updated. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A complete configuration set containing multiple grouped rules defining the - # behavior of reCAPTCHA for fraud detection and prevention. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name for this policy. - # Format: "projects/\\{project}/keys/\\{key}/policy" for a policy under a key. - # @!attribute [rw] client_settings - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ClientSettings] - # Required. Configuration for clients protected by this policy. - # @!attribute [rw] challenge_rule_groups - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRuleGroup>] - # Optional. Rules to configure the behavior of reCAPTCHA for showing a - # challenge. Rule groups are evaluated in order. Evaluation stops when the - # first matching rule group is found. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of challenge rules that applies to one or more actions. - # @!attribute [rw] actions - # @return [::Array<::String>] - # Required. Action name provided at token generation. The action name is not - # case-sensitive and can only contain alphanumeric characters, slashes, and - # underscores. If "*" is provided, the rule group applies to all actions. If - # multiple actions are provided, the rule group is applied to all of - # them. This field is required. - # @!attribute [rw] challenge_rules - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule>] - # Required. A list of rules that configure when and how reCAPTCHA presents a - # challenge. reCAPTCHA evaluates these rules in order and applies the first - # one that matches. - class ChallengeRuleGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule to configure the behavior of reCAPTCHA for conditionally presenting a - # challenge. - # @!attribute [rw] condition - # @return [::String] - # Optional. A CEL condition that must be met for this rule to apply. - # If unspecified, the rule applies unconditionally. - # The following fields can be referenced in the condition: - # * `score` - # * `user_ip_address` - # * `user_asn` - # * `user_agent` - # * `verified_bots.name` - # * `verified_bots.bot_type` - # - # Examples: - # * `score < 0.5` - # * `user_ip_address == "123.45.67.89"` - # * `user_agent.contains("Chrome")` - # * `score < 0.5 && user_ip_address == "123.45.67.89"` - # @!attribute [rw] no_challenge - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::NoChallengeOutcome] - # Do not present a challenge to the user. - # - # Note: The following fields are mutually exclusive: `no_challenge`, `challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] challenge - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ChallengeRule::ChallengeOutcome] - # Present a challenge to the user. - # - # Note: The following fields are mutually exclusive: `challenge`, `no_challenge`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ChallengeRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An outcome that indicates that no challenge should be presented to the - # user. - class NoChallengeOutcome - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An outcome that indicates that a challenge of a specified difficulty should - # be presented to the user. - # @!attribute [rw] difficulty - # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference] - # Optional. The difficulty of the challenge to present to the user. - # If unspecified, `BALANCE` is used. - class ChallengeOutcome - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for clients to protect with reCAPTCHA. - # @!attribute [rw] allowed_domains - # @return [::Array<::String>] - # Optional. Domains or subdomains of websites allowed to use the policy. All - # subdomains of an allowed domain are automatically allowed. A valid domain - # requires a host and must not include any path, port, query or fragment. - # Examples: 'example.com' or 'subdomain.example.com' - # Each policy supports a maximum of 250 domains. To use a policy on more - # domains, set `allow_all_domains` to true. When this is set, you are - # responsible for validating the hostname by checking the - # `token_properties.hostname` field in each assessment response against your - # list of allowed domains. - # @!attribute [rw] allow_all_domains - # @return [::Boolean] - # Optional. If set to true, it means allowed_domains are not enforced. - # @!attribute [rw] protected_endpoint_group - # @return [::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpointGroup] - # Optional. Configuration for all API endpoints to protect with reCAPTCHA. If - # this field is not set, reCAPTCHA will not automatically request tokens on - # any API endpoints. - class ClientSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for API endpoints to protect with reCAPTCHA. - # @!attribute [rw] protected_endpoints - # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::ProtectedEndpoint>] - # Optional. List of API endpoints to automatically protect with reCAPTCHA. If - # any of these endpoints is invoked from a page where a key bound to this - # policy is installed, a reCAPTCHA token is automatically generated and - # attached to the request. If multiple protected endpoints match a given API - # endpoint, the first one in the list is used. - class ProtectedEndpointGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for an API endpoint to protect with reCAPTCHA. - # @!attribute [rw] path - # @return [::String] - # Required. URI path of the API endpoint to protect. Must start with '/'. - # Supports glob characters '*' to match a single path segment and '**' to - # match multiple path segments. Standalone root catch-alls ('/*' and '/**') - # are invalid because it can negatively impact performance to trigger - # reCAPTCHA on every single request to your backend. - # - # Matching is evaluated against the URL path only (domain, scheme, and query - # parameters are ignored). - # - # Examples: - # - `/login` matches `/login`, `https://example.com/login`, and - # `/login?query=1`, but not `/login/step1`. - # - `/products/*` matches `/products/123`, but not `/products/123/456`. - # - `/content/**` matches `/content/articles/2024/01/01`. - # @!attribute [rw] action - # @return [::String] - # Required. Action name to be used for token generation for this endpoint. - # The action name can only contain alphanumeric characters, slashes, and - # underscores. - class ProtectedEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum of challenge types for Universal, `POLICY_BASED_CHALLENGE` and - # `INVISIBLE` keys. Ensure that applications can handle values not explicitly - # listed. - module ChallengeType - # Default unspecified type. - CHALLENGE_TYPE_UNSPECIFIED = 0 - - # A visual challenge. - CHALLENGE_TYPE_VISUAL = 1 - - # An audio challenge. - CHALLENGE_TYPE_AUDIO = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/Gemfile deleted file mode 100644 index ecbdc5a6605c..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/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-recaptcha_enterprise-v1", path: "../" -else - gem "google-cloud-recaptcha_enterprise-v1" -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-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.rb deleted file mode 100644 index 2cd93faef1ad..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/add_ip_override.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the add_ip_override call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override. -# -def add_ip_override - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new - - # Call the add_ip_override method. - result = client.add_ip_override request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.rb deleted file mode 100644 index a4e7cfd8ae7e..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/annotate_assessment.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the annotate_assessment call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment. -# -def annotate_assessment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new - - # Call the annotate_assessment method. - result = client.annotate_assessment request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.rb deleted file mode 100644 index 0faeb6dd26ee..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_assessment.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the create_assessment call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment. -# -def create_assessment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new - - # Call the create_assessment method. - result = client.create_assessment request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.rb deleted file mode 100644 index 6161259992c4..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the create_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy. -# -def create_firewall_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new - - # Call the create_firewall_policy method. - result = client.create_firewall_policy request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.rb deleted file mode 100644 index 17732dc4f67e..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/create_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the create_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key. -# -def create_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new - - # Call the create_key method. - result = client.create_key request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.rb deleted file mode 100644 index 4043f5b69b08..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the delete_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy. -# -def delete_firewall_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new - - # Call the delete_firewall_policy method. - result = client.delete_firewall_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.rb deleted file mode 100644 index 5303f077ca44..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/delete_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the delete_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key. -# -def delete_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new - - # Call the delete_key method. - result = client.delete_key request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.rb deleted file mode 100644 index 20c22a7354d8..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the get_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy. -# -def get_firewall_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new - - # Call the get_firewall_policy method. - result = client.get_firewall_policy request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.rb deleted file mode 100644 index 4c3b7da228bb..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the get_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key. -# -def get_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new - - # Call the get_key method. - result = client.get_key request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.rb deleted file mode 100644 index e70958bdf776..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/get_metrics.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the get_metrics call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics. -# -def get_metrics - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new - - # Call the get_metrics method. - result = client.get_metrics request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.rb deleted file mode 100644 index cac6a23ab90f..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_firewall_policies.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the list_firewall_policies call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies. -# -def list_firewall_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new - - # Call the list_firewall_policies method. - result = client.list_firewall_policies 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::RecaptchaEnterprise::V1::FirewallPolicy. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.rb deleted file mode 100644 index b028a8f6caa4..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_ip_overrides.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the list_ip_overrides call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides. -# -def list_ip_overrides - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new - - # Call the list_ip_overrides method. - result = client.list_ip_overrides 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::RecaptchaEnterprise::V1::IpOverrideData. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.rb deleted file mode 100644 index 7e6a4cabb356..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_keys.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the list_keys call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys. -# -def list_keys - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new - - # Call the list_keys method. - result = client.list_keys 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::RecaptchaEnterprise::V1::Key. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.rb deleted file mode 100644 index ece30d40559d..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_group_memberships.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the list_related_account_group_memberships call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships. -# -def list_related_account_group_memberships - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new - - # Call the list_related_account_group_memberships method. - result = client.list_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.rb deleted file mode 100644 index d19c5f95a161..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/list_related_account_groups.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the list_related_account_groups call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups. -# -def list_related_account_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new - - # Call the list_related_account_groups method. - result = client.list_related_account_groups 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::RecaptchaEnterprise::V1::RelatedAccountGroup. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.rb deleted file mode 100644 index 3790cc8bf22d..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/migrate_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the migrate_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key. -# -def migrate_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new - - # Call the migrate_key method. - result = client.migrate_key request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.rb deleted file mode 100644 index 775dae1c3506..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/remove_ip_override.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the remove_ip_override call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override. -# -def remove_ip_override - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new - - # Call the remove_ip_override method. - result = client.remove_ip_override request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.rb deleted file mode 100644 index 0785a8c5770d..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/reorder_firewall_policies.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the reorder_firewall_policies call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies. -# -def reorder_firewall_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new - - # Call the reorder_firewall_policies method. - result = client.reorder_firewall_policies request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.rb deleted file mode 100644 index a5aff30875f6..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/retrieve_legacy_secret_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the retrieve_legacy_secret_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key. -# -def retrieve_legacy_secret_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new - - # Call the retrieve_legacy_secret_key method. - result = client.retrieve_legacy_secret_key request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.rb deleted file mode 100644 index 8ca6af8cafde..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/search_related_account_group_memberships.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the search_related_account_group_memberships call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships. -# -def search_related_account_group_memberships - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new - - # Call the search_related_account_group_memberships method. - result = client.search_related_account_group_memberships 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::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. - p item - end -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.rb deleted file mode 100644 index 1c0edac34c62..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_firewall_policy.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the update_firewall_policy call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy. -# -def update_firewall_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new - - # Call the update_firewall_policy method. - result = client.update_firewall_policy request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.rb deleted file mode 100644 index f6b0ed5da093..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/recaptcha_enterprise_service/update_key.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 recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] -require "google/cloud/recaptcha_enterprise/v1" - -## -# Snippet for the update_key call in the RecaptchaEnterpriseService 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key. -# -def update_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new - - # Call the update_key method. - result = client.update_key request - - # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. - p result -end -# [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json deleted file mode 100644 index 4152b477e378..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/snippets/snippet_metadata_google.cloud.recaptchaenterprise.v1.json +++ /dev/null @@ -1,975 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-recaptcha_enterprise-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.recaptchaenterprise.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync", - "title": "Snippet for the create_assessment call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment.", - "file": "recaptcha_enterprise_service/create_assessment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_assessment", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_assessment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Assessment", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "CreateAssessment", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessment", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync", - "title": "Snippet for the annotate_assessment call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment.", - "file": "recaptcha_enterprise_service/annotate_assessment.rb", - "language": "RUBY", - "client_method": { - "short_name": "annotate_assessment", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#annotate_assessment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "AnnotateAssessment", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessment", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync", - "title": "Snippet for the create_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key.", - "file": "recaptcha_enterprise_service/create_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "CreateKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync", - "title": "Snippet for the list_keys call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys.", - "file": "recaptcha_enterprise_service/list_keys.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_keys", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_keys", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ListKeys", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeys", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_sync", - "title": "Snippet for the retrieve_legacy_secret_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key.", - "file": "recaptcha_enterprise_service/retrieve_legacy_secret_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "retrieve_legacy_secret_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#retrieve_legacy_secret_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "RetrieveLegacySecretKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync", - "title": "Snippet for the get_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key.", - "file": "recaptcha_enterprise_service/get_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "GetKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync", - "title": "Snippet for the update_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key.", - "file": "recaptcha_enterprise_service/update_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "UpdateKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync", - "title": "Snippet for the delete_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key.", - "file": "recaptcha_enterprise_service/delete_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "DeleteKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_MigrateKey_sync", - "title": "Snippet for the migrate_key call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key.", - "file": "recaptcha_enterprise_service/migrate_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "migrate_key", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#migrate_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Key", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "MigrateKey", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKey", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AddIpOverride_sync", - "title": "Snippet for the add_ip_override call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override.", - "file": "recaptcha_enterprise_service/add_ip_override.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_ip_override", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#add_ip_override", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "AddIpOverride", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AddIpOverride", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RemoveIpOverride_sync", - "title": "Snippet for the remove_ip_override call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override.", - "file": "recaptcha_enterprise_service/remove_ip_override.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_ip_override", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#remove_ip_override", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "RemoveIpOverride", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RemoveIpOverride", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListIpOverrides_sync", - "title": "Snippet for the list_ip_overrides call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides.", - "file": "recaptcha_enterprise_service/list_ip_overrides.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_ip_overrides", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_ip_overrides", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ListIpOverrides", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListIpOverrides", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetMetrics_sync", - "title": "Snippet for the get_metrics call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics.", - "file": "recaptcha_enterprise_service/get_metrics.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_metrics", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_metrics", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Metrics", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "GetMetrics", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetrics", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetPolicy_sync", - "title": "Snippet for the get_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy.", - "file": "recaptcha_enterprise_service/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetPolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy.", - "file": "recaptcha_enterprise_service/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::Policy", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdatePolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync", - "title": "Snippet for the create_firewall_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy.", - "file": "recaptcha_enterprise_service/create_firewall_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_firewall_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#create_firewall_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "CreateFirewallPolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateFirewallPolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync", - "title": "Snippet for the list_firewall_policies call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies.", - "file": "recaptcha_enterprise_service/list_firewall_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_firewall_policies", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_firewall_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ListFirewallPolicies", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListFirewallPolicies", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync", - "title": "Snippet for the get_firewall_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy.", - "file": "recaptcha_enterprise_service/get_firewall_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_firewall_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#get_firewall_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "GetFirewallPolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetFirewallPolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync", - "title": "Snippet for the update_firewall_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy.", - "file": "recaptcha_enterprise_service/update_firewall_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_firewall_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#update_firewall_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "UpdateFirewallPolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateFirewallPolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync", - "title": "Snippet for the delete_firewall_policy call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy.", - "file": "recaptcha_enterprise_service/delete_firewall_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_firewall_policy", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#delete_firewall_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "DeleteFirewallPolicy", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteFirewallPolicy", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ReorderFirewallPolicies_sync", - "title": "Snippet for the reorder_firewall_policies call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies.", - "file": "recaptcha_enterprise_service/reorder_firewall_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "reorder_firewall_policies", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#reorder_firewall_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ReorderFirewallPolicies", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ReorderFirewallPolicies", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync", - "title": "Snippet for the list_related_account_groups call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups.", - "file": "recaptcha_enterprise_service/list_related_account_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_related_account_groups", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ListRelatedAccountGroups", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroups", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync", - "title": "Snippet for the list_related_account_group_memberships call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships.", - "file": "recaptcha_enterprise_service/list_related_account_group_memberships.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_related_account_group_memberships", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#list_related_account_group_memberships", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "ListRelatedAccountGroupMemberships", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMemberships", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync", - "title": "Snippet for the search_related_account_group_memberships call in the RecaptchaEnterpriseService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships.", - "file": "recaptcha_enterprise_service/search_related_account_group_memberships.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_related_account_group_memberships", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client#search_related_account_group_memberships", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse", - "client": { - "short_name": "RecaptchaEnterpriseService::Client", - "full_name": "::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client" - }, - "method": { - "short_name": "SearchRelatedAccountGroupMemberships", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMemberships", - "service": { - "short_name": "RecaptchaEnterpriseService", - "full_name": "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.rb deleted file mode 100644 index 085d2844f8a4..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_paths_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" - -class ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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_assessment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.assessment_path project: "value0", assessment: "value1" - assert_equal "projects/value0/assessments/value1", path - end - end - - def test_firewall_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.firewall_policy_path project: "value0", firewallpolicy: "value1" - assert_equal "projects/value0/firewallpolicies/value1", path - end - end - - def test_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.key_path project: "value0", key: "value1" - assert_equal "projects/value0/keys/value1", path - end - end - - def test_metrics_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.metrics_path project: "value0", key: "value1" - assert_equal "projects/value0/keys/value1/metrics", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0", key: "value1" - assert_equal "projects/value0/keys/value1/policy", 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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_related_account_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.related_account_group_path project: "value0", relatedaccountgroup: "value1" - assert_equal "projects/value0/relatedaccountgroups/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb deleted file mode 100644 index 0aff9beeb849..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service_test.rb +++ /dev/null @@ -1,1586 +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/recaptchaenterprise/v1/recaptchaenterprise_pb" -require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service" - -class ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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_create_assessment - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Assessment.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" - assessment = {} - - create_assessment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_assessment, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Assessment), request["assessment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_assessment_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_assessment({ parent: parent, assessment: assessment }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_assessment parent: parent, assessment: assessment do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_assessment ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new(parent: parent, assessment: assessment) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_assessment({ parent: parent, assessment: assessment }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_assessment(::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new(parent: parent, assessment: assessment), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_assessment_client_stub.call_rpc_count - end - end - - def test_annotate_assessment - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse.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" - annotation = :ANNOTATION_UNSPECIFIED - reasons = [:REASON_UNSPECIFIED] - account_id = "hello world" - hashed_account_id = "hello world" - transaction_event = {} - phone_authentication_event = {} - - annotate_assessment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :annotate_assessment, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, request - assert_equal "hello world", request["name"] - assert_equal :ANNOTATION_UNSPECIFIED, request["annotation"] - assert_equal [:REASON_UNSPECIFIED], request["reasons"] - assert_equal "hello world", request["account_id"] - assert_equal "hello world", request["hashed_account_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent), request["transaction_event"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent), request["phone_authentication_event"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, annotate_assessment_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.annotate_assessment({ name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.annotate_assessment name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.annotate_assessment ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new(name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.annotate_assessment({ name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.annotate_assessment(::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new(name: name, annotation: annotation, reasons: reasons, account_id: account_id, hashed_account_id: hashed_account_id, transaction_event: transaction_event, phone_authentication_event: phone_authentication_event), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, annotate_assessment_client_stub.call_rpc_count - end - end - - def test_create_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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" - key = {} - - create_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Key), request["key"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_key({ parent: parent, key: key }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_key parent: parent, key: key do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_key ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new(parent: parent, key: key) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_key({ parent: parent, key: key }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_key(::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new(parent: parent, key: key), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_key_client_stub.call_rpc_count - end - end - - def test_list_keys - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysResponse.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" - - list_keys_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_keys, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_keys_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_keys({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_keys parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_keys ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 - c.list_keys({ parent: parent, page_size: page_size, page_token: page_token }, 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 - c.list_keys(::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_keys_client_stub.call_rpc_count - end - end - - def test_retrieve_legacy_secret_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse.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. - key = "hello world" - - retrieve_legacy_secret_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retrieve_legacy_secret_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, request - assert_equal "hello world", request["key"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retrieve_legacy_secret_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.retrieve_legacy_secret_key({ key: key }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.retrieve_legacy_secret_key key: key do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.retrieve_legacy_secret_key ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new(key: key) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.retrieve_legacy_secret_key({ key: key }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.retrieve_legacy_secret_key(::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new(key: key), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, retrieve_legacy_secret_key_client_stub.call_rpc_count - end - end - - def test_get_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_key({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_key name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_key ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_key({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_key(::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.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_key_client_stub.call_rpc_count - end - end - - def test_update_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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. - key = {} - update_mask = {} - - update_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Key), request["key"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_key({ key: key, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_key key: key, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_key ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new(key: key, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_key({ key: key, 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 - c.update_key(::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new(key: key, 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_key_client_stub.call_rpc_count - end - end - - def test_delete_key - # 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_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_key({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_key name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_key ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_key({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_key(::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.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_key_client_stub.call_rpc_count - end - end - - def test_migrate_key - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Key.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" - skip_billing_check = true - - migrate_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :migrate_key, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["skip_billing_check"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, migrate_key_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.migrate_key({ name: name, skip_billing_check: skip_billing_check }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.migrate_key name: name, skip_billing_check: skip_billing_check do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.migrate_key ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new(name: name, skip_billing_check: skip_billing_check) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.migrate_key({ name: name, skip_billing_check: skip_billing_check }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.migrate_key(::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new(name: name, skip_billing_check: skip_billing_check), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, migrate_key_client_stub.call_rpc_count - end - end - - def test_add_ip_override - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse.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" - ip_override_data = {} - - add_ip_override_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_ip_override, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData), request["ip_override_data"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_ip_override_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.add_ip_override({ name: name, ip_override_data: ip_override_data }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.add_ip_override name: name, ip_override_data: ip_override_data do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.add_ip_override ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new(name: name, ip_override_data: ip_override_data) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.add_ip_override({ name: name, ip_override_data: ip_override_data }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.add_ip_override(::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest.new(name: name, ip_override_data: ip_override_data), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_ip_override_client_stub.call_rpc_count - end - end - - def test_remove_ip_override - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse.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" - ip_override_data = {} - - remove_ip_override_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :remove_ip_override, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData), request["ip_override_data"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, remove_ip_override_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.remove_ip_override({ name: name, ip_override_data: ip_override_data }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.remove_ip_override name: name, ip_override_data: ip_override_data do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.remove_ip_override ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new(name: name, ip_override_data: ip_override_data) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.remove_ip_override({ name: name, ip_override_data: ip_override_data }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.remove_ip_override(::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest.new(name: name, ip_override_data: ip_override_data), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, remove_ip_override_client_stub.call_rpc_count - end - end - - def test_list_ip_overrides - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesResponse.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" - - list_ip_overrides_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_ip_overrides, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_ip_overrides_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_ip_overrides({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_ip_overrides parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_ip_overrides ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 - c.list_ip_overrides({ parent: parent, page_size: page_size, page_token: page_token }, 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 - c.list_ip_overrides(::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_ip_overrides_client_stub.call_rpc_count - end - end - - def test_get_metrics - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Metrics.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_metrics_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_metrics, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_metrics_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_metrics({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_metrics name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_metrics ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_metrics({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_metrics(::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.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_metrics_client_stub.call_rpc_count - end - end - - def test_get_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy ::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_policy(::Google::Cloud::RecaptchaEnterprise::V1::GetPolicyRequest.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_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::Policy.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. - policy = {} - update_mask = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy({ policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy ::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy({ policy: policy, 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 - c.update_policy(::Google::Cloud::RecaptchaEnterprise::V1::UpdatePolicyRequest.new(policy: policy, 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_policy_client_stub.call_rpc_count - end - end - - def test_create_firewall_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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" - firewall_policy = {} - - create_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_firewall_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy), request["firewall_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_firewall_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_firewall_policy({ parent: parent, firewall_policy: firewall_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_firewall_policy parent: parent, firewall_policy: firewall_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new(parent: parent, firewall_policy: firewall_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_firewall_policy({ parent: parent, firewall_policy: firewall_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest.new(parent: parent, firewall_policy: firewall_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_firewall_policy_client_stub.call_rpc_count - end - end - - def test_list_firewall_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesResponse.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" - - list_firewall_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_firewall_policies, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_firewall_policies_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_firewall_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_firewall_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_firewall_policies ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 - c.list_firewall_policies({ parent: parent, page_size: page_size, page_token: page_token }, 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 - c.list_firewall_policies(::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_firewall_policies_client_stub.call_rpc_count - end - end - - def test_get_firewall_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_firewall_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_firewall_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_firewall_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_firewall_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_firewall_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest.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_firewall_policy_client_stub.call_rpc_count - end - end - - def test_update_firewall_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy.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. - firewall_policy = {} - update_mask = {} - - update_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_firewall_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy), request["firewall_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_firewall_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_firewall_policy({ firewall_policy: firewall_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_firewall_policy firewall_policy: firewall_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new(firewall_policy: firewall_policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_firewall_policy({ firewall_policy: firewall_policy, 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 - c.update_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest.new(firewall_policy: firewall_policy, 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_firewall_policy_client_stub.call_rpc_count - end - end - - def test_delete_firewall_policy - # 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_firewall_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_firewall_policy, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_firewall_policy_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_firewall_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_firewall_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_firewall_policy ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_firewall_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_firewall_policy(::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest.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_firewall_policy_client_stub.call_rpc_count - end - end - - def test_reorder_firewall_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse.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" - names = ["hello world"] - - reorder_firewall_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reorder_firewall_policies, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reorder_firewall_policies_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.reorder_firewall_policies({ parent: parent, names: names }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.reorder_firewall_policies parent: parent, names: names do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.reorder_firewall_policies ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new(parent: parent, names: names) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.reorder_firewall_policies({ parent: parent, names: names }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.reorder_firewall_policies(::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest.new(parent: parent, names: names), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, reorder_firewall_policies_client_stub.call_rpc_count - end - end - - def test_list_related_account_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsResponse.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" - - list_related_account_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_related_account_groups, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_related_account_groups_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_related_account_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_related_account_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_related_account_groups ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 - c.list_related_account_groups({ parent: parent, page_size: page_size, page_token: page_token }, 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 - c.list_related_account_groups(::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_related_account_groups_client_stub.call_rpc_count - end - end - - def test_list_related_account_group_memberships - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsResponse.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" - - list_related_account_group_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_related_account_group_memberships, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_related_account_group_memberships_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_related_account_group_memberships({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_related_account_group_memberships parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_related_account_group_memberships ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token) 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 - c.list_related_account_group_memberships({ parent: parent, page_size: page_size, page_token: page_token }, 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 - c.list_related_account_group_memberships(::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token), 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_related_account_group_memberships_client_stub.call_rpc_count - end - end - - def test_search_related_account_group_memberships - # Create GRPC objects. - grpc_response = ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsResponse.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. - project = "hello world" - account_id = "hello world" - hashed_account_id = "hello world" - page_size = 42 - page_token = "hello world" - - search_related_account_group_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_related_account_group_memberships, name - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, request - assert_equal "hello world", request["project"] - assert_equal "hello world", request["account_id"] - assert_equal "hello world", request["hashed_account_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_related_account_group_memberships_client_stub do - # Create client - c = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search_related_account_group_memberships({ project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search_related_account_group_memberships project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search_related_account_group_memberships ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new(project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token) 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 - c.search_related_account_group_memberships({ project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token }, 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 - c.search_related_account_group_memberships(::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new(project: project, account_id: account_id, hashed_account_id: hashed_account_id, page_size: page_size, page_token: page_token), 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_related_account_group_memberships_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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::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::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise-v1/test/helper.rb +++ /dev/null @@ -1,35 +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! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"