Package com.google.maps.routing.v2
Class RouteLeg
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.maps.routing.v2.RouteLeg
- All Implemented Interfaces:
RouteLegOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class RouteLeg
extends com.google.protobuf.GeneratedMessage
implements RouteLegOrBuilder
Contains a segment between non-`via` waypoints.Protobuf type
google.maps.routing.v2.RouteLeg- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains a segment between non-`via` waypoints.static final classText representations of certain properties.static interfacestatic final classProvides overview information about a list of `RouteLegStep`s.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RouteLegstatic final com.google.protobuf.Descriptors.DescriptorintThe travel distance of the route leg, in meters.com.google.protobuf.DurationThe length of time needed to navigate the leg.com.google.protobuf.DurationOrBuilderThe length of time needed to navigate the leg.The end location of this leg.The end location of this leg.Text representations of properties of the `RouteLeg`.Text representations of properties of the `RouteLeg`.com.google.protobuf.Parser<RouteLeg>The overall polyline for this leg that includes each `step`'s polyline.The overall polyline for this leg that includes each `step`'s polyline.intThe start location of this leg.The start location of this leg.com.google.protobuf.DurationThe duration of travel through the leg, calculated without taking traffic conditions into consideration.com.google.protobuf.DurationOrBuilderThe duration of travel through the leg, calculated without taking traffic conditions into consideration.getSteps(int index) An array of steps denoting segments within this leg.intAn array of steps denoting segments within this leg.An array of steps denoting segments within this leg.getStepsOrBuilder(int index) An array of steps denoting segments within this leg.List<? extends RouteLegStepOrBuilder>An array of steps denoting segments within this leg.Overview information about the steps in this `RouteLeg`.Overview information about the steps in this `RouteLeg`.Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.booleanThe length of time needed to navigate the leg.booleanThe end location of this leg.inthashCode()booleanText representations of properties of the `RouteLeg`.booleanThe overall polyline for this leg that includes each `step`'s polyline.booleanThe start location of this leg.booleanThe duration of travel through the leg, calculated without taking traffic conditions into consideration.booleanOverview information about the steps in this `RouteLeg`.booleanContains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic RouteLeg.Builderstatic RouteLeg.BuildernewBuilder(RouteLeg prototype) protected RouteLeg.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static RouteLegparseDelimitedFrom(InputStream input) static RouteLegparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteLegparseFrom(byte[] data) static RouteLegparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteLegparseFrom(com.google.protobuf.ByteString data) static RouteLegparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteLegparseFrom(com.google.protobuf.CodedInputStream input) static RouteLegparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteLegparseFrom(InputStream input) static RouteLegparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteLegparseFrom(ByteBuffer data) static RouteLegparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RouteLeg>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
DISTANCE_METERS_FIELD_NUMBER
public static final int DISTANCE_METERS_FIELD_NUMBER- See Also:
-
DURATION_FIELD_NUMBER
public static final int DURATION_FIELD_NUMBER- See Also:
-
STATIC_DURATION_FIELD_NUMBER
public static final int STATIC_DURATION_FIELD_NUMBER- See Also:
-
POLYLINE_FIELD_NUMBER
public static final int POLYLINE_FIELD_NUMBER- See Also:
-
START_LOCATION_FIELD_NUMBER
public static final int START_LOCATION_FIELD_NUMBER- See Also:
-
END_LOCATION_FIELD_NUMBER
public static final int END_LOCATION_FIELD_NUMBER- See Also:
-
STEPS_FIELD_NUMBER
public static final int STEPS_FIELD_NUMBER- See Also:
-
TRAVEL_ADVISORY_FIELD_NUMBER
public static final int TRAVEL_ADVISORY_FIELD_NUMBER- See Also:
-
LOCALIZED_VALUES_FIELD_NUMBER
public static final int LOCALIZED_VALUES_FIELD_NUMBER- See Also:
-
STEPS_OVERVIEW_FIELD_NUMBER
public static final int STEPS_OVERVIEW_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getDistanceMeters
public int getDistanceMeters()The travel distance of the route leg, in meters.
int32 distance_meters = 1;- Specified by:
getDistanceMetersin interfaceRouteLegOrBuilder- Returns:
- The distanceMeters.
-
hasDuration
public 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;- Specified by:
hasDurationin interfaceRouteLegOrBuilder- Returns:
- Whether the duration field is set.
-
getDuration
public 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;- Specified by:
getDurationin interfaceRouteLegOrBuilder- Returns:
- The duration.
-
getDurationOrBuilder
public 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;- Specified by:
getDurationOrBuilderin interfaceRouteLegOrBuilder
-
hasStaticDuration
public boolean hasStaticDuration()The duration of travel through the leg, calculated without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 3;- Specified by:
hasStaticDurationin interfaceRouteLegOrBuilder- Returns:
- Whether the staticDuration field is set.
-
getStaticDuration
public 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;- Specified by:
getStaticDurationin interfaceRouteLegOrBuilder- Returns:
- The staticDuration.
-
getStaticDurationOrBuilder
public 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;- Specified by:
getStaticDurationOrBuilderin interfaceRouteLegOrBuilder
-
hasPolyline
public boolean hasPolyline()The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;- Specified by:
hasPolylinein interfaceRouteLegOrBuilder- Returns:
- Whether the polyline field is set.
-
getPolyline
The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;- Specified by:
getPolylinein interfaceRouteLegOrBuilder- Returns:
- The polyline.
-
getPolylineOrBuilder
The overall polyline for this leg that includes each `step`'s polyline.
.google.maps.routing.v2.Polyline polyline = 4;- Specified by:
getPolylineOrBuilderin interfaceRouteLegOrBuilder
-
hasStartLocation
public 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;- Specified by:
hasStartLocationin interfaceRouteLegOrBuilder- Returns:
- Whether the startLocation field is set.
-
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;- Specified by:
getStartLocationin interfaceRouteLegOrBuilder- Returns:
- The startLocation.
-
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;- Specified by:
getStartLocationOrBuilderin interfaceRouteLegOrBuilder
-
hasEndLocation
public 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;- Specified by:
hasEndLocationin interfaceRouteLegOrBuilder- Returns:
- Whether the endLocation field is set.
-
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;- Specified by:
getEndLocationin interfaceRouteLegOrBuilder- Returns:
- The endLocation.
-
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;- Specified by:
getEndLocationOrBuilderin interfaceRouteLegOrBuilder
-
getStepsList
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;- Specified by:
getStepsListin interfaceRouteLegOrBuilder
-
getStepsOrBuilderList
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;- Specified by:
getStepsOrBuilderListin interfaceRouteLegOrBuilder
-
getStepsCount
public 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;- Specified by:
getStepsCountin interfaceRouteLegOrBuilder
-
getSteps
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;- Specified by:
getStepsin interfaceRouteLegOrBuilder
-
getStepsOrBuilder
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
repeated .google.maps.routing.v2.RouteLegStep steps = 7;- Specified by:
getStepsOrBuilderin interfaceRouteLegOrBuilder
-
hasTravelAdvisory
public 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;- Specified by:
hasTravelAdvisoryin interfaceRouteLegOrBuilder- Returns:
- Whether the travelAdvisory field is set.
-
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;- Specified by:
getTravelAdvisoryin interfaceRouteLegOrBuilder- Returns:
- The travelAdvisory.
-
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;- Specified by:
getTravelAdvisoryOrBuilderin interfaceRouteLegOrBuilder
-
hasLocalizedValues
public boolean hasLocalizedValues()Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;- Specified by:
hasLocalizedValuesin interfaceRouteLegOrBuilder- Returns:
- Whether the localizedValues field is set.
-
getLocalizedValues
Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;- Specified by:
getLocalizedValuesin interfaceRouteLegOrBuilder- Returns:
- The localizedValues.
-
getLocalizedValuesOrBuilder
Text representations of properties of the `RouteLeg`.
.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;- Specified by:
getLocalizedValuesOrBuilderin interfaceRouteLegOrBuilder
-
hasStepsOverview
public 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;- Specified by:
hasStepsOverviewin interfaceRouteLegOrBuilder- Returns:
- Whether the stepsOverview field is set.
-
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;- Specified by:
getStepsOverviewin interfaceRouteLegOrBuilder- Returns:
- The stepsOverview.
-
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;- Specified by:
getStepsOverviewOrBuilderin interfaceRouteLegOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RouteLeg parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteLeg parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteLeg parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteLeg parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteLeg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteLeg parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RouteLeg parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RouteLeg parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RouteLeg parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RouteLeg.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-