# Google Cloud Eventarc V1 Client - Class Destination (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.5 2.0.1 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Eventarc V1 Client class Destination.

Represents a target of an invocation over HTTP.

Generated from protobuf message `google.cloud.eventarc.v1.Destination`

## Namespace

Google \\ Cloud \\ Eventarc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ cloud_run` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.CloudRun` Cloud Run fully-managed resource that receives the events. The resource should be in the same project as the trigger. |
| `↳ cloud_function` | `string` The Cloud Function resource name. Cloud Functions V1 and V2 are supported. Format: `projects/{project}/locations/{location}/functions/{function}` This is a read-only field. Creating Cloud Functions V1/V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value. |
| `↳ gke` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.GKE` A GKE service capable of receiving events. The service should be running in the same project as the trigger. |
| `↳ workflow` | `string` The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format: `projects/{project}/locations/{location}/workflows/{workflow}` |
| `↳ http_endpoint` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.HttpEndpoint` An HTTP endpoint destination described by an URI. |
| `↳ network_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.NetworkConfig` Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type. |

### getCloudRun

Cloud Run fully-managed resource that receives the events. The resource
should be in the same project as the trigger.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.CloudRun|null` |   |

### hasCloudRun

### setCloudRun

Cloud Run fully-managed resource that receives the events. The resource
should be in the same project as the trigger.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.CloudRun` |

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

### getCloudFunction

The Cloud Function resource name. Cloud Functions V1 and V2 are
supported.

Format: `projects/{project}/locations/{location}/functions/{function}`
This is a read-only field. Creating Cloud Functions V1/V2 triggers is
only supported via the Cloud Functions product. An error will be returned
if the user sets this value.

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

### hasCloudFunction

### setCloudFunction

The Cloud Function resource name. Cloud Functions V1 and V2 are
supported.

Format: `projects/{project}/locations/{location}/functions/{function}`
This is a read-only field. Creating Cloud Functions V1/V2 triggers is
only supported via the Cloud Functions product. An error will be returned
if the user sets this value.

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

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

### getGke

A GKE service capable of receiving events. The service should be running
in the same project as the trigger.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.GKE|null` |   |

### hasGke

### setGke

A GKE service capable of receiving events. The service should be running
in the same project as the trigger.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.GKE` |

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

### getWorkflow

The resource name of the Workflow whose Executions are triggered by
the events. The Workflow resource should be deployed in the same project
as the trigger.

Format: `projects/{project}/locations/{location}/workflows/{workflow}`

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

### hasWorkflow

### setWorkflow

The resource name of the Workflow whose Executions are triggered by
the events. The Workflow resource should be deployed in the same project
as the trigger.

Format: `projects/{project}/locations/{location}/workflows/{workflow}`

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

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

### getHttpEndpoint

An HTTP endpoint destination described by an URI.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.HttpEndpoint|null` |   |

### hasHttpEndpoint

### setHttpEndpoint

An HTTP endpoint destination described by an URI.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.HttpEndpoint` |

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

### getNetworkConfig

Optional. Network config is used to configure how Eventarc resolves and
connect to a destination.

This should only be used with HttpEndpoint destination type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.NetworkConfig|null` |   |

### hasNetworkConfig

### clearNetworkConfig

### setNetworkConfig

Optional. Network config is used to configure how Eventarc resolves and
connect to a destination.

This should only be used with HttpEndpoint destination type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.NetworkConfig` |

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

### getDescriptor

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