# Cloud Optimization v1 API - Class Vehicle.Types.LoadLimit (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.Vehicle.Types.LoadLimit)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.6.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.5.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.4.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.3.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.2.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.1.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/2.0.0/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/1.0.0-beta01/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit)

    public sealed class Vehicle.Types.LoadLimit : IMessage<Vehicle.Types.LoadLimit>, IEquatable<Vehicle.Types.LoadLimit>, IDeepCloneable<Vehicle.Types.LoadLimit>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class Vehicle.Types.LoadLimit.

Defines a load limit applying to a vehicle, e.g. "this truck may only
carry up to 3500 kg". See
\[load_limits\]\[google.cloud.optimization.v1.Vehicle.load_limits\].

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Vehicle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types)[LoadLimit](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Vehicle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types)[LoadLimit](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Vehicle](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types)[LoadLimit](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit), [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

### LoadLimit()

    public LoadLimit()

### LoadLimit(LoadLimit)

    public LoadLimit(Vehicle.Types.LoadLimit other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehiclehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit` |

## Properties

### CostPerUnitAboveSoftMax

    public double CostPerUnitAboveSoftMax { get; set; }

If the load ever exceeds
\[soft_max_load\]\[google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load\]
along this vehicle's route, the following cost penalty applies (only once
per vehicle): (load -
\[soft_max_load\]\[google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load\])

- \[cost_per_unit_above_soft_max\]\[google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max\]. All costs add up and must be in the same unit as \[Shipment.penalty_cost\]\[google.cloud.optimization.v1.Shipment.penalty_cost\].

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

### EndLoadInterval

    public Vehicle.Types.LoadLimit.Types.Interval EndLoadInterval { get; set; }

The acceptable load interval of the vehicle at the end of the route.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehiclehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimithttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit.Types.Interval` |   |

### HasMaxLoad

    public bool HasMaxLoad { get; }

Gets whether the "max_load" field is set

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

### MaxLoad

    public long MaxLoad { get; set; }

The maximum acceptable amount of load.

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

### SoftMaxLoad

    public long SoftMaxLoad { get; set; }

A soft limit of the load. See
\[cost_per_unit_above_soft_max\]\[google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max\].

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

### StartLoadInterval

    public Vehicle.Types.LoadLimit.Types.Interval StartLoadInterval { get; set; }

The acceptable load interval of the vehicle at the start of the route.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehiclehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimithttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.Vehicle.Types.LoadLimit.Types.Interval` |   |