# Google Cloud Video Live Stream V1 Client - Class Clip (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 Clip.

Clip is a sub-resource under channel. Each clip represents a clipping
operation that generates a VOD playlist from its channel given a set of
timestamp ranges.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the clip, in the following format: `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. `{clipId}` is a user-specified resource id that conforms to the following criteria: 1. 1 character minimum, 63 characters maximum 2. Only contains letters, digits, underscores, and hyphens |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation timestamp of the clip resource. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the clip request starts to be processed. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The update timestamp of the clip resource. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The labels associated with this resource. Each label is a key-value pair. |
| `↳ state` | `int` Output only. The state of the clip. |
| `↳ output_uri` | `string` Specify the `output_uri` to determine where to place the clip segments and clip manifest files in Cloud Storage. The manifests specified in `clip_manifests` fields will be placed under this URI. The exact URI of the generated manifests will be provided in `clip_manifests.output_uri` for each manifest. Example: "output_uri": "gs://my-bucket/clip-outputs" "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. An error object that describes the reason for the failure. This property only presents when `state` is `FAILED`. |
| `↳ slices` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Clip.Slice>` The specified ranges of segments to generate a clip. |
| `↳ clip_manifests` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.Clip.ClipManifest>` Required. A list of clip manifests. Currently only one clip manifest is allowed. |
| `↳ output_type` | `int` Optional. OutputType of the clip. If not specified, the default value is MANIFEST. |

### getName

The resource name of the clip, in the following format:
`projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.

`{clipId}` is a user-specified resource id that conforms to the following
criteria:

1. 1 character minimum, 63 characters maximum
2. Only contains letters, digits, underscores, and hyphens

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

### setName

The resource name of the clip, in the following format:
`projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.

`{clipId}` is a user-specified resource id that conforms to the following
criteria:

1. 1 character minimum, 63 characters maximum
2. Only contains letters, digits, underscores, and hyphens

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

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

### getCreateTime

Output only. The creation timestamp of the clip resource.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation timestamp of the clip resource.

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

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

### getStartTime

Output only. The timestamp when the clip request starts to be processed.

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

### hasStartTime

### clearStartTime

### setStartTime

Output only. The timestamp when the clip request starts to be processed.

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

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

### getUpdateTime

Output only. The update timestamp of the clip resource.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The update timestamp of the clip resource.

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

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

### getLabels

The labels associated with this resource. Each label is a key-value pair.

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

### setLabels

The labels associated with this resource. Each label is a key-value pair.

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

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

### getState

Output only. The state of the clip.

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

### setState

Output only. The state of the clip.

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

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

### getOutputUri

Specify the `output_uri` to determine where to place the clip segments and
clip manifest files in Cloud Storage. The manifests specified in
`clip_manifests` fields will be placed under this URI. The exact URI of the
generated manifests will be provided in `clip_manifests.output_uri` for
each manifest.

Example:
"output_uri": "gs://my-bucket/clip-outputs"
"clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8"

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

### setOutputUri

Specify the `output_uri` to determine where to place the clip segments and
clip manifest files in Cloud Storage. The manifests specified in
`clip_manifests` fields will be placed under this URI. The exact URI of the
generated manifests will be provided in `clip_manifests.output_uri` for
each manifest.

Example:
"output_uri": "gs://my-bucket/clip-outputs"
"clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8"

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

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

### getError

Output only. An error object that describes the reason for the failure.

This property only presents when `state` is `FAILED`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

Output only. An error object that describes the reason for the failure.

This property only presents when `state` is `FAILED`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getSlices

The specified ranges of segments to generate a clip.

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

### setSlices

The specified ranges of segments to generate a clip.

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

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

### getClipManifests

Required. A list of clip manifests. Currently only one clip manifest is
allowed.

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

### setClipManifests

Required. A list of clip manifests. Currently only one clip manifest is
allowed.

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

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

### getOutputType

Optional. OutputType of the clip. If not specified, the default value is
MANIFEST.

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

### setOutputType

Optional. OutputType of the clip. If not specified, the default value is
MANIFEST.

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

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