# reCAPTCHA Enterprise V1 API - Class Google::Cloud::RecaptchaEnterprise::V1::FirewallAction (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::FirewallAction.

An individual action. Each action represents what to do if a policy
matches.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allow

    def allow() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #allow=

    def allow=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::AllowAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #block

    def block() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #block=

    def block=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::BlockAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #include_recaptcha_script

    def include_recaptcha_script() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #include_recaptcha_script=

    def include_recaptcha_script=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::IncludeRecaptchaScriptAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #redirect

    def redirect() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #redirect=

    def redirect=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::RedirectAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #set_header

    def set_header() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #set_header=

    def set_header=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SetHeaderAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #substitute

    def substitute() -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction

**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.

### #substitute=

    def substitute=(value) -> ::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction

**Parameter**

- **value** ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.
**Returns**

- ([::Google::Cloud::RecaptchaEnterprise::V1::FirewallAction::SubstituteAction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/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.