Publish Routes Preferred API v1 proto definitions.
PiperOrigin-RevId: 288941399
This commit is contained in:
parent
d52885b642
commit
9e60345ba6
|
|
@ -0,0 +1,181 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
import "google/maps/routes/v1/polyline.proto";
|
||||
import "google/maps/routes/v1/toll_passes.proto";
|
||||
import "google/maps/routes/v1/vehicle_emission_type.proto";
|
||||
import "google/maps/routes/v1/waypoint.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ComputeRoutesRequestProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// ComputeRoutes request message.
|
||||
message ComputeRoutesRequest {
|
||||
// Required. Origin waypoint.
|
||||
Waypoint origin = 1;
|
||||
|
||||
// Required. Destination waypoint.
|
||||
Waypoint destination = 2;
|
||||
|
||||
// Optional. A set of waypoints along the route (excluding terminal points),
|
||||
// for either stopping at or passing by.
|
||||
repeated Waypoint intermediates = 3;
|
||||
|
||||
// Optional. Specifies the mode of transportation.
|
||||
RouteTravelMode travel_mode = 4;
|
||||
|
||||
// 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. In the future, we might implement a fallback
|
||||
// mechanism to use a different option when the preferred option does not give
|
||||
// a valid result. You can specify this option only when the `travel_mode` is
|
||||
// `DRIVE` or `TWO_WHEELER`, otherwise the request fails.
|
||||
RoutingPreference routing_preference = 5;
|
||||
|
||||
// Optional. Specifies your preference for the quality of the polyline.
|
||||
PolylineQuality polyline_quality = 6;
|
||||
|
||||
// Optional. The departure time. If you don't set this value, then this value
|
||||
// defaults to the time that you made the request. If you set this value to a
|
||||
// time that has already occurred, then the request fails.
|
||||
google.protobuf.Timestamp departure_time = 7;
|
||||
|
||||
// Specifies whether to calculate alternate routes in addition to the route.
|
||||
bool compute_alternative_routes = 8;
|
||||
|
||||
// Optional. A set of conditions to satisfy that affect the way routes are
|
||||
// calculated.
|
||||
RouteModifiers route_modifiers = 9;
|
||||
|
||||
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
||||
// information, see
|
||||
// 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;
|
||||
|
||||
// Optional. Specifies the units of measure for the display fields. This
|
||||
// includes the `instruction` field in `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 request.
|
||||
Units units = 11;
|
||||
}
|
||||
|
||||
// A set of values used to specify the mode of travel.
|
||||
enum RouteTravelMode {
|
||||
// No travel mode specified. Defaults to `DRIVE`.
|
||||
TRAVEL_MODE_UNSPECIFIED = 0;
|
||||
|
||||
// Travel by passenger car.
|
||||
DRIVE = 1;
|
||||
|
||||
// Travel by bicycle.
|
||||
BICYCLE = 2;
|
||||
|
||||
// Travel by walking.
|
||||
WALK = 3;
|
||||
|
||||
// Two-wheeled, motorized vehicle. For example, motorcycle. Note that this
|
||||
// differs from the `BICYCLE` travel mode which covers human-powered mode.
|
||||
TWO_WHEELER = 4;
|
||||
}
|
||||
|
||||
// A set of values that specify factors to take into consideration when
|
||||
// calculating the route.
|
||||
enum RoutingPreference {
|
||||
// No routing preference specified. Default to `TRAFFIC_AWARE`.
|
||||
ROUTING_PREFERENCE_UNSPECIFIED = 0;
|
||||
|
||||
// Computes routes without taking traffic conditions into consideration.
|
||||
// Suitable when traffic conditions don't matter. Using this value produces
|
||||
// the lowest latency.
|
||||
TRAFFIC_UNAWARE = 1;
|
||||
|
||||
// Calculates routes taking traffic conditions into consideration. In contrast
|
||||
// to `TRAFFIC_AWARE_OPTIMAL`, some optimizations are applied to significantly
|
||||
// reduce latency.
|
||||
TRAFFIC_AWARE = 2;
|
||||
|
||||
// Calculates the routes taking traffic conditions into consideration,
|
||||
// without applying most performance optimizations. Using this value produces
|
||||
// the highest latency.
|
||||
TRAFFIC_AWARE_OPTIMAL = 3;
|
||||
}
|
||||
|
||||
// Encapsulates a set of optional conditions to satisfy when calculating the
|
||||
// routes.
|
||||
message RouteModifiers {
|
||||
// Specifies whether to avoid toll roads. Applies only to the `DRIVE` and
|
||||
// `TWO_WHEELER` travel modes.
|
||||
bool avoid_tolls = 1;
|
||||
|
||||
// Specifies whether to avoid highways. Applies only to the `DRIVE` and
|
||||
// `TWO_WHEELER` travel modes.
|
||||
bool avoid_highways = 2;
|
||||
|
||||
// Specifies whether to avoid ferries. Applies only to the `DRIVE` and
|
||||
// `TWO_WHEELER` travel modes.
|
||||
bool avoid_ferries = 3;
|
||||
|
||||
// Specifies whether to avoid navigating indoors. Applies only to the `WALK`
|
||||
// travel mode.
|
||||
bool avoid_indoor = 4;
|
||||
|
||||
// Optional. Specifies the vehicle information.
|
||||
VehicleInfo vehicle_info = 5;
|
||||
|
||||
// Encapsulates information about toll passes.
|
||||
// TollPass is unset means no available pass.
|
||||
// Applies only to the DRIVE and TWO_WHEELER travel modes.
|
||||
repeated TollPass toll_passes = 6;
|
||||
}
|
||||
|
||||
// Encapsulates the vehicle information, such as the license plate last
|
||||
// character.
|
||||
message VehicleInfo {
|
||||
// Specifies the license plate last character. Could be a digit or a letter.
|
||||
string license_plate_last_character = 1;
|
||||
|
||||
// Describes the vehicle's emission type.
|
||||
// Applies only to the DRIVE travel mode.
|
||||
VehicleEmissionType emission_type = 2;
|
||||
}
|
||||
|
||||
// A set of values that specify the unit of measure used in the display.
|
||||
enum Units {
|
||||
// Units of measure not specified. Defaults to the unit of measure inferred
|
||||
// from the request.
|
||||
UNITS_UNSPECIFIED = 0;
|
||||
|
||||
// Metric units of measure.
|
||||
METRIC = 1;
|
||||
|
||||
// Imperial (English) units of measure.
|
||||
IMPERIAL = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
import "google/maps/routes/v1/route.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ComputeRoutesResponseProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// ComputeRoutes the response message.
|
||||
message ComputeRoutesResponse {
|
||||
// Contains an array of computed routes (up to three) when you specify
|
||||
// compute_alternatives_routes, and contains just one route when you don't.
|
||||
// When this array contains multiple entries, the first one is the most
|
||||
// recommended route. If the array is empty, then it means no route could be
|
||||
// found.
|
||||
repeated Route routes = 1;
|
||||
|
||||
// In some cases when the server is not able to compute the route results with
|
||||
// all of the input preferences, it may fallback to using a different way of
|
||||
// computation. When fallback mode is used, this field contains detailed info
|
||||
// about the fallback response. Otherwise this field is unset.
|
||||
FallbackInfo fallback_info = 2;
|
||||
}
|
||||
|
||||
// Information related to how and why a fallback result was used. If this field
|
||||
// is set, then it means the server used a different routing mode from your
|
||||
// preferred mode as fallback.
|
||||
message FallbackInfo {
|
||||
// Routing mode used for the response. If fallback was triggered, the mode
|
||||
// may be different from routing preference set in the original client
|
||||
// request.
|
||||
FallbackRoutingMode routing_mode = 1;
|
||||
|
||||
// The reason why fallback response was used instead of the original response.
|
||||
// This field is only populated when the fallback mode is triggered and the
|
||||
// fallback response is returned.
|
||||
FallbackReason reason = 2;
|
||||
}
|
||||
|
||||
// Reasons for using fallback response.
|
||||
enum FallbackReason {
|
||||
// No fallback reason specified.
|
||||
FALLBACK_REASON_UNSPECIFIED = 0;
|
||||
|
||||
// A server error happened while calculating routes with your preferred
|
||||
// routing mode, but we were able to return a result calculated by an
|
||||
// alternative mode.
|
||||
SERVER_ERROR = 1;
|
||||
|
||||
// We were not able to finish the calculation with your preferred routing mode
|
||||
// on time, but we were able to return a result calculated by an alternative
|
||||
// mode.
|
||||
LATENCY_EXCEEDED = 2;
|
||||
}
|
||||
|
||||
// Actual routing mode used for returned fallback response.
|
||||
enum FallbackRoutingMode {
|
||||
// Not used.
|
||||
FALLBACK_ROUTING_MODE_UNSPECIFIED = 0;
|
||||
|
||||
// Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
|
||||
// response.
|
||||
FALLBACK_TRAFFIC_UNAWARE = 1;
|
||||
|
||||
// Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
|
||||
// response.
|
||||
FALLBACK_TRAFFIC_AWARE = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "PolylineProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// Encapsulates an encoded polyline.
|
||||
message Polyline {
|
||||
// Encapsulates the type of polyline. Defaults to encoded_polyline.
|
||||
oneof polyline_type {
|
||||
// The string encoding of the polyline using the [polyline encoding
|
||||
// algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
|
||||
string encoded_polyline = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// A set of values that specify the quality of the polyline.
|
||||
enum PolylineQuality {
|
||||
// No polyline quality preference specified. Defaults to `OVERVIEW`.
|
||||
POLYLINE_QUALITY_UNSPECIFIED = 0;
|
||||
|
||||
// Specifies a high-quality polyline - which is composed using more points
|
||||
// than `OVERVIEW`, at the cost of increased response size. Use this value
|
||||
// when you need more precision.
|
||||
HIGH_QUALITY = 1;
|
||||
|
||||
// Specifies an overview polyline - which is composed using a small number of
|
||||
// points. Use this value when displaying an overview of the route. Using this
|
||||
// option has a lower request latency compared to using the
|
||||
// `HIGH_QUALITY` option.
|
||||
OVERVIEW = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
import "google/geo/type/viewport.proto";
|
||||
import "google/maps/routes/v1/polyline.proto";
|
||||
import "google/maps/routes/v1/waypoint.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/type/money.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "RouteProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// Encapsulates a route, which consists of a series of connected road segments
|
||||
// that join beginning, ending, and intermediate waypoints.
|
||||
message Route {
|
||||
// A collection of legs (path segments between waypoints) that make-up the
|
||||
// route. Each leg corresponds to the trip between two non-`via` Waypoints.
|
||||
// For example, a route with no intermediate waypoints has only one leg. A
|
||||
// route that includes one non-`via` intermediate waypoint has two legs. A
|
||||
// route that includes one `via` intermediate waypoint has one leg. The order
|
||||
// of the legs matches the order of Waypoints from `origin` to `intermediates`
|
||||
// to `destination`.
|
||||
repeated RouteLeg legs = 1;
|
||||
|
||||
// The travel distance of the route, in meters.
|
||||
int32 distance_meters = 2;
|
||||
|
||||
// The length of time needed to navigate the route. If you set the
|
||||
// `route_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
|
||||
// `static_duration`. If you set the `route_preference` to either
|
||||
// `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
|
||||
// taking traffic conditions into account.
|
||||
google.protobuf.Duration duration = 3;
|
||||
|
||||
// The duration of traveling through the route without taking traffic
|
||||
// conditions into consideration.
|
||||
google.protobuf.Duration static_duration = 4;
|
||||
|
||||
// The overall route polyline. This polyline will be the combined polyline of
|
||||
// all `legs`.
|
||||
Polyline polyline = 5;
|
||||
|
||||
// A description of the route.
|
||||
string description = 6;
|
||||
|
||||
// An array of warnings to show when displaying the route.
|
||||
repeated string warnings = 7;
|
||||
|
||||
// The viewport bounding box of the polyline.
|
||||
google.geo.type.Viewport viewport = 8;
|
||||
|
||||
// Additional information about the route.
|
||||
RouteTravelAdvisory travel_advisory = 9;
|
||||
}
|
||||
|
||||
// Encapsulates the additional information that the user should be informed
|
||||
// about, such as possible traffic zone restriction etc.
|
||||
message RouteTravelAdvisory {
|
||||
// The traffic restriction that applies to the route. A vehicle that is
|
||||
// subject to the restriction is not allowed to travel on the route. As of
|
||||
// October 2019, only Jakarta, Indonesia takes into consideration.
|
||||
TrafficRestriction traffic_restriction = 1;
|
||||
|
||||
// Populated if this journey contains toll roads.
|
||||
// This is an aggregation of the toll information for each RouteLeg into a
|
||||
// single price per every relevant currency.
|
||||
TollInfo toll_info = 2;
|
||||
}
|
||||
|
||||
// Encapsulates the additional information that the user should be informed
|
||||
// about, such as possible traffic zone restriction etc. on a route leg.
|
||||
message RouteLegTravelAdvisory {
|
||||
// Populated if the corresponding RouteLeg of the journey contains toll roads.
|
||||
// TollInfo encapsulates the estimated amount of toll collected on this leg,
|
||||
// grouped by relevant currencies.
|
||||
TollInfo toll_info = 1;
|
||||
}
|
||||
|
||||
// Encapsulates the traffic restriction applied to the route. As of October
|
||||
// 2019, only Jakarta, Indonesia takes into consideration.
|
||||
message TrafficRestriction {
|
||||
// The restriction based on the vehicle's license plate last character. If
|
||||
// this field does not exist, then no restriction on route.
|
||||
LicensePlateLastCharacterRestriction license_plate_last_character_restriction = 1;
|
||||
}
|
||||
|
||||
// Encapsulates the license plate last character restriction.
|
||||
message LicensePlateLastCharacterRestriction {
|
||||
// The allowed last character of a license plate of a vehicle. Only vehicles
|
||||
// whose license plate's last characters match these are allowed to travel on
|
||||
// the route. If empty, no vehicle is allowed.
|
||||
repeated string allowed_last_characters = 1;
|
||||
}
|
||||
|
||||
// Encapsulates a segment between non-`via` waypoints.
|
||||
message RouteLeg {
|
||||
// The travel distance of the route leg, in meters.
|
||||
int32 distance_meters = 1;
|
||||
|
||||
// The length of time needed to navigate the leg. If the `route_preference`
|
||||
// is set to `TRAFFIC_UNAWARE`, then this value is the same as
|
||||
// `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
|
||||
// `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
|
||||
// conditions into account.
|
||||
google.protobuf.Duration duration = 2;
|
||||
|
||||
// The duration of traveling through the leg, calculated without taking
|
||||
// traffic conditions into consideration.
|
||||
google.protobuf.Duration static_duration = 3;
|
||||
|
||||
// The overall polyline for this leg. This includes that each `step`'s
|
||||
// polyline.
|
||||
Polyline polyline = 4;
|
||||
|
||||
// The start location of this leg. This might be different from the provided
|
||||
// `origin`. For example, when the provided `origin` is not near a road, this
|
||||
// is a point on the road.
|
||||
Location start_location = 5;
|
||||
|
||||
// The end location of this leg. This might be different from the provided
|
||||
// `destination`. For example, when the provided `destination` is not near a
|
||||
// road, this is a point on the road.
|
||||
Location end_location = 6;
|
||||
|
||||
// An array of steps denoting segments within this leg. Each step represents
|
||||
// one navigation instruction.
|
||||
repeated RouteLegStep steps = 7;
|
||||
|
||||
// Encapsulates the additional information that the user should be informed
|
||||
// about, such as possible traffic zone restriction etc. on a route leg.
|
||||
RouteLegTravelAdvisory travel_advisory = 8;
|
||||
}
|
||||
|
||||
message TollInfo {
|
||||
// The monetary amount for the corresponding leg of the journey or the amount
|
||||
// for the entire journey (depending on whether TollInfo is hosted by
|
||||
// RouteLegTravelAdvisory or RouteTravelAdvisory, respectively),
|
||||
// for every relevant currency (multiple entries if paying in multiple
|
||||
// currencies), set if known.
|
||||
repeated google.type.Money estimated_price = 2;
|
||||
}
|
||||
|
||||
// Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
|
||||
// navigation instruction. Route legs are made up of steps.
|
||||
message RouteLegStep {
|
||||
// The travel distance of this step, in meters. In some circumstances, this
|
||||
// field might not have a value.
|
||||
int32 distance_meters = 1;
|
||||
|
||||
// The duration of travel through this step without taking traffic conditions
|
||||
// into consideration. In some circumstances, this field might not have a
|
||||
// value.
|
||||
google.protobuf.Duration static_duration = 2;
|
||||
|
||||
// The polyline associated with this step.
|
||||
Polyline polyline = 3;
|
||||
|
||||
// The start location of this step.
|
||||
Location start_location = 4;
|
||||
|
||||
// The end location of this step.
|
||||
Location end_location = 5;
|
||||
|
||||
// Navigation instructions.
|
||||
NavigationInstruction navigation_instruction = 6;
|
||||
}
|
||||
|
||||
message NavigationInstruction {
|
||||
// Encapsulates the navigation instructions for the current step (e.g., turn
|
||||
// left, merge, straight, etc.). This field determines which icon to display.
|
||||
Maneuver maneuver = 1;
|
||||
|
||||
// Instructions for navigating this step.
|
||||
string instructions = 2;
|
||||
}
|
||||
|
||||
// A set of values that specify the navigation action to take for the current
|
||||
// step (e.g., turn left, merge, straight, etc.).
|
||||
enum Maneuver {
|
||||
// Not used.
|
||||
MANEUVER_UNSPECIFIED = 0;
|
||||
|
||||
// Turn slightly to the left.
|
||||
TURN_SLIGHT_LEFT = 1;
|
||||
|
||||
// Turn sharply to the left.
|
||||
TURN_SHARP_LEFT = 2;
|
||||
|
||||
// Make a left u-turn.
|
||||
UTURN_LEFT = 3;
|
||||
|
||||
// Turn left.
|
||||
TURN_LEFT = 4;
|
||||
|
||||
// Turn slightly to the right.
|
||||
TURN_SLIGHT_RIGHT = 5;
|
||||
|
||||
// Turn sharply to the right.
|
||||
TURN_SHARP_RIGHT = 6;
|
||||
|
||||
// Make a right u-turn.
|
||||
UTURN_RIGHT = 7;
|
||||
|
||||
// Turn right.
|
||||
TURN_RIGHT = 8;
|
||||
|
||||
// Go straight.
|
||||
STRAIGHT = 9;
|
||||
|
||||
// Take the left ramp.
|
||||
RAMP_LEFT = 10;
|
||||
|
||||
// Take the right ramp.
|
||||
RAMP_RIGHT = 11;
|
||||
|
||||
// Merge into traffic.
|
||||
MERGE = 12;
|
||||
|
||||
// Take the left fork.
|
||||
FORK_LEFT = 13;
|
||||
|
||||
// Take the right fork.
|
||||
FORK_RIGHT = 14;
|
||||
|
||||
// Take the ferry.
|
||||
FERRY = 15;
|
||||
|
||||
// Take the train leading onto the ferry.
|
||||
FERRY_TRAIN = 16;
|
||||
|
||||
// Turn left at the roundabout.
|
||||
ROUNDABOUT_LEFT = 17;
|
||||
|
||||
// Turn right at the roundabout.
|
||||
ROUNDABOUT_RIGHT = 18;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: routespreferred.googleapis.com
|
||||
title: Routes Preferred API
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "TollPassesProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// List of toll passes around the world that we support.
|
||||
enum TollPass {
|
||||
// Not used. If this value is used, then the request fails.
|
||||
TOLL_PASS_UNSPECIFIED = 0;
|
||||
|
||||
// State pass of the Washington state, United States.
|
||||
US_WA_GOOD_TO_GO = 1;
|
||||
|
||||
// E-tag pass in Australia.
|
||||
AU_E_TAG = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "VehicleEmissionTypeProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// A set of values describing the vehicle's emission type.
|
||||
// Applies only to the DRIVE travel mode.
|
||||
enum VehicleEmissionType {
|
||||
// No emission type specified. Default to GASOLINE.
|
||||
VEHICLE_EMISSION_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Gasoline/petrol fueled vehicle.
|
||||
GASOLINE = 1;
|
||||
|
||||
// Electricity powered vehicle.
|
||||
ELECTRIC = 2;
|
||||
|
||||
// Hybrid fuel (such as gasoline + electric) vehicle.
|
||||
HYBRID = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.maps.routes.v1;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/type/latlng.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Maps.Routes.V1";
|
||||
option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "WaypointProto";
|
||||
option java_package = "com.google.maps.routes.v1";
|
||||
option objc_class_prefix = "GMRS";
|
||||
option php_namespace = "Google\\Maps\\Routes\\V1";
|
||||
|
||||
// Encapsulates a waypoint. Waypoints mark both the beginning and end of a
|
||||
// route, and include intermediate stops along the route.
|
||||
message Waypoint {
|
||||
// Different ways to represent a location.
|
||||
oneof location_type {
|
||||
// A point specified using geographic coordinates, including an optional
|
||||
// heading.
|
||||
Location location = 1;
|
||||
|
||||
// The POI Place ID associated with the waypoint.
|
||||
string place_id = 2;
|
||||
}
|
||||
|
||||
// Marks this waypoint as a milestone, as opposed to a stopping point. For
|
||||
// each non-via waypoint in the request, the response appends an entry to the
|
||||
// `legs` array to provide the details for stopovers on that leg of the
|
||||
// trip. Set this value to true when you want the route to pass through this
|
||||
// waypoint without stopping over. Via waypoints don't cause an entry to be
|
||||
// added to the `legs` array, but they do route the journey through the
|
||||
// waypoint. You can only set this value on waypoints that are intermediates.
|
||||
// If you set this field on terminal waypoints, then the request fails.
|
||||
bool via = 3;
|
||||
|
||||
// Indicates that the waypoint is meant for vehicles to stop at, where the
|
||||
// intention is to either pickup or drop-off. When you set this value, the
|
||||
// calculated route won't include non-`via` waypoints on roads that are
|
||||
// unsuitable for pickup and drop-off. This option works only for `DRIVE` and
|
||||
// `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
|
||||
bool vehicle_stopover = 4;
|
||||
|
||||
// Indicates that the location of this waypoint is meant to have a preference
|
||||
// for the vehicle to stop at a particular side of road. When you set this
|
||||
// value, the route will pass through the location so that the vehicle can
|
||||
// stop at the side of road that the location is biased towards from the
|
||||
// center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
|
||||
// travel modes, and when the 'location_type' is set to 'location'.
|
||||
bool side_of_road = 5;
|
||||
}
|
||||
|
||||
// Encapsulates a location (a geographic point, and an optional heading).
|
||||
message Location {
|
||||
// The waypoint's geographic coordinates.
|
||||
google.type.LatLng lat_lng = 1;
|
||||
|
||||
// The compass heading associated with the direction of the flow of traffic.
|
||||
// This value is used to specify the side of the road to use for pickup and
|
||||
// drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
|
||||
// of due North, 90 specifies a heading of due East, etc. You can use this
|
||||
// field only for `DRIVE` and `TWO_WHEELER` travel modes.
|
||||
google.protobuf.Int32Value heading = 2;
|
||||
}
|
||||
Loading…
Reference in New Issue