# Cloud Optimization v1 API - Class RouteModifiers (2.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.6.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.5.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.4.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.3.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.2.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.1.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.0.0/Google.Cloud.Optimization.V1.RouteModifiers)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/1.0.0-beta01/Google.Cloud.Optimization.V1.RouteModifiers)

    public sealed class RouteModifiers : IMessage<RouteModifiers>, IEquatable<RouteModifiers>, IDeepCloneable<RouteModifiers>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class RouteModifiers.

Encapsulates a set of optional conditions to satisfy when calculating
vehicle routes. This is similar to `RouteModifiers` in the Google Maps
Platform API; see:
<https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers>.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RouteModifiers

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RouteModifiers](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.RouteModifiers), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RouteModifiers](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.RouteModifiers), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RouteModifiers](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.RouteModifiers), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Optimization.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1)

## Assembly

Google.Cloud.Optimization.V1.dll

## Constructors

### RouteModifiers()

    public RouteModifiers()

### RouteModifiers(RouteModifiers)

    public RouteModifiers(RouteModifiers other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.RouteModifiers` |

## Properties

### AvoidFerries

    public bool AvoidFerries { get; set; }

Specifies whether to avoid ferries where reasonable. Preference will be
given to routes not containing travel by ferries. Applies only to motorized
travel modes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### AvoidHighways

    public bool AvoidHighways { get; set; }

Specifies whether to avoid highways where reasonable. Preference will be
given to routes not containing highways. Applies only to motorized travel
modes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### AvoidIndoor

    public bool AvoidIndoor { get; set; }

Optional. Specifies whether to avoid navigating indoors where reasonable.
Preference will be given to routes not containing indoor navigation.
Applies only to the `WALKING` travel mode.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### AvoidTolls

    public bool AvoidTolls { get; set; }

Specifies whether to avoid toll roads where reasonable. Preference will be
given to routes not containing toll roads. Applies only to motorized travel
modes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |