# Cloud Video Intelligence V1 Client - Class LabelAnnotation (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 LabelAnnotation.

Label annotation.

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

## Namespace

Google \\ Cloud \\ VideoIntelligence \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ entity` | `https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.Entity` Detected entity. |
| `↳ category_entities` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.Entity>` Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`. |
| `↳ segments` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelSegment>` All video segments where a label was detected. |
| `↳ frames` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.LabelFrame>` All video frames where a label was detected. |
| `↳ version` | `string` Feature version. |

### getEntity

Detected entity.

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

### hasEntity

### clearEntity

### setEntity

Detected entity.

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

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

### getCategoryEntities

Common categories for the detected entity.

For example, when the label is `Terrier`, the category is likely `dog`. And
in some cases there might be more than one categories e.g., `Terrier` could
also be a `pet`.

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

### setCategoryEntities

Common categories for the detected entity.

For example, when the label is `Terrier`, the category is likely `dog`. And
in some cases there might be more than one categories e.g., `Terrier` could
also be a `pet`.

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

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

### getSegments

All video segments where a label was detected.

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

### setSegments

All video segments where a label was detected.

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

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

### getFrames

All video frames where a label was detected.

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

### setFrames

All video frames where a label was detected.

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

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

### getVersion

Feature version.

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

### setVersion

Feature version.

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

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