# Google Cloud Video Live Stream V1 Client - Class RetentionConfig (1.4.0)

1.4.0 (latest) 1.3.2 1.2.1 1.1.3 1.0.0 0.7.5 0.6.2 0.5.0 0.4.2 0.3.2 0.2.6 Reference documentation and code samples for the Google Cloud Video Live Stream V1 Client class RetentionConfig.

Configuration for retention of output files.

Generated from protobuf message `google.cloud.video.livestream.v1.RetentionConfig`

## Namespace

Google \\ Cloud \\ Video \\ LiveStream \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ retention_window_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` The minimum duration for which the output files from the channel will remain in the output bucket. After this duration, output files are deleted asynchronously. When the channel is deleted, all output files are deleted from the output bucket asynchronously. If omitted or set to zero, output files will remain in the output bucket based on [Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__), which defaults to 60s. If both retention_window_duration and [Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__) are set, retention_window_duration is used and [Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__) is ignored. |

### getRetentionWindowDuration

The minimum duration for which the output files from the channel will
remain in the output bucket. After this duration, output files are
deleted asynchronously.

When the channel is deleted, all output files are deleted from the output
bucket asynchronously.
If omitted or set to zero, output files will remain in the output bucket
based on
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__),
which defaults to 60s.
If both retention_window_duration and
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__)
are set, retention_window_duration is used and
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__)
is ignored.

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

### hasRetentionWindowDuration

### clearRetentionWindowDuration

### setRetentionWindowDuration

The minimum duration for which the output files from the channel will
remain in the output bucket. After this duration, output files are
deleted asynchronously.

When the channel is deleted, all output files are deleted from the output
bucket asynchronously.
If omitted or set to zero, output files will remain in the output bucket
based on
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__),
which defaults to 60s.
If both retention_window_duration and
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__)
are set, retention_window_duration is used and
[Manifest.segment_keep_duration](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Manifest#_Google_Cloud_Video_LiveStream_V1_Manifest__getSegmentKeepDuration__)
is ignored.

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

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