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.v1alpha; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/maps/routes/v1/compute_custom_routes_request.proto"; 22import "google/maps/routes/v1/compute_custom_routes_response.proto"; 23import "google/maps/routes/v1/compute_route_matrix_request.proto"; 24import "google/maps/routes/v1/compute_routes_request.proto"; 25import "google/maps/routes/v1/compute_routes_response.proto"; 26import "google/maps/routes/v1/route_matrix_element.proto"; 27 28option cc_enable_arenas = true; 29option csharp_namespace = "Google.Maps.Routes.V1Alpha"; 30option go_package = "cloud.google.com/go/maps/routes/apiv1alpha/routespb;routespb"; 31option java_multiple_files = true; 32option java_outer_classname = "RoutesServiceAlphaProto"; 33option java_package = "com.google.maps.routes.v1alpha"; 34option objc_class_prefix = "GMRS"; 35option php_namespace = "Google\\Maps\\Routes\\V1alpha"; 36 37// The Routes Preferred API. 38service RoutesAlpha { 39 option (google.api.default_host) = "routespreferred.googleapis.com"; 40 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred"; 41 42 // Returns the primary route along with optional alternate routes, given a set 43 // of terminal and intermediate waypoints. 44 // 45 // **NOTE:** This method requires that you specify a response field mask in 46 // the input. You can provide the response field mask by using the URL 47 // parameter `$fields` or `fields`, or by using the HTTP/gRPC header 48 // `X-Goog-FieldMask` (see the [available URL parameters and 49 // headers](https://cloud.google.com/apis/docs/system-parameters). The value 50 // is a comma separated list of field paths. See this detailed documentation 51 // about [how to construct the field 52 // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). 53 // 54 // For example, in this method: 55 // 56 // * Field mask of all available fields (for manual inspection): 57 // `X-Goog-FieldMask: *` 58 // * Field mask of Route-level duration, distance, and polyline (an example 59 // production setup): 60 // `X-Goog-FieldMask: 61 // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline` 62 // 63 // Google discourages the use of the wildcard (`*`) response field mask, or 64 // specifying the field mask at the top level (`routes`), because: 65 // 66 // * Selecting only the fields that you need helps our server save computation 67 // cycles, allowing us to return the result to you with a lower latency. 68 // * Selecting only the fields that you need in your production job ensures 69 // stable latency performance. We might add more response fields in the 70 // future, and those new fields might require extra computation time. If you 71 // select all fields, or if you select all fields at the top level, then you 72 // might experience performance degradation because any new field we add will 73 // be automatically included in the response. 74 // * Selecting only the fields that you need results in a smaller response 75 // size, and thus higher network throughput. 76 rpc ComputeRoutes(google.maps.routes.v1.ComputeRoutesRequest) returns (google.maps.routes.v1.ComputeRoutesResponse) { 77 option (google.api.http) = { 78 post: "/v1alpha:computeRoutes" 79 body: "*" 80 }; 81 } 82 83 // Takes in a list of origins and destinations and returns a stream containing 84 // route information for each combination of origin and destination. 85 // 86 // **NOTE:** This method requires that you specify a response field mask in 87 // the input. You can provide the response field mask by using the URL 88 // parameter `$fields` or `fields`, or by using the HTTP/gRPC header 89 // `X-Goog-FieldMask` (see the [available URL parameters and 90 // headers](https://cloud.google.com/apis/docs/system-parameters). The value 91 // is a comma separated list of field paths. See this detailed documentation 92 // about [how to construct the field 93 // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). 94 // 95 // For example, in this method: 96 // 97 // * Field mask of all available fields (for manual inspection): 98 // `X-Goog-FieldMask: *` 99 // * Field mask of route durations, distances, element status, condition, and 100 // element indices (an example production setup): 101 // `X-Goog-FieldMask: 102 // originIndex,destinationIndex,status,condition,distanceMeters,duration` 103 // 104 // It is critical that you include `status` in your field mask as otherwise 105 // all messages will appear to be OK. Google discourages the use of the 106 // wildcard (`*`) response field mask, because: 107 // 108 // * Selecting only the fields that you need helps our server save computation 109 // cycles, allowing us to return the result to you with a lower latency. 110 // * Selecting only the fields that you need in your production job ensures 111 // stable latency performance. We might add more response fields in the 112 // future, and those new fields might require extra computation time. If you 113 // select all fields, or if you select all fields at the top level, then you 114 // might experience performance degradation because any new field we add will 115 // be automatically included in the response. 116 // * Selecting only the fields that you need results in a smaller response 117 // size, and thus higher network throughput. 118 rpc ComputeRouteMatrix(google.maps.routes.v1.ComputeRouteMatrixRequest) returns (stream google.maps.routes.v1.RouteMatrixElement) { 119 option (google.api.http) = { 120 post: "/v1alpha:computeRouteMatrix" 121 body: "*" 122 }; 123 } 124 125 // Given a set of terminal and intermediate waypoints, and a route objective, 126 // computes the best route for the route objective. Also returns fastest route 127 // and shortest route as reference routes. 128 // 129 // **NOTE:** This method requires that you specify a response field mask in 130 // the input. You can provide the response field mask by using the URL 131 // parameter `$fields` or `fields`, or by using the HTTP/gRPC header 132 // `X-Goog-FieldMask` (see the [available URL parameters and 133 // headers](https://cloud.google.com/apis/docs/system-parameters). The value 134 // is a comma separated list of field paths. See this detailed documentation 135 // about [how to construct the field 136 // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). 137 // 138 // For example, in this method: 139 // 140 // * Field mask of all available fields (for manual inspection): 141 // `X-Goog-FieldMask: *` 142 // * Field mask of route distances, durations, token and toll info: 143 // `X-Goog-FieldMask: 144 // routes.route.distanceMeters,routes.route.duration,routes.token,routes.route.travelAdvisory.tollInfo` 145 // 146 // Google discourages the use of the wildcard (`*`) response field mask, or 147 // specifying the field mask at the top level (`routes`), because: 148 // 149 // * Selecting only the fields that you need helps our server save computation 150 // cycles, allowing us to return the result to you with a lower latency. 151 // * Selecting only the fields that you need in your production job ensures 152 // stable latency performance. We might add more response fields in the 153 // future, and those new fields might require extra computation time. If you 154 // select all fields, or if you select all fields at the top level, then you 155 // might experience performance degradation because any new field we add will 156 // be automatically included in the response. 157 // * Selecting only the fields that you need results in a smaller response 158 // size, and thus higher network throughput. 159 rpc ComputeCustomRoutes(google.maps.routes.v1.ComputeCustomRoutesRequest) returns (google.maps.routes.v1.ComputeCustomRoutesResponse) { 160 option (google.api.http) = { 161 post: "/v1alpha:computeCustomRoutes" 162 body: "*" 163 }; 164 } 165} 166