Class Vehicle.LoadLimit.Builder (1.46.0)

publicstaticfinalclass Vehicle.LoadLimit.BuilderextendsGeneratedMessageV3.Builder<Vehicle.LoadLimit.Builder>implementsVehicle.LoadLimitOrBuilder

Defines a load limit applying to a vehicle, e.g. "this truck may only carry up to 3500 kg". See load_limits.

Protobuf type google.cloud.optimization.v1.Vehicle.LoadLimit

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicVehicle.LoadLimit.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

build()

publicVehicle.LoadLimitbuild()
Returns
Type Description
Vehicle.LoadLimit

buildPartial()

publicVehicle.LoadLimitbuildPartial()
Returns
Type Description
Vehicle.LoadLimit

clear()

publicVehicle.LoadLimit.Builderclear()
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

clearCostPerUnitAboveSoftMax()

publicVehicle.LoadLimit.BuilderclearCostPerUnitAboveSoftMax()

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load)

  • cost_per_unit_above_soft_max. All costs add up and must be in the same unit as Shipment.penalty_cost.

double cost_per_unit_above_soft_max = 3;

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

clearEndLoadInterval()

publicVehicle.LoadLimit.BuilderclearEndLoadInterval()

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Returns
Type Description
Vehicle.LoadLimit.Builder

clearField(Descriptors.FieldDescriptor field)

publicVehicle.LoadLimit.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

clearMaxLoad()

publicVehicle.LoadLimit.BuilderclearMaxLoad()

The maximum acceptable amount of load.

optional int64 max_load = 1;

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicVehicle.LoadLimit.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

clearSoftMaxLoad()

publicVehicle.LoadLimit.BuilderclearSoftMaxLoad()

A soft limit of the load. See cost_per_unit_above_soft_max.

int64 soft_max_load = 2;

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

clearStartLoadInterval()

publicVehicle.LoadLimit.BuilderclearStartLoadInterval()

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Returns
Type Description
Vehicle.LoadLimit.Builder

clone()

publicVehicle.LoadLimit.Builderclone()
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

getCostPerUnitAboveSoftMax()

publicdoublegetCostPerUnitAboveSoftMax()

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load)

  • cost_per_unit_above_soft_max. All costs add up and must be in the same unit as Shipment.penalty_cost.

double cost_per_unit_above_soft_max = 3;

Returns
Type Description
double

The costPerUnitAboveSoftMax.

getDefaultInstanceForType()

publicVehicle.LoadLimitgetDefaultInstanceForType()
Returns
Type Description
Vehicle.LoadLimit

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndLoadInterval()

publicVehicle.LoadLimit.IntervalgetEndLoadInterval()

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Returns
Type Description
Vehicle.LoadLimit.Interval

The endLoadInterval.

getEndLoadIntervalBuilder()

publicVehicle.LoadLimit.Interval.BuildergetEndLoadIntervalBuilder()

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Returns
Type Description
Vehicle.LoadLimit.Interval.Builder

getEndLoadIntervalOrBuilder()

publicVehicle.LoadLimit.IntervalOrBuildergetEndLoadIntervalOrBuilder()

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Returns
Type Description
Vehicle.LoadLimit.IntervalOrBuilder

getMaxLoad()

publiclonggetMaxLoad()

The maximum acceptable amount of load.

optional int64 max_load = 1;

Returns
Type Description
long

The maxLoad.

getSoftMaxLoad()

publiclonggetSoftMaxLoad()

A soft limit of the load. See cost_per_unit_above_soft_max.

int64 soft_max_load = 2;

Returns
Type Description
long

The softMaxLoad.

getStartLoadInterval()

publicVehicle.LoadLimit.IntervalgetStartLoadInterval()

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Returns
Type Description
Vehicle.LoadLimit.Interval

The startLoadInterval.

getStartLoadIntervalBuilder()

publicVehicle.LoadLimit.Interval.BuildergetStartLoadIntervalBuilder()

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Returns
Type Description
Vehicle.LoadLimit.Interval.Builder

getStartLoadIntervalOrBuilder()

publicVehicle.LoadLimit.IntervalOrBuildergetStartLoadIntervalOrBuilder()

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Returns
Type Description
Vehicle.LoadLimit.IntervalOrBuilder

