public static final class Route.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder> implements RouteOrBuilder
Contains a route, which consists of a series of connected road segments that join beginning, ending, and intermediate waypoints.Protobuf type
google.maps.routing.v2.Route| Modifier and Type | Method and Description |
|---|---|
Route.Builder |
addAllLegs(Iterable<? extends RouteLeg> values)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
addAllOptimizedIntermediateWaypointIndex(Iterable<? extends Integer> values)
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
Route.Builder |
addAllRouteLabels(Iterable<? extends RouteLabel> values)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
addAllRouteLabelsValue(Iterable<Integer> values)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
addAllWarnings(Iterable<String> values)
An array of warnings to show when displaying the route.
|
Route.Builder |
addLegs(int index,
RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
addLegs(int index,
RouteLeg value)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
addLegs(RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
addLegs(RouteLeg value)
A collection of legs (path segments between waypoints) that make up the
route.
|
RouteLeg.Builder |
addLegsBuilder()
A collection of legs (path segments between waypoints) that make up the
route.
|
RouteLeg.Builder |
addLegsBuilder(int index)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
addOptimizedIntermediateWaypointIndex(int value)
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
Route.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Route.Builder |
addRouteLabels(RouteLabel value)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
addRouteLabelsValue(int value)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
addWarnings(String value)
An array of warnings to show when displaying the route.
|
Route.Builder |
addWarningsBytes(com.google.protobuf.ByteString value)
An array of warnings to show when displaying the route.
|
Route |
build() |
Route |
buildPartial() |
Route.Builder |
clear() |
Route.Builder |
clearDescription()
A description of the route.
|
Route.Builder |
clearDistanceMeters()
The travel distance of the route, in meters.
|
Route.Builder |
clearDuration()
The length of time needed to navigate the route.
|
Route.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Route.Builder |
clearLegs()
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
clearLocalizedValues()
Text representations of properties of the `Route`.
|
Route.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Route.Builder |
clearOptimizedIntermediateWaypointIndex()
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
Route.Builder |
clearPolyline()
The overall route polyline.
|
Route.Builder |
clearPolylineDetails()
Contains information about details along the polyline.
|
Route.Builder |
clearRouteLabels()
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
clearRouteToken()
An opaque token that can be passed to [Navigation
SDK](https://developers.google.com/maps/documentation/navigation) to
reconstruct the route during navigation, and, in the event of rerouting,
honor the original intention when the route was created.
|
Route.Builder |
clearStaticDuration()
The duration of travel through the route without taking traffic
conditions into consideration.
|
Route.Builder |
clearTravelAdvisory()
Additional information about the route.
|
Route.Builder |
clearViewport()
The viewport bounding box of the polyline.
|
Route.Builder |
clearWarnings()
An array of warnings to show when displaying the route.
|
Route.Builder |
clone() |
Route |
getDefaultInstanceForType() |
String |
getDescription()
A description of the route.
|
com.google.protobuf.ByteString |
getDescriptionBytes()
A description of the route.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getDistanceMeters()
The travel distance of the route, in meters.
|
com.google.protobuf.Duration |
getDuration()
The length of time needed to navigate the route.
|
com.google.protobuf.Duration.Builder |
getDurationBuilder()
The length of time needed to navigate the route.
|
com.google.protobuf.DurationOrBuilder |
getDurationOrBuilder()
The length of time needed to navigate the route.
|
RouteLeg |
getLegs(int index)
A collection of legs (path segments between waypoints) that make up the
route.
|
RouteLeg.Builder |
getLegsBuilder(int index)
A collection of legs (path segments between waypoints) that make up the
route.
|
List<RouteLeg.Builder> |
getLegsBuilderList()
A collection of legs (path segments between waypoints) that make up the
route.
|
int |
getLegsCount()
A collection of legs (path segments between waypoints) that make up the
route.
|
List<RouteLeg> |
getLegsList()
A collection of legs (path segments between waypoints) that make up the
route.
|
RouteLegOrBuilder |
getLegsOrBuilder(int index)
A collection of legs (path segments between waypoints) that make up the
route.
|
List<? extends RouteLegOrBuilder> |
getLegsOrBuilderList()
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.RouteLocalizedValues |
getLocalizedValues()
Text representations of properties of the `Route`.
|
Route.RouteLocalizedValues.Builder |
getLocalizedValuesBuilder()
Text representations of properties of the `Route`.
|
Route.RouteLocalizedValuesOrBuilder |
getLocalizedValuesOrBuilder()
Text representations of properties of the `Route`.
|
int |
getOptimizedIntermediateWaypointIndex(int index)
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
int |
getOptimizedIntermediateWaypointIndexCount()
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
List<Integer> |
getOptimizedIntermediateWaypointIndexList()
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
Polyline |
getPolyline()
The overall route polyline.
|
Polyline.Builder |
getPolylineBuilder()
The overall route polyline.
|
PolylineDetails |
getPolylineDetails()
Contains information about details along the polyline.
|
PolylineDetails.Builder |
getPolylineDetailsBuilder()
Contains information about details along the polyline.
|
PolylineDetailsOrBuilder |
getPolylineDetailsOrBuilder()
Contains information about details along the polyline.
|
PolylineOrBuilder |
getPolylineOrBuilder()
The overall route polyline.
|
RouteLabel |
getRouteLabels(int index)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
int |
getRouteLabelsCount()
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
List<RouteLabel> |
getRouteLabelsList()
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
int |
getRouteLabelsValue(int index)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
List<Integer> |
getRouteLabelsValueList()
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
String |
getRouteToken()
An opaque token that can be passed to [Navigation
SDK](https://developers.google.com/maps/documentation/navigation) to
reconstruct the route during navigation, and, in the event of rerouting,
honor the original intention when the route was created.
|
com.google.protobuf.ByteString |
getRouteTokenBytes()
An opaque token that can be passed to [Navigation
SDK](https://developers.google.com/maps/documentation/navigation) to
reconstruct the route during navigation, and, in the event of rerouting,
honor the original intention when the route was created.
|
com.google.protobuf.Duration |
getStaticDuration()
The duration of travel through the route without taking traffic
conditions into consideration.
|
com.google.protobuf.Duration.Builder |
getStaticDurationBuilder()
The duration of travel through the route without taking traffic
conditions into consideration.
|
com.google.protobuf.DurationOrBuilder |
getStaticDurationOrBuilder()
The duration of travel through the route without taking traffic
conditions into consideration.
|
RouteTravelAdvisory |
getTravelAdvisory()
Additional information about the route.
|
RouteTravelAdvisory.Builder |
getTravelAdvisoryBuilder()
Additional information about the route.
|
RouteTravelAdvisoryOrBuilder |
getTravelAdvisoryOrBuilder()
Additional information about the route.
|
com.google.geo.type.Viewport |
getViewport()
The viewport bounding box of the polyline.
|
com.google.geo.type.Viewport.Builder |
getViewportBuilder()
The viewport bounding box of the polyline.
|
com.google.geo.type.ViewportOrBuilder |
getViewportOrBuilder()
The viewport bounding box of the polyline.
|
String |
getWarnings(int index)
An array of warnings to show when displaying the route.
|
com.google.protobuf.ByteString |
getWarningsBytes(int index)
An array of warnings to show when displaying the route.
|
int |
getWarningsCount()
An array of warnings to show when displaying the route.
|
com.google.protobuf.ProtocolStringList |
getWarningsList()
An array of warnings to show when displaying the route.
|
boolean |
hasDuration()
The length of time needed to navigate the route.
|
boolean |
hasLocalizedValues()
Text representations of properties of the `Route`.
|
boolean |
hasPolyline()
The overall route polyline.
|
boolean |
hasPolylineDetails()
Contains information about details along the polyline.
|
boolean |
hasStaticDuration()
The duration of travel through the route without taking traffic
conditions into consideration.
|
boolean |
hasTravelAdvisory()
Additional information about the route.
|
boolean |
hasViewport()
The viewport bounding box of the polyline.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Route.Builder |
mergeDuration(com.google.protobuf.Duration value)
The length of time needed to navigate the route.
|
Route.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Route.Builder |
mergeFrom(com.google.protobuf.Message other) |
Route.Builder |
mergeFrom(Route other) |
Route.Builder |
mergeLocalizedValues(Route.RouteLocalizedValues value)
Text representations of properties of the `Route`.
|
Route.Builder |
mergePolyline(Polyline value)
The overall route polyline.
|
Route.Builder |
mergePolylineDetails(PolylineDetails value)
Contains information about details along the polyline.
|
Route.Builder |
mergeStaticDuration(com.google.protobuf.Duration value)
The duration of travel through the route without taking traffic
conditions into consideration.
|
Route.Builder |
mergeTravelAdvisory(RouteTravelAdvisory value)
Additional information about the route.
|
Route.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Route.Builder |
mergeViewport(com.google.geo.type.Viewport value)
The viewport bounding box of the polyline.
|
Route.Builder |
removeLegs(int index)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
setDescription(String value)
A description of the route.
|
Route.Builder |
setDescriptionBytes(com.google.protobuf.ByteString value)
A description of the route.
|
Route.Builder |
setDistanceMeters(int value)
The travel distance of the route, in meters.
|
Route.Builder |
setDuration(com.google.protobuf.Duration.Builder builderForValue)
The length of time needed to navigate the route.
|
Route.Builder |
setDuration(com.google.protobuf.Duration value)
The length of time needed to navigate the route.
|
Route.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Route.Builder |
setLegs(int index,
RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
setLegs(int index,
RouteLeg value)
A collection of legs (path segments between waypoints) that make up the
route.
|
Route.Builder |
setLocalizedValues(Route.RouteLocalizedValues.Builder builderForValue)
Text representations of properties of the `Route`.
|
Route.Builder |
setLocalizedValues(Route.RouteLocalizedValues value)
Text representations of properties of the `Route`.
|
Route.Builder |
setOptimizedIntermediateWaypointIndex(int index,
int value)
If you set
[`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
to true, this field contains the optimized ordering of intermediate
waypoints.
|
Route.Builder |
setPolyline(Polyline.Builder builderForValue)
The overall route polyline.
|
Route.Builder |
setPolyline(Polyline value)
The overall route polyline.
|
Route.Builder |
setPolylineDetails(PolylineDetails.Builder builderForValue)
Contains information about details along the polyline.
|
Route.Builder |
setPolylineDetails(PolylineDetails value)
Contains information about details along the polyline.
|
Route.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Route.Builder |
setRouteLabels(int index,
RouteLabel value)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
setRouteLabelsValue(int index,
int value)
Labels for the `Route` that are useful to identify specific properties
of the route to compare against others.
|
Route.Builder |
setRouteToken(String value)
An opaque token that can be passed to [Navigation
SDK](https://developers.google.com/maps/documentation/navigation) to
reconstruct the route during navigation, and, in the event of rerouting,
honor the original intention when the route was created.
|
Route.Builder |
setRouteTokenBytes(com.google.protobuf.ByteString value)
An opaque token that can be passed to [Navigation
SDK](https://developers.google.com/maps/documentation/navigation) to
reconstruct the route during navigation, and, in the event of rerouting,
honor the original intention when the route was created.
|
Route.Builder |
setStaticDuration(com.google.protobuf.Duration.Builder builderForValue)
The duration of travel through the route without taking traffic
conditions into consideration.
|
Route.Builder |
setStaticDuration(com.google.protobuf.Duration value)
The duration of travel through the route without taking traffic
conditions into consideration.
|
Route.Builder |
setTravelAdvisory(RouteTravelAdvisory.Builder builderForValue)
Additional information about the route.
|
Route.Builder |
setTravelAdvisory(RouteTravelAdvisory value)
Additional information about the route.
|
Route.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Route.Builder |
setViewport(com.google.geo.type.Viewport.Builder builderForValue)
The viewport bounding box of the polyline.
|
Route.Builder |
setViewport(com.google.geo.type.Viewport value)
The viewport bounding box of the polyline.
|
Route.Builder |
setWarnings(int index,
String value)
An array of warnings to show when displaying the route.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Route build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Route buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Route.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Route.Builder>public Route.Builder mergeFrom(Route other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public Route.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Route.Builder>IOExceptionpublic List<RouteLabel> getRouteLabelsList()
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;getRouteLabelsList in interface RouteOrBuilderpublic int getRouteLabelsCount()
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;getRouteLabelsCount in interface RouteOrBuilderpublic RouteLabel getRouteLabels(int index)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;getRouteLabels in interface RouteOrBuilderindex - The index of the element to return.public Route.Builder setRouteLabels(int index, RouteLabel value)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;index - The index to set the value at.value - The routeLabels to set.public Route.Builder addRouteLabels(RouteLabel value)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;value - The routeLabels to add.public Route.Builder addAllRouteLabels(Iterable<? extends RouteLabel> values)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;values - The routeLabels to add.public Route.Builder clearRouteLabels()
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;public List<Integer> getRouteLabelsValueList()
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;getRouteLabelsValueList in interface RouteOrBuilderpublic int getRouteLabelsValue(int index)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;getRouteLabelsValue in interface RouteOrBuilderindex - The index of the value to return.public Route.Builder setRouteLabelsValue(int index, int value)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;index - The index to set the value at.value - The enum numeric value on the wire for routeLabels to set.public Route.Builder addRouteLabelsValue(int value)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;value - The enum numeric value on the wire for routeLabels to add.public Route.Builder addAllRouteLabelsValue(Iterable<Integer> values)
Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
repeated .google.maps.routing.v2.RouteLabel route_labels = 13;values - The enum numeric values on the wire for routeLabels to add.public List<RouteLeg> getLegsList()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;getLegsList in interface RouteOrBuilderpublic int getLegsCount()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;getLegsCount in interface RouteOrBuilderpublic RouteLeg getLegs(int index)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;getLegs in interface RouteOrBuilderpublic Route.Builder setLegs(int index, RouteLeg value)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder setLegs(int index, RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder addLegs(RouteLeg value)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder addLegs(int index, RouteLeg value)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder addLegs(RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder addLegs(int index, RouteLeg.Builder builderForValue)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder addAllLegs(Iterable<? extends RouteLeg> values)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder clearLegs()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public Route.Builder removeLegs(int index)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public RouteLeg.Builder getLegsBuilder(int index)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public RouteLegOrBuilder getLegsOrBuilder(int index)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;getLegsOrBuilder in interface RouteOrBuilderpublic List<? extends RouteLegOrBuilder> getLegsOrBuilderList()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;getLegsOrBuilderList in interface RouteOrBuilderpublic RouteLeg.Builder addLegsBuilder()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public RouteLeg.Builder addLegsBuilder(int index)
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public List<RouteLeg.Builder> getLegsBuilderList()
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-`via` [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-`via` intermediate waypoint has two legs. A route that includes one `via` intermediate waypoint has one leg. The order of the legs matches the order of waypoints from `origin` to `intermediates` to `destination`.
repeated .google.maps.routing.v2.RouteLeg legs = 1;public int getDistanceMeters()
The travel distance of the route, in meters.
int32 distance_meters = 2;getDistanceMeters in interface RouteOrBuilderpublic Route.Builder setDistanceMeters(int value)
The travel distance of the route, in meters.
int32 distance_meters = 2;value - The distanceMeters to set.public Route.Builder clearDistanceMeters()
The travel distance of the route, in meters.
int32 distance_meters = 2;public boolean hasDuration()
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;hasDuration in interface RouteOrBuilderpublic com.google.protobuf.Duration getDuration()
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;getDuration in interface RouteOrBuilderpublic Route.Builder setDuration(com.google.protobuf.Duration value)
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;public Route.Builder setDuration(com.google.protobuf.Duration.Builder builderForValue)
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;public Route.Builder mergeDuration(com.google.protobuf.Duration value)
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;public Route.Builder clearDuration()
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;public com.google.protobuf.Duration.Builder getDurationBuilder()
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
The length of time needed to navigate the route. If you set the `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If you set the `routing_preference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 3;getDurationOrBuilder in interface RouteOrBuilderpublic boolean hasStaticDuration()
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;hasStaticDuration in interface RouteOrBuilderpublic com.google.protobuf.Duration getStaticDuration()
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;getStaticDuration in interface RouteOrBuilderpublic Route.Builder setStaticDuration(com.google.protobuf.Duration value)
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;public Route.Builder setStaticDuration(com.google.protobuf.Duration.Builder builderForValue)
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;public Route.Builder mergeStaticDuration(com.google.protobuf.Duration value)
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;public Route.Builder clearStaticDuration()
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;public com.google.protobuf.Duration.Builder getStaticDurationBuilder()
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
The duration of travel through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 4;getStaticDurationOrBuilder in interface RouteOrBuilderpublic boolean hasPolyline()
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;hasPolyline in interface RouteOrBuilderpublic Polyline getPolyline()
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;getPolyline in interface RouteOrBuilderpublic Route.Builder setPolyline(Polyline value)
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;public Route.Builder setPolyline(Polyline.Builder builderForValue)
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;public Route.Builder mergePolyline(Polyline value)
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;public Route.Builder clearPolyline()
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;public Polyline.Builder getPolylineBuilder()
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;public PolylineOrBuilder getPolylineOrBuilder()
The overall route polyline. This polyline is the combined polyline of all `legs`.
.google.maps.routing.v2.Polyline polyline = 5;getPolylineOrBuilder in interface RouteOrBuilderpublic String getDescription()
A description of the route.
string description = 6;getDescription in interface RouteOrBuilderpublic com.google.protobuf.ByteString getDescriptionBytes()
A description of the route.
string description = 6;getDescriptionBytes in interface RouteOrBuilderpublic Route.Builder setDescription(String value)
A description of the route.
string description = 6;value - The description to set.public Route.Builder clearDescription()
A description of the route.
string description = 6;public Route.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
A description of the route.
string description = 6;value - The bytes for description to set.public com.google.protobuf.ProtocolStringList getWarningsList()
An array of warnings to show when displaying the route.
repeated string warnings = 7;getWarningsList in interface RouteOrBuilderpublic int getWarningsCount()
An array of warnings to show when displaying the route.
repeated string warnings = 7;getWarningsCount in interface RouteOrBuilderpublic String getWarnings(int index)
An array of warnings to show when displaying the route.
repeated string warnings = 7;getWarnings in interface RouteOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getWarningsBytes(int index)
An array of warnings to show when displaying the route.
repeated string warnings = 7;getWarningsBytes in interface RouteOrBuilderindex - The index of the value to return.public Route.Builder setWarnings(int index, String value)
An array of warnings to show when displaying the route.
repeated string warnings = 7;index - The index to set the value at.value - The warnings to set.public Route.Builder addWarnings(String value)
An array of warnings to show when displaying the route.
repeated string warnings = 7;value - The warnings to add.public Route.Builder addAllWarnings(Iterable<String> values)
An array of warnings to show when displaying the route.
repeated string warnings = 7;values - The warnings to add.public Route.Builder clearWarnings()
An array of warnings to show when displaying the route.
repeated string warnings = 7;public Route.Builder addWarningsBytes(com.google.protobuf.ByteString value)
An array of warnings to show when displaying the route.
repeated string warnings = 7;value - The bytes of the warnings to add.public boolean hasViewport()
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;hasViewport in interface RouteOrBuilderpublic com.google.geo.type.Viewport getViewport()
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;getViewport in interface RouteOrBuilderpublic Route.Builder setViewport(com.google.geo.type.Viewport value)
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;public Route.Builder setViewport(com.google.geo.type.Viewport.Builder builderForValue)
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;public Route.Builder mergeViewport(com.google.geo.type.Viewport value)
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;public Route.Builder clearViewport()
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;public com.google.geo.type.Viewport.Builder getViewportBuilder()
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder()
The viewport bounding box of the polyline.
.google.geo.type.Viewport viewport = 8;getViewportOrBuilder in interface RouteOrBuilderpublic boolean hasTravelAdvisory()
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;hasTravelAdvisory in interface RouteOrBuilderpublic RouteTravelAdvisory getTravelAdvisory()
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;getTravelAdvisory in interface RouteOrBuilderpublic Route.Builder setTravelAdvisory(RouteTravelAdvisory value)
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;public Route.Builder setTravelAdvisory(RouteTravelAdvisory.Builder builderForValue)
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;public Route.Builder mergeTravelAdvisory(RouteTravelAdvisory value)
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;public Route.Builder clearTravelAdvisory()
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;public RouteTravelAdvisory.Builder getTravelAdvisoryBuilder()
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;public RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
Additional information about the route.
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;getTravelAdvisoryOrBuilder in interface RouteOrBuilderpublic List<Integer> getOptimizedIntermediateWaypointIndexList()
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;getOptimizedIntermediateWaypointIndexList in interface RouteOrBuilderpublic int getOptimizedIntermediateWaypointIndexCount()
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;getOptimizedIntermediateWaypointIndexCount in interface RouteOrBuilderpublic int getOptimizedIntermediateWaypointIndex(int index)
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;getOptimizedIntermediateWaypointIndex in interface RouteOrBuilderindex - The index of the element to return.public Route.Builder setOptimizedIntermediateWaypointIndex(int index, int value)
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;index - The index to set the value at.value - The optimizedIntermediateWaypointIndex to set.public Route.Builder addOptimizedIntermediateWaypointIndex(int value)
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;value - The optimizedIntermediateWaypointIndex to add.public Route.Builder addAllOptimizedIntermediateWaypointIndex(Iterable<? extends Integer> values)
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;values - The optimizedIntermediateWaypointIndex to add.public Route.Builder clearOptimizedIntermediateWaypointIndex()
If you set [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.
repeated int32 optimized_intermediate_waypoint_index = 10;public boolean hasLocalizedValues()
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;hasLocalizedValues in interface RouteOrBuilderpublic Route.RouteLocalizedValues getLocalizedValues()
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;getLocalizedValues in interface RouteOrBuilderpublic Route.Builder setLocalizedValues(Route.RouteLocalizedValues value)
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;public Route.Builder setLocalizedValues(Route.RouteLocalizedValues.Builder builderForValue)
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;public Route.Builder mergeLocalizedValues(Route.RouteLocalizedValues value)
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;public Route.Builder clearLocalizedValues()
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;public Route.RouteLocalizedValues.Builder getLocalizedValuesBuilder()
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;public Route.RouteLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
Text representations of properties of the `Route`.
.google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;getLocalizedValuesOrBuilder in interface RouteOrBuilderpublic String getRouteToken()
An opaque token that can be passed to [Navigation SDK](https://developers.google.com/maps/documentation/navigation) to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. NOTE: `Route.route_token` is only available for requests that have set `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests that have Via waypoints.
string route_token = 12;getRouteToken in interface RouteOrBuilderpublic com.google.protobuf.ByteString getRouteTokenBytes()
An opaque token that can be passed to [Navigation SDK](https://developers.google.com/maps/documentation/navigation) to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. NOTE: `Route.route_token` is only available for requests that have set `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests that have Via waypoints.
string route_token = 12;getRouteTokenBytes in interface RouteOrBuilderpublic Route.Builder setRouteToken(String value)
An opaque token that can be passed to [Navigation SDK](https://developers.google.com/maps/documentation/navigation) to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. NOTE: `Route.route_token` is only available for requests that have set `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests that have Via waypoints.
string route_token = 12;value - The routeToken to set.public Route.Builder clearRouteToken()
An opaque token that can be passed to [Navigation SDK](https://developers.google.com/maps/documentation/navigation) to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. NOTE: `Route.route_token` is only available for requests that have set `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests that have Via waypoints.
string route_token = 12;public Route.Builder setRouteTokenBytes(com.google.protobuf.ByteString value)
An opaque token that can be passed to [Navigation SDK](https://developers.google.com/maps/documentation/navigation) to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. NOTE: `Route.route_token` is only available for requests that have set `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests that have Via waypoints.
string route_token = 12;value - The bytes for routeToken to set.public boolean hasPolylineDetails()
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;hasPolylineDetails in interface RouteOrBuilderpublic PolylineDetails getPolylineDetails()
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;getPolylineDetails in interface RouteOrBuilderpublic Route.Builder setPolylineDetails(PolylineDetails value)
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;public Route.Builder setPolylineDetails(PolylineDetails.Builder builderForValue)
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;public Route.Builder mergePolylineDetails(PolylineDetails value)
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;public Route.Builder clearPolylineDetails()
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;public PolylineDetails.Builder getPolylineDetailsBuilder()
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;public PolylineDetailsOrBuilder getPolylineDetailsOrBuilder()
Contains information about details along the polyline.
.google.maps.routing.v2.PolylineDetails polyline_details = 14;getPolylineDetailsOrBuilder in interface RouteOrBuilderpublic final Route.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>public final Route.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>Copyright © 2025 Google LLC. All rights reserved.