# Google Cloud Recaptcha Enterprise V1 Client - Class FirewallAction (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.3 2.0.1 1.17.2 1.16.1 1.15.0 1.14.0 1.13.0 1.12.2 1.8.0 1.7.0 1.6.0 1.5.2 1.4.2 1.3.2 1.2.6 Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class FirewallAction.

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

Generated from protobuf message `google.cloud.recaptchaenterprise.v1.FirewallAction`

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ allow` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.AllowAction` The user request did not match any policy and should be allowed access to the requested resource. |
| `↳ block` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.BlockAction` This action denies access to a given page. The user gets an HTTP error code. |
| `↳ include_recaptcha_script` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.IncludeRecaptchaScriptAction` This action injects reCAPTCHA JavaScript code into the HTML page returned by the site backend. |
| `↳ redirect` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.RedirectAction` This action redirects the request to a reCAPTCHA interstitial to attach a token. |
| `↳ substitute` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SubstituteAction` This action transparently serves a different page to an offending user. |
| `↳ set_header` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SetHeaderAction` This action sets a custom header but allow the request to continue to the customer backend. |

### getAllow

The user request did not match any policy and should be allowed
access to the requested resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.AllowAction|null` |   |

### hasAllow

### setAllow

The user request did not match any policy and should be allowed
access to the requested resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.AllowAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBlock

This action denies access to a given page. The user gets an HTTP
error code.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.BlockAction|null` |   |

### hasBlock

### setBlock

This action denies access to a given page. The user gets an HTTP
error code.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.BlockAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIncludeRecaptchaScript

This action injects reCAPTCHA JavaScript code into the HTML page
returned by the site backend.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.IncludeRecaptchaScriptAction|null` |   |

### hasIncludeRecaptchaScript

### setIncludeRecaptchaScript

This action injects reCAPTCHA JavaScript code into the HTML page
returned by the site backend.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.IncludeRecaptchaScriptAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRedirect

This action redirects the request to a reCAPTCHA interstitial to
attach a token.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.RedirectAction|null` |   |

### hasRedirect

### setRedirect

This action redirects the request to a reCAPTCHA interstitial to
attach a token.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.RedirectAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSubstitute

This action transparently serves a different page to an offending
user.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SubstituteAction|null` |   |

### hasSubstitute

### setSubstitute

This action transparently serves a different page to an offending
user.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SubstituteAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSetHeader

This action sets a custom header but allow the request to continue
to the customer backend.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SetHeaderAction|null` |   |

### hasSetHeader

### setSetHeader

This action sets a custom header but allow the request to continue
to the customer backend.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallAction.SetHeaderAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFirewallActionOneof

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |