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

A collection of links, which are references from this span to a span
in the same or different trace.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ link` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V2.Span.Link>` A collection of links. |
| `↳ dropped_links_count` | `int` The number of dropped links after the maximum size was enforced. If this value is 0, then no links were dropped. |

### getLink

A collection of links.

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

### setLink

A collection of links.

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

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

### getDroppedLinksCount

The number of dropped links after the maximum size was enforced. If
this value is 0, then no links were dropped.

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

### setDroppedLinksCount

The number of dropped links after the maximum size was enforced. If
this value is 0, then no links were dropped.

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

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