# Stackdriver Trace V2 Client - Class Annotation (2.0.0)

2.0.0 (latest) 2.0.0-RC1 1.9.5 1.8.10 1.7.0 1.6.5 1.5.3 1.4.11 Reference documentation and code samples for the Stackdriver Trace V2 Client class Annotation.

Text annotation with a set of attributes.

Generated from protobuf message `google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation`

## Namespace

Google \\ Cloud \\ Trace \\ V2 \\ Span \\ TimeEvent

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ description` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString` A user-supplied message describing the event. The maximum length for the description is 256 bytes. |
| `↳ attributes` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.Attributes` A set of attributes on the annotation. You can have up to 4 attributes per Annotation. |

### getDescription

A user-supplied message describing the event. The maximum length for
the description is 256 bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString|null` |   |

### hasDescription

### clearDescription

### setDescription

A user-supplied message describing the event. The maximum length for
the description is 256 bytes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.TruncatableString` |

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

### getAttributes

A set of attributes on the annotation. You can have up to 4 attributes
per Annotation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.Attributes|null` |   |

### hasAttributes

### clearAttributes

### setAttributes

A set of attributes on the annotation. You can have up to 4 attributes
per Annotation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.Attributes` |

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