public final class ComputeRoutesRequest extends com.google.protobuf.GeneratedMessageV3 implements ComputeRoutesRequestOrBuilder
ComputeRoutes request message.Protobuf type
google.maps.routing.v2.ComputeRoutesRequest| Modifier and Type | Class and Description |
|---|---|
static class |
ComputeRoutesRequest.Builder
ComputeRoutes request message.
|
static class |
ComputeRoutesRequest.ExtraComputation
Extra computations to perform while completing the request.
|
static class |
ComputeRoutesRequest.ReferenceRoute
A supported reference route on the ComputeRoutesRequest.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ARRIVAL_TIME_FIELD_NUMBER |
static int |
COMPUTE_ALTERNATIVE_ROUTES_FIELD_NUMBER |
static int |
DEPARTURE_TIME_FIELD_NUMBER |
static int |
DESTINATION_FIELD_NUMBER |
static int |
EXTRA_COMPUTATIONS_FIELD_NUMBER |
static int |
INTERMEDIATES_FIELD_NUMBER |
static int |
LANGUAGE_CODE_FIELD_NUMBER |
static int |
OPTIMIZE_WAYPOINT_ORDER_FIELD_NUMBER |
static int |
ORIGIN_FIELD_NUMBER |
static int |
POLYLINE_ENCODING_FIELD_NUMBER |
static int |
POLYLINE_QUALITY_FIELD_NUMBER |
static int |
REGION_CODE_FIELD_NUMBER |
static int |
REQUESTED_REFERENCE_ROUTES_FIELD_NUMBER |
static int |
ROUTE_MODIFIERS_FIELD_NUMBER |
static int |
ROUTING_PREFERENCE_FIELD_NUMBER |
static int |
TRAFFIC_MODEL_FIELD_NUMBER |
static int |
TRANSIT_PREFERENCES_FIELD_NUMBER |
static int |
TRAVEL_MODE_FIELD_NUMBER |
static int |
UNITS_FIELD_NUMBER |
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, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ORIGIN_FIELD_NUMBER
public static final int DESTINATION_FIELD_NUMBER
public static final int INTERMEDIATES_FIELD_NUMBER
public static final int TRAVEL_MODE_FIELD_NUMBER
public static final int ROUTING_PREFERENCE_FIELD_NUMBER
public static final int POLYLINE_QUALITY_FIELD_NUMBER
public static final int POLYLINE_ENCODING_FIELD_NUMBER
public static final int DEPARTURE_TIME_FIELD_NUMBER
public static final int ARRIVAL_TIME_FIELD_NUMBER
public static final int COMPUTE_ALTERNATIVE_ROUTES_FIELD_NUMBER
public static final int ROUTE_MODIFIERS_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER
public static final int REGION_CODE_FIELD_NUMBER
public static final int UNITS_FIELD_NUMBER
public static final int OPTIMIZE_WAYPOINT_ORDER_FIELD_NUMBER
public static final int REQUESTED_REFERENCE_ROUTES_FIELD_NUMBER
public static final int EXTRA_COMPUTATIONS_FIELD_NUMBER
public static final int TRAFFIC_MODEL_FIELD_NUMBER
public static final int TRANSIT_PREFERENCES_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public boolean hasOrigin()
Required. Origin waypoint.
.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED];
hasOrigin in interface ComputeRoutesRequestOrBuilderpublic Waypoint getOrigin()
Required. Origin waypoint.
.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED];
getOrigin in interface ComputeRoutesRequestOrBuilderpublic WaypointOrBuilder getOriginOrBuilder()
Required. Origin waypoint.
.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED];
getOriginOrBuilder in interface ComputeRoutesRequestOrBuilderpublic boolean hasDestination()
Required. Destination waypoint.
.google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED];
hasDestination in interface ComputeRoutesRequestOrBuilderpublic Waypoint getDestination()
Required. Destination waypoint.
.google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED];
getDestination in interface ComputeRoutesRequestOrBuilderpublic WaypointOrBuilder getDestinationOrBuilder()
Required. Destination waypoint.
.google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED];
getDestinationOrBuilder in interface ComputeRoutesRequestOrBuilderpublic List<Waypoint> getIntermediatesList()
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL];
getIntermediatesList in interface ComputeRoutesRequestOrBuilderpublic List<? extends WaypointOrBuilder> getIntermediatesOrBuilderList()
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL];
getIntermediatesOrBuilderList in interface ComputeRoutesRequestOrBuilderpublic int getIntermediatesCount()
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL];
getIntermediatesCount in interface ComputeRoutesRequestOrBuilderpublic Waypoint getIntermediates(int index)
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL];
getIntermediates in interface ComputeRoutesRequestOrBuilderpublic WaypointOrBuilder getIntermediatesOrBuilder(int index)
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL];
getIntermediatesOrBuilder in interface ComputeRoutesRequestOrBuilderpublic int getTravelModeValue()
Optional. Specifies the mode of transportation.
.google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
getTravelModeValue in interface ComputeRoutesRequestOrBuilderpublic RouteTravelMode getTravelMode()
Optional. Specifies the mode of transportation.
.google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
getTravelMode in interface ComputeRoutesRequestOrBuilderpublic int getRoutingPreferenceValue()
Optional. Specifies how to compute the route. The server attempts to use the selected routing preference to compute the route. If the routing preference results in an error or an extra long latency, then an error is returned. You can specify this option only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
.google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
getRoutingPreferenceValue in interface ComputeRoutesRequestOrBuilderpublic RoutingPreference getRoutingPreference()
Optional. Specifies how to compute the route. The server attempts to use the selected routing preference to compute the route. If the routing preference results in an error or an extra long latency, then an error is returned. You can specify this option only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
.google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
getRoutingPreference in interface ComputeRoutesRequestOrBuilderpublic int getPolylineQualityValue()
Optional. Specifies your preference for the quality of the polyline.
.google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL];
getPolylineQualityValue in interface ComputeRoutesRequestOrBuilderpublic PolylineQuality getPolylineQuality()
Optional. Specifies your preference for the quality of the polyline.
.google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL];
getPolylineQuality in interface ComputeRoutesRequestOrBuilderpublic int getPolylineEncodingValue()
Optional. Specifies the preferred encoding for the polyline.
.google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL];
getPolylineEncodingValue in interface ComputeRoutesRequestOrBuilderpublic PolylineEncoding getPolylineEncoding()
Optional. Specifies the preferred encoding for the polyline.
.google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL];
getPolylineEncoding in interface ComputeRoutesRequestOrBuilderpublic boolean hasDepartureTime()
Optional. The departure time. If you don't set this value, then this value defaults to the time that you made the request. NOTE: You can only specify a `departure_time` in the past when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL];
hasDepartureTime in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.Timestamp getDepartureTime()
Optional. The departure time. If you don't set this value, then this value defaults to the time that you made the request. NOTE: You can only specify a `departure_time` in the past when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL];
getDepartureTime in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.TimestampOrBuilder getDepartureTimeOrBuilder()
Optional. The departure time. If you don't set this value, then this value defaults to the time that you made the request. NOTE: You can only specify a `departure_time` in the past when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL];
getDepartureTimeOrBuilder in interface ComputeRoutesRequestOrBuilderpublic boolean hasArrivalTime()
Optional. The arrival time. NOTE: Can only be set when [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but not both. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp arrival_time = 19 [(.google.api.field_behavior) = OPTIONAL];
hasArrivalTime in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.Timestamp getArrivalTime()
Optional. The arrival time. NOTE: Can only be set when [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but not both. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp arrival_time = 19 [(.google.api.field_behavior) = OPTIONAL];
getArrivalTime in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.TimestampOrBuilder getArrivalTimeOrBuilder()
Optional. The arrival time. NOTE: Can only be set when [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but not both. Transit trips are available for up to 7 days in the past or 100 days in the future.
.google.protobuf.Timestamp arrival_time = 19 [(.google.api.field_behavior) = OPTIONAL];
getArrivalTimeOrBuilder in interface ComputeRoutesRequestOrBuilderpublic boolean getComputeAlternativeRoutes()
Optional. Specifies whether to calculate alternate routes in addition to the route. No alternative routes are returned for requests that have intermediate waypoints.
bool compute_alternative_routes = 8 [(.google.api.field_behavior) = OPTIONAL];getComputeAlternativeRoutes in interface ComputeRoutesRequestOrBuilderpublic boolean hasRouteModifiers()
Optional. A set of conditions to satisfy that affect the way routes are calculated.
.google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL];
hasRouteModifiers in interface ComputeRoutesRequestOrBuilderpublic RouteModifiers getRouteModifiers()
Optional. A set of conditions to satisfy that affect the way routes are calculated.
.google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL];
getRouteModifiers in interface ComputeRoutesRequestOrBuilderpublic RouteModifiersOrBuilder getRouteModifiersOrBuilder()
Optional. A set of conditions to satisfy that affect the way routes are calculated.
.google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL];
getRouteModifiersOrBuilder in interface ComputeRoutesRequestOrBuilderpublic String getLanguageCode()
Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Unicode Locale Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier). See [Language Support](https://developers.google.com/maps/faq#languagesupport) for the list of supported languages. When you don't provide this value, the display language is inferred from the location of the route request.
string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];getLanguageCode in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.ByteString getLanguageCodeBytes()
Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Unicode Locale Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier). See [Language Support](https://developers.google.com/maps/faq#languagesupport) for the list of supported languages. When you don't provide this value, the display language is inferred from the location of the route request.
string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];getLanguageCodeBytes in interface ComputeRoutesRequestOrBuilderpublic String getRegionCode()
Optional. The region code, specified as a ccTLD ("top-level domain")
two-character value. For more information see [Country code top-level
domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];getRegionCode in interface ComputeRoutesRequestOrBuilderpublic com.google.protobuf.ByteString getRegionCodeBytes()
Optional. The region code, specified as a ccTLD ("top-level domain")
two-character value. For more information see [Country code top-level
domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];getRegionCodeBytes in interface ComputeRoutesRequestOrBuilderpublic int getUnitsValue()
Optional. Specifies the units of measure for the display fields. These fields include the `instruction` field in [`NavigationInstruction`][google.maps.routing.v2.NavigationInstruction]. The units of measure used for the route, leg, step distance, and duration are not affected by this value. If you don't provide this value, then the display units are inferred from the location of the first origin.
.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL];
getUnitsValue in interface ComputeRoutesRequestOrBuilderpublic Units getUnits()
Optional. Specifies the units of measure for the display fields. These fields include the `instruction` field in [`NavigationInstruction`][google.maps.routing.v2.NavigationInstruction]. The units of measure used for the route, leg, step distance, and duration are not affected by this value. If you don't provide this value, then the display units are inferred from the location of the first origin.
.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL];
getUnits in interface ComputeRoutesRequestOrBuilderpublic boolean getOptimizeWaypointOrder()
Optional. If set to true, the service attempts to minimize the overall cost of the route by re-ordering the specified intermediate waypoints. The request fails if any of the intermediate waypoints is a `via` waypoint. Use `ComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index` to find the new ordering. If `ComputeRoutesResponseroutes.optimized_intermediate_waypoint_index` is not requested in the `X-Goog-FieldMask` header, the request fails. If `optimize_waypoint_order` is set to false, `ComputeRoutesResponse.optimized_intermediate_waypoint_index` will be empty.
bool optimize_waypoint_order = 13 [(.google.api.field_behavior) = OPTIONAL];getOptimizeWaypointOrder in interface ComputeRoutesRequestOrBuilderpublic List<ComputeRoutesRequest.ReferenceRoute> getRequestedReferenceRoutesList()
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a `FUEL_EFFICIENT` reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for [`route_labels`][google.maps.routing.v2.Route.route_labels] on the resulting routes.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL];
getRequestedReferenceRoutesList in interface ComputeRoutesRequestOrBuilderpublic int getRequestedReferenceRoutesCount()
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a `FUEL_EFFICIENT` reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for [`route_labels`][google.maps.routing.v2.Route.route_labels] on the resulting routes.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL];
getRequestedReferenceRoutesCount in interface ComputeRoutesRequestOrBuilderpublic ComputeRoutesRequest.ReferenceRoute getRequestedReferenceRoutes(int index)
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a `FUEL_EFFICIENT` reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for [`route_labels`][google.maps.routing.v2.Route.route_labels] on the resulting routes.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL];
getRequestedReferenceRoutes in interface ComputeRoutesRequestOrBuilderindex - The index of the element to return.public List<Integer> getRequestedReferenceRoutesValueList()
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a `FUEL_EFFICIENT` reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for [`route_labels`][google.maps.routing.v2.Route.route_labels] on the resulting routes.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL];
getRequestedReferenceRoutesValueList in interface ComputeRoutesRequestOrBuilderpublic int getRequestedReferenceRoutesValue(int index)
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a `FUEL_EFFICIENT` reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for [`route_labels`][google.maps.routing.v2.Route.route_labels] on the resulting routes.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL];
getRequestedReferenceRoutesValue in interface ComputeRoutesRequestOrBuilderindex - The index of the value to return.public List<ComputeRoutesRequest.ExtraComputation> getExtraComputationsList()
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL];
getExtraComputationsList in interface ComputeRoutesRequestOrBuilderpublic int getExtraComputationsCount()
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL];
getExtraComputationsCount in interface ComputeRoutesRequestOrBuilderpublic ComputeRoutesRequest.ExtraComputation getExtraComputations(int index)
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL];
getExtraComputations in interface ComputeRoutesRequestOrBuilderindex - The index of the element to return.public List<Integer> getExtraComputationsValueList()
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL];
getExtraComputationsValueList in interface ComputeRoutesRequestOrBuilderpublic int getExtraComputationsValue(int index)
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL];
getExtraComputationsValue in interface ComputeRoutesRequestOrBuilderindex - The index of the value to return.public int getTrafficModelValue()
Optional. Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration field in the [`Route`][google.maps.routing.v2.Route] and [`RouteLeg`][google.maps.routing.v2.RouteLeg] which contains the predicted time in traffic based on historical averages. `TrafficModel` is only available for requests that have set [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] to `TRAFFIC_AWARE_OPTIMAL` and [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] to `DRIVE`. Defaults to `BEST_GUESS` if traffic is requested and `TrafficModel` is not specified.
.google.maps.routing.v2.TrafficModel traffic_model = 18 [(.google.api.field_behavior) = OPTIONAL];
getTrafficModelValue in interface ComputeRoutesRequestOrBuilderpublic TrafficModel getTrafficModel()
Optional. Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration field in the [`Route`][google.maps.routing.v2.Route] and [`RouteLeg`][google.maps.routing.v2.RouteLeg] which contains the predicted time in traffic based on historical averages. `TrafficModel` is only available for requests that have set [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] to `TRAFFIC_AWARE_OPTIMAL` and [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] to `DRIVE`. Defaults to `BEST_GUESS` if traffic is requested and `TrafficModel` is not specified.
.google.maps.routing.v2.TrafficModel traffic_model = 18 [(.google.api.field_behavior) = OPTIONAL];
getTrafficModel in interface ComputeRoutesRequestOrBuilderpublic boolean hasTransitPreferences()
Optional. Specifies preferences that influence the route returned for `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`.
.google.maps.routing.v2.TransitPreferences transit_preferences = 20 [(.google.api.field_behavior) = OPTIONAL];
hasTransitPreferences in interface ComputeRoutesRequestOrBuilderpublic TransitPreferences getTransitPreferences()
Optional. Specifies preferences that influence the route returned for `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`.
.google.maps.routing.v2.TransitPreferences transit_preferences = 20 [(.google.api.field_behavior) = OPTIONAL];
getTransitPreferences in interface ComputeRoutesRequestOrBuilderpublic TransitPreferencesOrBuilder getTransitPreferencesOrBuilder()
Optional. Specifies preferences that influence the route returned for `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] is set to `TRANSIT`.
.google.maps.routing.v2.TransitPreferences transit_preferences = 20 [(.google.api.field_behavior) = OPTIONAL];
getTransitPreferencesOrBuilder in interface ComputeRoutesRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ComputeRoutesRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ComputeRoutesRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static ComputeRoutesRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ComputeRoutesRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ComputeRoutesRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ComputeRoutesRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ComputeRoutesRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ComputeRoutesRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ComputeRoutesRequest.Builder newBuilder()
public static ComputeRoutesRequest.Builder newBuilder(ComputeRoutesRequest prototype)
public ComputeRoutesRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ComputeRoutesRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ComputeRoutesRequest getDefaultInstance()
public static com.google.protobuf.Parser<ComputeRoutesRequest> parser()
public com.google.protobuf.Parser<ComputeRoutesRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ComputeRoutesRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.