Class Shipment.Load.Builder (1.38.0)

publicstaticfinalclass Shipment.Load.BuilderextendsGeneratedMessageV3.Builder<Shipment.Load.Builder>implementsShipment.LoadOrBuilder

When performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery. This message defines such amount. See load_demands.

Protobuf type google.cloud.optimization.v1.Shipment.Load

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)

publicShipment.Load.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Shipment.Load.Builder
Overrides

build()

publicShipment.Loadbuild()
Returns
Type Description
Shipment.Load

buildPartial()

publicShipment.LoadbuildPartial()
Returns
Type Description
Shipment.Load

clear()

publicShipment.Load.Builderclear()
Returns
Type Description
Shipment.Load.Builder
Overrides

clearAmount()

publicShipment.Load.BuilderclearAmount()

The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0.

int64 amount = 2;

Returns
Type Description
Shipment.Load.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicShipment.Load.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Shipment.Load.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicShipment.Load.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Shipment.Load.Builder
Overrides

clone()

publicShipment.Load.Builderclone()
Returns
Type Description
Shipment.Load.Builder
Overrides

getAmount()

publiclonggetAmount()

The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0.

int64 amount = 2;

Returns
Type Description
long

The amount.

getDefaultInstanceForType()

publicShipment.LoadgetDefaultInstanceForType()
Returns
Type Description
Shipment.Load

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Shipment.Load other)

publicShipment.Load.BuildermergeFrom(Shipment.Loadother)
Parameter
Name Description
other Shipment.Load
Returns
Type Description
Shipment.Load.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicShipment.Load.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Shipment.Load.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicShipment.Load.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Shipment.Load.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalShipment.Load.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Shipment.Load.Builder
Overrides

setAmount(long value)

publicShipment.Load.BuildersetAmount(longvalue)

The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0.

int64 amount = 2;

Parameter
Name Description
value long

The amount to set.

Returns
Type Description
Shipment.Load.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicShipment.Load.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Shipment.Load.Builder
Overrides

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

publicShipment.Load.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Shipment.Load.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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