# Google Cloud Eventarc V1 Client - Class ProjectSubscriptions (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 ProjectSubscriptions.

Config to enable subscribing to all events from a list of projects.

Generated from protobuf message `google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptions`

## Namespace

Google \\ Cloud \\ Eventarc \\ V1 \\ GoogleApiSource

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ list` | `string[]` Required. A list of projects to receive events from. All the projects must be in the same org. The listed projects should have the format project/{identifier} where identifier can be either the project id for project number. A single list may contain both formats. At most 100 projects can be listed. |

### getList

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have
the format project/{identifier} where identifier can be either the
project id for project number. A single list may contain both formats. At
most 100 projects can be listed.

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

### setList

Required. A list of projects to receive events from.

All the projects must be in the same org. The listed projects should have
the format project/{identifier} where identifier can be either the
project id for project number. A single list may contain both formats. At
most 100 projects can be listed.

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

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