Package com.google.maps.routing.v2
Class RouteMatrixElement
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.maps.routing.v2.RouteMatrixElement
- All Implemented Interfaces:
RouteMatrixElementOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class RouteMatrixElement
extends com.google.protobuf.GeneratedMessage
implements RouteMatrixElementOrBuilder
Contains route information computed for an origin/destination pair in the ComputeRouteMatrix API. This proto can be streamed to the client.Protobuf type
google.maps.routing.v2.RouteMatrixElement- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains route information computed for an origin/destination pair in the ComputeRouteMatrix API.static final classText representations of certain properties.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 TypeMethodDescriptionbooleanIndicates whether the route was found or not.intIndicates whether the route was found or not.static RouteMatrixElementstatic final com.google.protobuf.Descriptors.DescriptorintZero-based index of the destination in the request.intThe travel distance of the route, in meters.com.google.protobuf.DurationThe length of time needed to navigate the route.com.google.protobuf.DurationOrBuilderThe length of time needed to navigate the route.In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation.In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation.Text representations of properties of the `RouteMatrixElement`.Text representations of properties of the `RouteMatrixElement`.intZero-based index of the origin in the request.com.google.protobuf.Parser<RouteMatrixElement>intcom.google.protobuf.DurationThe duration of traveling through the route without taking traffic conditions into consideration.com.google.protobuf.DurationOrBuilderThe duration of traveling through the route without taking traffic conditions into consideration.Error status code for this element.Error status code for this element.Additional information about the route.Additional information about the route.booleanZero-based index of the destination in the request.booleanThe length of time needed to navigate the route.booleanIn some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation.inthashCode()booleanText representations of properties of the `RouteMatrixElement`.booleanZero-based index of the origin in the request.booleanThe duration of traveling through the route without taking traffic conditions into consideration.booleanError status code for this element.booleanAdditional information about the route.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic RouteMatrixElement.Builderstatic RouteMatrixElement.BuildernewBuilder(RouteMatrixElement prototype) protected RouteMatrixElement.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static RouteMatrixElementparseDelimitedFrom(InputStream input) static RouteMatrixElementparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteMatrixElementparseFrom(byte[] data) static RouteMatrixElementparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteMatrixElementparseFrom(com.google.protobuf.ByteString data) static RouteMatrixElementparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteMatrixElementparseFrom(com.google.protobuf.CodedInputStream input) static RouteMatrixElementparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteMatrixElementparseFrom(InputStream input) static RouteMatrixElementparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RouteMatrixElementparseFrom(ByteBuffer data) static RouteMatrixElementparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RouteMatrixElement>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
-
ORIGIN_INDEX_FIELD_NUMBER
public static final int ORIGIN_INDEX_FIELD_NUMBER- See Also:
-
DESTINATION_INDEX_FIELD_NUMBER
public static final int DESTINATION_INDEX_FIELD_NUMBER- See Also:
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER- See Also:
-
CONDITION_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER- See Also:
-
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:
-
TRAVEL_ADVISORY_FIELD_NUMBER
public static final int TRAVEL_ADVISORY_FIELD_NUMBER- See Also:
-
FALLBACK_INFO_FIELD_NUMBER
public static final int FALLBACK_INFO_FIELD_NUMBER- See Also:
-
LOCALIZED_VALUES_FIELD_NUMBER
public static final int LOCALIZED_VALUES_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
-
hasOriginIndex
public boolean hasOriginIndex()Zero-based index of the origin in the request.
optional int32 origin_index = 1;- Specified by:
hasOriginIndexin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the originIndex field is set.
-
getOriginIndex
public int getOriginIndex()Zero-based index of the origin in the request.
optional int32 origin_index = 1;- Specified by:
getOriginIndexin interfaceRouteMatrixElementOrBuilder- Returns:
- The originIndex.
-
hasDestinationIndex
public boolean hasDestinationIndex()Zero-based index of the destination in the request.
optional int32 destination_index = 2;- Specified by:
hasDestinationIndexin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the destinationIndex field is set.
-
getDestinationIndex
public int getDestinationIndex()Zero-based index of the destination in the request.
optional int32 destination_index = 2;- Specified by:
getDestinationIndexin interfaceRouteMatrixElementOrBuilder- Returns:
- The destinationIndex.
-
hasStatus
public boolean hasStatus()Error status code for this element.
.google.rpc.Status status = 3;- Specified by:
hasStatusin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the status field is set.
-
getStatus
Error status code for this element.
.google.rpc.Status status = 3;- Specified by:
getStatusin interfaceRouteMatrixElementOrBuilder- Returns:
- The status.
-
getStatusOrBuilder
Error status code for this element.
.google.rpc.Status status = 3;- Specified by:
getStatusOrBuilderin interfaceRouteMatrixElementOrBuilder
-
getConditionValue
public int getConditionValue()Indicates whether the route was found or not. Independent of status.
.google.maps.routing.v2.RouteMatrixElementCondition condition = 9;- Specified by:
getConditionValuein interfaceRouteMatrixElementOrBuilder- Returns:
- The enum numeric value on the wire for condition.
-
getCondition
Indicates whether the route was found or not. Independent of status.
.google.maps.routing.v2.RouteMatrixElementCondition condition = 9;- Specified by:
getConditionin interfaceRouteMatrixElementOrBuilder- Returns:
- The condition.
-
getDistanceMeters
public int getDistanceMeters()The travel distance of the route, in meters.
int32 distance_meters = 4;- Specified by:
getDistanceMetersin interfaceRouteMatrixElementOrBuilder- Returns:
- The distanceMeters.
-
hasDuration
public boolean hasDuration()The length of time needed to navigate the route. If you set the [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;- Specified by:
hasDurationin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the duration field is set.
-
getDuration
public com.google.protobuf.Duration getDuration()The length of time needed to navigate the route. If you set the [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;- Specified by:
getDurationin interfaceRouteMatrixElementOrBuilder- Returns:
- The duration.
-
getDurationOrBuilder
public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()The length of time needed to navigate the route. If you set the [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;- Specified by:
getDurationOrBuilderin interfaceRouteMatrixElementOrBuilder
-
hasStaticDuration
public boolean hasStaticDuration()The duration of traveling through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 6;- Specified by:
hasStaticDurationin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the staticDuration field is set.
-
getStaticDuration
public com.google.protobuf.Duration getStaticDuration()The duration of traveling through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 6;- Specified by:
getStaticDurationin interfaceRouteMatrixElementOrBuilder- Returns:
- The staticDuration.
-
getStaticDurationOrBuilder
public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()The duration of traveling through the route without taking traffic conditions into consideration.
.google.protobuf.Duration static_duration = 6;- Specified by:
getStaticDurationOrBuilderin interfaceRouteMatrixElementOrBuilder
-
hasTravelAdvisory
public boolean hasTravelAdvisory()Additional information about the route. For example: restriction information and toll information
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;- Specified by:
hasTravelAdvisoryin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the travelAdvisory field is set.
-
getTravelAdvisory
Additional information about the route. For example: restriction information and toll information
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;- Specified by:
getTravelAdvisoryin interfaceRouteMatrixElementOrBuilder- Returns:
- The travelAdvisory.
-
getTravelAdvisoryOrBuilder
Additional information about the route. For example: restriction information and toll information
.google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;- Specified by:
getTravelAdvisoryOrBuilderin interfaceRouteMatrixElementOrBuilder
-
hasFallbackInfo
public boolean hasFallbackInfo()In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation. When fallback mode is used, this field contains detailed information about the fallback response. Otherwise this field is unset.
.google.maps.routing.v2.FallbackInfo fallback_info = 8;- Specified by:
hasFallbackInfoin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the fallbackInfo field is set.
-
getFallbackInfo
In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation. When fallback mode is used, this field contains detailed information about the fallback response. Otherwise this field is unset.
.google.maps.routing.v2.FallbackInfo fallback_info = 8;- Specified by:
getFallbackInfoin interfaceRouteMatrixElementOrBuilder- Returns:
- The fallbackInfo.
-
getFallbackInfoOrBuilder
In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation. When fallback mode is used, this field contains detailed information about the fallback response. Otherwise this field is unset.
.google.maps.routing.v2.FallbackInfo fallback_info = 8;- Specified by:
getFallbackInfoOrBuilderin interfaceRouteMatrixElementOrBuilder
-
hasLocalizedValues
public boolean hasLocalizedValues()Text representations of properties of the `RouteMatrixElement`.
.google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;- Specified by:
hasLocalizedValuesin interfaceRouteMatrixElementOrBuilder- Returns:
- Whether the localizedValues field is set.
-
getLocalizedValues
Text representations of properties of the `RouteMatrixElement`.
.google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;- Specified by:
getLocalizedValuesin interfaceRouteMatrixElementOrBuilder- Returns:
- The localizedValues.
-
getLocalizedValuesOrBuilder
Text representations of properties of the `RouteMatrixElement`.
.google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;- Specified by:
getLocalizedValuesOrBuilderin interfaceRouteMatrixElementOrBuilder
-
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 RouteMatrixElement parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteMatrixElement parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteMatrixElement parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteMatrixElement parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteMatrixElement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RouteMatrixElement parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RouteMatrixElement parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RouteMatrixElement parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static RouteMatrixElement parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static RouteMatrixElement 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 RouteMatrixElement.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
-