compute_route_matrix_request.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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/api/field_behavior.proto";
  17. import "google/maps/routes/v1/compute_routes_request.proto";
  18. import "google/maps/routes/v1/waypoint.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option cc_enable_arenas = true;
  21. option csharp_namespace = "Google.Maps.Routes.V1";
  22. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ComputeRouteMatrixRequestProto";
  25. option java_package = "com.google.maps.routes.v1";
  26. option objc_class_prefix = "GMRS";
  27. option php_namespace = "Google\\Maps\\Routes\\V1";
  28. // ComputeRouteMatrix request message
  29. message ComputeRouteMatrixRequest {
  30. // Required. Array of origins, which determines the rows of the response matrix.
  31. // Several size restrictions apply to the cardinality of origins and
  32. // destinations:
  33. //
  34. // * The number of elements (origins × destinations) must be no greater than
  35. // 625 in any case.
  36. // * The number of elements (origins × destinations) must be no greater than
  37. // 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
  38. // * The number of waypoints (origins + destinations) specified as `place_id`
  39. // must be no greater than 50.
  40. repeated RouteMatrixOrigin origins = 1 [(google.api.field_behavior) = REQUIRED];
  41. // Required. Array of destinations, which determines the columns of the response matrix.
  42. repeated RouteMatrixDestination destinations = 2 [(google.api.field_behavior) = REQUIRED];
  43. // Optional. Specifies the mode of transportation.
  44. RouteTravelMode travel_mode = 3 [(google.api.field_behavior) = OPTIONAL];
  45. // Optional. Specifies how to compute the route. The server attempts to use the selected
  46. // routing preference to compute the route. If the routing preference results
  47. // in an error or an extra long latency, an error is returned. In the future,
  48. // we might implement a fallback mechanism to use a different option when the
  49. // preferred option does not give a valid result. You can specify this option
  50. // only when the `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the
  51. // request fails.
  52. RoutingPreference routing_preference = 4 [(google.api.field_behavior) = OPTIONAL];
  53. // Optional. The departure time. If you don't set this value, this defaults to the time
  54. // that you made the request. If you set this value to a time that has already
  55. // occurred, the request fails.
  56. google.protobuf.Timestamp departure_time = 5 [(google.api.field_behavior) = OPTIONAL];
  57. }
  58. // A single origin for ComputeRouteMatrixRequest
  59. message RouteMatrixOrigin {
  60. // Required. Origin waypoint
  61. Waypoint waypoint = 1 [(google.api.field_behavior) = REQUIRED];
  62. // Optional. Modifiers for every route that takes this as the origin
  63. RouteModifiers route_modifiers = 2 [(google.api.field_behavior) = OPTIONAL];
  64. }
  65. // A single destination for ComputeRouteMatrixRequest
  66. message RouteMatrixDestination {
  67. // Required. Destination waypoint
  68. Waypoint waypoint = 1 [(google.api.field_behavior) = REQUIRED];
  69. }