Class ShipmentModel.BreakRule.Builder (1.9.0)

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

Deprecated: Use top level 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).

Protobuf type google.cloud.optimization.v1.ShipmentModel.BreakRule

Static Methods

getDescriptor()

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

Methods

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

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

Sequence of breaks. See the BreakRequest message.

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

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

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

public ShipmentModel.BreakRule.Builder addAllFrequencyConstraints(Iterable<? extends ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

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

addBreakRequests(ShipmentModel.BreakRule.BreakRequest value)

public ShipmentModel.BreakRule.Builder addBreakRequests(ShipmentModel.BreakRule.BreakRequest value)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
valueShipmentModel.BreakRule.BreakRequest
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addBreakRequests(ShipmentModel.BreakRule.BreakRequest.Builder builderForValue)

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

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
builderForValueShipmentModel.BreakRule.BreakRequest.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addBreakRequests(int index, ShipmentModel.BreakRule.BreakRequest value)

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

Sequence of breaks. See the BreakRequest message.

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

Parameters
NameDescription
indexint
valueShipmentModel.BreakRule.BreakRequest
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

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

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

Sequence of breaks. See the BreakRequest message.

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

Parameters
NameDescription
indexint
builderForValueShipmentModel.BreakRule.BreakRequest.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addBreakRequestsBuilder()

public ShipmentModel.BreakRule.BreakRequest.Builder addBreakRequestsBuilder()

Sequence of breaks. See the BreakRequest message.

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

Returns
TypeDescription
ShipmentModel.BreakRule.BreakRequest.Builder

addBreakRequestsBuilder(int index)

public ShipmentModel.BreakRule.BreakRequest.Builder addBreakRequestsBuilder(int index)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.BreakRequest.Builder

addFrequencyConstraints(ShipmentModel.BreakRule.FrequencyConstraint value)

public ShipmentModel.BreakRule.Builder addFrequencyConstraints(ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
valueShipmentModel.BreakRule.FrequencyConstraint
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addFrequencyConstraints(ShipmentModel.BreakRule.FrequencyConstraint.Builder builderForValue)

public ShipmentModel.BreakRule.Builder addFrequencyConstraints(ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
builderForValueShipmentModel.BreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addFrequencyConstraints(int index, ShipmentModel.BreakRule.FrequencyConstraint value)

public ShipmentModel.BreakRule.Builder addFrequencyConstraints(int index, ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
valueShipmentModel.BreakRule.FrequencyConstraint
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

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

public ShipmentModel.BreakRule.Builder addFrequencyConstraints(int index, ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
builderForValueShipmentModel.BreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

addFrequencyConstraintsBuilder()

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
ShipmentModel.BreakRule.FrequencyConstraint.Builder

addFrequencyConstraintsBuilder(int index)

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.FrequencyConstraint.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ShipmentModel.BreakRule build()
Returns
TypeDescription
ShipmentModel.BreakRule

buildPartial()

public ShipmentModel.BreakRule buildPartial()
Returns
TypeDescription
ShipmentModel.BreakRule

clear()

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

clearBreakRequests()

public ShipmentModel.BreakRule.Builder clearBreakRequests()

Sequence of breaks. See the BreakRequest message.

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

Returns
TypeDescription
ShipmentModel.BreakRule.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearFrequencyConstraints()

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
ShipmentModel.BreakRule.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getBreakRequests(int index)

public ShipmentModel.BreakRule.BreakRequest getBreakRequests(int index)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.BreakRequest

getBreakRequestsBuilder(int index)

public ShipmentModel.BreakRule.BreakRequest.Builder getBreakRequestsBuilder(int index)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.BreakRequest.Builder

getBreakRequestsBuilderList()

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

Sequence of breaks. See the BreakRequest message.

repeated .google.cloud.optimization.v1.ShipmentModel.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.ShipmentModel.BreakRule.BreakRequest break_requests = 1;

Returns
TypeDescription
int

getBreakRequestsList()

public List<ShipmentModel.BreakRule.BreakRequest> getBreakRequestsList()

Sequence of breaks. See the BreakRequest message.

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

Returns
TypeDescription
List<BreakRequest>

getBreakRequestsOrBuilder(int index)

public ShipmentModel.BreakRule.BreakRequestOrBuilder getBreakRequestsOrBuilder(int index)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.BreakRequestOrBuilder

getBreakRequestsOrBuilderList()

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

Sequence of breaks. See the BreakRequest message.

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

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

getDefaultInstanceForType()

public ShipmentModel.BreakRule getDefaultInstanceForType()
Returns
TypeDescription
ShipmentModel.BreakRule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFrequencyConstraints(int index)

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.FrequencyConstraint

getFrequencyConstraintsBuilder(int index)

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.FrequencyConstraint.Builder

getFrequencyConstraintsBuilderList()

public List<ShipmentModel.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.ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
int

getFrequencyConstraintsList()

public List<ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Returns
TypeDescription
List<FrequencyConstraint>

getFrequencyConstraintsOrBuilder(int index)

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.FrequencyConstraintOrBuilder

getFrequencyConstraintsOrBuilderList()

public List<? extends ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ShipmentModel.BreakRule other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeBreakRequests(int index)

public ShipmentModel.BreakRule.Builder removeBreakRequests(int index)

Sequence of breaks. See the BreakRequest message.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

removeFrequencyConstraints(int index)

public ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

setBreakRequests(int index, ShipmentModel.BreakRule.BreakRequest value)

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

Sequence of breaks. See the BreakRequest message.

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

Parameters
NameDescription
indexint
valueShipmentModel.BreakRule.BreakRequest
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

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

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

Sequence of breaks. See the BreakRequest message.

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

Parameters
NameDescription
indexint
builderForValueShipmentModel.BreakRule.BreakRequest.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFrequencyConstraints(int index, ShipmentModel.BreakRule.FrequencyConstraint value)

public ShipmentModel.BreakRule.Builder setFrequencyConstraints(int index, ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
valueShipmentModel.BreakRule.FrequencyConstraint
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

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

public ShipmentModel.BreakRule.Builder setFrequencyConstraints(int index, ShipmentModel.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.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;

Parameters
NameDescription
indexint
builderForValueShipmentModel.BreakRule.FrequencyConstraint.Builder
Returns
TypeDescription
ShipmentModel.BreakRule.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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