Package com.google.cloud.optimization.v1
Class ShipmentRoute.TravelStep.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
com.google.cloud.optimization.v1.ShipmentRoute.TravelStep.Builder
- All Implemented Interfaces:
ShipmentRoute.TravelStepOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ShipmentRoute.TravelStep
public static final class ShipmentRoute.TravelStep.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
implements ShipmentRoute.TravelStepOrBuilder
Deprecated: Use [ShipmentRoute.Transition][google.cloud.optimization.v1.ShipmentRoute.Transition] instead. Travel between each visit along the route: from the vehicle's `start_location` to the first visit's `arrival_location`, then from the first visit's `departure_location` to the second visit's `arrival_location`, and so on until the vehicle's `end_location`. This accounts only for the actual travel between visits, not counting the waiting time, the time spent performing a visit, nor the distance covered during a visit. Invariant: `travel_steps_size() == visits_size() + 1`. If the vehicle does not have a start_ and/or end_location, the corresponding travel metrics are 0 and/or empty.Protobuf type
google.cloud.optimization.v1.ShipmentRoute.TravelStep-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Distance traveled during the step.Duration of the travel step.The encoded polyline representation of the route followed during the step.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 TravelStep, this boolean is set to true.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptordoubleDistance traveled during the step.com.google.protobuf.DurationDuration of the travel step.com.google.protobuf.Duration.BuilderDuration of the travel step.com.google.protobuf.DurationOrBuilderDuration of the travel step.The encoded polyline representation of the route followed during the step.The encoded polyline representation of the route followed during the step.The encoded polyline representation of the route followed during the step.booleanWhen 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 TravelStep, this boolean is set to true.booleanDuration of the travel step.booleanThe encoded polyline representation of the route followed during the step.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeDuration(com.google.protobuf.Duration value) Duration of the travel step.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The encoded polyline representation of the route followed during the step.setDistanceMeters(double value) Distance traveled during the step.setDuration(com.google.protobuf.Duration value) Duration of the travel step.setDuration(com.google.protobuf.Duration.Builder builderForValue) Duration of the travel step.The encoded polyline representation of the route followed during the step.setRoutePolyline(ShipmentRoute.EncodedPolyline.Builder builderForValue) The encoded polyline representation of the route followed during the step.setTrafficInfoUnavailable(boolean value) 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 TravelStep, this boolean is set to true.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
mergeFrom
public ShipmentRoute.TravelStep.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ShipmentRoute.TravelStep.Builder>- Throws:
IOException
-
hasDuration
public boolean hasDuration()Duration of the travel step.
.google.protobuf.Duration duration = 1;- Specified by:
hasDurationin interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- Whether the duration field is set.
-
getDuration
public com.google.protobuf.Duration getDuration()Duration of the travel step.
.google.protobuf.Duration duration = 1;- Specified by:
getDurationin interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- The duration.
-
setDuration
Duration of the travel step.
.google.protobuf.Duration duration = 1; -
setDuration
public ShipmentRoute.TravelStep.Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) Duration of the travel step.
.google.protobuf.Duration duration = 1; -
mergeDuration
Duration of the travel step.
.google.protobuf.Duration duration = 1; -
clearDuration
Duration of the travel step.
.google.protobuf.Duration duration = 1; -
getDurationBuilder
public com.google.protobuf.Duration.Builder getDurationBuilder()Duration of the travel step.
.google.protobuf.Duration duration = 1; -
getDurationOrBuilder
public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()Duration of the travel step.
.google.protobuf.Duration duration = 1;- Specified by:
getDurationOrBuilderin interfaceShipmentRoute.TravelStepOrBuilder
-
getDistanceMeters
public double getDistanceMeters()Distance traveled during the step.
double distance_meters = 2;- Specified by:
getDistanceMetersin interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- The distanceMeters.
-
setDistanceMeters
Distance traveled during the step.
double distance_meters = 2;- Parameters:
value- The distanceMeters to set.- Returns:
- This builder for chaining.
-
clearDistanceMeters
Distance traveled during the step.
double distance_meters = 2;- Returns:
- This builder for chaining.
-
hasRoutePolyline
public boolean hasRoutePolyline()The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4;- Specified by:
hasRoutePolylinein interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- Whether the routePolyline field is set.
-
getRoutePolyline
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4;- Specified by:
getRoutePolylinein interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- The routePolyline.
-
setRoutePolyline
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; -
setRoutePolyline
public ShipmentRoute.TravelStep.Builder setRoutePolyline(ShipmentRoute.EncodedPolyline.Builder builderForValue) The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; -
mergeRoutePolyline
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; -
clearRoutePolyline
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; -
getRoutePolylineBuilder
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; -
getRoutePolylineOrBuilder
The encoded polyline representation of the route followed during the step. This field is only populated if [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] is set to true.
.google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4;- Specified by:
getRoutePolylineOrBuilderin interfaceShipmentRoute.TravelStepOrBuilder
-