# reCAPTCHA Enterprise V1 API - Class Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client (v1.11.0)

1.11.0 (latest) 1.9.1 1.8.0 1.7.1 1.6.0 1.5.1 1.4.1 1.3.0 1.2.0 1.1.0 1.0.0 0.22.0 0.21.0 0.20.1 0.19.0 0.18.0 0.17.3 0.16.0 0.15.0 0.14.1 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 0.8.0 0.7.1 Reference documentation and code samples for the reCAPTCHA Enterprise V1 API class Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.

Client for the RecaptchaEnterpriseService service.


<br />

Service to determine the likelihood an event is legitimate.

## Inherits

- Object

## Includes

- [Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the RecaptchaEnterpriseService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration "Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all RecaptchaEnterpriseService clients
::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #add_ip_override

    def add_ip_override(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse
    def add_ip_override(name: nil, ip_override_data: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse

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.
**Overloads**

    def add_ip_override(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse

Pass arguments to `add_ip_override` via a request object, either of type [AddIpOverrideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AddIpOverrideRequest "Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def add_ip_override(name: nil, ip_override_data: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse

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). **Parameters**

- **name** (::String) --- Required. The name of the key to which the IP override is added, in the format `projects/{project}/keys/{key}`.
- **ip_override_data** ([::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-IpOverrideData), ::Hash) --- Required. IP override added to the key.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AddIpOverrideResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AddIpOverrideResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #annotate_assessment

    def annotate_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
    def annotate_assessment(name: nil, annotation: nil, reasons: nil, account_id: nil, hashed_account_id: nil, transaction_event: nil, phone_authentication_event: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse

Annotates a previously created Assessment to provide additional information
on whether the event turned out to be authentic or fraudulent.
**Overloads**

    def annotate_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse

Pass arguments to `annotate_assessment` via a request object, either of type [AnnotateAssessmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AnnotateAssessmentRequest "Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def annotate_assessment(name: nil, annotation: nil, reasons: nil, account_id: nil, hashed_account_id: nil, transaction_event: nil, phone_authentication_event: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse

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). **Parameters**

- **name** (::String) --- Required. The resource name of the Assessment, in the format `projects/{project}/assessments/{assessment}`.
- **annotation** ([::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **reasons** (::Array\<[::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AnnotateAssessmentRequest-Reason)\>) --- Optional. Reasons for the annotation that are assigned to the event.
- **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.
- **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.
- **transaction_event** ([::Google::Cloud::RecaptchaEnterprise::V1::TransactionEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **phone_authentication_event** ([::Google::Cloud::RecaptchaEnterprise::V1::PhoneAuthenticationEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-PhoneAuthenticationEvent), ::Hash) --- Optional. If using an external multi-factor authentication provider, provide phone authentication details for fraud detection purposes.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AnnotateAssessmentResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-AnnotateAssessmentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client#Google__Cloud__RecaptchaEnterprise__V1__RecaptchaEnterpriseService__Client_configure_class_ "Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration "Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration))

### #create_assessment

    def create_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
    def create_assessment(parent: nil, assessment: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment

Creates an Assessment of the likelihood an event is legitimate.
**Overloads**

    def create_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment

Pass arguments to `create_assessment` via a request object, either of type [CreateAssessmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-CreateAssessmentRequest "Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_assessment(parent: nil, assessment: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment

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). **Parameters**

- **parent** (::String) --- Required. The name of the project in which the assessment is created, in the format `projects/{project}`.
- **assessment** ([::Google::Cloud::RecaptchaEnterprise::V1::Assessment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Assessment), ::Hash) --- Required. The assessment details.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Assessment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Assessment))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Assessment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Assessment))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #create_firewall_policy

    def create_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
    def create_firewall_policy(parent: nil, firewall_policy: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
Enterprise actions can be executed.
A project may have a maximum of 1000 policies.
**Overloads**

    def create_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Pass arguments to `create_firewall_policy` via a request object, either of type [CreateFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-CreateFirewallPolicyRequest "Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_firewall_policy(parent: nil, firewall_policy: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

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). **Parameters**

- **parent** (::String) --- Required. The name of the project this policy applies to, in the format `projects/{project}`.
- **firewall_policy** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy), ::Hash) --- Required. Information to create the policy.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #create_key

    def create_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
    def create_key(parent: nil, key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Creates a new reCAPTCHA Enterprise key.
**Overloads**

    def create_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Pass arguments to `create_key` via a request object, either of type [CreateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-CreateKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_key(parent: nil, key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

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). **Parameters**

- **parent** (::String) --- Required. The name of the project in which the key is created, in the format `projects/{project}`.
- **key** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key), ::Hash) --- Required. Information to create a reCAPTCHA Enterprise key.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #delete_firewall_policy

    def delete_firewall_policy(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_firewall_policy(name: nil) -> ::Google::Protobuf::Empty

Deletes the specified firewall policy.
**Overloads**

    def delete_firewall_policy(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_firewall_policy` via a request object, either of type [DeleteFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-DeleteFirewallPolicyRequest "Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_firewall_policy(name: nil) -> ::Google::Protobuf::Empty

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). **Parameter**

- **name** (::String) --- Required. The name of the policy to be deleted, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #delete_key

    def delete_key(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_key(name: nil) -> ::Google::Protobuf::Empty

Deletes the specified key.
**Overloads**

    def delete_key(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_key` via a request object, either of type [DeleteKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-DeleteKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_key(name: nil) -> ::Google::Protobuf::Empty

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). **Parameter**

- **name** (::String) --- Required. The name of the key to be deleted, in the format `projects/{project}/keys/{key}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #get_firewall_policy

    def get_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
    def get_firewall_policy(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Returns the specified firewall policy.
**Overloads**

    def get_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Pass arguments to `get_firewall_policy` via a request object, either of type [GetFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-GetFirewallPolicyRequest "Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_firewall_policy(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

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). **Parameter**

- **name** (::String) --- Required. The name of the requested policy, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #get_key

    def get_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
    def get_key(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Returns the specified key.
**Overloads**

    def get_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Pass arguments to `get_key` via a request object, either of type [GetKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-GetKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_key(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

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). **Parameter**

- **name** (::String) --- Required. The name of the requested key, in the format `projects/{project}/keys/{key}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #get_metrics

    def get_metrics(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
    def get_metrics(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics

Get some aggregated metrics for a Key. This data can be used to build
dashboards.
**Overloads**

    def get_metrics(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics

Pass arguments to `get_metrics` via a request object, either of type [GetMetricsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-GetMetricsRequest "Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_metrics(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics

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). **Parameter**

- **name** (::String) --- Required. The name of the requested metrics, in the format `projects/{project}/keys/{key}/metrics`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Metrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Metrics))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Metrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Metrics))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new RecaptchaEnterpriseService client object.
**Yields**

- (config) --- Configure the RecaptchaEnterpriseService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client)) --- a new instance of Client
**Example**

```ruby
# 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
```

### #list_firewall_policies

    def list_firewall_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>
    def list_firewall_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>

Returns the list of all firewall policies that belong to a project.
**Overloads**

    def list_firewall_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>

Pass arguments to `list_firewall_policies` via a request object, either of type [ListFirewallPoliciesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ListFirewallPoliciesRequest "Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_firewall_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>

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). **Parameters**

- **parent** (::String) --- Required. The name of the project to list the policies for, in the format `projects/{project}`.
- **page_size** (::Integer) --- Optional. The maximum number of policies to return. Default is 10. Max limit is 1000.
- **page_token** (::String) --- Optional. The next_page_token value returned from a previous. ListFirewallPoliciesRequest, if any.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #list_ip_overrides

    def list_ip_overrides(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>
    def list_ip_overrides(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>

Lists all IP overrides for a key.
**Overloads**

    def list_ip_overrides(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>

Pass arguments to `list_ip_overrides` via a request object, either of type [ListIpOverridesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ListIpOverridesRequest "Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_ip_overrides(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>

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). **Parameters**

- **parent** (::String) --- Required. The parent key for which the IP overrides are listed, in the format `projects/{project}/keys/{key}`.
- **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.
- **page_token** (::String) --- Optional. The next_page_token value returned from a previous ListIpOverridesRequest, if any.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-IpOverrideData)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-IpOverrideData)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #list_keys

    def list_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
    def list_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>

Returns the list of all keys that belong to a project.
**Overloads**

    def list_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>

Pass arguments to `list_keys` via a request object, either of type [ListKeysRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ListKeysRequest "Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>

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). **Parameters**

- **parent** (::String) --- Required. The name of the project that contains the keys that is listed, in the format `projects/{project}`.
- **page_size** (::Integer) --- Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.
- **page_token** (::String) --- Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #list_related_account_group_memberships

    def list_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
    def list_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

Get memberships in a group of related accounts.
**Overloads**

    def list_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

Pass arguments to `list_related_account_group_memberships` via a request object, either of type [ListRelatedAccountGroupMembershipsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ListRelatedAccountGroupMembershipsRequest "Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

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). **Parameters**

- **parent** (::String) --- Required. The resource name for the related account group in the format `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
- **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.
- **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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroupMembership)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroupMembership)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #list_related_account_groups

    def list_related_account_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
    def list_related_account_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>

List groups of related accounts.
**Overloads**

    def list_related_account_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>

Pass arguments to `list_related_account_groups` via a request object, either of type [ListRelatedAccountGroupsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ListRelatedAccountGroupsRequest "Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_related_account_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>

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). **Parameters**

- **parent** (::String) --- Required. The name of the project to list related account groups from, in the format `projects/{project}`.
- **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.
- **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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroup)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroup)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #migrate_key

    def migrate_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
    def migrate_key(name: nil, skip_billing_check: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

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.
**Overloads**

    def migrate_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Pass arguments to `migrate_key` via a request object, either of type [MigrateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-MigrateKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def migrate_key(name: nil, skip_billing_check: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

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). **Parameters**

- **name** (::String) --- Required. The name of the key to be migrated, in the format `projects/{project}/keys/{key}`.
- **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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #remove_ip_override

    def remove_ip_override(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse
    def remove_ip_override(name: nil, ip_override_data: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse

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.
**Overloads**

    def remove_ip_override(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse

Pass arguments to `remove_ip_override` via a request object, either of type [Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RemoveIpOverrideRequest "Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def remove_ip_override(name: nil, ip_override_data: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse

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). **Parameters**

- **name** (::String) --- Required. The name of the key from which the IP override is removed, in the format `projects/{project}/keys/{key}`.
- **ip_override_data** ([::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-IpOverrideData), ::Hash) --- Required. IP override to be removed from the key.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RemoveIpOverrideResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RemoveIpOverrideResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #reorder_firewall_policies

    def reorder_firewall_policies(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse
    def reorder_firewall_policies(parent: nil, names: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse

Reorders all firewall policies.
**Overloads**

    def reorder_firewall_policies(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse

Pass arguments to `reorder_firewall_policies` via a request object, either of type [Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ReorderFirewallPoliciesRequest "Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def reorder_firewall_policies(parent: nil, names: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse

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). **Parameters**

- **parent** (::String) --- Required. The name of the project to list the policies for, in the format `projects/{project}`.
- **names** (::Array\<::String\>) --- Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ReorderFirewallPoliciesResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-ReorderFirewallPoliciesResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #retrieve_legacy_secret_key

    def retrieve_legacy_secret_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
    def retrieve_legacy_secret_key(key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse

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.
**Overloads**

    def retrieve_legacy_secret_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse

Pass arguments to `retrieve_legacy_secret_key` via a request object, either of type [Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RetrieveLegacySecretKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def retrieve_legacy_secret_key(key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse

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). **Parameter**

- **key** (::String) --- Required. The public key name linked to the requested secret key in the format `projects/{project}/keys/{key}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RetrieveLegacySecretKeyResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RetrieveLegacySecretKeyResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #search_related_account_group_memberships

    def search_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
    def search_related_account_group_memberships(project: nil, account_id: nil, hashed_account_id: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

Search group memberships related to a given account.
**Overloads**

    def search_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

Pass arguments to `search_related_account_group_memberships` via a request object, either of type [SearchRelatedAccountGroupMembershipsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-SearchRelatedAccountGroupMembershipsRequest "Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def search_related_account_group_memberships(project: nil, account_id: nil, hashed_account_id: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>

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). **Parameters**

- **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}`.
- **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.
- **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.
- **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.
- **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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroupMembership)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RelatedAccountGroupMembership)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_firewall_policy

    def update_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
    def update_firewall_policy(firewall_policy: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Updates the specified firewall policy.
**Overloads**

    def update_firewall_policy(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

Pass arguments to `update_firewall_policy` via a request object, either of type [UpdateFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-UpdateFirewallPolicyRequest "Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_firewall_policy(firewall_policy: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy

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). **Parameters**

- **firewall_policy** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy), ::Hash) --- Required. The policy to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-FirewallPolicy))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```

### #update_key

    def update_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
    def update_key(key: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Updates the specified key.
**Overloads**

    def update_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

Pass arguments to `update_key` via a request object, either of type [UpdateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-UpdateKeyRequest "Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_key(key: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key

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). **Parameters**

- **key** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key), ::Hash) --- Required. The key to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-Key))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
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
```