# Google Cloud Video Stitcher V1 Client - Class CompanionAds (1.2.0)

1.2.0 (latest) 1.1.2 1.0.4 0.9.1 0.8.4 0.7.3 0.6.2 0.5.1 0.3.4 Reference documentation and code samples for the Google Cloud Video Stitcher V1 Client class CompanionAds.

Metadata for companion ads.

Generated from protobuf message `google.cloud.video.stitcher.v1.CompanionAds`

## Namespace

Google \\ Cloud \\ Video \\ Stitcher \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ display_requirement` | `int` Indicates how many of the companions should be displayed with the ad. |
| `↳ companions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.Companion>` List of companion ads. |

### getDisplayRequirement

Indicates how many of the companions should be displayed with the ad.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DisplayRequirement](https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.CompanionAds.DisplayRequirement). |

### setDisplayRequirement

Indicates how many of the companions should be displayed with the ad.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [DisplayRequirement](https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.CompanionAds.DisplayRequirement). |

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

### getCompanions

List of companion ads.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.Companion>` |   |

### setCompanions

List of companion ads.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.Companion>` |

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