Class Vehicle.LoadLimit (1.72.0)

publicstaticfinalclass Vehicle.LoadLimitextendsGeneratedMessageV3implementsVehicle.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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

COST_PER_UNIT_ABOVE_SOFT_MAX_FIELD_NUMBER

publicstaticfinalintCOST_PER_UNIT_ABOVE_SOFT_MAX_FIELD_NUMBER
Field Value
Type Description
int

END_LOAD_INTERVAL_FIELD_NUMBER

publicstaticfinalintEND_LOAD_INTERVAL_FIELD_NUMBER
Field Value
Type Description
int

MAX_LOAD_FIELD_NUMBER

publicstaticfinalintMAX_LOAD_FIELD_NUMBER
Field Value
Type Description
int

SOFT_MAX_LOAD_FIELD_NUMBER

publicstaticfinalintSOFT_MAX_LOAD_FIELD_NUMBER
Field Value
Type Description
int

START_LOAD_INTERVAL_FIELD_NUMBER

publicstaticfinalintSTART_LOAD_INTERVAL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticVehicle.LoadLimitgetDefaultInstance()
Returns
Type Description
Vehicle.LoadLimit

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticVehicle.LoadLimit.BuildernewBuilder()
Returns
Type Description
Vehicle.LoadLimit.Builder

newBuilder(Vehicle.LoadLimit prototype)

publicstaticVehicle.LoadLimit.BuildernewBuilder(Vehicle.LoadLimitprototype)
Parameter
Name Description
prototype Vehicle.LoadLimit
Returns
Type Description
Vehicle.LoadLimit.Builder

parseDelimitedFrom(InputStream input)

publicstaticVehicle.LoadLimitparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticVehicle.LoadLimitparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticVehicle.LoadLimitparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticVehicle.LoadLimitparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticVehicle.LoadLimitparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticVehicle.LoadLimitparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticVehicle.LoadLimitparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.LoadLimit
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Vehicle.LoadLimit>parser()
Returns
Type Description
Parser<LoadLimit>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

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.

getParserForType()

publicParser<Vehicle.LoadLimit>getParserForType()
Returns
Type Description
Parser<LoadLimit>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicVehicle.LoadLimit.BuildernewBuilderForType()
Returns
Type Description
Vehicle.LoadLimit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedVehicle.LoadLimit.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Vehicle.LoadLimit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicVehicle.LoadLimit.BuildertoBuilder()
Returns
Type Description
Vehicle.LoadLimit.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.