# Google Cloud Network Management V1 Client - Class Trace (2.9.2)

2.9.2 (latest) 2.9.1 2.8.0 2.7.0 2.6.1 2.5.0 2.4.2 2.3.2 2.2.1 2.1.1 2.0.1 1.7.3 1.5.0 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Management V1 Client class Trace.

Trace represents one simulated packet forwarding path.

- Each trace contains multiple ordered steps.
  - Each step is in a particular state with associated configuration.
  - State is categorized as final or non-final states.
  - Each final state has a reason associated.
  - Each trace must end with a final state (the last step). `php
    |---Trace---|
    Step1(State) Step2(State) --- StepN(State(final))`

Generated from protobuf message `google.cloud.networkmanagement.v1.Trace`

## Namespace

Google \\ Cloud \\ NetworkManagement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ endpoint_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.EndpointInfo` Derived from the source and destination endpoints definition specified by user request, and validated by the data plane model. If there are multiple traces starting from different source locations, then the endpoint_info may be different between traces. |
| `↳ steps` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.Step>` A trace of a test contains multiple steps from the initial state to the final state (delivered, dropped, forwarded, or aborted). The steps are ordered by the processing sequence within the simulated network state machine. It is critical to preserve the order of the steps and avoid reordering or sorting them. |
| `↳ forward_trace_id` | `int` ID of trace. For forward traces, this ID is unique for each trace. For return traces, it matches ID of associated forward trace. A single forward trace can be associated with none, one or more than one return trace. |

### getEndpointInfo

Derived from the source and destination endpoints definition specified by
user request, and validated by the data plane model.

If there are multiple traces starting from different source locations, then
the endpoint_info may be different between traces.

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

### hasEndpointInfo

### clearEndpointInfo

### setEndpointInfo

Derived from the source and destination endpoints definition specified by
user request, and validated by the data plane model.

If there are multiple traces starting from different source locations, then
the endpoint_info may be different between traces.

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

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

### getSteps

A trace of a test contains multiple steps from the initial state to the
final state (delivered, dropped, forwarded, or aborted).

The steps are ordered by the processing sequence within the simulated
network state machine. It is critical to preserve the order of the steps
and avoid reordering or sorting them.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.Step>` |   |

### setSteps

A trace of a test contains multiple steps from the initial state to the
final state (delivered, dropped, forwarded, or aborted).

The steps are ordered by the processing sequence within the simulated
network state machine. It is critical to preserve the order of the steps
and avoid reordering or sorting them.

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

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

### getForwardTraceId

ID of trace. For forward traces, this ID is unique for each trace. For
return traces, it matches ID of associated forward trace. A single forward
trace can be associated with none, one or more than one return trace.

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

### setForwardTraceId

ID of trace. For forward traces, this ID is unique for each trace. For
return traces, it matches ID of associated forward trace. A single forward
trace can be associated with none, one or more than one return trace.

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

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