ComputeRoutesRequest class
ComputeRoutes request message.
- Inheritance
-
- Object
- GeneratedMessage
- ComputeRoutesRequest
Constructors
-
ComputeRoutesRequest.new({Waypoint? origin, Waypoint? destination, Iterable<
Waypoint> ? intermediates, RouteTravelMode? travelMode, RoutingPreference? routingPreference, PolylineQuality? polylineQuality, Timestamp? departureTime, bool? computeAlternativeRoutes, RouteModifiers? routeModifiers, String? languageCode, Units? units, PolylineEncoding? polylineEncoding, bool? optimizeWaypointOrder, Iterable<ComputeRoutesRequest_ReferenceRoute> ? requestedReferenceRoutes, Iterable<ComputeRoutesRequest_ExtraComputation> ? extraComputations, String? regionCode, TrafficModel? trafficModel, Timestamp? arrivalTime, TransitPreferences? transitPreferences}) -
factory
-
ComputeRoutesRequest.fromBuffer(List<
int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) -
factory
- ComputeRoutesRequest.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- arrivalTime ↔ Timestamp
-
Optional. The arrival time.
NOTE: Can only be set when
google.maps.routing.v2.RouteTravelMode
is set toTRANSIT
. You can specify eitherdeparture_time
orarrival_time
, but not both. Transit trips are available for up to 7 days in the past or 100 days in the future.getter/setter pair - computeAlternativeRoutes ↔ bool
-
Optional. Specifies whether to calculate alternate routes in addition to
the route. No alternative routes are returned for requests that have
intermediate waypoints.
getter/setter pair
- departureTime ↔ Timestamp
-
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 whengoogle.maps.routing.v2.RouteTravelMode
is set toTRANSIT
. Transit trips are available for up to 7 days in the past or 100 days in the future.getter/setter pair - destination ↔ Waypoint
-
Required. Destination waypoint.
getter/setter pair
- eventPlugin → EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
-
extraComputations
→ List<
ComputeRoutesRequest_ExtraComputation> -
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.
no setter
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setteroverride
-
intermediates
→ List<
Waypoint> -
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.
no setter
- isFrozen → bool
-
Returns
true
if this message is marked read-only. Otherwisefalse
.no setterinherited - languageCode ↔ String
-
Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
information, see Unicode Locale
Identifier.
See Language
Support
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.
getter/setter pair
- optimizeWaypointOrder ↔ bool
-
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. UseComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index
to find the new ordering. IfComputeRoutesResponseroutes.optimized_intermediate_waypoint_index
is not requested in theX-Goog-FieldMask
header, the request fails. Ifoptimize_waypoint_order
is set to false,ComputeRoutesResponse.optimized_intermediate_waypoint_index
will be empty.getter/setter pair - origin ↔ Waypoint
-
Required. Origin waypoint.
getter/setter pair
- polylineEncoding ↔ PolylineEncoding
-
Optional. Specifies the preferred encoding for the polyline.
getter/setter pair
- polylineQuality ↔ PolylineQuality
-
Optional. Specifies your preference for the quality of the polyline.
getter/setter pair
- regionCode ↔ String
-
Optional. The region code, specified as a ccTLD ("top-level domain")
two-character value. For more information see Country code top-level
domains.
getter/setter pair
-
requestedReferenceRoutes
→ List<
ComputeRoutesRequest_ReferenceRoute> -
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 forgoogle.maps.routing.v2.Route.route_labels
on the resulting routes.no setter - routeModifiers ↔ RouteModifiers
-
Optional. A set of conditions to satisfy that affect the way routes are
calculated.
getter/setter pair
- routingPreference ↔ RoutingPreference
-
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
isDRIVE
orTWO_WHEELER
, otherwise the request fails.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trafficModel ↔ TrafficModel
-
Optional. Specifies the assumptions to use when calculating time in
traffic. This setting affects the value returned in the duration field in
the
google.maps.routing.v2.Route
andgoogle.maps.routing.v2.RouteLeg
which contains the predicted time in traffic based on historical averages.TrafficModel
is only available for requests that have setgoogle.maps.routing.v2.RoutingPreference
toTRAFFIC_AWARE_OPTIMAL
andgoogle.maps.routing.v2.RouteTravelMode
toDRIVE
. Defaults toBEST_GUESS
if traffic is requested andTrafficModel
is not specified.getter/setter pair - transitPreferences ↔ TransitPreferences
-
Optional. Specifies preferences that influence the route returned for
TRANSIT
routes. NOTE: You can only specify atransit_preferences
whengoogle.maps.routing.v2.RouteTravelMode
is set toTRANSIT
.getter/setter pair - travelMode ↔ RouteTravelMode
-
Optional. Specifies the mode of transportation.
getter/setter pair
- units ↔ Units
-
Optional. Specifies the units of measure for the display fields. These
fields include the
instruction
field ingoogle.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.getter/setter pair - unknownFields → UnknownFieldSet
-
no setterinherited
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearArrivalTime(
) → void -
clearComputeAlternativeRoutes(
) → void -
clearDepartureTime(
) → void -
clearDestination(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearLanguageCode(
) → void -
clearOptimizeWaypointOrder(
) → void -
clearOrigin(
) → void -
clearPolylineEncoding(
) → void -
clearPolylineQuality(
) → void -
clearRegionCode(
) → void -
clearRouteModifiers(
) → void -
clearRoutingPreference(
) → void -
clearTrafficModel(
) → void -
clearTransitPreferences(
) → void -
clearTravelMode(
) → void -
clearUnits(
) → void -
clone(
) → ComputeRoutesRequest -
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
copyWith(
void updates(ComputeRoutesRequest)) → ComputeRoutesRequest -
Apply
updates
to a copy of this message.override -
createEmptyInstance(
) → ComputeRoutesRequest -
Creates an empty instance of the same message type as this.
override
-
createMapField<
K, V> (int tagNumber, MapFieldInfo< K, V> fi) → Map<K, V> -
Creates a Map representing a map field.
inherited
-
createRepeatedField<
T> (int tagNumber, FieldInfo< T> fi) → List<T> -
Creates List implementing a mutable repeated field.
inherited
-
ensureArrivalTime(
) → Timestamp -
ensureDepartureTime(
) → Timestamp -
ensureDestination(
) → Waypoint -
ensureOrigin(
) → Waypoint -
ensureRouteModifiers(
) → RouteModifiers -
ensureTransitPreferences(
) → TransitPreferences -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension
.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber
, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasArrivalTime(
) → bool -
hasComputeAlternativeRoutes(
) → bool -
hasDepartureTime(
) → bool -
hasDestination(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
true
if a value ofextension
is present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber
.inherited -
hasLanguageCode(
) → bool -
hasOptimizeWaypointOrder(
) → bool -
hasOrigin(
) → bool -
hasPolylineEncoding(
) → bool -
hasPolylineQuality(
) → bool -
hasRegionCode(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasRouteModifiers(
) → bool -
hasRoutingPreference(
) → bool -
hasTrafficModel(
) → bool -
hasTransitPreferences(
) → bool -
hasTravelMode(
) → bool -
hasUnits(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data
, a JSON object, encoded as described byGeneratedMessage.writeToJson
.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
other
into this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json
, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value
.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber
.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this
.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
writeToBuffer(
) → Uint8List -
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → ComputeRoutesRequest -
createRepeated(
) → PbList< ComputeRoutesRequest> -
getDefault(
) → ComputeRoutesRequest