waypoint.proto 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. syntax = "proto3";
  15. package google.maps.routes.v1;
  16. import "google/protobuf/wrappers.proto";
  17. import "google/type/latlng.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Maps.Routes.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "WaypointProto";
  23. option java_package = "com.google.maps.routes.v1";
  24. option objc_class_prefix = "GMRS";
  25. option php_namespace = "Google\\Maps\\Routes\\V1";
  26. // Encapsulates a waypoint. Waypoints mark both the beginning and end of a
  27. // route, and include intermediate stops along the route.
  28. message Waypoint {
  29. // Different ways to represent a location.
  30. oneof location_type {
  31. // A point specified using geographic coordinates, including an optional
  32. // heading.
  33. Location location = 1;
  34. // The POI Place ID associated with the waypoint.
  35. string place_id = 2;
  36. }
  37. // Marks this waypoint as a milestone rather a stopping point. For
  38. // each non-via waypoint in the request, the response appends an entry to the
  39. // `legs` array to provide the details for stopovers on that leg of the
  40. // trip. Set this value to true when you want the route to pass through this
  41. // waypoint without stopping over. Via waypoints don't cause an entry to be
  42. // added to the `legs` array, but they do route the journey through the
  43. // waypoint. You can only set this value on waypoints that are intermediates.
  44. // The request fails if you set this field on terminal waypoints.
  45. // If ComputeRoutesRequest.optimize_waypoint_order is set to true then
  46. // this field cannot be set to true; otherwise, the request fails.
  47. bool via = 3;
  48. // Indicates that the waypoint is meant for vehicles to stop at, where the
  49. // intention is to either pickup or drop-off. When you set this value, the
  50. // calculated route won't include non-`via` waypoints on roads that are
  51. // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
  52. // `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
  53. bool vehicle_stopover = 4;
  54. // Indicates that the location of this waypoint is meant to have a preference
  55. // for the vehicle to stop at a particular side of road. When you set this
  56. // value, the route will pass through the location so that the vehicle can
  57. // stop at the side of road that the location is biased towards from the
  58. // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
  59. // travel modes, and when the 'location_type' is set to 'location'.
  60. bool side_of_road = 5;
  61. }
  62. // Encapsulates a location (a geographic point, and an optional heading).
  63. message Location {
  64. // The waypoint's geographic coordinates.
  65. google.type.LatLng lat_lng = 1;
  66. // The compass heading associated with the direction of the flow of traffic.
  67. // This value is used to specify the side of the road to use for pickup and
  68. // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
  69. // of due North, 90 specifies a heading of due East, etc. You can use this
  70. // field only for `DRIVE` and `TWO_WHEELER` travel modes.
  71. google.protobuf.Int32Value heading = 2;
  72. }