public final class RouteLeg extends com.google.protobuf.GeneratedMessageV3 implements RouteLegOrBuilder
Contains a segment between non-`via` waypoints.Protobuf type
google.maps.routing.v2.RouteLeg| Modifier and Type | Class and Description |
|---|---|
static class |
RouteLeg.Builder
Contains a segment between non-`via` waypoints.
|
static class |
RouteLeg.RouteLegLocalizedValues
Text representations of certain properties.
|
static interface |
RouteLeg.RouteLegLocalizedValuesOrBuilder |
static class |
RouteLeg.StepsOverview
Provides overview information about a list of `RouteLegStep`s.
|
static interface |
RouteLeg.StepsOverviewOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DISTANCE_METERS_FIELD_NUMBER |
static int |
DURATION_FIELD_NUMBER |
static int |
END_LOCATION_FIELD_NUMBER |
static int |
LOCALIZED_VALUES_FIELD_NUMBER |
static int |
POLYLINE_FIELD_NUMBER |
static int |
START_LOCATION_FIELD_NUMBER |
static int |
STATIC_DURATION_FIELD_NUMBER |
static int |
STEPS_FIELD_NUMBER |
static int |
STEPS_OVERVIEW_FIELD_NUMBER |
static int |
TRAVEL_ADVISORY_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RouteLeg |
getDefaultInstance() |
RouteLeg |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
int |
getDistanceMeters()
The travel distance of the route leg, in meters.
|
com.google.protobuf.Duration |
getDuration()
The length of time needed to navigate the leg.
|
com.google.protobuf.DurationOrBuilder |
getDurationOrBuilder()
The length of time needed to navigate the leg.
|
Location |
getEndLocation()
The end location of this leg.
|
LocationOrBuilder |
getEndLocationOrBuilder()
The end location of this leg.
|
RouteLeg.RouteLegLocalizedValues |
getLocalizedValues()
Text representations of properties of the `RouteLeg`.
|
RouteLeg.RouteLegLocalizedValuesOrBuilder |
getLocalizedValuesOrBuilder()
Text representations of properties of the `RouteLeg`.
|
com.google.protobuf.Parser<RouteLeg> |
getParserForType() |
Polyline |
getPolyline()
The overall polyline for this leg that includes each `step`'s
polyline.
|
PolylineOrBuilder |
getPolylineOrBuilder()
The overall polyline for this leg that includes each `step`'s
polyline.
|
int |
getSerializedSize() |
Location |
getStartLocation()
The start location of this leg.
|
LocationOrBuilder |
getStartLocationOrBuilder()
The start location of this leg.
|
com.google.protobuf.Duration |
getStaticDuration()
The duration of travel through the leg, calculated without taking
traffic conditions into consideration.
|
com.google.protobuf.DurationOrBuilder |
getStaticDurationOrBuilder()
The duration of travel through the leg, calculated without taking
traffic conditions into consideration.
|
RouteLegStep |
getSteps(int index)
An array of steps denoting segments within this leg.
|
int |
getStepsCount()
An array of steps denoting segments within this leg.
|
List<RouteLegStep> |
getStepsList()
An array of steps denoting segments within this leg.
|
RouteLegStepOrBuilder |
getStepsOrBuilder(int index)
An array of steps denoting segments within this leg.
|
List<? extends RouteLegStepOrBuilder> |
getStepsOrBuilderList()
An array of steps denoting segments within this leg.
|
RouteLeg.StepsOverview |
getStepsOverview()
Overview information about the steps in this `RouteLeg`.
|
RouteLeg.StepsOverviewOrBuilder |
getStepsOverviewOrBuilder()
Overview information about the steps in this `RouteLeg`.
|
RouteLegTravelAdvisory |
getTravelAdvisory()
Contains the additional information that the user should be informed
about, such as possible traffic zone restrictions, on a route leg.
|
RouteLegTravelAdvisoryOrBuilder |
getTravelAdvisoryOrBuilder()
Contains the additional information that the user should be informed
about, such as possible traffic zone restrictions, on a route leg.
|
boolean |
hasDuration()
The length of time needed to navigate the leg.
|
boolean |
hasEndLocation()
The end location of this leg.
|
int |
hashCode() |
boolean |
hasLocalizedValues()
Text representations of properties of the `RouteLeg`.
|
boolean |
hasPolyline()
The overall polyline for this leg that includes each `step`'s
polyline.
|
boolean |
hasStartLocation()
The start location of this leg.
|
boolean |
hasStaticDuration()
The duration of travel through the leg, calculated without taking
traffic conditions into consideration.
|
boolean |
hasStepsOverview()
Overview information about the steps in this `RouteLeg`.
|
boolean |
hasTravelAdvisory()
Contains the additional information that the user should be informed
about, such as possible traffic zone restrictions, on a route leg.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RouteLeg.Builder |
newBuilder() |
static RouteLeg.Builder |
newBuilder(RouteLeg prototype) |
RouteLeg.Builder |
newBuilderForType() |
protected RouteLeg.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RouteLeg |
parseDelimitedFrom(InputStream input) |
static RouteLeg |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteLeg |
parseFrom(byte[] data) |
static RouteLeg |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteLeg |
parseFrom(ByteBuffer data) |
static RouteLeg |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteLeg |
parseFrom(com.google.protobuf.ByteString data) |
static RouteLeg |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteLeg |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RouteLeg |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteLeg |
parseFrom(InputStream input) |
static RouteLeg |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RouteLeg> |
parser() |
RouteLeg.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int DISTANCE_METERS_FIELD_NUMBER
public static final int DURATION_FIELD_NUMBER
public static final int STATIC_DURATION_FIELD_NUMBER
public static final int POLYLINE_FIELD_NUMBER
public static final int START_LOCATION_FIELD_NUMBER
public static final int END_LOCATION_FIELD_NUMBER
public static final int STEPS_FIELD_NUMBER
public static final int TRAVEL_ADVISORY_FIELD_NUMBER
public static final int LOCALIZED_VALUES_FIELD_NUMBER
public static final int STEPS_OVERVIEW_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getDistanceMeters()
The travel distance of the route leg, in meters.
int32 distance_meters = 1;getDistanceMeters in interface RouteLegOrBuilderpublic boolean hasDuration()
The length of time needed to navigate the leg. If the `route_preference` is set to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 2;hasDuration in interface RouteLegOrBuilderpublic com.google.protobuf.Duration getDuration()
The length of time needed to navigate the leg. If the `route_preference` is set to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 2;getDuration in interface RouteLegOrBuilderpublic com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
The length of time needed to navigate the leg. If the `route_preference` is set to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic conditions into account.
.google.protobuf.Duration duration = 2;getDurationOrBuilder in interface RouteLegOrBuilderpublic boolean hasStaticDuration()
The duration of travel through the leg, calculated without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 3;hasStaticDuration in interface RouteLegOrBuilderpublic com.google.protobuf.Duration getStaticDuration()
The duration of travel through the leg, calculated without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 3;getStaticDuration in interface RouteLegOrBuilderpublic com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
The duration of travel through the leg, calculated without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 3;getStaticDurationOrBuilder in interface RouteLegOrBuilderpublic boolean hasPolyline()
The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;hasPolyline in interface RouteLegOrBuilderpublic Polyline getPolyline()
The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;getPolyline in interface RouteLegOrBuilderpublic PolylineOrBuilder getPolylineOrBuilder()
The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;getPolylineOrBuilder in interface RouteLegOrBuilderpublic boolean hasStartLocation()
The start location of this leg. This location might be different from the provided `origin`. For example, when the provided `origin` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location start_location = 5;hasStartLocation in interface RouteLegOrBuilderpublic Location getStartLocation()
The start location of this leg. This location might be different from the provided `origin`. For example, when the provided `origin` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location start_location = 5;getStartLocation in interface RouteLegOrBuilderpublic LocationOrBuilder getStartLocationOrBuilder()
The start location of this leg. This location might be different from the provided `origin`. For example, when the provided `origin` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location start_location = 5;getStartLocationOrBuilder in interface RouteLegOrBuilderpublic boolean hasEndLocation()
The end location of this leg. This location might be different from the provided `destination`. For example, when the provided `destination` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location end_location = 6;hasEndLocation in interface RouteLegOrBuilderpublic Location getEndLocation()
The end location of this leg. This location might be different from the provided `destination`. For example, when the provided `destination` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location end_location = 6;getEndLocation in interface RouteLegOrBuilderpublic LocationOrBuilder getEndLocationOrBuilder()
The end location of this leg. This location might be different from the provided `destination`. For example, when the provided `destination` is not near a road, this is a point on the road.
.google.maps.routing.v2.Location end_location = 6;getEndLocationOrBuilder in interface RouteLegOrBuilderpublic List<RouteLegStep> getStepsList()
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;getStepsList in interface RouteLegOrBuilderpublic List<? extends RouteLegStepOrBuilder> getStepsOrBuilderList()
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;getStepsOrBuilderList in interface RouteLegOrBuilderpublic int getStepsCount()
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;getStepsCount in interface RouteLegOrBuilderpublic RouteLegStep getSteps(int index)
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;getSteps in interface RouteLegOrBuilderpublic RouteLegStepOrBuilder getStepsOrBuilder(int index)
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;getStepsOrBuilder in interface RouteLegOrBuilderpublic boolean hasTravelAdvisory()
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.
.google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;hasTravelAdvisory in interface RouteLegOrBuilderpublic RouteLegTravelAdvisory getTravelAdvisory()
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.
.google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;getTravelAdvisory in interface RouteLegOrBuilderpublic RouteLegTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.
.google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;getTravelAdvisoryOrBuilder in interface RouteLegOrBuilderpublic boolean hasLocalizedValues()
Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;hasLocalizedValues in interface RouteLegOrBuilderpublic RouteLeg.RouteLegLocalizedValues getLocalizedValues()
Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;getLocalizedValues in interface RouteLegOrBuilderpublic RouteLeg.RouteLegLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;getLocalizedValuesOrBuilder in interface RouteLegOrBuilderpublic boolean hasStepsOverview()
Overview information about the steps in this `RouteLeg`. This field is only populated for TRANSIT routes.
.google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;hasStepsOverview in interface RouteLegOrBuilderpublic RouteLeg.StepsOverview getStepsOverview()
Overview information about the steps in this `RouteLeg`. This field is only populated for TRANSIT routes.
.google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;getStepsOverview in interface RouteLegOrBuilderpublic RouteLeg.StepsOverviewOrBuilder getStepsOverviewOrBuilder()
Overview information about the steps in this `RouteLeg`. This field is only populated for TRANSIT routes.
.google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;getStepsOverviewOrBuilder in interface RouteLegOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RouteLeg parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteLeg parseFrom(InputStream input) throws IOException
IOExceptionpublic static RouteLeg parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteLeg parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RouteLeg parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteLeg parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RouteLeg parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RouteLeg.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RouteLeg.Builder newBuilder()
public static RouteLeg.Builder newBuilder(RouteLeg prototype)
public RouteLeg.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RouteLeg.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RouteLeg getDefaultInstance()
public static com.google.protobuf.Parser<RouteLeg> parser()
public com.google.protobuf.Parser<RouteLeg> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RouteLeg getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.