xref: /aosp_15_r20/external/googleapis/google/maps/routes/v1/waypoint.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2022 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.maps.routes.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/wrappers.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/type/latlng.proto";
21*d5c09012SAndroid Build Coastguard Worker
22*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
23*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Maps.Routes.V1";
24*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/maps/routes/apiv1/routespb;routespb";
25*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
26*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "WaypointProto";
27*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.maps.routes.v1";
28*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GMRS";
29*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Maps\\Routes\\V1";
30*d5c09012SAndroid Build Coastguard Worker
31*d5c09012SAndroid Build Coastguard Worker// Encapsulates a waypoint. Waypoints mark both the beginning and end of a
32*d5c09012SAndroid Build Coastguard Worker// route, and include intermediate stops along the route.
33*d5c09012SAndroid Build Coastguard Workermessage Waypoint {
34*d5c09012SAndroid Build Coastguard Worker  // Different ways to represent a location.
35*d5c09012SAndroid Build Coastguard Worker  oneof location_type {
36*d5c09012SAndroid Build Coastguard Worker    // A point specified using geographic coordinates, including an optional
37*d5c09012SAndroid Build Coastguard Worker    // heading.
38*d5c09012SAndroid Build Coastguard Worker    Location location = 1;
39*d5c09012SAndroid Build Coastguard Worker
40*d5c09012SAndroid Build Coastguard Worker    // The POI Place ID associated with the waypoint.
41*d5c09012SAndroid Build Coastguard Worker    string place_id = 2;
42*d5c09012SAndroid Build Coastguard Worker  }
43*d5c09012SAndroid Build Coastguard Worker
44*d5c09012SAndroid Build Coastguard Worker  // Marks this waypoint as a milestone rather a stopping point. For
45*d5c09012SAndroid Build Coastguard Worker  // each non-via waypoint in the request, the response appends an entry to the
46*d5c09012SAndroid Build Coastguard Worker  // `legs` array to provide the details for stopovers on that leg of the
47*d5c09012SAndroid Build Coastguard Worker  // trip. Set this value to true when you want the route to pass through this
48*d5c09012SAndroid Build Coastguard Worker  // waypoint without stopping over. Via waypoints don't cause an entry to be
49*d5c09012SAndroid Build Coastguard Worker  // added to the `legs` array, but they do route the journey through the
50*d5c09012SAndroid Build Coastguard Worker  // waypoint. You can only set this value on waypoints that are intermediates.
51*d5c09012SAndroid Build Coastguard Worker  // The request fails if you set this field on terminal waypoints.
52*d5c09012SAndroid Build Coastguard Worker  // If ComputeRoutesRequest.optimize_waypoint_order is set to true then
53*d5c09012SAndroid Build Coastguard Worker  // this field cannot be set to true; otherwise, the request fails.
54*d5c09012SAndroid Build Coastguard Worker  bool via = 3;
55*d5c09012SAndroid Build Coastguard Worker
56*d5c09012SAndroid Build Coastguard Worker  // Indicates that the waypoint is meant for vehicles to stop at, where the
57*d5c09012SAndroid Build Coastguard Worker  // intention is to either pickup or drop-off. When you set this value, the
58*d5c09012SAndroid Build Coastguard Worker  // calculated route won't include non-`via` waypoints on roads that are
59*d5c09012SAndroid Build Coastguard Worker  // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
60*d5c09012SAndroid Build Coastguard Worker  // `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
61*d5c09012SAndroid Build Coastguard Worker  bool vehicle_stopover = 4;
62*d5c09012SAndroid Build Coastguard Worker
63*d5c09012SAndroid Build Coastguard Worker  // Indicates that the location of this waypoint is meant to have a preference
64*d5c09012SAndroid Build Coastguard Worker  // for the vehicle to stop at a particular side of road. When you set this
65*d5c09012SAndroid Build Coastguard Worker  // value, the route will pass through the location so that the vehicle can
66*d5c09012SAndroid Build Coastguard Worker  // stop at the side of road that the location is biased towards from the
67*d5c09012SAndroid Build Coastguard Worker  // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
68*d5c09012SAndroid Build Coastguard Worker  // travel modes, and when the 'location_type' is set to 'location'.
69*d5c09012SAndroid Build Coastguard Worker  bool side_of_road = 5;
70*d5c09012SAndroid Build Coastguard Worker}
71*d5c09012SAndroid Build Coastguard Worker
72*d5c09012SAndroid Build Coastguard Worker// Encapsulates a location (a geographic point, and an optional heading).
73*d5c09012SAndroid Build Coastguard Workermessage Location {
74*d5c09012SAndroid Build Coastguard Worker  // The waypoint's geographic coordinates.
75*d5c09012SAndroid Build Coastguard Worker  google.type.LatLng lat_lng = 1;
76*d5c09012SAndroid Build Coastguard Worker
77*d5c09012SAndroid Build Coastguard Worker  // The compass heading associated with the direction of the flow of traffic.
78*d5c09012SAndroid Build Coastguard Worker  // This value is used to specify the side of the road to use for pickup and
79*d5c09012SAndroid Build Coastguard Worker  // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
80*d5c09012SAndroid Build Coastguard Worker  // of due North, 90 specifies a heading of due East, etc. You can use this
81*d5c09012SAndroid Build Coastguard Worker  // field only for `DRIVE` and `TWO_WHEELER` travel modes.
82*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Int32Value heading = 2;
83*d5c09012SAndroid Build Coastguard Worker}
84