@googlemaps/fleetengine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/LICENSE +202 -0
- package/README.md +319 -0
- package/build/protos/google/geo/type/viewport.proto +69 -0
- package/build/protos/google/maps/fleetengine/v1/fleetengine.proto +331 -0
- package/build/protos/google/maps/fleetengine/v1/header.proto +108 -0
- package/build/protos/google/maps/fleetengine/v1/traffic.proto +68 -0
- package/build/protos/google/maps/fleetengine/v1/trip_api.proto +377 -0
- package/build/protos/google/maps/fleetengine/v1/trips.proto +311 -0
- package/build/protos/google/maps/fleetengine/v1/vehicle_api.proto +842 -0
- package/build/protos/google/maps/fleetengine/v1/vehicles.proto +348 -0
- package/build/protos/protos.d.ts +13292 -0
- package/build/protos/protos.js +36937 -0
- package/build/protos/protos.json +3997 -0
- package/build/src/index.d.ts +14 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +25 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/trip_service_client.d.ts +555 -0
- package/build/src/v1/trip_service_client.js +631 -0
- package/build/src/v1/trip_service_client.js.map +1 -0
- package/build/src/v1/trip_service_client_config.json +62 -0
- package/build/src/v1/vehicle_service_client.d.ts +1165 -0
- package/build/src/v1/vehicle_service_client.js +904 -0
- package/build/src/v1/vehicle_service_client.js.map +1 -0
- package/build/src/v1/vehicle_service_client_config.json +75 -0
- package/package.json +70 -0
|
@@ -0,0 +1,377 @@
|
|
|
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
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package maps.fleetengine.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/api/resource.proto";
|
|
23
|
+
import "google/api/routing.proto";
|
|
24
|
+
import "google/maps/fleetengine/v1/fleetengine.proto";
|
|
25
|
+
import "google/maps/fleetengine/v1/header.proto";
|
|
26
|
+
import "google/maps/fleetengine/v1/trips.proto";
|
|
27
|
+
import "google/protobuf/duration.proto";
|
|
28
|
+
import "google/protobuf/empty.proto";
|
|
29
|
+
import "google/protobuf/field_mask.proto";
|
|
30
|
+
import "google/protobuf/timestamp.proto";
|
|
31
|
+
|
|
32
|
+
option csharp_namespace = "Google.Maps.FleetEngine.V1";
|
|
33
|
+
option go_package = "cloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb";
|
|
34
|
+
option java_multiple_files = true;
|
|
35
|
+
option java_outer_classname = "TripApi";
|
|
36
|
+
option java_package = "google.maps.fleetengine.v1";
|
|
37
|
+
option objc_class_prefix = "CFE";
|
|
38
|
+
|
|
39
|
+
// Trip management service.
|
|
40
|
+
service TripService {
|
|
41
|
+
option (google.api.default_host) = "fleetengine.googleapis.com";
|
|
42
|
+
option (google.api.oauth_scopes) =
|
|
43
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
|
44
|
+
|
|
45
|
+
// Creates a trip in the Fleet Engine and returns the new trip.
|
|
46
|
+
rpc CreateTrip(CreateTripRequest) returns (Trip) {
|
|
47
|
+
option (google.api.http) = {
|
|
48
|
+
post: "/v1/{parent=providers/*}/trips"
|
|
49
|
+
body: "trip"
|
|
50
|
+
};
|
|
51
|
+
option (google.api.routing) = {
|
|
52
|
+
routing_parameters {
|
|
53
|
+
field: "parent"
|
|
54
|
+
path_template: "{provider_id=providers/*}"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Get information about a single trip.
|
|
60
|
+
rpc GetTrip(GetTripRequest) returns (Trip) {
|
|
61
|
+
option (google.api.http) = {
|
|
62
|
+
get: "/v1/{name=providers/*/trips/*}"
|
|
63
|
+
};
|
|
64
|
+
option (google.api.routing) = {
|
|
65
|
+
routing_parameters {
|
|
66
|
+
field: "name"
|
|
67
|
+
path_template: "{provider_id=providers/*}"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Report billable trip usage.
|
|
73
|
+
rpc ReportBillableTrip(ReportBillableTripRequest)
|
|
74
|
+
returns (google.protobuf.Empty) {
|
|
75
|
+
option (google.api.http) = {
|
|
76
|
+
post: "/v1/{name=providers/*/billableTrips/*}:report"
|
|
77
|
+
body: "*"
|
|
78
|
+
};
|
|
79
|
+
option (google.api.routing) = {
|
|
80
|
+
routing_parameters {
|
|
81
|
+
field: "name"
|
|
82
|
+
path_template: "{provider_id=providers/*}"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Get all the trips for a specific vehicle.
|
|
88
|
+
rpc SearchTrips(SearchTripsRequest) returns (SearchTripsResponse) {
|
|
89
|
+
option (google.api.http) = {
|
|
90
|
+
post: "/v1/{parent=providers/*}/trips:search"
|
|
91
|
+
body: "*"
|
|
92
|
+
};
|
|
93
|
+
option (google.api.routing) = {
|
|
94
|
+
routing_parameters {
|
|
95
|
+
field: "parent"
|
|
96
|
+
path_template: "{provider_id=providers/*}"
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Updates trip data.
|
|
102
|
+
rpc UpdateTrip(UpdateTripRequest) returns (Trip) {
|
|
103
|
+
option (google.api.http) = {
|
|
104
|
+
put: "/v1/{name=providers/*/trips/*}"
|
|
105
|
+
body: "trip"
|
|
106
|
+
};
|
|
107
|
+
option (google.api.routing) = {
|
|
108
|
+
routing_parameters {
|
|
109
|
+
field: "name"
|
|
110
|
+
path_template: "{provider_id=providers/*}"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// CreateTrip request message.
|
|
117
|
+
message CreateTripRequest {
|
|
118
|
+
// The standard Fleet Engine request header.
|
|
119
|
+
RequestHeader header = 1;
|
|
120
|
+
|
|
121
|
+
// Required. Must be in the format `providers/{provider}`.
|
|
122
|
+
// The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
123
|
+
// of the Google Cloud Project of which the service account making
|
|
124
|
+
// this call is a member.
|
|
125
|
+
string parent = 3 [
|
|
126
|
+
(google.api.field_behavior) = REQUIRED,
|
|
127
|
+
(google.api.resource_reference) = {
|
|
128
|
+
type: "fleetengine.googleapis.com/Trip"
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
// Required. Unique Trip ID.
|
|
133
|
+
// Subject to the following restrictions:
|
|
134
|
+
//
|
|
135
|
+
// * Must be a valid Unicode string.
|
|
136
|
+
// * Limited to a maximum length of 64 characters.
|
|
137
|
+
// * Normalized according to [Unicode Normalization Form C]
|
|
138
|
+
// (http://www.unicode.org/reports/tr15/).
|
|
139
|
+
// * May not contain any of the following ASCII characters: '/', ':', '?',
|
|
140
|
+
// ',', or '#'.
|
|
141
|
+
string trip_id = 5 [(google.api.field_behavior) = REQUIRED];
|
|
142
|
+
|
|
143
|
+
// Required. Trip entity to create.
|
|
144
|
+
//
|
|
145
|
+
// When creating a Trip, the following fields are required:
|
|
146
|
+
//
|
|
147
|
+
// * `trip_type`
|
|
148
|
+
// * `pickup_point`
|
|
149
|
+
//
|
|
150
|
+
// The following fields are used if you provide them:
|
|
151
|
+
//
|
|
152
|
+
// * `number_of_passengers`
|
|
153
|
+
// * `vehicle_id`
|
|
154
|
+
// * `dropoff_point`
|
|
155
|
+
// * `intermediate_destinations`
|
|
156
|
+
// * `vehicle_waypoints`
|
|
157
|
+
//
|
|
158
|
+
// All other Trip fields are ignored. For example, all trips start with a
|
|
159
|
+
// `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
|
|
160
|
+
// the creation request.
|
|
161
|
+
//
|
|
162
|
+
// Only `EXCLUSIVE` trips support `intermediate_destinations`.
|
|
163
|
+
//
|
|
164
|
+
// When `vehicle_id` is set for a shared trip, you must supply
|
|
165
|
+
// the list of `Trip.vehicle_waypoints` to specify the order of the remaining
|
|
166
|
+
// waypoints for the vehicle, otherwise the waypoint order will be
|
|
167
|
+
// undetermined.
|
|
168
|
+
//
|
|
169
|
+
// When you specify `Trip.vehicle_waypoints`, the list must contain all
|
|
170
|
+
// the remaining waypoints of the vehicle's trips, with no extra waypoints.
|
|
171
|
+
// You must order these waypoints such that for a given trip, the pickup
|
|
172
|
+
// point is before intermediate destinations, and all intermediate
|
|
173
|
+
// destinations come before the drop-off point. An `EXCLUSIVE` trip's
|
|
174
|
+
// waypoints must not interleave with any other trips.
|
|
175
|
+
//
|
|
176
|
+
// The `trip_id`, `waypoint_type` and `location` fields are used, and all
|
|
177
|
+
// other TripWaypoint fields in `vehicle_waypoints` are ignored.
|
|
178
|
+
Trip trip = 4 [(google.api.field_behavior) = REQUIRED];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// GetTrip request message.
|
|
182
|
+
message GetTripRequest {
|
|
183
|
+
// The standard Fleet Engine request header.
|
|
184
|
+
RequestHeader header = 1;
|
|
185
|
+
|
|
186
|
+
// Required. Must be in the format `providers/{provider}/trips/{trip}`.
|
|
187
|
+
// The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
188
|
+
// of the Google Cloud Project of which the service account making
|
|
189
|
+
// this call is a member.
|
|
190
|
+
string name = 3 [
|
|
191
|
+
(google.api.field_behavior) = REQUIRED,
|
|
192
|
+
(google.api.resource_reference) = {
|
|
193
|
+
type: "fleetengine.googleapis.com/Trip"
|
|
194
|
+
}
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
// The subset of Trip fields that should be returned and their interpretation.
|
|
198
|
+
TripView view = 11;
|
|
199
|
+
|
|
200
|
+
// Indicates the minimum timestamp (exclusive) for which `Trip.route` or
|
|
201
|
+
// `Trip.current_route_segment` data are retrieved. If route data are
|
|
202
|
+
// unchanged since this timestamp, the route field is not set in the response.
|
|
203
|
+
// If a minimum is unspecified, the route data are always retrieved.
|
|
204
|
+
google.protobuf.Timestamp current_route_segment_version = 6;
|
|
205
|
+
|
|
206
|
+
// Indicates the minimum timestamp (exclusive) for which
|
|
207
|
+
// `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
|
|
208
|
+
// timestamp, the `remaining_waypoints` are not set in the response. If this
|
|
209
|
+
// field is unspecified, `remaining_waypoints` is always retrieved.
|
|
210
|
+
google.protobuf.Timestamp remaining_waypoints_version = 7;
|
|
211
|
+
|
|
212
|
+
// The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
|
|
213
|
+
// or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
|
|
214
|
+
// is `LAT_LNG_LIST_TYPE`.
|
|
215
|
+
PolylineFormatType route_format_type = 8;
|
|
216
|
+
|
|
217
|
+
// Indicates the minimum timestamp (exclusive) for which
|
|
218
|
+
// `Trip.current_route_segment_traffic` is retrieved. If traffic data are
|
|
219
|
+
// unchanged since this timestamp, the `current_route_segment_traffic` field
|
|
220
|
+
// is not set in the response. If a minimum is unspecified, the traffic data
|
|
221
|
+
// are always retrieved. Note that traffic is only available for On-Demand
|
|
222
|
+
// Rides and Deliveries Solution customers.
|
|
223
|
+
google.protobuf.Timestamp current_route_segment_traffic_version = 9;
|
|
224
|
+
|
|
225
|
+
// Indicates the minimum timestamp (exclusive) for which
|
|
226
|
+
// `Trip.remaining_waypoints.traffic_to_waypoint` and
|
|
227
|
+
// `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
|
|
228
|
+
// unchanged since this timestamp, the fields above are
|
|
229
|
+
// not set in the response. If `remaining_waypoints_route_version` is
|
|
230
|
+
// unspecified, traffic and path are always retrieved.
|
|
231
|
+
google.protobuf.Timestamp remaining_waypoints_route_version = 10;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// ReportBillableTrip request message.
|
|
235
|
+
message ReportBillableTripRequest {
|
|
236
|
+
// Selector for different solution types of a reported trip.
|
|
237
|
+
enum SolutionType {
|
|
238
|
+
// The default value. For backwards-compatibility, the API will use
|
|
239
|
+
// `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first
|
|
240
|
+
// supported solution type.
|
|
241
|
+
SOLUTION_TYPE_UNSPECIFIED = 0;
|
|
242
|
+
|
|
243
|
+
// The solution is an on-demand ridesharing and deliveries trip.
|
|
244
|
+
ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Required. Must be in the format
|
|
248
|
+
// `providers/{provider}/billableTrips/{billable_trip}`. The
|
|
249
|
+
// provider must be the Project ID (for example, `sample-cloud-project`) of
|
|
250
|
+
// the Google Cloud Project of which the service account making this call is a
|
|
251
|
+
// member.
|
|
252
|
+
string name = 2 [(google.api.field_behavior) = REQUIRED];
|
|
253
|
+
|
|
254
|
+
// Required. Two letter country code of the country where the trip takes
|
|
255
|
+
// place. Price is defined according to country code.
|
|
256
|
+
string country_code = 3 [(google.api.field_behavior) = REQUIRED];
|
|
257
|
+
|
|
258
|
+
// The platform upon which the request was issued.
|
|
259
|
+
BillingPlatformIdentifier platform = 5;
|
|
260
|
+
|
|
261
|
+
// The identifiers that are directly related to the trip being reported. These
|
|
262
|
+
// are usually IDs (for example, session IDs) of pre-booking operations done
|
|
263
|
+
// before the trip ID is available. The number of `related_ids` is
|
|
264
|
+
// limited to 50.
|
|
265
|
+
repeated string related_ids = 6;
|
|
266
|
+
|
|
267
|
+
// The type of GMP product solution (for example,
|
|
268
|
+
// `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
|
|
269
|
+
SolutionType solution_type = 7;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// UpdateTrip request message.
|
|
273
|
+
message UpdateTripRequest {
|
|
274
|
+
// The standard Fleet Engine request header.
|
|
275
|
+
RequestHeader header = 1;
|
|
276
|
+
|
|
277
|
+
// Required. Must be in the format
|
|
278
|
+
// `providers/{provider}/trips/{trip}`. The provider must
|
|
279
|
+
// be the Project ID (for example, `sample-consumer-project`) of the Google
|
|
280
|
+
// Cloud Project of which the service account making this call is a member.
|
|
281
|
+
string name = 3 [(google.api.field_behavior) = REQUIRED];
|
|
282
|
+
|
|
283
|
+
// Required. The Trip associated with the update.
|
|
284
|
+
//
|
|
285
|
+
// The following fields are maintained by the Fleet Engine. Do not update
|
|
286
|
+
// them using Trip.update.
|
|
287
|
+
//
|
|
288
|
+
// * `current_route_segment`
|
|
289
|
+
// * `current_route_segment_end_point`
|
|
290
|
+
// * `current_route_segment_traffic`
|
|
291
|
+
// * `current_route_segment_traffic_version`
|
|
292
|
+
// * `current_route_segment_version`
|
|
293
|
+
// * `dropoff_time`
|
|
294
|
+
// * `eta_to_next_waypoint`
|
|
295
|
+
// * `intermediate_destinations_version`
|
|
296
|
+
// * `last_location`
|
|
297
|
+
// * `name`
|
|
298
|
+
// * `number_of_passengers`
|
|
299
|
+
// * `pickup_time`
|
|
300
|
+
// * `remaining_distance_meters`
|
|
301
|
+
// * `remaining_time_to_first_waypoint`
|
|
302
|
+
// * `remaining_waypoints`
|
|
303
|
+
// * `remaining_waypoints_version`
|
|
304
|
+
// * `route`
|
|
305
|
+
//
|
|
306
|
+
// When you update the `Trip.vehicle_id` for a shared trip, you must supply
|
|
307
|
+
// the list of `Trip.vehicle_waypoints` to specify the order of the remaining
|
|
308
|
+
// waypoints, otherwise the order will be undetermined.
|
|
309
|
+
//
|
|
310
|
+
// When you specify `Trip.vehicle_waypoints`, the list must contain all
|
|
311
|
+
// the remaining waypoints of the vehicle's trips, with no extra waypoints.
|
|
312
|
+
// You must order these waypoints such that for a given trip, the pickup
|
|
313
|
+
// point is before intermediate destinations, and all intermediate
|
|
314
|
+
// destinations come before the drop-off point. An `EXCLUSIVE` trip's
|
|
315
|
+
// waypoints must not interleave with any other trips.
|
|
316
|
+
// The `trip_id`, `waypoint_type` and `location` fields are used, and all
|
|
317
|
+
// other TripWaypoint fields in `vehicle_waypoints` are ignored.
|
|
318
|
+
//
|
|
319
|
+
// To avoid a race condition for trips with multiple destinations, you
|
|
320
|
+
// should provide `Trip.intermediate_destinations_version` when updating
|
|
321
|
+
// the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
|
|
322
|
+
// `Trip.intermediate_destinations_version` passed must be consistent with
|
|
323
|
+
// Fleet Engine's version. If it isn't, the request fails.
|
|
324
|
+
Trip trip = 4 [(google.api.field_behavior) = REQUIRED];
|
|
325
|
+
|
|
326
|
+
// Required. The field mask indicating which fields in Trip to update.
|
|
327
|
+
// The `update_mask` must contain at least one field.
|
|
328
|
+
google.protobuf.FieldMask update_mask = 5
|
|
329
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// SearchTrips request message.
|
|
333
|
+
message SearchTripsRequest {
|
|
334
|
+
// The standard Fleet Engine request header.
|
|
335
|
+
RequestHeader header = 1;
|
|
336
|
+
|
|
337
|
+
// Required. Must be in the format `providers/{provider}`.
|
|
338
|
+
// The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
339
|
+
// of the Google Cloud Project of which the service account making
|
|
340
|
+
// this call is a member.
|
|
341
|
+
string parent = 3 [(google.api.field_behavior) = REQUIRED];
|
|
342
|
+
|
|
343
|
+
// The vehicle associated with the trips in the request. If unspecified, the
|
|
344
|
+
// returned trips do not contain:
|
|
345
|
+
//
|
|
346
|
+
// * `current_route_segment`
|
|
347
|
+
// * `remaining_waypoints`
|
|
348
|
+
// * `remaining_distance_meters`
|
|
349
|
+
// * `eta_to_first_waypoint`
|
|
350
|
+
string vehicle_id = 4;
|
|
351
|
+
|
|
352
|
+
// If set to true, the response includes Trips that influence a driver's
|
|
353
|
+
// route.
|
|
354
|
+
bool active_trips_only = 5;
|
|
355
|
+
|
|
356
|
+
// If not set, the server decides the number of results to return.
|
|
357
|
+
int32 page_size = 6;
|
|
358
|
+
|
|
359
|
+
// Set this to a value previously returned in the `SearchTripsResponse` to
|
|
360
|
+
// continue from previous results.
|
|
361
|
+
string page_token = 7;
|
|
362
|
+
|
|
363
|
+
// If specified, returns the trips that have not been updated after the time
|
|
364
|
+
// `(current - minimum_staleness)`.
|
|
365
|
+
google.protobuf.Duration minimum_staleness = 8;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// SearchTrips response message.
|
|
369
|
+
message SearchTripsResponse {
|
|
370
|
+
// The list of trips for the requested vehicle.
|
|
371
|
+
repeated Trip trips = 1;
|
|
372
|
+
|
|
373
|
+
// Pass this token in the SearchTripsRequest to page through list results. The
|
|
374
|
+
// API returns a trip list on each call, and when no more results remain the
|
|
375
|
+
// trip list is empty.
|
|
376
|
+
string next_page_token = 2;
|
|
377
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
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
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package maps.fleetengine.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/maps/fleetengine/v1/fleetengine.proto";
|
|
22
|
+
import "google/maps/fleetengine/v1/traffic.proto";
|
|
23
|
+
import "google/protobuf/duration.proto";
|
|
24
|
+
import "google/protobuf/timestamp.proto";
|
|
25
|
+
import "google/protobuf/wrappers.proto";
|
|
26
|
+
import "google/type/latlng.proto";
|
|
27
|
+
|
|
28
|
+
option csharp_namespace = "Google.Maps.FleetEngine.V1";
|
|
29
|
+
option go_package = "cloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb";
|
|
30
|
+
option java_multiple_files = true;
|
|
31
|
+
option java_outer_classname = "Trips";
|
|
32
|
+
option java_package = "google.maps.fleetengine.v1";
|
|
33
|
+
option objc_class_prefix = "CFE";
|
|
34
|
+
|
|
35
|
+
// Trip metadata.
|
|
36
|
+
message Trip {
|
|
37
|
+
option (google.api.resource) = {
|
|
38
|
+
type: "fleetengine.googleapis.com/Trip"
|
|
39
|
+
pattern: "providers/{provider}/trips/{trip}"
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Output only. In the format "providers/{provider}/trips/{trip}"
|
|
43
|
+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
44
|
+
|
|
45
|
+
// ID of the vehicle making this trip.
|
|
46
|
+
string vehicle_id = 2;
|
|
47
|
+
|
|
48
|
+
// Current status of the trip.
|
|
49
|
+
TripStatus trip_status = 3;
|
|
50
|
+
|
|
51
|
+
// The type of the trip.
|
|
52
|
+
TripType trip_type = 4;
|
|
53
|
+
|
|
54
|
+
// Location where customer indicates they will be picked up.
|
|
55
|
+
TerminalLocation pickup_point = 5;
|
|
56
|
+
|
|
57
|
+
// Input only. The actual location when and where customer was picked up.
|
|
58
|
+
// This field is for provider to provide feedback on actual pickup
|
|
59
|
+
// information.
|
|
60
|
+
StopLocation actual_pickup_point = 22
|
|
61
|
+
[(google.api.field_behavior) = INPUT_ONLY];
|
|
62
|
+
|
|
63
|
+
// Input only. The actual time and location of the driver arrival at
|
|
64
|
+
// the pickup point.
|
|
65
|
+
// This field is for provider to provide feedback on actual arrival
|
|
66
|
+
// information at the pickup point.
|
|
67
|
+
StopLocation actual_pickup_arrival_point = 32
|
|
68
|
+
[(google.api.field_behavior) = INPUT_ONLY];
|
|
69
|
+
|
|
70
|
+
// Output only. Either the estimated future time when the rider(s) will be
|
|
71
|
+
// picked up, or the actual time when they were picked up.
|
|
72
|
+
google.protobuf.Timestamp pickup_time = 6
|
|
73
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
74
|
+
|
|
75
|
+
// Intermediate stops in order that the trip requests (in addition
|
|
76
|
+
// to pickup and dropoff). Initially this will not be supported for shared
|
|
77
|
+
// trips.
|
|
78
|
+
repeated TerminalLocation intermediate_destinations = 14;
|
|
79
|
+
|
|
80
|
+
// Indicates the last time the `intermediate_destinations` was modified.
|
|
81
|
+
// Your server should cache this value and pass it in `UpdateTripRequest`
|
|
82
|
+
// when update `intermediate_destination_index` to ensure the
|
|
83
|
+
// `intermediate_destinations` is not changed.
|
|
84
|
+
google.protobuf.Timestamp intermediate_destinations_version = 25;
|
|
85
|
+
|
|
86
|
+
// When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
|
|
87
|
+
// between [0..N-1] indicating which intermediate destination the vehicle will
|
|
88
|
+
// cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
|
|
89
|
+
// number between [0..N-1] indicating which intermediate destination the
|
|
90
|
+
// vehicle is at. The provider sets this value. If there are no
|
|
91
|
+
// `intermediate_destinations`, this field is ignored.
|
|
92
|
+
int32 intermediate_destination_index = 15;
|
|
93
|
+
|
|
94
|
+
// Input only. The actual time and location of the driver's arrival at
|
|
95
|
+
// an intermediate destination.
|
|
96
|
+
// This field is for provider to provide feedback on actual arrival
|
|
97
|
+
// information at intermediate destinations.
|
|
98
|
+
repeated StopLocation actual_intermediate_destination_arrival_points = 33
|
|
99
|
+
[(google.api.field_behavior) = INPUT_ONLY];
|
|
100
|
+
|
|
101
|
+
// Input only. The actual time and location when and where the customer was
|
|
102
|
+
// picked up from an intermediate destination. This field is for provider to
|
|
103
|
+
// provide feedback on actual pickup information at intermediate destinations.
|
|
104
|
+
repeated StopLocation actual_intermediate_destinations = 34
|
|
105
|
+
[(google.api.field_behavior) = INPUT_ONLY];
|
|
106
|
+
|
|
107
|
+
// Location where customer indicates they will be dropped off.
|
|
108
|
+
TerminalLocation dropoff_point = 7;
|
|
109
|
+
|
|
110
|
+
// Input only. The actual time and location when and where customer was
|
|
111
|
+
// dropped off. This field is for provider to provide feedback on actual
|
|
112
|
+
// dropoff information.
|
|
113
|
+
StopLocation actual_dropoff_point = 23
|
|
114
|
+
[(google.api.field_behavior) = INPUT_ONLY];
|
|
115
|
+
|
|
116
|
+
// Output only. Either the estimated future time when the rider(s) will be
|
|
117
|
+
// dropped off at the final destination, or the actual time when they were
|
|
118
|
+
// dropped off.
|
|
119
|
+
google.protobuf.Timestamp dropoff_time = 8
|
|
120
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
121
|
+
|
|
122
|
+
// Output only. The full path from the current location to the dropoff point,
|
|
123
|
+
// inclusive. This path could include waypoints from other trips.
|
|
124
|
+
repeated TripWaypoint remaining_waypoints = 16
|
|
125
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
126
|
+
|
|
127
|
+
// This field supports manual ordering of the waypoints for the trip. It
|
|
128
|
+
// contains all of the remaining waypoints for the assigned vehicle, as well
|
|
129
|
+
// as the pickup and drop-off waypoints for this trip. If the trip hasn't been
|
|
130
|
+
// assigned to a vehicle, then Fleet Engine ignores this field. For privacy
|
|
131
|
+
// reasons, this field is only populated by the server on `UpdateTrip` and
|
|
132
|
+
// `CreateTrip` calls, NOT on `GetTrip` calls.
|
|
133
|
+
repeated TripWaypoint vehicle_waypoints = 20;
|
|
134
|
+
|
|
135
|
+
// Output only. Anticipated route for this trip to the first entry in
|
|
136
|
+
// remaining_waypoints. Note that the first waypoint may belong to a different
|
|
137
|
+
// trip.
|
|
138
|
+
repeated google.type.LatLng route = 9
|
|
139
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
140
|
+
|
|
141
|
+
// Output only. An encoded path to the next waypoint.
|
|
142
|
+
//
|
|
143
|
+
// Note: This field is intended only for use by the Driver SDK and Consumer
|
|
144
|
+
// SDK. Decoding is not yet supported.
|
|
145
|
+
string current_route_segment = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
146
|
+
|
|
147
|
+
// Output only. Indicates the last time the route was modified.
|
|
148
|
+
//
|
|
149
|
+
// Note: This field is intended only for use by the Driver SDK and Consumer
|
|
150
|
+
// SDK.
|
|
151
|
+
google.protobuf.Timestamp current_route_segment_version = 17
|
|
152
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
153
|
+
|
|
154
|
+
// Output only. Indicates the traffic conditions along the
|
|
155
|
+
// `current_route_segment` when they're available.
|
|
156
|
+
//
|
|
157
|
+
// Note: This field is intended only for use by the Driver SDK and Consumer
|
|
158
|
+
// SDK.
|
|
159
|
+
ConsumableTrafficPolyline current_route_segment_traffic = 28
|
|
160
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
161
|
+
|
|
162
|
+
// Output only. Indicates the last time the `current_route_segment_traffic`
|
|
163
|
+
// was modified.
|
|
164
|
+
//
|
|
165
|
+
// Note: This field is intended only for use by the Driver SDK and Consumer
|
|
166
|
+
// SDK.
|
|
167
|
+
google.protobuf.Timestamp current_route_segment_traffic_version = 30
|
|
168
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
169
|
+
|
|
170
|
+
// Output only. The waypoint where `current_route_segment` ends.
|
|
171
|
+
TripWaypoint current_route_segment_end_point = 24
|
|
172
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
173
|
+
|
|
174
|
+
// Output only. The remaining driving distance in the `current_route_segment`
|
|
175
|
+
// field. The value is unspecified if the trip is not assigned to a vehicle,
|
|
176
|
+
// or the trip is completed or cancelled.
|
|
177
|
+
google.protobuf.Int32Value remaining_distance_meters = 12
|
|
178
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
179
|
+
|
|
180
|
+
// Output only. The ETA to the next waypoint (the first entry in the
|
|
181
|
+
// `remaining_waypoints` field). The value is unspecified if the trip is not
|
|
182
|
+
// assigned to a vehicle, or the trip is inactive (completed or cancelled).
|
|
183
|
+
google.protobuf.Timestamp eta_to_first_waypoint = 13
|
|
184
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
185
|
+
|
|
186
|
+
// Output only. The duration from when the Trip data is returned to the time
|
|
187
|
+
// in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
|
|
188
|
+
// not assigned to a vehicle, or the trip is inactive (completed or
|
|
189
|
+
// cancelled).
|
|
190
|
+
google.protobuf.Duration remaining_time_to_first_waypoint = 27
|
|
191
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
192
|
+
|
|
193
|
+
// Output only. Indicates the last time that `remaining_waypoints` was changed
|
|
194
|
+
// (a waypoint was added, removed, or changed).
|
|
195
|
+
google.protobuf.Timestamp remaining_waypoints_version = 19
|
|
196
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
197
|
+
|
|
198
|
+
// Output only. Indicates the last time the
|
|
199
|
+
// `remaining_waypoints.path_to_waypoint` and
|
|
200
|
+
// `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
|
|
201
|
+
// should cache this value and pass it in `GetTripRequest` to ensure the
|
|
202
|
+
// paths and traffic for `remaining_waypoints` are only returned if updated.
|
|
203
|
+
google.protobuf.Timestamp remaining_waypoints_route_version = 29
|
|
204
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
205
|
+
|
|
206
|
+
// Immutable. Indicates the number of passengers on this trip and does not
|
|
207
|
+
// include the driver. A vehicle must have available capacity to be returned
|
|
208
|
+
// in a `SearchVehicles` response.
|
|
209
|
+
int32 number_of_passengers = 10 [(google.api.field_behavior) = IMMUTABLE];
|
|
210
|
+
|
|
211
|
+
// Output only. Indicates the last reported location of the vehicle along the
|
|
212
|
+
// route.
|
|
213
|
+
VehicleLocation last_location = 11
|
|
214
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
215
|
+
|
|
216
|
+
// Output only. Indicates whether the vehicle's `last_location` can be snapped
|
|
217
|
+
// to the current_route_segment. False if `last_location` or
|
|
218
|
+
// `current_route_segment` doesn't exist.
|
|
219
|
+
// It is computed by Fleet Engine. Any update from clients will be ignored.
|
|
220
|
+
bool last_location_snappable = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
221
|
+
|
|
222
|
+
// The subset of Trip fields that are populated and how they should be
|
|
223
|
+
// interpreted.
|
|
224
|
+
TripView view = 31;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// The actual location where a stop (pickup/dropoff) happened.
|
|
228
|
+
message StopLocation {
|
|
229
|
+
// Required. Denotes the actual location.
|
|
230
|
+
google.type.LatLng point = 1 [(google.api.field_behavior) = REQUIRED];
|
|
231
|
+
|
|
232
|
+
// Indicates when the stop happened.
|
|
233
|
+
google.protobuf.Timestamp timestamp = 2;
|
|
234
|
+
|
|
235
|
+
// Input only. Deprecated. Use the timestamp field.
|
|
236
|
+
google.protobuf.Timestamp stop_time = 3
|
|
237
|
+
[deprecated = true, (google.api.field_behavior) = INPUT_ONLY];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// The status of a trip indicating its progression.
|
|
241
|
+
enum TripStatus {
|
|
242
|
+
// Default, used for unspecified or unrecognized trip status.
|
|
243
|
+
UNKNOWN_TRIP_STATUS = 0;
|
|
244
|
+
|
|
245
|
+
// Newly created trip.
|
|
246
|
+
NEW = 1;
|
|
247
|
+
|
|
248
|
+
// The driver is on their way to the pickup point.
|
|
249
|
+
ENROUTE_TO_PICKUP = 2;
|
|
250
|
+
|
|
251
|
+
// The driver has arrived at the pickup point.
|
|
252
|
+
ARRIVED_AT_PICKUP = 3;
|
|
253
|
+
|
|
254
|
+
// The driver has arrived at an intermediate destination and is waiting for
|
|
255
|
+
// the rider.
|
|
256
|
+
ARRIVED_AT_INTERMEDIATE_DESTINATION = 7;
|
|
257
|
+
|
|
258
|
+
// The driver is on their way to an intermediate destination
|
|
259
|
+
// (not the dropoff point).
|
|
260
|
+
ENROUTE_TO_INTERMEDIATE_DESTINATION = 8;
|
|
261
|
+
|
|
262
|
+
// The driver has picked up the rider and is on their way to the
|
|
263
|
+
// next destination.
|
|
264
|
+
ENROUTE_TO_DROPOFF = 4;
|
|
265
|
+
|
|
266
|
+
// The rider has been dropped off and the trip is complete.
|
|
267
|
+
COMPLETE = 5;
|
|
268
|
+
|
|
269
|
+
// The trip was canceled prior to pickup by the driver, rider, or
|
|
270
|
+
// rideshare provider.
|
|
271
|
+
CANCELED = 6;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// A set of values that indicate upon which platform the request was issued.
|
|
275
|
+
enum BillingPlatformIdentifier {
|
|
276
|
+
// Default. Used for unspecified platforms.
|
|
277
|
+
BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0;
|
|
278
|
+
|
|
279
|
+
// The platform is a client server.
|
|
280
|
+
SERVER = 1;
|
|
281
|
+
|
|
282
|
+
// The platform is a web browser.
|
|
283
|
+
WEB = 2;
|
|
284
|
+
|
|
285
|
+
// The platform is an Android mobile device.
|
|
286
|
+
ANDROID = 3;
|
|
287
|
+
|
|
288
|
+
// The platform is an IOS mobile device.
|
|
289
|
+
IOS = 4;
|
|
290
|
+
|
|
291
|
+
// Other platforms that are not listed in this enumeration.
|
|
292
|
+
OTHERS = 5;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Selector for different sets of Trip fields in a `GetTrip` response. See
|
|
296
|
+
// [AIP-157](https://google.aip.dev/157) for context. Additional views are
|
|
297
|
+
// likely to be added.
|
|
298
|
+
enum TripView {
|
|
299
|
+
// The default value. For backwards-compatibility, the API will default to an
|
|
300
|
+
// SDK view. To ensure stability and support, customers are
|
|
301
|
+
// advised to select a `TripView` other than `SDK`.
|
|
302
|
+
TRIP_VIEW_UNSPECIFIED = 0;
|
|
303
|
+
|
|
304
|
+
// Includes fields that may not be interpretable or supportable using
|
|
305
|
+
// publicly available libraries.
|
|
306
|
+
SDK = 1;
|
|
307
|
+
|
|
308
|
+
// Trip fields are populated for the Journey Sharing use case. This view is
|
|
309
|
+
// intended for server-to-server communications.
|
|
310
|
+
JOURNEY_SHARING_V1S = 2;
|
|
311
|
+
}
|