Class ShipmentRoute.Visit.Builder (1.4.0)

publicstaticfinalclass ShipmentRoute.Visit.BuilderextendsGeneratedMessageV3.Builder<ShipmentRoute.Visit.Builder>implementsShipmentRoute.VisitOrBuilder

A visit performed during a route. This visit corresponds to a pickup or a delivery of a Shipment.

Protobuf type google.cloud.optimization.v1.ShipmentRoute.Visit

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
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

Methods

addAllArrivalLoads(Iterable<? extends CapacityQuantity> values)

publicShipmentRoute.Visit.BuilderaddAllArrivalLoads(Iterable<?extendsCapacityQuantity>values)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
Returns
Type Description

addAllDemands(Iterable<? extends CapacityQuantity> values)

publicShipmentRoute.Visit.BuilderaddAllDemands(Iterable<?extendsCapacityQuantity>values)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
Returns
Type Description

addArrivalLoads(CapacityQuantity value)

publicShipmentRoute.Visit.BuilderaddArrivalLoads(CapacityQuantityvalue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
Returns
Type Description

addArrivalLoads(CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuilderaddArrivalLoads(CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description

addArrivalLoads(int index, CapacityQuantity value)

publicShipmentRoute.Visit.BuilderaddArrivalLoads(intindex,CapacityQuantityvalue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
Returns
Type Description

addArrivalLoads(int index, CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuilderaddArrivalLoads(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description

addArrivalLoadsBuilder()

publicCapacityQuantity.BuilderaddArrivalLoadsBuilder()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description

addArrivalLoadsBuilder(int index)

publicCapacityQuantity.BuilderaddArrivalLoadsBuilder(intindex)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

addDemands(CapacityQuantity value)

publicShipmentRoute.Visit.BuilderaddDemands(CapacityQuantityvalue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
Returns
Type Description

addDemands(CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuilderaddDemands(CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description

addDemands(int index, CapacityQuantity value)

publicShipmentRoute.Visit.BuilderaddDemands(intindex,CapacityQuantityvalue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
Returns
Type Description

addDemands(int index, CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuilderaddDemands(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description

addDemandsBuilder()

publicCapacityQuantity.BuilderaddDemandsBuilder()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description

addDemandsBuilder(int index)

publicCapacityQuantity.BuilderaddDemandsBuilder(intindex)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicShipmentRoute.Visitbuild()
Returns
Type Description

buildPartial()

publicShipmentRoute.VisitbuildPartial()
Returns
Type Description

clear()

publicShipmentRoute.Visit.Builderclear()
Returns
Type Description
Overrides

clearArrivalLoads()

publicShipmentRoute.Visit.BuilderclearArrivalLoads()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description

clearDelayBeforeStart()

publicShipmentRoute.Visit.BuilderclearDelayBeforeStart()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description

clearDemands()

publicShipmentRoute.Visit.BuilderclearDemands()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description

clearDetour()

publicShipmentRoute.Visit.BuilderclearDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description

clearField(Descriptors.FieldDescriptor field)

publicShipmentRoute.Visit.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearIsPickup()

publicShipmentRoute.Visit.BuilderclearIsPickup()

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearLoadDemands()

publicShipmentRoute.Visit.BuilderclearLoadDemands()
Returns
Type Description

clearOneof(Descriptors.OneofDescriptor oneof)

publicShipmentRoute.Visit.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearShipmentIndex()

publicShipmentRoute.Visit.BuilderclearShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearShipmentLabel()

publicShipmentRoute.Visit.BuilderclearShipmentLabel()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearStartTime()

publicShipmentRoute.Visit.BuilderclearStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description

clearVisitLabel()

publicShipmentRoute.Visit.BuilderclearVisitLabel()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearVisitRequestIndex()

publicShipmentRoute.Visit.BuilderclearVisitRequestIndex()

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clone()

publicShipmentRoute.Visit.Builderclone()
Returns
Type Description
Overrides

containsLoadDemands(String key)

publicbooleancontainsLoadDemands(Stringkey)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description

getArrivalLoads(int index)

publicCapacityQuantitygetArrivalLoads(intindex)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getArrivalLoadsBuilder(int index)

publicCapacityQuantity.BuildergetArrivalLoadsBuilder(intindex)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getArrivalLoadsBuilderList()

publicList<CapacityQuantity.Builder>getArrivalLoadsBuilderList()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description

getArrivalLoadsCount()

publicintgetArrivalLoadsCount()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
int

getArrivalLoadsList()

publicList<CapacityQuantity>getArrivalLoadsList()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description

getArrivalLoadsOrBuilder(int index)

publicCapacityQuantityOrBuildergetArrivalLoadsOrBuilder(intindex)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getArrivalLoadsOrBuilderList()

publicList<?extendsCapacityQuantityOrBuilder>getArrivalLoadsOrBuilderList()

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

getDefaultInstanceForType()

publicShipmentRoute.VisitgetDefaultInstanceForType()
Returns
Type Description

getDelayBeforeStart() (deprecated)

publicShipmentRoute.DelaygetDelayBeforeStart()

Deprecated. google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1824

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
ShipmentRoute.Delay

The delayBeforeStart.

getDelayBeforeStartBuilder()

publicShipmentRoute.Delay.BuildergetDelayBeforeStartBuilder()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description

getDelayBeforeStartOrBuilder()

publicShipmentRoute.DelayOrBuildergetDelayBeforeStartOrBuilder()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description

getDemands(int index)

publicCapacityQuantitygetDemands(intindex)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getDemandsBuilder(int index)

publicCapacityQuantity.BuildergetDemandsBuilder(intindex)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getDemandsBuilderList()

publicList<CapacityQuantity.Builder>getDemandsBuilderList()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description

getDemandsCount()

publicintgetDemandsCount()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
int

getDemandsList()

publicList<CapacityQuantity>getDemandsList()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description

getDemandsOrBuilder(int index)

publicCapacityQuantityOrBuildergetDemandsOrBuilder(intindex)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getDemandsOrBuilderList()

publicList<?extendsCapacityQuantityOrBuilder>getDemandsOrBuilderList()

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getDetour()

publicDurationgetDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
Duration

The detour.

getDetourBuilder()

publicDuration.BuildergetDetourBuilder()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description

getDetourOrBuilder()

publicDurationOrBuildergetDetourOrBuilder()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description

getIsPickup()

publicbooleangetIsPickup()

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Returns
Type Description
boolean

The isPickup.

getLoadDemands()

publicMap<String,Shipment.Load>getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
Type Description

getLoadDemandsCount()

publicintgetLoadDemandsCount()

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Returns
Type Description
int

getLoadDemandsMap()

publicMap<String,Shipment.Load>getLoadDemandsMap()

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Returns
Type Description

getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

publicShipment.LoadgetLoadDemandsOrDefault(Stringkey,Shipment.LoaddefaultValue)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameters
Name Description
key String
defaultValue Shipment.Load
Returns
Type Description

getLoadDemandsOrThrow(String key)

publicShipment.LoadgetLoadDemandsOrThrow(Stringkey)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description

getMutableLoadDemands()

publicMap<String,Shipment.Load>getMutableLoadDemands()

Use alternate mutation accessors instead.

Returns
Type Description

getShipmentIndex()

publicintgetShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
int

The shipmentIndex.

getShipmentLabel()

publicStringgetShipmentLabel()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
String

The shipmentLabel.

getShipmentLabelBytes()

publicByteStringgetShipmentLabelBytes()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
ByteString

The bytes for shipmentLabel.

getStartTime()

publicTimestampgetStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

publicTimestamp.BuildergetStartTimeBuilder()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description

getStartTimeOrBuilder()

publicTimestampOrBuildergetStartTimeOrBuilder()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description

getVisitLabel()

publicStringgetVisitLabel()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
String

The visitLabel.

getVisitLabelBytes()

publicByteStringgetVisitLabelBytes()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
ByteString

The bytes for visitLabel.

getVisitRequestIndex()

publicintgetVisitRequestIndex()

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Returns
Type Description
int

The visitRequestIndex.

hasDelayBeforeStart() (deprecated)

publicbooleanhasDelayBeforeStart()

Deprecated. google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1824

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
boolean

Whether the delayBeforeStart field is set.

hasDetour()

publicbooleanhasDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
boolean

Whether the detour field is set.

hasStartTime()

publicbooleanhasStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

internalGetMutableMapField(int number)

protectedMapFieldinternalGetMutableMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeDelayBeforeStart(ShipmentRoute.Delay value)

publicShipmentRoute.Visit.BuildermergeDelayBeforeStart(ShipmentRoute.Delayvalue)

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
Returns
Type Description

mergeDetour(Duration value)

publicShipmentRoute.Visit.BuildermergeDetour(Durationvalue)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
value Duration
Returns
Type Description

mergeFrom(ShipmentRoute.Visit other)

publicShipmentRoute.Visit.BuildermergeFrom(ShipmentRoute.Visitother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicShipmentRoute.Visit.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeStartTime(Timestamp value)

publicShipmentRoute.Visit.BuildermergeStartTime(Timestampvalue)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalShipmentRoute.Visit.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

putAllLoadDemands(Map<String,Shipment.Load> values)

publicShipmentRoute.Visit.BuilderputAllLoadDemands(Map<String,Shipment.Load>values)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
values Map<String,Load>
Returns
Type Description

putLoadDemands(String key, Shipment.Load value)

publicShipmentRoute.Visit.BuilderputLoadDemands(Stringkey,Shipment.Loadvalue)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameters
Name Description
key String
Returns
Type Description

removeArrivalLoads(int index)

publicShipmentRoute.Visit.BuilderremoveArrivalLoads(intindex)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

removeDemands(int index)

publicShipmentRoute.Visit.BuilderremoveDemands(intindex)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

removeLoadDemands(String key)

publicShipmentRoute.Visit.BuilderremoveLoadDemands(Stringkey)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description

setArrivalLoads(int index, CapacityQuantity value)

publicShipmentRoute.Visit.BuildersetArrivalLoads(intindex,CapacityQuantityvalue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
Returns
Type Description

setArrivalLoads(int index, CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuildersetArrivalLoads(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [ShipmentRoute.Transition.loads][] instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description

setDelayBeforeStart(ShipmentRoute.Delay value)

publicShipmentRoute.Visit.BuildersetDelayBeforeStart(ShipmentRoute.Delayvalue)

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
Returns
Type Description

setDelayBeforeStart(ShipmentRoute.Delay.Builder builderForValue)

publicShipmentRoute.Visit.BuildersetDelayBeforeStart(ShipmentRoute.Delay.BuilderbuilderForValue)

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
builderForValue ShipmentRoute.Delay.Builder
Returns
Type Description

setDemands(int index, CapacityQuantity value)

publicShipmentRoute.Visit.BuildersetDemands(intindex,CapacityQuantityvalue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
Returns
Type Description

setDemands(int index, CapacityQuantity.Builder builderForValue)

publicShipmentRoute.Visit.BuildersetDemands(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use [Visit.load_demands][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description

setDetour(Duration value)

publicShipmentRoute.Visit.BuildersetDetour(Durationvalue)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
value Duration
Returns
Type Description

setDetour(Duration.Builder builderForValue)

publicShipmentRoute.Visit.BuildersetDetour(Duration.BuilderbuilderForValue)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicShipmentRoute.Visit.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setIsPickup(boolean value)

publicShipmentRoute.Visit.BuildersetIsPickup(booleanvalue)

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Parameter
Name Description
value boolean

The isPickup to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

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

publicShipmentRoute.Visit.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setShipmentIndex(int value)

publicShipmentRoute.Visit.BuildersetShipmentIndex(intvalue)

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Parameter
Name Description
value int

The shipmentIndex to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setShipmentLabel(String value)

publicShipmentRoute.Visit.BuildersetShipmentLabel(Stringvalue)

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Parameter
Name Description
value String

The shipmentLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setShipmentLabelBytes(ByteString value)

publicShipmentRoute.Visit.BuildersetShipmentLabelBytes(ByteStringvalue)

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Parameter
Name Description
value ByteString

The bytes for shipmentLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setStartTime(Timestamp value)

publicShipmentRoute.Visit.BuildersetStartTime(Timestampvalue)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description

setStartTime(Timestamp.Builder builderForValue)

publicShipmentRoute.Visit.BuildersetStartTime(Timestamp.BuilderbuilderForValue)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalShipmentRoute.Visit.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

setVisitLabel(String value)

publicShipmentRoute.Visit.BuildersetVisitLabel(Stringvalue)

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Parameter
Name Description
value String

The visitLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setVisitLabelBytes(ByteString value)

publicShipmentRoute.Visit.BuildersetVisitLabelBytes(ByteStringvalue)

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Parameter
Name Description
value ByteString

The bytes for visitLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setVisitRequestIndex(int value)

publicShipmentRoute.Visit.BuildersetVisitRequestIndex(intvalue)

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Parameter
Name Description
value int

The visitRequestIndex to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

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.