Class Vehicle.LoadLimit.Builder (0.1.2)

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

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicVehicle.LoadLimitbuild()
Returns
Type Description

buildPartial()

publicVehicle.LoadLimitbuildPartial()
Returns
Type Description

clear()

publicVehicle.LoadLimit.Builderclear()
Returns
Type Description
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

clearField(Descriptors.FieldDescriptor field)

publicVehicle.LoadLimit.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
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
Returns
Type Description
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

clone()

publicVehicle.LoadLimit.Builderclone()
Returns
Type Description
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

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
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

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

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

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

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
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
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
Returns
Type Description

mergeFrom(Vehicle.LoadLimit other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicVehicle.LoadLimit.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicVehicle.LoadLimit.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
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
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.LoadLimit.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Returns
Type Description

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
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicVehicle.LoadLimit.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
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
index int
value Object
Returns
Type Description
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
Returns
Type Description

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
Returns
Type Description

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.LoadLimit.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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.