# Google Cloud Recaptcha Enterprise V1 Client - Class ChallengeSettings (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 ChallengeSettings.

Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is
triggered.

Generated from protobuf message `google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings`

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1 \\ WebKeySettings

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ default_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.WebKeySettings.ActionSettings` Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`). |
| `↳ action_settings` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see <https://cloud.google.com/recaptcha/docs/actions-website>). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100. |

### getDefaultSettings

Required. Defines when a challenge is triggered (unless the default
threshold is overridden for the given action, see `action_settings`).

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

### hasDefaultSettings

### clearDefaultSettings

### setDefaultSettings

Required. Defines when a challenge is triggered (unless the default
threshold is overridden for the given action, see `action_settings`).

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

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

### getActionSettings

Optional. The action to score threshold map.

The action name should be the same as the action name passed in the
`data-action` attribute
(see <https://cloud.google.com/recaptcha/docs/actions-website>).
Action names are case-insensitive.
There is a maximum of 100 action settings.
An action name has a maximum length of 100.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setActionSettings

Optional. The action to score threshold map.

The action name should be the same as the action name passed in the
`data-action` attribute
(see <https://cloud.google.com/recaptcha/docs/actions-website>).
Action names are case-insensitive.
There is a maximum of 100 action settings.
An action name has a maximum length of 100.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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