Skip to content

Commit 948c8fd

Browse files
Google APIscopybara-github
authored andcommitted
refactor: use updated protos for DeliveryService
PiperOrigin-RevId: 430330814
1 parent 88075ae commit 948c8fd

14 files changed

Lines changed: 707 additions & 438 deletions

google/maps/fleetengine/delivery/v1/BUILD.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
2121
proto_library(
2222
name = "delivery_proto",
2323
srcs = [
24+
"common.proto",
2425
"delivery_api.proto",
2526
"delivery_vehicles.proto",
27+
"header.proto",
2628
"tasks.proto",
2729
],
2830
deps = [
@@ -31,7 +33,6 @@ proto_library(
3133
"//google/api:field_behavior_proto",
3234
"//google/api:resource_proto",
3335
"//google/geo/type:viewport_proto",
34-
"//google/maps/fleetengine/v1:fleetengine_proto",
3536
"//google/type:latlng_proto",
3637
"@com_google_protobuf//:duration_proto",
3738
"@com_google_protobuf//:field_mask_proto",
@@ -125,7 +126,6 @@ go_proto_library(
125126
deps = [
126127
"//google/api:annotations_go_proto",
127128
"//google/geo/type:viewport_go_proto",
128-
"//google/maps/fleetengine/v1:fleetengine_go_proto",
129129
"//google/type:latlng_go_proto",
130130
],
131131
)
@@ -173,7 +173,7 @@ load(
173173
py_gapic_library(
174174
name = "delivery_py_gapic",
175175
srcs = [":delivery_proto"],
176-
grpc_service_config = None,
176+
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
177177
)
178178

179179
# Open Source Packages
@@ -209,7 +209,7 @@ php_grpc_library(
209209
php_gapic_library(
210210
name = "delivery_php_gapic",
211211
srcs = [":delivery_proto_with_info"],
212-
grpc_service_config = None,
212+
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
213213
service_yaml = "fleetengine.yaml",
214214
deps = [
215215
":delivery_php_grpc",
@@ -241,7 +241,7 @@ nodejs_gapic_library(
241241
package_name = "@googlemaps/fleetengine-delivery",
242242
src = ":delivery_proto_with_info",
243243
extra_protoc_parameters = ["metadata"],
244-
grpc_service_config = None,
244+
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
245245
package = "maps.fleetengine.delivery.v1",
246246
service_yaml = "fleetengine.yaml",
247247
deps = [],
@@ -283,7 +283,7 @@ ruby_cloud_gapic_library(
283283
extra_protoc_parameters = [
284284
"ruby-cloud-gem-name=google-maps-fleetengine-delivery-v1",
285285
],
286-
grpc_service_config = None,
286+
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
287287
deps = [
288288
":delivery_ruby_grpc",
289289
":delivery_ruby_proto",
@@ -326,7 +326,7 @@ csharp_gapic_library(
326326
name = "delivery_csharp_gapic",
327327
srcs = [":delivery_proto_with_info"],
328328
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
329-
grpc_service_config = None,
329+
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
330330
deps = [
331331
":delivery_csharp_grpc",
332332
":delivery_csharp_proto",
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
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+
15+
syntax = "proto3";
16+
17+
package maps.fleetengine.delivery.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/protobuf/timestamp.proto";
21+
import "google/protobuf/wrappers.proto";
22+
import "google/type/latlng.proto";
23+
24+
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/delivery/v1;delivery";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "Common";
27+
option java_package = "google.maps.fleetengine.delivery.v1";
28+
option objc_class_prefix = "CFED";
29+
30+
// Describes a vehicle attribute as a key-value pair. The "key:value" string
31+
// length cannot exceed 256 characters.
32+
message DeliveryVehicleAttribute {
33+
// The attribute's key. Keys may not contain the colon character (:).
34+
string key = 1;
35+
36+
// The attribute's value.
37+
string value = 2;
38+
}
39+
40+
// The location, speed, and heading of a vehicle at a point in time.
41+
message DeliveryVehicleLocation {
42+
// The location of the vehicle.
43+
// When it is sent to Fleet Engine, the vehicle's location is a GPS location.
44+
// When you receive it in a response, the vehicle's location can be either a
45+
// GPS location, a supplemental location, or some other estimated location.
46+
// The source is specified in `location_sensor`.
47+
google.type.LatLng location = 1;
48+
49+
// Deprecated: Use `latlng_accuracy` instead.
50+
google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true];
51+
52+
// Accuracy of `location` in meters as a radius.
53+
google.protobuf.DoubleValue latlng_accuracy = 22;
54+
55+
// Direction the vehicle is moving in degrees. 0 represents North.
56+
// The valid range is [0,360).
57+
google.protobuf.Int32Value heading = 2;
58+
59+
// Deprecated: Use `heading_accuracy` instead.
60+
google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true];
61+
62+
// Accuracy of `heading` in degrees.
63+
google.protobuf.DoubleValue heading_accuracy = 23;
64+
65+
// Altitude in meters above WGS84.
66+
google.protobuf.DoubleValue altitude = 5;
67+
68+
// Deprecated: Use `altitude_accuracy` instead.
69+
google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true];
70+
71+
// Accuracy of `altitude` in meters.
72+
google.protobuf.DoubleValue altitude_accuracy = 24;
73+
74+
// Speed of the vehicle in kilometers per hour.
75+
// Deprecated: Use `speed` instead.
76+
google.protobuf.Int32Value speed_kmph = 3 [deprecated = true];
77+
78+
// Speed of the vehicle in meters/second
79+
google.protobuf.DoubleValue speed = 6;
80+
81+
// Accuracy of `speed` in meters/second.
82+
google.protobuf.DoubleValue speed_accuracy = 7;
83+
84+
// The time when `location` was reported by the sensor.
85+
google.protobuf.Timestamp update_time = 4;
86+
87+
// Output only. The time when the server received the location information.
88+
google.protobuf.Timestamp server_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
89+
90+
// Provider of location data (for example, `GPS`).
91+
DeliveryVehicleLocationSensor location_sensor = 11;
92+
93+
// Whether `location` is snapped to a road.
94+
google.protobuf.BoolValue is_road_snapped = 27;
95+
96+
// Input only. Indicates whether the GPS sensor is enabled on the mobile device.
97+
google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(google.api.field_behavior) = INPUT_ONLY];
98+
99+
// Input only. Time (in seconds) since this location was first sent to the server.
100+
// This will be zero for the first update. If the time is unknown
101+
// (for example, when the app restarts), this value resets to zero.
102+
google.protobuf.Int32Value time_since_update = 14 [(google.api.field_behavior) = INPUT_ONLY];
103+
104+
// Input only. Number of additional attempts to send this location to the server.
105+
// If this value is zero, then it is not stale.
106+
google.protobuf.Int32Value num_stale_updates = 15 [(google.api.field_behavior) = INPUT_ONLY];
107+
108+
// Raw vehicle location (unprocessed by road-snapper).
109+
google.type.LatLng raw_location = 16;
110+
111+
// Input only. Timestamp associated with the raw location.
112+
google.protobuf.Timestamp raw_location_time = 17 [(google.api.field_behavior) = INPUT_ONLY];
113+
114+
// Input only. Source of the raw location.
115+
DeliveryVehicleLocationSensor raw_location_sensor = 28 [(google.api.field_behavior) = INPUT_ONLY];
116+
117+
// Input only. Accuracy of `raw_location` as a radius, in meters.
118+
google.protobuf.DoubleValue raw_location_accuracy = 25 [(google.api.field_behavior) = INPUT_ONLY];
119+
120+
// Input only. Supplemental location provided by the integrating app, such as the location
121+
// provided by Fused Location Provider.
122+
google.type.LatLng supplemental_location = 18 [(google.api.field_behavior) = INPUT_ONLY];
123+
124+
// Input only. Timestamp associated with the supplemental location.
125+
google.protobuf.Timestamp supplemental_location_time = 19 [(google.api.field_behavior) = INPUT_ONLY];
126+
127+
// Input only. Source of the supplemental location.
128+
DeliveryVehicleLocationSensor supplemental_location_sensor = 20 [(google.api.field_behavior) = INPUT_ONLY];
129+
130+
// Input only. Accuracy of `supplemental_location` as a radius, in meters.
131+
google.protobuf.DoubleValue supplemental_location_accuracy = 21 [(google.api.field_behavior) = INPUT_ONLY];
132+
133+
// Deprecated: Use `is_road_snapped` instead.
134+
bool road_snapped = 26 [deprecated = true];
135+
}
136+
137+
// The sensor or methodology used to determine the location.
138+
enum DeliveryVehicleLocationSensor {
139+
// The sensor is unspecified or unknown.
140+
UNKNOWN_SENSOR = 0;
141+
142+
// GPS or Assisted GPS.
143+
GPS = 1;
144+
145+
// Assisted GPS, cell tower ID, or WiFi access point.
146+
NETWORK = 2;
147+
148+
// Cell tower ID or WiFi access point.
149+
PASSIVE = 3;
150+
151+
// A location signal snapped to the best road position.
152+
ROAD_SNAPPED_LOCATION_PROVIDER = 4;
153+
154+
// The fused location provider in Google Play services.
155+
FUSED_LOCATION_PROVIDER = 100;
156+
}
157+
158+
// The vehicle's navigation status.
159+
enum DeliveryVehicleNavigationStatus {
160+
// Unspecified navigation status.
161+
UNKNOWN_NAVIGATION_STATUS = 0;
162+
163+
// The Driver app's navigation is in `FREE_NAV` mode.
164+
NO_GUIDANCE = 1;
165+
166+
// Turn-by-turn navigation is available and the Driver app navigation has
167+
// entered `GUIDED_NAV` mode.
168+
ENROUTE_TO_DESTINATION = 2;
169+
170+
// The vehicle has gone off the suggested route.
171+
OFF_ROUTE = 3;
172+
173+
// The vehicle is within approximately 50m of the destination.
174+
ARRIVED_AT_DESTINATION = 4;
175+
}

0 commit comments

Comments
 (0)