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

A key used to identify and configure applications (web and/or mobile) that
use reCAPTCHA Enterprise.

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

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`. |
| `↳ display_name` | `string` Required. Human-readable display name of this key. Modifiable by user. |
| `↳ web_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.WebKeySettings` Settings for keys that can be used by websites. |
| `↳ android_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AndroidKeySettings` Settings for keys that can be used by Android apps. |
| `↳ ios_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.IOSKeySettings` Settings for keys that can be used by iOS apps. |
| `↳ express_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.ExpressKeySettings` Settings for keys that can be used by reCAPTCHA Express. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. See [Creating and managing labels](https://cloud.google.com/recaptcha/docs/labels). |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp corresponding to the creation of this key. |
| `↳ testing_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TestingOptions` Optional. Options for user acceptance testing. |
| `↳ waf_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.WafSettings` Optional. Settings for Web Application Firewall (WAF). |

### getName

Identifier. The resource name for the Key in the format
`projects/{project}/keys/{key}`.

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

### setName

Identifier. The resource name for the Key in the format
`projects/{project}/keys/{key}`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getDisplayName

Required. Human-readable display name of this key. Modifiable by user.

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

### setDisplayName

Required. Human-readable display name of this key. Modifiable by user.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getWebSettings

Settings for keys that can be used by websites.

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

### hasWebSettings

### setWebSettings

Settings for keys that can be used by websites.

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

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

### getAndroidSettings

Settings for keys that can be used by Android apps.

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

### hasAndroidSettings

### setAndroidSettings

Settings for keys that can be used by Android apps.

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

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

### getIosSettings

Settings for keys that can be used by iOS apps.

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

### hasIosSettings

### setIosSettings

Settings for keys that can be used by iOS apps.

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

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

### getExpressSettings

Settings for keys that can be used by reCAPTCHA Express.

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

### hasExpressSettings

### setExpressSettings

Settings for keys that can be used by reCAPTCHA Express.

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

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

### getLabels

Optional. See [Creating and managing labels](https://cloud.google.com/recaptcha/docs/labels).

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

### setLabels

Optional. See [Creating and managing labels](https://cloud.google.com/recaptcha/docs/labels).

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

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

### getCreateTime

Output only. The timestamp corresponding to the creation of this key.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp corresponding to the creation of this key.

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

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

### getTestingOptions

Optional. Options for user acceptance testing.

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

### hasTestingOptions

### clearTestingOptions

### setTestingOptions

Optional. Options for user acceptance testing.

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

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

### getWafSettings

Optional. Settings for Web Application Firewall (WAF).

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

### hasWafSettings

### clearWafSettings

### setWafSettings

Optional. Settings for Web Application Firewall (WAF).

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

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

### getPlatformSettings

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