Class ShipmentRoute.Visit (1.32.0)

public static final class ShipmentRoute.Visit extends GeneratedMessageV3 implements ShipmentRoute.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

Static Fields

ARRIVAL_LOADS_FIELD_NUMBER

public static final int ARRIVAL_LOADS_FIELD_NUMBER
Field Value
TypeDescription
int

DELAY_BEFORE_START_FIELD_NUMBER

public static final int DELAY_BEFORE_START_FIELD_NUMBER
Field Value
TypeDescription
int

DEMANDS_FIELD_NUMBER

public static final int DEMANDS_FIELD_NUMBER
Field Value
TypeDescription
int

DETOUR_FIELD_NUMBER

public static final int DETOUR_FIELD_NUMBER
Field Value
TypeDescription
int

IS_PICKUP_FIELD_NUMBER

public static final int IS_PICKUP_FIELD_NUMBER
Field Value
TypeDescription
int

LOAD_DEMANDS_FIELD_NUMBER

public static final int LOAD_DEMANDS_FIELD_NUMBER
Field Value
TypeDescription
int

SHIPMENT_INDEX_FIELD_NUMBER

public static final int SHIPMENT_INDEX_FIELD_NUMBER
Field Value
TypeDescription
int

SHIPMENT_LABEL_FIELD_NUMBER

public static final int SHIPMENT_LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

VISIT_LABEL_FIELD_NUMBER

public static final int VISIT_LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

VISIT_REQUEST_INDEX_FIELD_NUMBER

public static final int VISIT_REQUEST_INDEX_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ShipmentRoute.Visit getDefaultInstance()
Returns
TypeDescription
ShipmentRoute.Visit

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ShipmentRoute.Visit.Builder newBuilder()
Returns
TypeDescription
ShipmentRoute.Visit.Builder

newBuilder(ShipmentRoute.Visit prototype)

public static ShipmentRoute.Visit.Builder newBuilder(ShipmentRoute.Visit prototype)
Parameter
NameDescription
prototypeShipmentRoute.Visit
Returns
TypeDescription
ShipmentRoute.Visit.Builder

parseDelimitedFrom(InputStream input)

public static ShipmentRoute.Visit parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ShipmentRoute.Visit parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ShipmentRoute.Visit parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ShipmentRoute.Visit parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ShipmentRoute.Visit parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ShipmentRoute.Visit parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ShipmentRoute.Visit parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentRoute.Visit
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ShipmentRoute.Visit> parser()
Returns
TypeDescription
Parser<Visit>

Methods

containsLoadDemands(String key)

public boolean containsLoadDemands(String key)

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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getArrivalLoads(int index) (deprecated)

public CapacityQuantity getArrivalLoads(int index)

Deprecated: Use Transition.vehicle_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
NameDescription
indexint
Returns
TypeDescription
CapacityQuantity

getArrivalLoadsCount() (deprecated)

public int getArrivalLoadsCount()

Deprecated: Use Transition.vehicle_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
TypeDescription
int

getArrivalLoadsList() (deprecated)

public List<CapacityQuantity> getArrivalLoadsList()

Deprecated: Use Transition.vehicle_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
TypeDescription
List<CapacityQuantity>

getArrivalLoadsOrBuilder(int index) (deprecated)

public CapacityQuantityOrBuilder getArrivalLoadsOrBuilder(int index)

Deprecated: Use Transition.vehicle_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
NameDescription
indexint
Returns
TypeDescription
CapacityQuantityOrBuilder

getArrivalLoadsOrBuilderList() (deprecated)

public List<? extends CapacityQuantityOrBuilder> getArrivalLoadsOrBuilderList()

Deprecated: Use Transition.vehicle_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
TypeDescription
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

getDefaultInstanceForType()

public ShipmentRoute.Visit getDefaultInstanceForType()
Returns
TypeDescription
ShipmentRoute.Visit

getDelayBeforeStart() (deprecated)

public ShipmentRoute.Delay getDelayBeforeStart()

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

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

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

Returns
TypeDescription
ShipmentRoute.Delay

The delayBeforeStart.

