Class ShipmentRoute.Transition (0.1.2)

publicstaticfinalclass ShipmentRoute.TransitionextendsGeneratedMessageV3implementsShipmentRoute.TransitionOrBuilder

Transition between two events on the route. See the description of ShipmentRoute. If the vehicle does not have a start_location and/or end_location, the corresponding travel metrics are 0.

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

Inherited Members

Static Fields

BREAK_DURATION_FIELD_NUMBER

publicstaticfinalintBREAK_DURATION_FIELD_NUMBER
Field Value
Type Description
int

DELAY_DURATION_FIELD_NUMBER

publicstaticfinalintDELAY_DURATION_FIELD_NUMBER
Field Value
Type Description
int

LOADS_FIELD_NUMBER

publicstaticfinalintLOADS_FIELD_NUMBER
Field Value
Type Description
int

ROUTE_POLYLINE_FIELD_NUMBER

publicstaticfinalintROUTE_POLYLINE_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

publicstaticfinalintSTART_TIME_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_DURATION_FIELD_NUMBER

publicstaticfinalintTOTAL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

TRAFFIC_INFO_UNAVAILABLE_FIELD_NUMBER

publicstaticfinalintTRAFFIC_INFO_UNAVAILABLE_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DISTANCE_METERS_FIELD_NUMBER

publicstaticfinalintTRAVEL_DISTANCE_METERS_FIELD_NUMBER
Field Value
Type Description
int

TRAVEL_DURATION_FIELD_NUMBER

publicstaticfinalintTRAVEL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

VEHICLE_LOADS_FIELD_NUMBER

publicstaticfinalintVEHICLE_LOADS_FIELD_NUMBER
Field Value
Type Description
int

WAIT_DURATION_FIELD_NUMBER

publicstaticfinalintWAIT_DURATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticShipmentRoute.TransitiongetDefaultInstance()
Returns
Type Description

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticShipmentRoute.Transition.BuildernewBuilder()
Returns
Type Description

newBuilder(ShipmentRoute.Transition prototype)

publicstaticShipmentRoute.Transition.BuildernewBuilder(ShipmentRoute.Transitionprototype)
Parameter
Name Description
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticShipmentRoute.TransitionparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticShipmentRoute.TransitionparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticShipmentRoute.TransitionparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticShipmentRoute.TransitionparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticShipmentRoute.TransitionparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticShipmentRoute.TransitionparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.TransitionparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parser()

publicstaticParser<ShipmentRoute.Transition>parser()
Returns
Type Description

Methods

containsVehicleLoads(String key)

publicbooleancontainsVehicleLoads(Stringkey)

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits, or that have non-zero Shipment.load_demands on some shipment performed on this route. The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;

Parameter
Name Description
key String
Returns
Type Description

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

getBreakDuration()

publicDurationgetBreakDuration()

Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored in ShipmentRoute.breaks.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
Duration

The breakDuration.

getBreakDurationOrBuilder()

publicDurationOrBuildergetBreakDurationOrBuilder()

Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored in ShipmentRoute.breaks.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description

getDefaultInstanceForType()

publicShipmentRoute.TransitiongetDefaultInstanceForType()
Returns
Type Description

getDelayDuration()

publicDurationgetDelayDuration()

Sum of the delay durations applied to this transition. If any, the delay starts exactly delay_duration seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
Duration

The delayDuration.

getDelayDurationOrBuilder()

publicDurationOrBuildergetDelayDurationOrBuilder()

Sum of the delay durations applied to this transition. If any, the delay starts exactly delay_duration seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description

getLoads(int index)

publicCapacityQuantitygetLoads(intindex)

