Package com.google.cloud.optimization.v1
Class Vehicle.LoadLimit.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
com.google.cloud.optimization.v1.Vehicle.LoadLimit.Builder
- All Implemented Interfaces:
Vehicle.LoadLimitOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Vehicle.LoadLimit
public static final class Vehicle.LoadLimit.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
implements Vehicle.LoadLimitOrBuilder
Defines a load limit applying to a vehicle, e.g. "this truck may only carry up to 3500 kg". See [load_limits][google.cloud.optimization.v1.Vehicle.load_limits].Protobuf type
google.cloud.optimization.v1.Vehicle.LoadLimit-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].The acceptable load interval of the vehicle at the end of the route.The maximum acceptable amount of load.A soft limit of the load.The acceptable load interval of the vehicle at the start of the route.doubleIf the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe acceptable load interval of the vehicle at the end of the route.The acceptable load interval of the vehicle at the end of the route.The acceptable load interval of the vehicle at the end of the route.longThe maximum acceptable amount of load.longA soft limit of the load.The acceptable load interval of the vehicle at the start of the route.The acceptable load interval of the vehicle at the start of the route.The acceptable load interval of the vehicle at the start of the route.booleanThe acceptable load interval of the vehicle at the end of the route.booleanThe maximum acceptable amount of load.booleanThe acceptable load interval of the vehicle at the start of the route.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanThe acceptable load interval of the vehicle at the end of the route.mergeFrom(Vehicle.LoadLimit other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The acceptable load interval of the vehicle at the start of the route.setCostPerUnitAboveSoftMax(double value) If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].The acceptable load interval of the vehicle at the end of the route.setEndLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue) The acceptable load interval of the vehicle at the end of the route.setMaxLoad(long value) The maximum acceptable amount of load.setSoftMaxLoad(long value) A soft limit of the load.The acceptable load interval of the vehicle at the start of the route.setStartLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue) The acceptable load interval of the vehicle at the start of the route.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Vehicle.LoadLimit.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Vehicle.LoadLimit.Builder>
-
mergeFrom
public Vehicle.LoadLimit.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Vehicle.LoadLimit.Builder>- Throws:
IOException
-
hasMaxLoad
public boolean hasMaxLoad()The maximum acceptable amount of load.
optional int64 max_load = 1;- Specified by:
hasMaxLoadin interfaceVehicle.LoadLimitOrBuilder- Returns:
- Whether the maxLoad field is set.
-
getMaxLoad
public long getMaxLoad()The maximum acceptable amount of load.
optional int64 max_load = 1;- Specified by:
getMaxLoadin interfaceVehicle.LoadLimitOrBuilder- Returns:
- The maxLoad.
-
setMaxLoad
The maximum acceptable amount of load.
optional int64 max_load = 1;- Parameters:
value- The maxLoad to set.- Returns:
- This builder for chaining.
-
clearMaxLoad
The maximum acceptable amount of load.
optional int64 max_load = 1;- Returns:
- This builder for chaining.
-
getSoftMaxLoad
public long getSoftMaxLoad()A soft limit of the load. See [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].
int64 soft_max_load = 2;- Specified by:
getSoftMaxLoadin interfaceVehicle.LoadLimitOrBuilder- Returns:
- The softMaxLoad.
-
setSoftMaxLoad
A soft limit of the load. See [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].
int64 soft_max_load = 2;- Parameters:
value- The softMaxLoad to set.- Returns:
- This builder for chaining.
-
clearSoftMaxLoad
A soft limit of the load. See [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].
int64 soft_max_load = 2;- Returns:
- This builder for chaining.
-
getCostPerUnitAboveSoftMax
public double getCostPerUnitAboveSoftMax()If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs add up and must be in the same unit as [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
double cost_per_unit_above_soft_max = 3;- Specified by:
getCostPerUnitAboveSoftMaxin interfaceVehicle.LoadLimitOrBuilder- Returns:
- The costPerUnitAboveSoftMax.
-
setCostPerUnitAboveSoftMax
If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs add up and must be in the same unit as [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
double cost_per_unit_above_soft_max = 3;- Parameters:
value- The costPerUnitAboveSoftMax to set.- Returns:
- This builder for chaining.
-
clearCostPerUnitAboveSoftMax
If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs add up and must be in the same unit as [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
double cost_per_unit_above_soft_max = 3;- Returns:
- This builder for chaining.
-
hasStartLoadInterval
public boolean hasStartLoadInterval()The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;- Specified by:
hasStartLoadIntervalin interfaceVehicle.LoadLimitOrBuilder- Returns:
- Whether the startLoadInterval field is set.
-
getStartLoadInterval
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;- Specified by:
getStartLoadIntervalin interfaceVehicle.LoadLimitOrBuilder- Returns:
- The startLoadInterval.
-
setStartLoadInterval
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; -
setStartLoadInterval
public Vehicle.LoadLimit.Builder setStartLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue) The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; -
mergeStartLoadInterval
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; -
clearStartLoadInterval
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; -
getStartLoadIntervalBuilder
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; -
getStartLoadIntervalOrBuilder
The acceptable load interval of the vehicle at the start of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;- Specified by:
getStartLoadIntervalOrBuilderin interfaceVehicle.LoadLimitOrBuilder
-
hasEndLoadInterval
public boolean hasEndLoadInterval()The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;- Specified by:
hasEndLoadIntervalin interfaceVehicle.LoadLimitOrBuilder- Returns:
- Whether the endLoadInterval field is set.
-
getEndLoadInterval
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;- Specified by:
getEndLoadIntervalin interfaceVehicle.LoadLimitOrBuilder- Returns:
- The endLoadInterval.
-
setEndLoadInterval
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; -
setEndLoadInterval
public Vehicle.LoadLimit.Builder setEndLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue) The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; -
mergeEndLoadInterval
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; -
clearEndLoadInterval
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; -
getEndLoadIntervalBuilder
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; -
getEndLoadIntervalOrBuilder
The acceptable load interval of the vehicle at the end of the route.
.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;- Specified by:
getEndLoadIntervalOrBuilderin interfaceVehicle.LoadLimitOrBuilder
-