getDelayBeforeStartOrBuilder() (deprecated)

public ShipmentRoute.DelayOrBuilder getDelayBeforeStartOrBuilder()

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

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

Returns
TypeDescription
ShipmentRoute.DelayOrBuilder

getDemands(int index) (deprecated)

public CapacityQuantity getDemands(int index)

Deprecated: Use Visit.load_demands instead.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
CapacityQuantity

getDemandsCount() (deprecated)

public int getDemandsCount()

Deprecated: Use Visit.load_demands instead.

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

Returns
TypeDescription
int

getDemandsList() (deprecated)

public List<CapacityQuantity> getDemandsList()

Deprecated: Use Visit.load_demands instead.

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

Returns
TypeDescription
List<CapacityQuantity>

getDemandsOrBuilder(int index) (deprecated)

public CapacityQuantityOrBuilder getDemandsOrBuilder(int index)

Deprecated: Use Visit.load_demands instead.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
CapacityQuantityOrBuilder

getDemandsOrBuilderList() (deprecated)

public List<? extends CapacityQuantityOrBuilder> getDemandsOrBuilderList()

Deprecated: Use Visit.load_demands instead.

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

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

getDetour()

public Duration getDetour()

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
TypeDescription
Duration

The detour.

getDetourOrBuilder()

public DurationOrBuilder getDetourOrBuilder()

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
TypeDescription
DurationOrBuilder

getIsPickup()

public boolean getIsPickup()

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

bool is_pickup = 2;

Returns
TypeDescription
boolean

The isPickup.

getLoadDemands() (deprecated)

public Map<String,Shipment.Load> getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
TypeDescription
Map<String,Load>

getLoadDemandsCount()

public int getLoadDemandsCount()

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
TypeDescription
int

getLoadDemandsMap()

public Map<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
TypeDescription
Map<String,Load>

getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

public Shipment.Load getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

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
NameDescription
keyString
defaultValueShipment.Load
Returns
TypeDescription
Shipment.Load

getLoadDemandsOrThrow(String key)

public Shipment.Load getLoadDemandsOrThrow(String key)

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
NameDescription
keyString
Returns
TypeDescription
Shipment.Load

getParserForType()

public Parser<ShipmentRoute.Visit> getParserForType()
Returns
TypeDescription
Parser<Visit>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getShipmentIndex()

public int getShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
TypeDescription
int

The shipmentIndex.

getShipmentLabel()

public String getShipmentLabel()

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

string shipment_label = 7;

Returns
TypeDescription
String

The shipmentLabel.

getShipmentLabelBytes()

public ByteString getShipmentLabelBytes()

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

string shipment_label = 7;

Returns
TypeDescription
ByteString

The bytes for shipmentLabel.

getStartTime()

public Timestamp getStartTime()

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
TypeDescription
Timestamp

The startTime.

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

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
TypeDescription
TimestampOrBuilder

getVisitLabel()

public String getVisitLabel()

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

string visit_label = 8;

Returns
TypeDescription
String

The visitLabel.

getVisitLabelBytes()

public ByteString getVisitLabelBytes()

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

string visit_label = 8;

Returns
TypeDescription
ByteString

The bytes for visitLabel.

getVisitRequestIndex()

public int getVisitRequestIndex()

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

int32 visit_request_index = 3;

Returns
TypeDescription
int

The visitRequestIndex.

hasDelayBeforeStart() (deprecated)

public boolean hasDelayBeforeStart()

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

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

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

Returns
TypeDescription
boolean

Whether the delayBeforeStart field is set.

hasDetour()

public boolean hasDetour()

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
TypeDescription
boolean

Whether the detour field is set.

hasStartTime()

public boolean hasStartTime()

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
TypeDescription
boolean

Whether the startTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ShipmentRoute.Visit.Builder newBuilderForType()
Returns
TypeDescription
ShipmentRoute.Visit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ShipmentRoute.Visit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ShipmentRoute.Visit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ShipmentRoute.Visit.Builder toBuilder()
Returns
TypeDescription
ShipmentRoute.Visit.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException