# Google Cloud Video Stitcher V1 Client - Class VodSessionAd (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 VodSessionAd.

Metadata for an inserted ad in a VOD session.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Duration in seconds of the ad. |
| `↳ companion_ads` | `https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.CompanionAds` Metadata of companion ads associated with the ad. |
| `↳ activity_events` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.Event>` The list of progress tracking events for the ad break. These can be of the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, `CLOSE_LINEAR`, `SKIP`. |

### getDuration

Duration in seconds of the ad.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasDuration

### clearDuration

### setDuration

Duration in seconds of the ad.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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

### getCompanionAds

Metadata of companion ads associated with the ad.

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

### hasCompanionAds

### clearCompanionAds

### setCompanionAds

Metadata of companion ads associated with the ad.

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

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

### getActivityEvents

The list of progress tracking events for the ad break. These can be of
the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`,
`CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`,
`EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`,
`CLOSE_LINEAR`, `SKIP`.

| **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.Event>` |   |

### setActivityEvents

The list of progress tracking events for the ad break. These can be of
the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`,
`CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`,
`EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`,
`CLOSE_LINEAR`, `SKIP`.

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

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