# Stackdriver Monitoring V3 Client - Class BasicSli (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 BasicSli.

An SLI measuring performance on a well-known service type. Performance will
be computed on the basis of pre-defined metrics. The type of the
`service_resource` determines the metrics to use and the
`service_resource.labels` and `metric_labels` are used to construct a
monitoring filter to filter that metric down to just the data relevant to
this service.

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

## Namespace

Google \\ Cloud \\ Monitoring \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ method` | `string[]` OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error. |
| `↳ location` | `string[]` OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error. |
| `↳ version` | `string[]` OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error. |
| `↳ availability` | `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.AvailabilityCriteria` Good service is defined to be the count of requests made to this service that return successfully. |
| `↳ latency` | `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.LatencyCriteria` Good service is defined to be the count of requests made to this service that are fast enough with respect to `latency.threshold`. |

### getMethod

OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from
other methods will not be used to calculate performance for this SLI. If
omitted, this SLI applies to all the Service's methods. For service types
that don't support breaking down by method, setting this field will result
in an error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setMethod

OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from
other methods will not be used to calculate performance for this SLI. If
omitted, this SLI applies to all the Service's methods. For service types
that don't support breaking down by method, setting this field will result
in an error.

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

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

### getLocation

OPTIONAL: The set of locations to which this SLI is relevant. Telemetry
from other locations will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all locations in which the Service has
activity. For service types that don't support breaking down by location,
setting this field will result in an error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setLocation

OPTIONAL: The set of locations to which this SLI is relevant. Telemetry
from other locations will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all locations in which the Service has
activity. For service types that don't support breaking down by location,
setting this field will result in an error.

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

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

### getVersion

OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry
from other API versions will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all API versions. For service types
that don't support breaking down by version, setting this field will result
in an error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setVersion

OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry
from other API versions will not be used to calculate performance for this
SLI. If omitted, this SLI applies to all API versions. For service types
that don't support breaking down by version, setting this field will result
in an error.

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

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

### getAvailability

Good service is defined to be the count of requests made to this service
that return successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.AvailabilityCriteria|null` |   |

### hasAvailability

### setAvailability

Good service is defined to be the count of requests made to this service
that return successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.AvailabilityCriteria` |

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

### getLatency

Good service is defined to be the count of requests made to this service
that are fast enough with respect to `latency.threshold`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.LatencyCriteria|null` |   |

### hasLatency

### setLatency

Good service is defined to be the count of requests made to this service
that are fast enough with respect to `latency.threshold`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-monitoring/latest/V3.BasicSli.LatencyCriteria` |

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

### getSliCriteria

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