# Google Maps Route Optimization V1 Client - Class BreakRule (0.6.2)

0.6.2 (latest) 0.6.1 0.5.1 0.4.1 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Maps Route Optimization V1 Client class BreakRule.

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,
- or 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.

- or after the vehicle end (ditto, with the vehicle end time).

Generated from protobuf message `google.maps.routeoptimization.v1.BreakRule`

## Namespace

Google \\ Maps \\ RouteOptimization \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ break_requests` | `array<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.BreakRequest>` Sequence of breaks. See the `BreakRequest` message. |
| `↳ frequency_constraints` | `array<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.FrequencyConstraint>` Several `FrequencyConstraint` may apply. They must all be satisfied by the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. |

### getBreakRequests

Sequence of breaks. See the `BreakRequest` message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.BreakRequest>` |   |

### setBreakRequests

Sequence of breaks. See the `BreakRequest` message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.BreakRequest>` |

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

### getFrequencyConstraints

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.FrequencyConstraint>` |   |

### setFrequencyConstraints

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.BreakRule.FrequencyConstraint>` |

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