# Google Cloud Asset V1 Client - Class PubsubDestination (2.3.3)

2.3.3 (latest) 2.3.2 2.2.3 2.1.3 2.0.1 1.16.4 1.14.1 1.13.2 1.12.2 1.11.3 1.10.2 1.9.2 Reference documentation and code samples for the Google Cloud Asset V1 Client class PubsubDestination.

A Pub/Sub destination.

Generated from protobuf message `google.cloud.asset.v1.PubsubDestination`

## Namespace

Google \\ Cloud \\ Asset \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ topic` | `string` The name of the Pub/Sub topic to publish to. Example: `projects/PROJECT_ID/topics/TOPIC_ID`. |

### getTopic

The name of the Pub/Sub topic to publish to.

Example: `projects/PROJECT_ID/topics/TOPIC_ID`.

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

### setTopic

The name of the Pub/Sub topic to publish to.

Example: `projects/PROJECT_ID/topics/TOPIC_ID`.

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

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