# Stackdriver Monitoring V3 Client - Class LatencyCriteria (2.2.2)

2.2.2 (latest) 2.2.1 2.1.2 2.0.1 1.12.1 1.11.1 1.10.3 1.9.0 1.8.0 1.7.1 1.6.0 1.5.1 1.4.0 1.3.2 1.2.2 Reference documentation and code samples for the Stackdriver Monitoring V3 Client class LatencyCriteria.

Parameters for a latency threshold SLI.

Generated from protobuf message `google.monitoring.v3.BasicSli.LatencyCriteria`

## Namespace

Google \\ Cloud \\ Monitoring \\ V3 \\ BasicSli

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ threshold` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Good service is defined to be the count of requests made to this service that return in no more than `threshold`. |

### getThreshold

Good service is defined to be the count of requests made to this service
that return in no more than `threshold`.

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

### hasThreshold

### clearThreshold

### setThreshold

Good service is defined to be the count of requests made to this service
that return in no more than `threshold`.

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

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