Deprecated: Use [Transition.vehicle_loads][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getLoadsCount()

publicintgetLoadsCount()

Deprecated: Use [Transition.vehicle_loads][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];

Returns
Type Description
int

getLoadsList()

publicList<CapacityQuantity>getLoadsList()

Deprecated: Use [Transition.vehicle_loads][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];

Returns
Type Description

getLoadsOrBuilder(int index)

publicCapacityQuantityOrBuildergetLoadsOrBuilder(intindex)

Deprecated: Use [Transition.vehicle_loads][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getLoadsOrBuilderList()

publicList<?extendsCapacityQuantityOrBuilder>getLoadsOrBuilderList()

Deprecated: Use [Transition.vehicle_loads][] instead.

repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];

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

getParserForType()

publicParser<ShipmentRoute.Transition>getParserForType()
Returns
Type Description
Overrides

getRoutePolyline()

publicShipmentRoute.EncodedPolylinegetRoutePolyline()

The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.

.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;

Returns
Type Description
ShipmentRoute.EncodedPolyline

The routePolyline.

getRoutePolylineOrBuilder()

publicShipmentRoute.EncodedPolylineOrBuildergetRoutePolylineOrBuilder()

The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.

.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;

Returns
Type Description

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getStartTime()

publicTimestampgetStartTime()

Start time of this transition.

.google.protobuf.Timestamp start_time = 8;

Returns
Type Description
Timestamp

The startTime.

getStartTimeOrBuilder()

publicTimestampOrBuildergetStartTimeOrBuilder()

Start time of this transition.

.google.protobuf.Timestamp start_time = 8;

Returns
Type Description

getTotalDuration()

publicDurationgetTotalDuration()

Total duration of the transition, provided for convenience. It is equal to:

  • next visit start_time (or vehicle_end_time if this is the last transition) - this transition's start_time;
  • if ShipmentRoute.has_traffic_infeasibilities is false, the following additionally holds: total_duration = travel_duration + delay_duration
  • break_duration + wait_duration.

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
Duration

The totalDuration.

getTotalDurationOrBuilder()

publicDurationOrBuildergetTotalDurationOrBuilder()

Total duration of the transition, provided for convenience. It is equal to:

  • next visit start_time (or vehicle_end_time if this is the last transition) - this transition's start_time;
  • if ShipmentRoute.has_traffic_infeasibilities is false, the following additionally holds: total_duration = travel_duration + delay_duration
  • break_duration + wait_duration.

.google.protobuf.Duration total_duration = 7;

Returns
Type Description

getTrafficInfoUnavailable()

publicbooleangetTrafficInfoUnavailable()

When traffic is requested via [OptimizeToursRequest.consider_road_traffic] [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], and the traffic info couldn't be retrieved for a Transition, this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).

bool traffic_info_unavailable = 3;

Returns
Type Description
boolean

The trafficInfoUnavailable.

getTravelDistanceMeters()

publicdoublegetTravelDistanceMeters()

Distance traveled during the transition.

double travel_distance_meters = 2;

Returns
Type Description
double

The travelDistanceMeters.

getTravelDuration()

publicDurationgetTravelDuration()

Travel duration during this transition.

.google.protobuf.Duration travel_duration = 1;

Returns
Type Description
Duration

The travelDuration.

getTravelDurationOrBuilder()

publicDurationOrBuildergetTravelDurationOrBuilder()

Travel duration during this transition.

.google.protobuf.Duration travel_duration = 1;

Returns
Type Description

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

getVehicleLoads()

publicMap<String,ShipmentRoute.VehicleLoad>getVehicleLoads()

Use #getVehicleLoadsMap() instead.

Returns
Type Description

getVehicleLoadsCount()

publicintgetVehicleLoadsCount()

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits, or that have non-zero Shipment.load_demands on some shipment performed on this route. The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;

Returns
Type Description
int

getVehicleLoadsMap()

publicMap<String,ShipmentRoute.VehicleLoad>getVehicleLoadsMap()

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits, or that have non-zero Shipment.load_demands on some shipment performed on this route. The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;

Returns
Type Description

getVehicleLoadsOrDefault(String key, ShipmentRoute.VehicleLoad defaultValue)

publicShipmentRoute.VehicleLoadgetVehicleLoadsOrDefault(Stringkey,ShipmentRoute.VehicleLoaddefaultValue)

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits, or that have non-zero Shipment.load_demands on some shipment performed on this route. The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;

Parameters
Name Description
key String
Returns
Type Description

getVehicleLoadsOrThrow(String key)

publicShipmentRoute.VehicleLoadgetVehicleLoadsOrThrow(Stringkey)

Vehicle loads during this transition, for each type that either appears in this vehicle's Vehicle.load_limits, or that have non-zero Shipment.load_demands on some shipment performed on this route. The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's load_demands are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.

map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;

Parameter
Name Description
key String
Returns
Type Description

getWaitDuration()

publicDurationgetWaitDuration()

Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals.

.google.protobuf.Duration wait_duration = 6;

Returns
Type Description
Duration

The waitDuration.

getWaitDurationOrBuilder()

publicDurationOrBuildergetWaitDurationOrBuilder()

Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals.

.google.protobuf.Duration wait_duration = 6;

Returns
Type Description

hasBreakDuration()

publicbooleanhasBreakDuration()

Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored in ShipmentRoute.breaks.

.google.protobuf.Duration break_duration = 5;

Returns
Type Description
boolean

Whether the breakDuration field is set.

hasDelayDuration()

publicbooleanhasDelayDuration()

Sum of the delay durations applied to this transition. If any, the delay starts exactly delay_duration seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.

.google.protobuf.Duration delay_duration = 4;

Returns
Type Description
boolean

Whether the delayDuration field is set.

hasRoutePolyline()

publicbooleanhasRoutePolyline()

The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.

.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;

Returns
Type Description
boolean

Whether the routePolyline field is set.

hasStartTime()

publicbooleanhasStartTime()

Start time of this transition.

.google.protobuf.Timestamp start_time = 8;

Returns
Type Description
boolean

Whether the startTime field is set.

hasTotalDuration()

publicbooleanhasTotalDuration()

Total duration of the transition, provided for convenience. It is equal to:

  • next visit start_time (or vehicle_end_time if this is the last transition) - this transition's start_time;
  • if ShipmentRoute.has_traffic_infeasibilities is false, the following additionally holds: total_duration = travel_duration + delay_duration
  • break_duration + wait_duration.

.google.protobuf.Duration total_duration = 7;

Returns
Type Description
boolean

Whether the totalDuration field is set.

hasTravelDuration()

publicbooleanhasTravelDuration()

Travel duration during this transition.

.google.protobuf.Duration travel_duration = 1;

Returns
Type Description
boolean

Whether the travelDuration field is set.

hasWaitDuration()

publicbooleanhasWaitDuration()

Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals.

.google.protobuf.Duration wait_duration = 6;

Returns
Type Description
boolean

Whether the waitDuration field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

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

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicShipmentRoute.Transition.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedShipmentRoute.Transition.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicShipmentRoute.Transition.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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.