Class BreakRule.Builder (1.2.0)

public static final class BreakRule.Builder extends GeneratedMessageV3.Builder<BreakRule.Builder> implements BreakRuleOrBuilder

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).

Protobuf type google.cloud.optimization.v1.BreakRule

Implements

BreakRuleOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllBreakRequests(Iterable<? extends BreakRule.BreakRequest> values)

public BreakRule.Builder addAllBreakRequests(Iterable<? extends BreakRule.BreakRequest> values)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.BreakRule.BreakRequest>
Returns
TypeDescription
BreakRule.Builder

addAllFrequencyConstraints(Iterable<? extends BreakRule.FrequencyConstraint> values)

public BreakRule.Builder addAllFrequencyConstraints(Iterable<? extends BreakRule.FrequencyConstraint> values)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.BreakRule.FrequencyConstraint>
Returns
TypeDescription
BreakRule.Builder

addBreakRequests(BreakRule.BreakRequest value)

public BreakRule.Builder addBreakRequests(BreakRule.BreakRequest value)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
valueBreakRule.BreakRequest
Returns
TypeDescription
BreakRule.Builder

addBreakRequests(BreakRule.BreakRequest.Builder builderForValue)

public BreakRule.Builder addBreakRequests(BreakRule.BreakRequest.Builder builderForValue)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
builderForValueBreakRule.BreakRequest.Builder
Returns
TypeDescription
BreakRule.Builder

addBreakRequests(int index, BreakRule.BreakRequest value)

public BreakRule.Builder addBreakRequests(int index, BreakRule.BreakRequest value)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameters
NameDescription
indexint
valueBreakRule.BreakRequest
Returns
TypeDescription
BreakRule.Builder

addBreakRequests(int index, BreakRule.BreakRequest.Builder builderForValue)

public BreakRule.Builder addBreakRequests(int index, BreakRule.BreakRequest.Builder builderForValue)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameters
NameDescription
indexint
builderForValueBreakRule.BreakRequest.Builder
Returns
TypeDescription
BreakRule.Builder

addBreakRequestsBuilder()

public BreakRule.BreakRequest.Builder addBreakRequestsBuilder()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
BreakRule.BreakRequest.Builder

addBreakRequestsBuilder(int index)

public BreakRule.BreakRequest.Builder addBreakRequestsBuilder(int index)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.BreakRequest.Builder

addFrequencyConstraints(BreakRule.FrequencyConstraint value)

public BreakRule.Builder addFrequencyConstraints(BreakRule.FrequencyConstraint value)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
valueBreakRule.FrequencyConstraint
Returns
TypeDescription
BreakRule.Builder

addFrequencyConstraints(BreakRule.FrequencyConstraint.Builder builderForValue)

public BreakRule.Builder addFrequencyConstraints(BreakRule.FrequencyConstraint.Builder builderForValue)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
builderForValueBreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
BreakRule.Builder

addFrequencyConstraints(int index, BreakRule.FrequencyConstraint value)

public BreakRule.Builder addFrequencyConstraints(int index, BreakRule.FrequencyConstraint value)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
valueBreakRule.FrequencyConstraint
Returns
TypeDescription
BreakRule.Builder

addFrequencyConstraints(int index, BreakRule.FrequencyConstraint.Builder builderForValue)

public BreakRule.Builder addFrequencyConstraints(int index, BreakRule.FrequencyConstraint.Builder builderForValue)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
builderForValueBreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
BreakRule.Builder

addFrequencyConstraintsBuilder()

public BreakRule.FrequencyConstraint.Builder addFrequencyConstraintsBuilder()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
BreakRule.FrequencyConstraint.Builder

addFrequencyConstraintsBuilder(int index)

public BreakRule.FrequencyConstraint.Builder addFrequencyConstraintsBuilder(int index)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.FrequencyConstraint.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BreakRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BreakRule.Builder
Overrides

build()

public BreakRule build()
Returns
TypeDescription
BreakRule

buildPartial()

public BreakRule buildPartial()
Returns
TypeDescription
BreakRule

clear()

public BreakRule.Builder clear()
Returns
TypeDescription
BreakRule.Builder
Overrides

clearBreakRequests()

public BreakRule.Builder clearBreakRequests()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
BreakRule.Builder

clearField(Descriptors.FieldDescriptor field)

public BreakRule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BreakRule.Builder
Overrides

clearFrequencyConstraints()

public BreakRule.Builder clearFrequencyConstraints()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
BreakRule.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BreakRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BreakRule.Builder
Overrides

clone()

public BreakRule.Builder clone()
Returns
TypeDescription
BreakRule.Builder
Overrides

getBreakRequests(int index)

public BreakRule.BreakRequest getBreakRequests(int index)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.BreakRequest

getBreakRequestsBuilder(int index)

public BreakRule.BreakRequest.Builder getBreakRequestsBuilder(int index)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.BreakRequest.Builder

getBreakRequestsBuilderList()

public List<BreakRule.BreakRequest.Builder> getBreakRequestsBuilderList()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
List<Builder>

getBreakRequestsCount()

public int getBreakRequestsCount()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
int

getBreakRequestsList()

public List<BreakRule.BreakRequest> getBreakRequestsList()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
List<BreakRequest>

getBreakRequestsOrBuilder(int index)

public BreakRule.BreakRequestOrBuilder getBreakRequestsOrBuilder(int index)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.BreakRequestOrBuilder

getBreakRequestsOrBuilderList()

public List<? extends BreakRule.BreakRequestOrBuilder> getBreakRequestsOrBuilderList()

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.BreakRule.BreakRequestOrBuilder>

getDefaultInstanceForType()

public BreakRule getDefaultInstanceForType()
Returns
TypeDescription
BreakRule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFrequencyConstraints(int index)

public BreakRule.FrequencyConstraint getFrequencyConstraints(int index)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.FrequencyConstraint

getFrequencyConstraintsBuilder(int index)

public BreakRule.FrequencyConstraint.Builder getFrequencyConstraintsBuilder(int index)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.FrequencyConstraint.Builder

getFrequencyConstraintsBuilderList()

public List<BreakRule.FrequencyConstraint.Builder> getFrequencyConstraintsBuilderList()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
List<Builder>

getFrequencyConstraintsCount()

public int getFrequencyConstraintsCount()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
int

getFrequencyConstraintsList()

public List<BreakRule.FrequencyConstraint> getFrequencyConstraintsList()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
List<FrequencyConstraint>

getFrequencyConstraintsOrBuilder(int index)

public BreakRule.FrequencyConstraintOrBuilder getFrequencyConstraintsOrBuilder(int index)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.FrequencyConstraintOrBuilder

getFrequencyConstraintsOrBuilderList()

public List<? extends BreakRule.FrequencyConstraintOrBuilder> getFrequencyConstraintsOrBuilderList()

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.BreakRule.FrequencyConstraintOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(BreakRule other)

public BreakRule.Builder mergeFrom(BreakRule other)
Parameter
NameDescription
otherBreakRule
Returns
TypeDescription
BreakRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BreakRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BreakRule.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BreakRule.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BreakRule.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BreakRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BreakRule.Builder
Overrides

removeBreakRequests(int index)

public BreakRule.Builder removeBreakRequests(int index)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.Builder

removeFrequencyConstraints(int index)

public BreakRule.Builder removeFrequencyConstraints(int index)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
BreakRule.Builder

setBreakRequests(int index, BreakRule.BreakRequest value)

public BreakRule.Builder setBreakRequests(int index, BreakRule.BreakRequest value)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameters
NameDescription
indexint
valueBreakRule.BreakRequest
Returns
TypeDescription
BreakRule.Builder

setBreakRequests(int index, BreakRule.BreakRequest.Builder builderForValue)

public BreakRule.Builder setBreakRequests(int index, BreakRule.BreakRequest.Builder builderForValue)

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1;

Parameters
NameDescription
indexint
builderForValueBreakRule.BreakRequest.Builder
Returns
TypeDescription
BreakRule.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public BreakRule.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BreakRule.Builder
Overrides

setFrequencyConstraints(int index, BreakRule.FrequencyConstraint value)

public BreakRule.Builder setFrequencyConstraints(int index, BreakRule.FrequencyConstraint value)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
valueBreakRule.FrequencyConstraint
Returns
TypeDescription
BreakRule.Builder

setFrequencyConstraints(int index, BreakRule.FrequencyConstraint.Builder builderForValue)

public BreakRule.Builder setFrequencyConstraints(int index, BreakRule.FrequencyConstraint.Builder builderForValue)

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

repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
builderForValueBreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
BreakRule.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BreakRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BreakRule.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BreakRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BreakRule.Builder
Overrides