Enum RoutingPreference

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<RoutingPreference>

    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 Detail

      • ROUTING_PREFERENCE_UNSPECIFIED

        public static final RoutingPreference ROUTING_PREFERENCE_UNSPECIFIED
         No routing preference specified. Default to `TRAFFIC_UNAWARE`.
         
        ROUTING_PREFERENCE_UNSPECIFIED = 0;
      • TRAFFIC_UNAWARE

        public static final RoutingPreference 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` choice of route and duration are based on road network
         and average time-independent traffic conditions. 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

        public static final RoutingPreference 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

        public static final RoutingPreference 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;
    • Field Detail

      • ROUTING_PREFERENCE_UNSPECIFIED_VALUE

        public static final int ROUTING_PREFERENCE_UNSPECIFIED_VALUE
         No routing preference specified. Default to `TRAFFIC_UNAWARE`.
         
        ROUTING_PREFERENCE_UNSPECIFIED = 0;
        See Also:
        Constant Field Values
      • TRAFFIC_UNAWARE_VALUE

        public static final int TRAFFIC_UNAWARE_VALUE
         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` choice of route and duration are based on road network
         and average time-independent traffic conditions. 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:
        Constant Field Values
      • TRAFFIC_AWARE_VALUE

        public static final int TRAFFIC_AWARE_VALUE
         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;
        See Also:
        Constant Field Values
      • TRAFFIC_AWARE_OPTIMAL_VALUE

        public static final int TRAFFIC_AWARE_OPTIMAL_VALUE
         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;
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static RoutingPreference[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RoutingPreference c : RoutingPreference.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RoutingPreference valueOf​(String name)
        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 name
        NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static RoutingPreference valueOf​(int value)
        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 name
        NullPointerException - if the argument is null
      • forNumber

        public static RoutingPreference forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • internalGetValueMap

        public static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> internalGetValueMap()
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static RoutingPreference valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        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 name
        NullPointerException - if the argument is null