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.GeneratedMessageV3.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.GeneratedMessageV3.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 typegoogle.cloud.optimization.v1.Vehicle.LoadLimit
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vehicle.LoadLimit.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Vehicle.LoadLimitbuild()Vehicle.LoadLimitbuildPartial()Vehicle.LoadLimit.Builderclear()Vehicle.LoadLimit.BuilderclearCostPerUnitAboveSoftMax()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].Vehicle.LoadLimit.BuilderclearEndLoadInterval()The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Vehicle.LoadLimit.BuilderclearMaxLoad()The maximum acceptable amount of load.Vehicle.LoadLimit.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Vehicle.LoadLimit.BuilderclearSoftMaxLoad()A soft limit of the load.Vehicle.LoadLimit.BuilderclearStartLoadInterval()The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.Builderclone()doublegetCostPerUnitAboveSoftMax()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].Vehicle.LoadLimitgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Vehicle.LoadLimit.IntervalgetEndLoadInterval()The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.Interval.BuildergetEndLoadIntervalBuilder()The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.IntervalOrBuildergetEndLoadIntervalOrBuilder()The acceptable load interval of the vehicle at the end of the route.longgetMaxLoad()The maximum acceptable amount of load.longgetSoftMaxLoad()A soft limit of the load.Vehicle.LoadLimit.IntervalgetStartLoadInterval()The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.Interval.BuildergetStartLoadIntervalBuilder()The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.IntervalOrBuildergetStartLoadIntervalOrBuilder()The acceptable load interval of the vehicle at the start of the route.booleanhasEndLoadInterval()The acceptable load interval of the vehicle at the end of the route.booleanhasMaxLoad()The maximum acceptable amount of load.booleanhasStartLoadInterval()The acceptable load interval of the vehicle at the start of the route.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Vehicle.LoadLimit.BuildermergeEndLoadInterval(Vehicle.LoadLimit.Interval value)The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.BuildermergeFrom(Vehicle.LoadLimit other)Vehicle.LoadLimit.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Vehicle.LoadLimit.BuildermergeFrom(com.google.protobuf.Message other)Vehicle.LoadLimit.BuildermergeStartLoadInterval(Vehicle.LoadLimit.Interval value)The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Vehicle.LoadLimit.BuildersetCostPerUnitAboveSoftMax(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].Vehicle.LoadLimit.BuildersetEndLoadInterval(Vehicle.LoadLimit.Interval value)The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.BuildersetEndLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue)The acceptable load interval of the vehicle at the end of the route.Vehicle.LoadLimit.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Vehicle.LoadLimit.BuildersetMaxLoad(long value)The maximum acceptable amount of load.Vehicle.LoadLimit.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Vehicle.LoadLimit.BuildersetSoftMaxLoad(long value)A soft limit of the load.Vehicle.LoadLimit.BuildersetStartLoadInterval(Vehicle.LoadLimit.Interval value)The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.BuildersetStartLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue)The acceptable load interval of the vehicle at the start of the route.Vehicle.LoadLimit.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
clear
public 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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
getDefaultInstanceForType
public Vehicle.LoadLimit getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Vehicle.LoadLimit build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Vehicle.LoadLimit buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Vehicle.LoadLimit.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
setField
public Vehicle.LoadLimit.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
clearField
public Vehicle.LoadLimit.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
clearOneof
public Vehicle.LoadLimit.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
setRepeatedField
public Vehicle.LoadLimit.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
addRepeatedField
public Vehicle.LoadLimit.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
mergeFrom
public Vehicle.LoadLimit.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Vehicle.LoadLimit.Builder>
-
mergeFrom
public Vehicle.LoadLimit.Builder mergeFrom(Vehicle.LoadLimit other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public Vehicle.LoadLimit.Builder setMaxLoad(long value)
The maximum acceptable amount of load.
optional int64 max_load = 1;- Parameters:
value- The maxLoad to set.- Returns:
- This builder for chaining.
-
clearMaxLoad
public Vehicle.LoadLimit.Builder 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
public Vehicle.LoadLimit.Builder setSoftMaxLoad(long value)
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
public Vehicle.LoadLimit.Builder 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
public Vehicle.LoadLimit.Builder 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]. 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
public Vehicle.LoadLimit.Builder 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
public Vehicle.LoadLimit.Interval 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
public Vehicle.LoadLimit.Builder setStartLoadInterval(Vehicle.LoadLimit.Interval value)
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
public Vehicle.LoadLimit.Builder mergeStartLoadInterval(Vehicle.LoadLimit.Interval value)
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
public Vehicle.LoadLimit.Builder 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
public Vehicle.LoadLimit.Interval.Builder 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
public Vehicle.LoadLimit.IntervalOrBuilder 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
public Vehicle.LoadLimit.Interval 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
public Vehicle.LoadLimit.Builder setEndLoadInterval(Vehicle.LoadLimit.Interval value)
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
public Vehicle.LoadLimit.Builder mergeEndLoadInterval(Vehicle.LoadLimit.Interval value)
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
public Vehicle.LoadLimit.Builder 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
public Vehicle.LoadLimit.Interval.Builder 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
public Vehicle.LoadLimit.IntervalOrBuilder 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
-
setUnknownFields
public final Vehicle.LoadLimit.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
mergeUnknownFields
public final Vehicle.LoadLimit.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>
-
-