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

    [Obsolete]
    public sealed class ShipmentModel.Types.BreakRule : IMessage<ShipmentModel.Types.BreakRule>, IEquatable<ShipmentModel.Types.BreakRule>, IDeepCloneable<ShipmentModel.Types.BreakRule>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class ShipmentModel.Types.BreakRule.

Deprecated: Use top level
\[BreakRule\]\[google.cloud.optimization.v1.ShipmentModel.BreakRule\] instead.
Rules to generate time breaks for a vehicle (e.g. lunch
breaks). A break is a contiguous period of time during which the vehicle
remains idle at its current position and cannot perform any visit. A break
may occur:

- during the travel between two visits (which includes the time right before or right after a visit, but not in the middle of a visit), in which case it extends the corresponding transit time between the visits
- before the vehicle start (the vehicle may not start in the middle of a break), in which case it does not affect the vehicle start time.
- after the vehicle end (ditto, with the vehicle end time).

## Inheritance

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

## Implements

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

### BreakRule()

    public BreakRule()

### BreakRule(BreakRule)

    public BreakRule(ShipmentModel.Types.BreakRule other)

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

## Properties

### BreakRequests

    public RepeatedField<ShipmentModel.Types.BreakRule.Types.BreakRequest> BreakRequests { get; }

Sequence of breaks. See the `BreakRequest` message.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModelhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRulehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRule.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRule.Types.BreakRequest` |   |

### FrequencyConstraints

    public RepeatedField<ShipmentModel.Types.BreakRule.Types.FrequencyConstraint> FrequencyConstraints { get; }

Several `FrequencyConstraint` may apply. They must all be satisfied by
the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModelhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRulehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRule.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Optimization.V1/latest/Google.Cloud.Optimization.V1.ShipmentModel.Types.BreakRule.Types.FrequencyConstraint` |   |