# Interface HttpRoute.RouteRuleOrBuilder (0.49.0)

0.49.0 (latest) 0.47.0 0.44.0 0.43.0 0.41.0 0.39.0 0.38.0 0.36.0 0.34.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.26.0 0.24.0 0.23.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public static interface HttpRoute.RouteRuleOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAction()

    public abstract HttpRoute.RouteAction getAction()

The detailed rule defining how to route matched traffic.

`.google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.HttpRoute.RouteAction` | The action. |

### getActionOrBuilder()

    public abstract HttpRoute.RouteActionOrBuilder getActionOrBuilder()

The detailed rule defining how to route matched traffic.

`.google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.HttpRoute.RouteActionOrBuilder` |   |

### getMatches(int index)

    public abstract HttpRoute.RouteMatch getMatches(int index)

A list of matches define conditions used for matching the rule against
incoming HTTP requests. Each match is independent, i.e. this rule will be
matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match
traffic.

If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.

`repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.HttpRoute.RouteMatch` |   |

### getMatchesCount()

    public abstract int getMatchesCount()

A list of matches define conditions used for matching the rule against
incoming HTTP requests. Each match is independent, i.e. this rule will be
matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match
traffic.

If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.

`repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getMatchesList()

    public abstract List<HttpRoute.RouteMatch> getMatchesList()

A list of matches define conditions used for matching the rule against
incoming HTTP requests. Each match is independent, i.e. this rule will be
matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match
traffic.

If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.

`repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.HttpRoute.RouteMatch>` |   |

### getMatchesOrBuilder(int index)

    public abstract HttpRoute.RouteMatchOrBuilder getMatchesOrBuilder(int index)

A list of matches define conditions used for matching the rule against
incoming HTTP requests. Each match is independent, i.e. this rule will be
matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match
traffic.

If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.

`repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.HttpRoute.RouteMatchOrBuilder` |   |

### getMatchesOrBuilderList()

    public abstract List<? extends HttpRoute.RouteMatchOrBuilder> getMatchesOrBuilderList()

A list of matches define conditions used for matching the rule against
incoming HTTP requests. Each match is independent, i.e. this rule will be
matched if ANY one of the matches is satisfied.

If no matches field is specified, this rule will unconditionally match
traffic.

If a default rule is desired to be configured, add a rule with no matches
specified to the end of the rules list.

`repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.networkservices.v1.HttpRoute.RouteMatchOrBuilder>` |   |

### hasAction()

    public abstract boolean hasAction()

The detailed rule defining how to route matched traffic.

`.google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the action field is set. |