# Google Cloud Network Services V1 Client - Class RouteAction (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class RouteAction.

The specifications for routing traffic and applying associated policies.

Generated from protobuf message `google.cloud.networkservices.v1.TcpRoute.RouteAction`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1 \\ TcpRoute

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ destinations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.TcpRoute.RouteDestination>` Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set. |
| `↳ original_destination` | `bool` Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set. |
| `↳ idle_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled. |

### getDestinations

Optional. The destination services to which traffic should be forwarded.

At least one destination service is required. Only one of route
destination or original destination can be set.

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

### setDestinations

Optional. The destination services to which traffic should be forwarded.

At least one destination service is required. Only one of route
destination or original destination can be set.

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

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

### getOriginalDestination

Optional. If true, Router will use the destination IP and port of the
original connection as the destination of the request. Default is false.

Only one of route destinations or original destination can be set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setOriginalDestination

Optional. If true, Router will use the destination IP and port of the
original connection as the destination of the request. Default is false.

Only one of route destinations or original destination can be set.

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

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

### getIdleTimeout

Optional. Specifies the idle timeout for the selected route. The idle
timeout is defined as the period in which there are no bytes sent or
received on either the upstream or downstream connection. If not set, the
default idle timeout is 30 seconds. If set to 0s, the timeout will be
disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasIdleTimeout

### clearIdleTimeout

### setIdleTimeout

Optional. Specifies the idle timeout for the selected route. The idle
timeout is defined as the period in which there are no bytes sent or
received on either the upstream or downstream connection. If not set, the
default idle timeout is 30 seconds. If set to 0s, the timeout will be
disabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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