1// Copyright 2023 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.routing.v2; 18 19import "google/maps/routing/v2/location.proto"; 20 21option cc_enable_arenas = true; 22option csharp_namespace = "Google.Maps.Routing.V2"; 23option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb"; 24option java_multiple_files = true; 25option java_outer_classname = "WaypointProto"; 26option java_package = "com.google.maps.routing.v2"; 27option objc_class_prefix = "GMRV2"; 28option php_namespace = "Google\\Maps\\Routing\\V2"; 29option ruby_package = "Google::Maps::Routing::V2"; 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 // Human readable address or a plus code. 44 // See https://plus.codes for details. 45 string address = 7; 46 } 47 48 // Marks this waypoint as a milestone rather a stopping point. For 49 // each non-via waypoint in the request, the response appends an entry to the 50 // [`legs`][google.maps.routing.v2.Route.legs] 51 // array to provide the details for stopovers on that leg of the trip. Set 52 // this value to true when you want the route to pass through this waypoint 53 // without stopping over. Via waypoints don't cause an entry to be added to 54 // the `legs` array, but they do route the journey through the waypoint. You 55 // can only set this value on waypoints that are intermediates. The request 56 // fails if you set this field on terminal waypoints. If 57 // `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this 58 // field cannot be set to true; otherwise, the request fails. 59 bool via = 3; 60 61 // Indicates that the waypoint is meant for vehicles to stop at, where the 62 // intention is to either pickup or drop-off. When you set this value, the 63 // calculated route won't include non-`via` waypoints on roads that are 64 // unsuitable for pickup and drop-off. This option works only for `DRIVE` and 65 // `TWO_WHEELER` travel modes, and when the `location_type` is 66 // [`Location`][google.maps.routing.v2.Location]. 67 bool vehicle_stopover = 4; 68 69 // Indicates that the location of this waypoint is meant to have a preference 70 // for the vehicle to stop at a particular side of road. When you set this 71 // value, the route will pass through the location so that the vehicle can 72 // stop at the side of road that the location is biased towards from the 73 // center of the road. This option works only for `DRIVE` and `TWO_WHEELER` 74 // [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode]. 75 bool side_of_road = 5; 76} 77