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.GeneratedMessageV3.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.GeneratedMessageV3.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 typegoogle.cloud.optimization.v1.ShipmentRoute.TravelStep
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ShipmentRoute.TravelStep.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ShipmentRoute.TravelStepbuild()ShipmentRoute.TravelStepbuildPartial()ShipmentRoute.TravelStep.Builderclear()ShipmentRoute.TravelStep.BuilderclearDistanceMeters()Distance traveled during the step.ShipmentRoute.TravelStep.BuilderclearDuration()Duration of the travel step.ShipmentRoute.TravelStep.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)ShipmentRoute.TravelStep.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)ShipmentRoute.TravelStep.BuilderclearRoutePolyline()The encoded polyline representation of the route followed during the step.ShipmentRoute.TravelStep.BuilderclearTrafficInfoUnavailable()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.ShipmentRoute.TravelStep.Builderclone()ShipmentRoute.TravelStepgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()doublegetDistanceMeters()Distance traveled during the step.com.google.protobuf.DurationgetDuration()Duration of the travel step.com.google.protobuf.Duration.BuildergetDurationBuilder()Duration of the travel step.com.google.protobuf.DurationOrBuildergetDurationOrBuilder()Duration of the travel step.ShipmentRoute.EncodedPolylinegetRoutePolyline()The encoded polyline representation of the route followed during the step.ShipmentRoute.EncodedPolyline.BuildergetRoutePolylineBuilder()The encoded polyline representation of the route followed during the step.ShipmentRoute.EncodedPolylineOrBuildergetRoutePolylineOrBuilder()The encoded polyline representation of the route followed during the step.booleangetTrafficInfoUnavailable()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.booleanhasDuration()Duration of the travel step.booleanhasRoutePolyline()The encoded polyline representation of the route followed during the step.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()ShipmentRoute.TravelStep.BuildermergeDuration(com.google.protobuf.Duration value)Duration of the travel step.ShipmentRoute.TravelStep.BuildermergeFrom(ShipmentRoute.TravelStep other)ShipmentRoute.TravelStep.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)ShipmentRoute.TravelStep.BuildermergeFrom(com.google.protobuf.Message other)ShipmentRoute.TravelStep.BuildermergeRoutePolyline(ShipmentRoute.EncodedPolyline value)The encoded polyline representation of the route followed during the step.ShipmentRoute.TravelStep.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)ShipmentRoute.TravelStep.BuildersetDistanceMeters(double value)Distance traveled during the step.ShipmentRoute.TravelStep.BuildersetDuration(com.google.protobuf.Duration value)Duration of the travel step.ShipmentRoute.TravelStep.BuildersetDuration(com.google.protobuf.Duration.Builder builderForValue)Duration of the travel step.ShipmentRoute.TravelStep.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ShipmentRoute.TravelStep.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)ShipmentRoute.TravelStep.BuildersetRoutePolyline(ShipmentRoute.EncodedPolyline value)The encoded polyline representation of the route followed during the step.ShipmentRoute.TravelStep.BuildersetRoutePolyline(ShipmentRoute.EncodedPolyline.Builder builderForValue)The encoded polyline representation of the route followed during the step.ShipmentRoute.TravelStep.BuildersetTrafficInfoUnavailable(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.ShipmentRoute.TravelStep.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
clear
public 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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
getDefaultInstanceForType
public ShipmentRoute.TravelStep getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public ShipmentRoute.TravelStep build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ShipmentRoute.TravelStep buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ShipmentRoute.TravelStep.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
setField
public ShipmentRoute.TravelStep.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
clearField
public ShipmentRoute.TravelStep.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
clearOneof
public ShipmentRoute.TravelStep.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
setRepeatedField
public ShipmentRoute.TravelStep.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
addRepeatedField
public ShipmentRoute.TravelStep.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
mergeFrom
public ShipmentRoute.TravelStep.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ShipmentRoute.TravelStep.Builder>
-
mergeFrom
public ShipmentRoute.TravelStep.Builder mergeFrom(ShipmentRoute.TravelStep other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public ShipmentRoute.TravelStep.Builder setDuration(com.google.protobuf.Duration value)
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
public ShipmentRoute.TravelStep.Builder mergeDuration(com.google.protobuf.Duration value)
Duration of the travel step.
.google.protobuf.Duration duration = 1;
-
clearDuration
public ShipmentRoute.TravelStep.Builder 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
public ShipmentRoute.TravelStep.Builder setDistanceMeters(double value)
Distance traveled during the step.
double distance_meters = 2;- Parameters:
value- The distanceMeters to set.- Returns:
- This builder for chaining.
-
clearDistanceMeters
public ShipmentRoute.TravelStep.Builder clearDistanceMeters()
Distance traveled during the step.
double distance_meters = 2;- Returns:
- This builder for chaining.
-
getTrafficInfoUnavailable
public boolean getTrafficInfoUnavailable()
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. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
bool traffic_info_unavailable = 3;- Specified by:
getTrafficInfoUnavailablein interfaceShipmentRoute.TravelStepOrBuilder- Returns:
- The trafficInfoUnavailable.
-
setTrafficInfoUnavailable
public ShipmentRoute.TravelStep.Builder 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. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
bool traffic_info_unavailable = 3;- Parameters:
value- The trafficInfoUnavailable to set.- Returns:
- This builder for chaining.
-
clearTrafficInfoUnavailable
public ShipmentRoute.TravelStep.Builder clearTrafficInfoUnavailable()
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. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
bool traffic_info_unavailable = 3;- 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
public ShipmentRoute.EncodedPolyline 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
public ShipmentRoute.TravelStep.Builder setRoutePolyline(ShipmentRoute.EncodedPolyline value)
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
public ShipmentRoute.TravelStep.Builder mergeRoutePolyline(ShipmentRoute.EncodedPolyline value)
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
public ShipmentRoute.TravelStep.Builder 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
public ShipmentRoute.EncodedPolyline.Builder 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
public ShipmentRoute.EncodedPolylineOrBuilder 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
-
setUnknownFields
public final ShipmentRoute.TravelStep.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
mergeUnknownFields
public final ShipmentRoute.TravelStep.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentRoute.TravelStep.Builder>
-
-