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

A track of an object instance.

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

## Namespace

Google \\ Cloud \\ VideoIntelligence \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ segment` | `https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.VideoSegment` Video segment of a track. |
| `↳ timestamped_objects` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.TimestampedObject>` The object with timestamp and attributes per frame in the track. |
| `↳ attributes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-videointelligence/latest/V1.DetectedAttribute>` Optional. Attributes in the track level. |
| `↳ confidence` | `float` Optional. The confidence score of the tracked object. |

### getSegment

Video segment of a track.

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

### hasSegment

### clearSegment

### setSegment

Video segment of a track.

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

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

### getTimestampedObjects

The object with timestamp and attributes per frame in the track.

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

### setTimestampedObjects

The object with timestamp and attributes per frame in the track.

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

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

### getAttributes

Optional. Attributes in the track level.

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

### setAttributes

Optional. Attributes in the track level.

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

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

### getConfidence

Optional. The confidence score of the tracked object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setConfidence

Optional. The confidence score of the tracked object.

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

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