# Cloud Video Intelligence V1 Client - Class VideoAnnotationResults (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.15.5 1.14.2 1.13.1 1.12.16 Reference documentation and code samples for the Cloud Video Intelligence V1 Client class VideoAnnotationResults.

Annotation results for a single video.

Generated from protobuf message `google.cloud.videointelligence.v1.VideoAnnotationResults`

## Namespace

Google \\ Cloud \\ VideoIntelligence \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ input_uri` | `string` Video file location in [Cloud Storage](https://cloud.google.com/storage/). |
| `↳ segment` | `https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.VideoSegment` Video segment on which the annotation is run. |
| `↳ segment_label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelAnnotation>` Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label. |
| `↳ segment_presence_label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelAnnotation>` Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to "builtin/latest" in the request. |
| `↳ shot_label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelAnnotation>` Topical label annotations on shot level. There is exactly one element for each unique label. |
| `↳ shot_presence_label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelAnnotation>` Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to "builtin/latest" in the request. |
| `↳ frame_label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelAnnotation>` Label annotations on frame level. There is exactly one element for each unique label. |
| `↳ face_annotations` | `array<FaceAnnotation>` Deprecated. Please use `face_detection_annotations` instead. |
| `↳ face_detection_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.FaceDetectionAnnotation>` Face detection annotations. |
| `↳ shot_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.VideoSegment>` Shot annotations. Each shot is represented as a video segment. |
| `↳ explicit_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.ExplicitContentAnnotation` Explicit content annotation. |
| `↳ speech_transcriptions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.SpeechTranscription>` Speech transcription. |
| `↳ text_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.TextAnnotation>` OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it. |
| `↳ object_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.ObjectTrackingAnnotation>` Annotations for list of objects detected and tracked in video. |
| `↳ logo_recognition_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LogoRecognitionAnnotation>` Annotations for list of logos detected, tracked and recognized in video. |
| `↳ person_detection_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.PersonDetectionAnnotation>` Person detection annotations. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail. |

### getInputUri

Video file location in
[Cloud Storage](https://cloud.google.com/storage/).

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

### setInputUri

Video file location in
[Cloud Storage](https://cloud.google.com/storage/).

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

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

### getSegment

Video segment on which the annotation is run.

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

### hasSegment

### clearSegment

### setSegment

Video segment on which the annotation is run.

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

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

### getSegmentLabelAnnotations

Topical label annotations on video level or user-specified segment level.

There is exactly one element for each unique label.

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

### setSegmentLabelAnnotations

Topical label annotations on video level or user-specified segment level.

There is exactly one element for each unique label.

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

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

### getSegmentPresenceLabelAnnotations

Presence label annotations on video level or user-specified segment level.

There is exactly one element for each unique label. Compared to the
existing topical `segment_label_annotations`, this field presents more
fine-grained, segment-level labels detected in video content and is made
available only when the client sets `LabelDetectionConfig.model` to
"builtin/latest" in the request.

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

### setSegmentPresenceLabelAnnotations

Presence label annotations on video level or user-specified segment level.

There is exactly one element for each unique label. Compared to the
existing topical `segment_label_annotations`, this field presents more
fine-grained, segment-level labels detected in video content and is made
available only when the client sets `LabelDetectionConfig.model` to
"builtin/latest" in the request.

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

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

### getShotLabelAnnotations

Topical label annotations on shot level.

There is exactly one element for each unique label.

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

### setShotLabelAnnotations

Topical label annotations on shot level.

There is exactly one element for each unique label.

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

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

### getShotPresenceLabelAnnotations

Presence label annotations on shot level. There is exactly one element for
each unique label. Compared to the existing topical
`shot_label_annotations`, this field presents more fine-grained, shot-level
labels detected in video content and is made available only when the client
sets `LabelDetectionConfig.model` to "builtin/latest" in the request.

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

### setShotPresenceLabelAnnotations

Presence label annotations on shot level. There is exactly one element for
each unique label. Compared to the existing topical
`shot_label_annotations`, this field presents more fine-grained, shot-level
labels detected in video content and is made available only when the client
sets `LabelDetectionConfig.model` to "builtin/latest" in the request.

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

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

### getFrameLabelAnnotations

Label annotations on frame level.

There is exactly one element for each unique label.

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

### setFrameLabelAnnotations

Label annotations on frame level.

There is exactly one element for each unique label.

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

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

### getFaceAnnotations

Deprecated. Please use `face_detection_annotations` instead.

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

### setFaceAnnotations

Deprecated. Please use `face_detection_annotations` instead.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<FaceAnnotation>` |

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

### getFaceDetectionAnnotations

Face detection annotations.

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

### setFaceDetectionAnnotations

Face detection annotations.

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

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

### getShotAnnotations

Shot annotations. Each shot is represented as a video segment.

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

### setShotAnnotations

Shot annotations. Each shot is represented as a video segment.

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

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

### getExplicitAnnotation

Explicit content annotation.

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

### hasExplicitAnnotation

### clearExplicitAnnotation

### setExplicitAnnotation

Explicit content annotation.

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

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

### getSpeechTranscriptions

Speech transcription.

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

### setSpeechTranscriptions

Speech transcription.

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

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

### getTextAnnotations

OCR text detection and tracking.

Annotations for list of detected text snippets. Each will have list of
frame information associated with it.

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

### setTextAnnotations

OCR text detection and tracking.

Annotations for list of detected text snippets. Each will have list of
frame information associated with it.

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

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

### getObjectAnnotations

Annotations for list of objects detected and tracked in video.

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

### setObjectAnnotations

Annotations for list of objects detected and tracked in video.

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

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

### getLogoRecognitionAnnotations

Annotations for list of logos detected, tracked and recognized in video.

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

### setLogoRecognitionAnnotations

Annotations for list of logos detected, tracked and recognized in video.

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

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

### getPersonDetectionAnnotations

Person detection annotations.

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

### setPersonDetectionAnnotations

Person detection annotations.

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

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

### getError

If set, indicates an error. Note that for a single `AnnotateVideoRequest`
some videos may succeed and some may fail.

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

### hasError

### clearError

### setError

If set, indicates an error. Note that for a single `AnnotateVideoRequest`
some videos may succeed and some may fail.

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

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