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