# Stackdriver Trace V2 Client - Class TimeEvents (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 TimeEvents.

A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
on the span, consisting of either user-supplied key:value pairs, or
details of a message sent/received between Spans.

Generated from protobuf message `google.devtools.cloudtrace.v2.Span.TimeEvents`

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ time_event` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.TimeEvent>` A collection of `TimeEvent`s. |
| `↳ dropped_annotations_count` | `int` The number of dropped annotations in all the included time events. If the value is 0, then no annotations were dropped. |
| `↳ dropped_message_events_count` | `int` The number of dropped message events in all the included time events. If the value is 0, then no message events were dropped. |

### getTimeEvent

A collection of `TimeEvent`s.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.TimeEvent>` |   |

### setTimeEvent

A collection of `TimeEvent`s.

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

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

### getDroppedAnnotationsCount

The number of dropped annotations in all the included time events.

If the value is 0, then no annotations were dropped.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setDroppedAnnotationsCount

The number of dropped annotations in all the included time events.

If the value is 0, then no annotations were dropped.

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

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

### getDroppedMessageEventsCount

The number of dropped message events in all the included time events.

If the value is 0, then no message events were dropped.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setDroppedMessageEventsCount

The number of dropped message events in all the included time events.

If the value is 0, then no message events were dropped.

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

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