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

A well-known service type, defined by its service type and service labels.

Documentation and examples
[here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).

Generated from protobuf message `google.monitoring.v3.Service.BasicService`

## Namespace

Google \\ Cloud \\ Monitoring \\ V3 \\ Service

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ service_type` | `string` The type of service that this basic service defines, e.g. APP_ENGINE service type. Documentation and valid values [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). |
| `↳ service_labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels that specify the resource that emits the monitoring data which is used for SLO reporting of this `Service`. Documentation and valid values for given service types [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). |

### getServiceType

The type of service that this basic service defines, e.g.

APP_ENGINE service type.
Documentation and valid values
[here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).

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

### setServiceType

The type of service that this basic service defines, e.g.

APP_ENGINE service type.
Documentation and valid values
[here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).

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

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

### getServiceLabels

Labels that specify the resource that emits the monitoring data which
is used for SLO reporting of this `Service`.

Documentation and valid values for given service types
[here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).

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

### setServiceLabels

Labels that specify the resource that emits the monitoring data which
is used for SLO reporting of this `Service`.

Documentation and valid values for given service types
[here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).

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

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