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

Metrics for a single Key.

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

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The name of the metrics, in the format `projects/{project}/keys/{key}/metrics`. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) timezone. |
| `↳ score_metrics` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.ScoreMetrics>` Metrics are continuous and in order by dates, and in the granularity of day. All Key types should have score-based data. |
| `↳ challenge_metrics` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.ChallengeMetrics>` Metrics are continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have challenge-based data. |

### getName

Output only. Identifier. The name of the metrics, in the format
`projects/{project}/keys/{key}/metrics`.

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

### setName

Output only. Identifier. The name of the metrics, in the format
`projects/{project}/keys/{key}/metrics`.

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

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

### getStartTime

Inclusive start time aligned to a day in the America/Los_Angeles (Pacific)
timezone.

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

### hasStartTime

### clearStartTime

### setStartTime

Inclusive start time aligned to a day in the America/Los_Angeles (Pacific)
timezone.

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

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

### getScoreMetrics

Metrics are continuous and in order by dates, and in the granularity
of day. All Key types should have score-based data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.ScoreMetrics>` |   |

### setScoreMetrics

Metrics are continuous and in order by dates, and in the granularity
of day. All Key types should have score-based data.

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

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

### getChallengeMetrics

Metrics are continuous and in order by dates, and in the granularity
of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have
challenge-based data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.ChallengeMetrics>` |   |

### setChallengeMetrics

Metrics are continuous and in order by dates, and in the granularity
of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have
challenge-based data.

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

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