Package com.google.maps.routing.v2
Enum RoutingPreference
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<RoutingPreference>
@Generated
public enum RoutingPreference
extends Enum<RoutingPreference>
implements com.google.protobuf.ProtocolMessageEnum
A set of values that specify factors to take into consideration when calculating the route.Protobuf enum
google.maps.routing.v2.RoutingPreference-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo routing preference specified.Calculates routes taking live traffic conditions into consideration.Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.Computes routes without taking live traffic conditions into consideration. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNo routing preference specified.static final intCalculates the routes taking live traffic conditions into consideration, without applying most performance optimizations.static final intCalculates routes taking live traffic conditions into consideration.static final intComputes routes without taking live traffic conditions into consideration. -
Method Summary
Modifier and TypeMethodDescriptionstatic RoutingPreferenceforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<RoutingPreference>static RoutingPreferencevalueOf(int value) Deprecated.static RoutingPreferencevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static RoutingPreferenceReturns the enum constant of this type with the specified name.static RoutingPreference[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ROUTING_PREFERENCE_UNSPECIFIED
No routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0; -
TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1; -
TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2; -
TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3; -
UNRECOGNIZED
-
-
Field Details
-
ROUTING_PREFERENCE_UNSPECIFIED_VALUE
public static final int ROUTING_PREFERENCE_UNSPECIFIED_VALUENo routing preference specified. Default to `TRAFFIC_UNAWARE`.
ROUTING_PREFERENCE_UNSPECIFIED = 0;- See Also:
-
TRAFFIC_UNAWARE_VALUE
public static final int TRAFFIC_UNAWARE_VALUEComputes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] `DRIVE` and `TWO_WHEELER`, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_UNAWARE = 1;- See Also:
-
TRAFFIC_AWARE_VALUE
public static final int TRAFFIC_AWARE_VALUECalculates routes taking live traffic conditions into consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE = 2;- See Also:
-
TRAFFIC_AWARE_OPTIMAL_VALUE
public static final int TRAFFIC_AWARE_OPTIMAL_VALUECalculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
TRAFFIC_AWARE_OPTIMAL = 3;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-