hasEndLoadInterval()

publicbooleanhasEndLoadInterval()

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Returns
Type Description
boolean

Whether the endLoadInterval field is set.

hasMaxLoad()

publicbooleanhasMaxLoad()

The maximum acceptable amount of load.

optional int64 max_load = 1;

Returns
Type Description
boolean

Whether the maxLoad field is set.

hasStartLoadInterval()

publicbooleanhasStartLoadInterval()

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Returns
Type Description
boolean

Whether the startLoadInterval field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeEndLoadInterval(Vehicle.LoadLimit.Interval value)

publicVehicle.LoadLimit.BuildermergeEndLoadInterval(Vehicle.LoadLimit.Intervalvalue)

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Parameter
Name Description
value Vehicle.LoadLimit.Interval
Returns
Type Description
Vehicle.LoadLimit.Builder

mergeFrom(Vehicle.LoadLimit other)

publicVehicle.LoadLimit.BuildermergeFrom(Vehicle.LoadLimitother)
Parameter
Name Description
other Vehicle.LoadLimit
Returns
Type Description
Vehicle.LoadLimit.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicVehicle.LoadLimit.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicVehicle.LoadLimit.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

mergeStartLoadInterval(Vehicle.LoadLimit.Interval value)

publicVehicle.LoadLimit.BuildermergeStartLoadInterval(Vehicle.LoadLimit.Intervalvalue)

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Parameter
Name Description
value Vehicle.LoadLimit.Interval
Returns
Type Description
Vehicle.LoadLimit.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.LoadLimit.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

setCostPerUnitAboveSoftMax(double value)

publicVehicle.LoadLimit.BuildersetCostPerUnitAboveSoftMax(doublevalue)

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load)

  • cost_per_unit_above_soft_max. All costs add up and must be in the same unit as Shipment.penalty_cost.

double cost_per_unit_above_soft_max = 3;

Parameter
Name Description
value double

The costPerUnitAboveSoftMax to set.

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

setEndLoadInterval(Vehicle.LoadLimit.Interval value)

publicVehicle.LoadLimit.BuildersetEndLoadInterval(Vehicle.LoadLimit.Intervalvalue)

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Parameter
Name Description
value Vehicle.LoadLimit.Interval
Returns
Type Description
Vehicle.LoadLimit.Builder

setEndLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue)

publicVehicle.LoadLimit.BuildersetEndLoadInterval(Vehicle.LoadLimit.Interval.BuilderbuilderForValue)

The acceptable load interval of the vehicle at the end of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5;

Parameter
Name Description
builderForValue Vehicle.LoadLimit.Interval.Builder
Returns
Type Description
Vehicle.LoadLimit.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicVehicle.LoadLimit.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

setMaxLoad(long value)

publicVehicle.LoadLimit.BuildersetMaxLoad(longvalue)

The maximum acceptable amount of load.

optional int64 max_load = 1;

Parameter
Name Description
value long

The maxLoad to set.

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

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

publicVehicle.LoadLimit.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

setSoftMaxLoad(long value)

publicVehicle.LoadLimit.BuildersetSoftMaxLoad(longvalue)

A soft limit of the load. See cost_per_unit_above_soft_max.

int64 soft_max_load = 2;

Parameter
Name Description
value long

The softMaxLoad to set.

Returns
Type Description
Vehicle.LoadLimit.Builder

This builder for chaining.

setStartLoadInterval(Vehicle.LoadLimit.Interval value)

publicVehicle.LoadLimit.BuildersetStartLoadInterval(Vehicle.LoadLimit.Intervalvalue)

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Parameter
Name Description
value Vehicle.LoadLimit.Interval
Returns
Type Description
Vehicle.LoadLimit.Builder

setStartLoadInterval(Vehicle.LoadLimit.Interval.Builder builderForValue)

publicVehicle.LoadLimit.BuildersetStartLoadInterval(Vehicle.LoadLimit.Interval.BuilderbuilderForValue)

The acceptable load interval of the vehicle at the start of the route.

.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4;

Parameter
Name Description
builderForValue Vehicle.LoadLimit.Interval.Builder
Returns
Type Description
Vehicle.LoadLimit.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.LoadLimit.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.