# Google API Common Protos Client - Class MonitoringDestination (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class MonitoringDestination.

Configuration of a specific monitoring destination (the producer project
or the consumer project).

Generated from protobuf message `google.api.Monitoring.MonitoringDestination`

## Namespace

Google \\ Api \\ Monitoring

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ monitored_resource` | `string` The monitored resource type. The type must be defined in [Service.monitored_resources](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMonitoredResources__) section. |
| `↳ metrics` | `string[]` Types of the metrics to report to this monitoring destination. Each type must be defined in [Service.metrics](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMetrics__) section. |

### getMonitoredResource

The monitored resource type. The type must be defined in
[Service.monitored_resources](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMonitoredResources__)
section.

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

### setMonitoredResource

The monitored resource type. The type must be defined in
[Service.monitored_resources](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMonitoredResources__)
section.

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

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

### getMetrics

Types of the metrics to report to this monitoring destination.

Each type must be defined in
[Service.metrics](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMetrics__) section.

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

### setMetrics

Types of the metrics to report to this monitoring destination.

Each type must be defined in
[Service.metrics](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.Service#_Google_Api_Service__getMetrics__) section.

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

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