1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/maps/routing/v2/routing_preference.proto 18 19 package com.google.maps.routing.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * A set of values that specify factors to take into consideration when 26 * calculating the route. 27 * </pre> 28 * 29 * Protobuf enum {@code google.maps.routing.v2.RoutingPreference} 30 */ 31 public enum RoutingPreference implements com.google.protobuf.ProtocolMessageEnum { 32 /** 33 * 34 * 35 * <pre> 36 * No routing preference specified. Default to `TRAFFIC_UNAWARE`. 37 * </pre> 38 * 39 * <code>ROUTING_PREFERENCE_UNSPECIFIED = 0;</code> 40 */ 41 ROUTING_PREFERENCE_UNSPECIFIED(0), 42 /** 43 * 44 * 45 * <pre> 46 * Computes routes without taking live traffic conditions into consideration. 47 * Suitable when traffic conditions don't matter or are not applicable. 48 * Using this value produces the lowest latency. 49 * Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE` 50 * and `TWO_WHEELER` choice of route and duration are based on road network 51 * and average time-independent traffic conditions. Results for a given 52 * request may vary over time due to changes in the road network, updated 53 * average traffic conditions, and the distributed nature of the service. 54 * Results may also vary between nearly-equivalent routes at any time or 55 * frequency. 56 * </pre> 57 * 58 * <code>TRAFFIC_UNAWARE = 1;</code> 59 */ 60 TRAFFIC_UNAWARE(1), 61 /** 62 * 63 * 64 * <pre> 65 * Calculates routes taking live traffic conditions into consideration. 66 * In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to 67 * significantly reduce latency. 68 * </pre> 69 * 70 * <code>TRAFFIC_AWARE = 2;</code> 71 */ 72 TRAFFIC_AWARE(2), 73 /** 74 * 75 * 76 * <pre> 77 * Calculates the routes taking live traffic conditions into consideration, 78 * without applying most performance optimizations. Using this value produces 79 * the highest latency. 80 * </pre> 81 * 82 * <code>TRAFFIC_AWARE_OPTIMAL = 3;</code> 83 */ 84 TRAFFIC_AWARE_OPTIMAL(3), 85 UNRECOGNIZED(-1), 86 ; 87 88 /** 89 * 90 * 91 * <pre> 92 * No routing preference specified. Default to `TRAFFIC_UNAWARE`. 93 * </pre> 94 * 95 * <code>ROUTING_PREFERENCE_UNSPECIFIED = 0;</code> 96 */ 97 public static final int ROUTING_PREFERENCE_UNSPECIFIED_VALUE = 0; 98 /** 99 * 100 * 101 * <pre> 102 * Computes routes without taking live traffic conditions into consideration. 103 * Suitable when traffic conditions don't matter or are not applicable. 104 * Using this value produces the lowest latency. 105 * Note: For [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] `DRIVE` 106 * and `TWO_WHEELER` choice of route and duration are based on road network 107 * and average time-independent traffic conditions. Results for a given 108 * request may vary over time due to changes in the road network, updated 109 * average traffic conditions, and the distributed nature of the service. 110 * Results may also vary between nearly-equivalent routes at any time or 111 * frequency. 112 * </pre> 113 * 114 * <code>TRAFFIC_UNAWARE = 1;</code> 115 */ 116 public static final int TRAFFIC_UNAWARE_VALUE = 1; 117 /** 118 * 119 * 120 * <pre> 121 * Calculates routes taking live traffic conditions into consideration. 122 * In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to 123 * significantly reduce latency. 124 * </pre> 125 * 126 * <code>TRAFFIC_AWARE = 2;</code> 127 */ 128 public static final int TRAFFIC_AWARE_VALUE = 2; 129 /** 130 * 131 * 132 * <pre> 133 * Calculates the routes taking live traffic conditions into consideration, 134 * without applying most performance optimizations. Using this value produces 135 * the highest latency. 136 * </pre> 137 * 138 * <code>TRAFFIC_AWARE_OPTIMAL = 3;</code> 139 */ 140 public static final int TRAFFIC_AWARE_OPTIMAL_VALUE = 3; 141 getNumber()142 public final int getNumber() { 143 if (this == UNRECOGNIZED) { 144 throw new java.lang.IllegalArgumentException( 145 "Can't get the number of an unknown enum value."); 146 } 147 return value; 148 } 149 150 /** 151 * @param value The numeric wire value of the corresponding enum entry. 152 * @return The enum associated with the given numeric wire value. 153 * @deprecated Use {@link #forNumber(int)} instead. 154 */ 155 @java.lang.Deprecated valueOf(int value)156 public static RoutingPreference valueOf(int value) { 157 return forNumber(value); 158 } 159 160 /** 161 * @param value The numeric wire value of the corresponding enum entry. 162 * @return The enum associated with the given numeric wire value. 163 */ forNumber(int value)164 public static RoutingPreference forNumber(int value) { 165 switch (value) { 166 case 0: 167 return ROUTING_PREFERENCE_UNSPECIFIED; 168 case 1: 169 return TRAFFIC_UNAWARE; 170 case 2: 171 return TRAFFIC_AWARE; 172 case 3: 173 return TRAFFIC_AWARE_OPTIMAL; 174 default: 175 return null; 176 } 177 } 178 internalGetValueMap()179 public static com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> internalGetValueMap() { 180 return internalValueMap; 181 } 182 183 private static final com.google.protobuf.Internal.EnumLiteMap<RoutingPreference> 184 internalValueMap = 185 new com.google.protobuf.Internal.EnumLiteMap<RoutingPreference>() { 186 public RoutingPreference findValueByNumber(int number) { 187 return RoutingPreference.forNumber(number); 188 } 189 }; 190 getValueDescriptor()191 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 192 if (this == UNRECOGNIZED) { 193 throw new java.lang.IllegalStateException( 194 "Can't get the descriptor of an unrecognized enum value."); 195 } 196 return getDescriptor().getValues().get(ordinal()); 197 } 198 getDescriptorForType()199 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 200 return getDescriptor(); 201 } 202 getDescriptor()203 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 204 return com.google.maps.routing.v2.RoutingPreferenceProto.getDescriptor().getEnumTypes().get(0); 205 } 206 207 private static final RoutingPreference[] VALUES = values(); 208 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)209 public static RoutingPreference valueOf( 210 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 211 if (desc.getType() != getDescriptor()) { 212 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 213 } 214 if (desc.getIndex() == -1) { 215 return UNRECOGNIZED; 216 } 217 return VALUES[desc.getIndex()]; 218 } 219 220 private final int value; 221 RoutingPreference(int value)222 private RoutingPreference(int value) { 223 this.value = value; 224 } 225 226 // @@protoc_insertion_point(enum_scope:google.maps.routing.v2.RoutingPreference) 227 } 228