# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::BreakRule (v0.16.0)

0.16.0 (latest) 0.15.0 0.14.1 0.13.0 0.12.0 0.11.1 0.10.0 0.9.2 0.8.2 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.1 0.1.1 Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::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).

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #break_requests

    def break_requests() -> ::Array<::Google::Cloud::Optimization::V1::BreakRule::BreakRequest>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::BreakRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-BreakRequest)\>) --- Sequence of breaks. See the `BreakRequest` message.

### #break_requests=

    def break_requests=(value) -> ::Array<::Google::Cloud::Optimization::V1::BreakRule::BreakRequest>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::BreakRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-BreakRequest)\>) --- Sequence of breaks. See the `BreakRequest` message.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::BreakRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-BreakRequest)\>) --- Sequence of breaks. See the `BreakRequest` message.

### #frequency_constraints

    def frequency_constraints() -> ::Array<::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-FrequencyConstraint)\>) --- Several `FrequencyConstraint` may apply. They must all be satisfied by the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.

### #frequency_constraints=

    def frequency_constraints=(value) -> ::Array<::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-FrequencyConstraint)\>) --- Several `FrequencyConstraint` may apply. They must all be satisfied by the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::BreakRule::FrequencyConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-BreakRule-FrequencyConstraint)\>) --- Several `FrequencyConstraint` may apply. They must all be satisfied by the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.