# Google Cloud BigQuery Analytics Hub V1 Client - Class PubSubTopicSource (1.5.1)

1.5.1 (latest) 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.4 0.5.3 0.4.0 0.3.2 0.2.2 0.1.6 Reference documentation and code samples for the Google Cloud BigQuery Analytics Hub V1 Client class PubSubTopicSource.

Pub/Sub topic source.

Generated from protobuf message `google.cloud.bigquery.analyticshub.v1.Listing.PubSubTopicSource`

## Namespace

Google \\ Cloud \\ BigQuery \\ AnalyticsHub \\ V1 \\ Listing

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ topic` | `string` Required. Resource name of the Pub/Sub topic source for this listing. e.g. projects/myproject/topics/topicId |
| `↳ data_affinity_regions` | `string[]` Optional. Region hint on where the data might be published. Data affinity regions are modifiable. See <https://cloud.google.com/about/locations> for full listing of possible Cloud regions. |

### getTopic

Required. Resource name of the Pub/Sub topic source for this listing.

e.g. projects/myproject/topics/topicId

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

### setTopic

Required. Resource name of the Pub/Sub topic source for this listing.

e.g. projects/myproject/topics/topicId

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

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

### getDataAffinityRegions

Optional. Region hint on where the data might be published. Data affinity
regions are modifiable. See <https://cloud.google.com/about/locations> for
full listing of possible Cloud regions.

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

### setDataAffinityRegions

Optional. Region hint on where the data might be published. Data affinity
regions are modifiable. See <https://cloud.google.com/about/locations> for
full listing of possible Cloud regions.

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

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