refactor: use updated protos for DeliveryService

PiperOrigin-RevId: 430330814
pull/705/head
Google APIs 3 years ago committed by Copybara-Service
parent 88075aead0
commit 948c8fd1f3
  1. 14
      google/maps/fleetengine/delivery/v1/BUILD.bazel
  2. 175
      google/maps/fleetengine/delivery/v1/common.proto
  3. 362
      google/maps/fleetengine/delivery/v1/delivery_api.proto
  4. 167
      google/maps/fleetengine/delivery/v1/delivery_vehicles.proto
  5. 4
      google/maps/fleetengine/delivery/v1/fleetengine.yaml
  6. 103
      google/maps/fleetengine/delivery/v1/header.proto
  7. 176
      google/maps/fleetengine/delivery/v1/tasks.proto
  8. 120
      google/maps/fleetengine/v1/fleetengine.proto
  9. 2
      google/maps/fleetengine/v1/header.proto
  10. 2
      google/maps/fleetengine/v1/traffic.proto
  11. 4
      google/maps/fleetengine/v1/trip_api.proto
  12. 2
      google/maps/fleetengine/v1/trips.proto
  13. 10
      google/maps/fleetengine/v1/vehicle_api.proto
  14. 4
      google/maps/fleetengine/v1/vehicles.proto

@ -21,8 +21,10 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "delivery_proto",
srcs = [
"common.proto",
"delivery_api.proto",
"delivery_vehicles.proto",
"header.proto",
"tasks.proto",
],
deps = [
@ -31,7 +33,6 @@ proto_library(
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/geo/type:viewport_proto",
"//google/maps/fleetengine/v1:fleetengine_proto",
"//google/type:latlng_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:field_mask_proto",
@ -125,7 +126,6 @@ go_proto_library(
deps = [
"//google/api:annotations_go_proto",
"//google/geo/type:viewport_go_proto",
"//google/maps/fleetengine/v1:fleetengine_go_proto",
"//google/type:latlng_go_proto",
],
)
@ -173,7 +173,7 @@ load(
py_gapic_library(
name = "delivery_py_gapic",
srcs = [":delivery_proto"],
grpc_service_config = None,
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
)
# Open Source Packages
@ -209,7 +209,7 @@ php_grpc_library(
php_gapic_library(
name = "delivery_php_gapic",
srcs = [":delivery_proto_with_info"],
grpc_service_config = None,
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
service_yaml = "fleetengine.yaml",
deps = [
":delivery_php_grpc",
@ -241,7 +241,7 @@ nodejs_gapic_library(
package_name = "@googlemaps/fleetengine-delivery",
src = ":delivery_proto_with_info",
extra_protoc_parameters = ["metadata"],
grpc_service_config = None,
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
package = "maps.fleetengine.delivery.v1",
service_yaml = "fleetengine.yaml",
deps = [],
@ -283,7 +283,7 @@ ruby_cloud_gapic_library(
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-maps-fleetengine-delivery-v1",
],
grpc_service_config = None,
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
deps = [
":delivery_ruby_grpc",
":delivery_ruby_proto",
@ -326,7 +326,7 @@ csharp_gapic_library(
name = "delivery_csharp_gapic",
srcs = [":delivery_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = None,
grpc_service_config = "//google/maps/fleetengine/v1:fleetengine_grpc_service_config.json",
deps = [
":delivery_csharp_grpc",
":delivery_csharp_proto",

@ -0,0 +1,175 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package maps.fleetengine.delivery.v1;
import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/latlng.proto";
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/delivery/v1;delivery";
option java_multiple_files = true;
option java_outer_classname = "Common";
option java_package = "google.maps.fleetengine.delivery.v1";
option objc_class_prefix = "CFED";
// Describes a vehicle attribute as a key-value pair. The "key:value" string
// length cannot exceed 256 characters.
message DeliveryVehicleAttribute {
// The attribute's key. Keys may not contain the colon character (:).
string key = 1;
// The attribute's value.
string value = 2;
}
// The location, speed, and heading of a vehicle at a point in time.
message DeliveryVehicleLocation {
// The location of the vehicle.
// When it is sent to Fleet Engine, the vehicle's location is a GPS location.
// When you receive it in a response, the vehicle's location can be either a
// GPS location, a supplemental location, or some other estimated location.
// The source is specified in `location_sensor`.
google.type.LatLng location = 1;
// Deprecated: Use `latlng_accuracy` instead.
google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true];
// Accuracy of `location` in meters as a radius.
google.protobuf.DoubleValue latlng_accuracy = 22;
// Direction the vehicle is moving in degrees. 0 represents North.
// The valid range is [0,360).
google.protobuf.Int32Value heading = 2;
// Deprecated: Use `heading_accuracy` instead.
google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true];
// Accuracy of `heading` in degrees.
google.protobuf.DoubleValue heading_accuracy = 23;
// Altitude in meters above WGS84.
google.protobuf.DoubleValue altitude = 5;
// Deprecated: Use `altitude_accuracy` instead.
google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true];
// Accuracy of `altitude` in meters.
google.protobuf.DoubleValue altitude_accuracy = 24;
// Speed of the vehicle in kilometers per hour.
// Deprecated: Use `speed` instead.
google.protobuf.Int32Value speed_kmph = 3 [deprecated = true];
// Speed of the vehicle in meters/second
google.protobuf.DoubleValue speed = 6;
// Accuracy of `speed` in meters/second.
google.protobuf.DoubleValue speed_accuracy = 7;
// The time when `location` was reported by the sensor.
google.protobuf.Timestamp update_time = 4;
// Output only. The time when the server received the location information.
google.protobuf.Timestamp server_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Provider of location data (for example, `GPS`).
DeliveryVehicleLocationSensor location_sensor = 11;
// Whether `location` is snapped to a road.
google.protobuf.BoolValue is_road_snapped = 27;
// Input only. Indicates whether the GPS sensor is enabled on the mobile device.
google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Time (in seconds) since this location was first sent to the server.
// This will be zero for the first update. If the time is unknown
// (for example, when the app restarts), this value resets to zero.
google.protobuf.Int32Value time_since_update = 14 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Number of additional attempts to send this location to the server.
// If this value is zero, then it is not stale.
google.protobuf.Int32Value num_stale_updates = 15 [(google.api.field_behavior) = INPUT_ONLY];
// Raw vehicle location (unprocessed by road-snapper).
google.type.LatLng raw_location = 16;
// Input only. Timestamp associated with the raw location.
google.protobuf.Timestamp raw_location_time = 17 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Source of the raw location.
DeliveryVehicleLocationSensor raw_location_sensor = 28 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Accuracy of `raw_location` as a radius, in meters.
google.protobuf.DoubleValue raw_location_accuracy = 25 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Supplemental location provided by the integrating app, such as the location
// provided by Fused Location Provider.
google.type.LatLng supplemental_location = 18 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Timestamp associated with the supplemental location.
google.protobuf.Timestamp supplemental_location_time = 19 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Source of the supplemental location.
DeliveryVehicleLocationSensor supplemental_location_sensor = 20 [(google.api.field_behavior) = INPUT_ONLY];
// Input only. Accuracy of `supplemental_location` as a radius, in meters.
google.protobuf.DoubleValue supplemental_location_accuracy = 21 [(google.api.field_behavior) = INPUT_ONLY];
// Deprecated: Use `is_road_snapped` instead.
bool road_snapped = 26 [deprecated = true];
}
// The sensor or methodology used to determine the location.
enum DeliveryVehicleLocationSensor {
// The sensor is unspecified or unknown.
UNKNOWN_SENSOR = 0;
// GPS or Assisted GPS.
GPS = 1;
// Assisted GPS, cell tower ID, or WiFi access point.
NETWORK = 2;
// Cell tower ID or WiFi access point.
PASSIVE = 3;
// A location signal snapped to the best road position.
ROAD_SNAPPED_LOCATION_PROVIDER = 4;
// The fused location provider in Google Play services.
FUSED_LOCATION_PROVIDER = 100;
}
// The vehicle's navigation status.
enum DeliveryVehicleNavigationStatus {
// Unspecified navigation status.
UNKNOWN_NAVIGATION_STATUS = 0;
// The Driver app's navigation is in `FREE_NAV` mode.
NO_GUIDANCE = 1;
// Turn-by-turn navigation is available and the Driver app navigation has
// entered `GUIDED_NAV` mode.
ENROUTE_TO_DESTINATION = 2;
// The vehicle has gone off the suggested route.
OFF_ROUTE = 3;
// The vehicle is within approximately 50m of the destination.
ARRIVED_AT_DESTINATION = 4;
}

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -22,37 +22,34 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/geo/type/viewport.proto";
import "google/maps/fleetengine/delivery/v1/delivery_vehicles.proto";
import "google/maps/fleetengine/delivery/v1/header.proto";
import "google/maps/fleetengine/delivery/v1/tasks.proto";
import "google/maps/fleetengine/v1/header.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/delivery/v1;delivery";
option java_multiple_files = true;
option java_outer_classname = "DeliveryApi";
option java_package = "google.maps.fleetengine.delivery.v1";
option objc_class_prefix = "CFE";
option objc_class_prefix = "CFED";
option (google.api.resource_definition) = {
type: "fleetengine.googleapis.com/Provider"
pattern: "providers/{provider}"
};
// Last Mile Delivery service.
// The Last Mile Delivery service.
service DeliveryService {
option (google.api.default_host) = "fleetengine.googleapis.com";
// Creates a DeliveryVehicle in the Fleet Engine and returns the new
// DeliveryVehicle.
rpc CreateDeliveryVehicle(CreateDeliveryVehicleRequest)
returns (DeliveryVehicle) {
// Creates and returns a new `DeliveryVehicle`.
rpc CreateDeliveryVehicle(CreateDeliveryVehicleRequest) returns (DeliveryVehicle) {
option (google.api.http) = {
post: "/v1/{parent=providers/*}/deliveryVehicles"
body: "delivery_vehicle"
};
option (google.api.method_signature) =
"parent,delivery_vehicle,delivery_vehicle_id";
option (google.api.method_signature) = "parent,delivery_vehicle,delivery_vehicle_id";
}
// GetDeliveryVehicle returns a DeliveryVehicle from the Fleet Engine.
// Returns the specified `DeliveryVehicle` instance.
rpc GetDeliveryVehicle(GetDeliveryVehicleRequest) returns (DeliveryVehicle) {
option (google.api.http) = {
get: "/v1/{name=providers/*/deliveryVehicles/*}"
@ -60,16 +57,14 @@ service DeliveryService {
option (google.api.method_signature) = "name";
}
// UpdateDeliveryVehicle writes updated DeliveryVehicle data to the Fleet
// Engine and assigns Tasks to the DeliveryVehicle. The name of the
// DeliveryVehicle cannot be updated. remaining_vehicle_journey_segments can
// be updated, but must contain all the VehicleJourneySegments currently on
// the DeliveryVehicle. The task_id's are retrieved from
// remaining_vehicle_journey_segments and their corresponding Tasks are
// assigned to the DeliveryVehicle if they have not yet been assigned to the
// vehicle.
rpc UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest)
returns (DeliveryVehicle) {
// Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
// `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
// `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
// though, but it must contain all of the `VehicleJourneySegment`s currently
// on the `DeliveryVehicle`. The `task_id`s are retrieved from
// `remaining_vehicle_journey_segments, and their corresponding `Tasks` are
// assigned to the `DeliveryVehicle` if they have not yet been assigned.
rpc UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest) returns (DeliveryVehicle) {
option (google.api.http) = {
patch: "/v1/{delivery_vehicle.name=providers/*/deliveryVehicles/*}"
body: "delivery_vehicle"
@ -77,7 +72,7 @@ service DeliveryService {
option (google.api.method_signature) = "delivery_vehicle,update_mask";
}
// Creates a Task in the Fleet Engine and returns the new Task.
// Creates and returns a new `Task` object.
rpc CreateTask(CreateTaskRequest) returns (Task) {
option (google.api.http) = {
post: "/v1/{parent=providers/*}/tasks"
@ -86,7 +81,7 @@ service DeliveryService {
option (google.api.method_signature) = "parent,task,task_id";
}
// Gets information about a single Task.
// Gets information about a `Task`.
rpc GetTask(GetTaskRequest) returns (Task) {
option (google.api.http) = {
get: "/v1/{name=providers/*/tasks/*}"
@ -94,7 +89,7 @@ service DeliveryService {
option (google.api.method_signature) = "name";
}
// Get all tasks with a specific tracking_id.
// Gets all `Task`s with a particular `tracking_id`.
rpc SearchTasks(SearchTasksRequest) returns (SearchTasksResponse) {
option (google.api.http) = {
get: "/v1/{parent=providers/*}/tasks:search"
@ -102,7 +97,7 @@ service DeliveryService {
option (google.api.method_signature) = "parent";
}
// Updates Task data.
// Updates `Task` data.
rpc UpdateTask(UpdateTaskRequest) returns (Task) {
option (google.api.http) = {
patch: "/v1/{task.name=providers/*/tasks/*}"
@ -111,7 +106,7 @@ service DeliveryService {
option (google.api.method_signature) = "task,update_mask";
}
// Gets all tasks that meet specified filtering criteria.
// Gets all `Task`s that meet the specified filtering criteria.
rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {
option (google.api.http) = {
get: "/v1/{parent=providers/*}/tasks"
@ -119,9 +114,8 @@ service DeliveryService {
option (google.api.method_signature) = "parent";
}
// Gets all delivery vehicles that meet specified filtering criteria.
rpc ListDeliveryVehicles(ListDeliveryVehiclesRequest)
returns (ListDeliveryVehiclesResponse) {
// Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
rpc ListDeliveryVehicles(ListDeliveryVehiclesRequest) returns (ListDeliveryVehiclesResponse) {
option (google.api.http) = {
get: "/v1/{parent=providers/*}/deliveryVehicles"
};
@ -129,50 +123,47 @@ service DeliveryService {
}
}
// CreateDeliveryVehicle request message.
// The `CreateDeliveryVehicle` request message.
message CreateDeliveryVehicleRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}`.
// The provider must be the Project ID (for example, `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// Required. Must be in the format `providers/{provider}`. The provider must be the
// Google Cloud Project ID. For example, `sample-cloud-project`.
string parent = 3 [(google.api.field_behavior) = REQUIRED];
// Required. The DeliveryVehicle ID must be unique for each provider. IDs are
// subject to the following normalization and restrictions:
// Required. The Delivery Vehicle ID must be unique for each provider. Delivery Vehicle
// IDs are subject to the following restrictions:
//
// 1. IDs must be valid Unicode strings.
// 2. IDs are limited to a maximum length of 64 characters.
// 3. IDs will be normalized according to Unicode Normalization Form C
// * IDs must be valid Unicode strings.
// * IDs are limited to a maximum length of 64 characters.
// * IDs will be normalized according to Unicode Normalization Form C
// (http://www.unicode.org/reports/tr15/).
// 4. IDs may not contain any of the following ASCII characters: '/', ':',
// * IDs may not contain any of the following ASCII characters: '/', ':',
// '\\', '?', or '#'.
string delivery_vehicle_id = 4 [(google.api.field_behavior) = REQUIRED];
// Required. The DeliveryVehicle entity to create.
// When creating a DeliveryVehicle, the following fields may optionally be
// set:
// * last_location
// * attributes
// All other DeliveryVehicle fields are ignored.
// Required. The `DeliveryVehicle` entity to create. When creating a new delivery
// vehicle, you may set the following optional fields:
//
// * last_location
// * attributes
//
// Note: The DeliveryVehicle's `name` field is ignored. All other
// DeliveryVehicle fields must not be set; otherwise, an error is returned.
DeliveryVehicle delivery_vehicle = 5 [(google.api.field_behavior) = REQUIRED];
}
// GetDeliveryVehicle request message.
// The `GetDeliveryVehicle` request message.
// Next id: 4
message GetDeliveryVehicleRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format
// `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
// The provider must be the Project ID (for example, `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// The `provider` must be the Google Cloud Project ID. For example,
// `sample-cloud-project`.
string name = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -181,16 +172,14 @@ message GetDeliveryVehicleRequest {
];
}
// ListDeliveryVehicles request message.
// The `ListDeliveryVehicles` request message.
message ListDeliveryVehiclesRequest {
// Optional.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}`.
// The provider must be the Project ID (for example, `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// The `provider` must be the Google Cloud Project ID.
// For example, `sample-cloud-project`.
string parent = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -198,110 +187,111 @@ message ListDeliveryVehiclesRequest {
}
];
// Optional. The maximum number of Vehicles to return. The service may return
// fewer than this value. If unspecified, the server will decide the number of
// results to return.
// Optional. The maximum number of vehicles to return. The service may return fewer than
// this number. If you don't specify this number, then the server determines
// the number of results to return.
int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. A page token, received from a previous `ListDeliveryVehicles`
// call. Provide this to retrieve the subsequent page.
// Optional. A page token, received from a previous `ListDeliveryVehicles` call. You
// must provide this in order to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListDeliveryVehicles`
// must match the call that provided the page token.
string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
// Optional. A filter query to apply when listing delivery vehicles.
// See http://aip.dev/160 for examples of filter syntax.
// If no value is specified or filter is an empty string, all delivery
// vehicles will be returned.
// Optional. A filter query to apply when listing delivery vehicles. See
// http://aip.dev/160 for examples of the filter syntax. If you don't specify
// a value, or if you specify an empty string for the filter, then all
// delivery vehicles are returned.
//
// Note that the only queries supported for `ListDeliveryVehicles` are
// equality comparisons on vehicle attributes (`attributes.<key> = <value>`).
// Comparison operators besides `=` (like `!=`, `>`, `<`, etc.) aren't
// supported. Queries that include them are rejected. You can combine
// attribute equality queries with **AND**, but not with any other boolean
// operator.
string filter = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. A filter to limit the search area to a rectangle defined by the
// Optional. A filter that limits the search area to a rectangle defined by the
// northeast and southwest corner points.
//
// When defined, only vehicles located within the area range will be returned.
google.geo.type.Viewport viewport = 7
[(google.api.field_behavior) = OPTIONAL];
// When defined, only vehicles located within the search area are returned.
google.geo.type.Viewport viewport = 7 [(google.api.field_behavior) = OPTIONAL];
}
// ListDeliveryVehicles response message.
// The `ListDeliveryVehicles` response message.
message ListDeliveryVehiclesResponse {
// The list of delivery vehicles that meet the requested filtering criteria.
// The set of delivery vehicles that meet the requested filtering criteria.
repeated DeliveryVehicle delivery_vehicles = 1;
// Pass this token in the ListDeliveryVehiclesRequest to continue to list
// results. If all results have been returned, this field is an empty string
// or not present in the response.
// You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
// list results. When all of the results are returned, this field won't be in
// the response, or it will be an empty string.
string next_page_token = 2;
// Total number of delivery vehicles matching request criteria across all
// pages.
// The total number of delivery vehicles that match the request criteria,
// across all pages.
int64 total_size = 3;
}
// UpdateDeliveryVehicle request message.
// The `UpdateDeliveryVehicle` request message.
message UpdateDeliveryVehicleRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. The DeliveryVehicle entity update to apply.
// The name of the DeliveryVehicle cannot be updated.
// Required. The `DeliveryVehicle` entity update to apply.
// Note: You cannot update the name of the `DeliveryVehicle`.
DeliveryVehicle delivery_vehicle = 3 [(google.api.field_behavior) = REQUIRED];
// Required. A field mask indicating which fields of the DeliveryVehicle to
// update. The update_mask must contain at least one field.
google.protobuf.FieldMask update_mask = 4
[(google.api.field_behavior) = REQUIRED];
// Required. A field mask that indicates which `DeliveryVehicle` fields to
// update. Note that the update_mask must contain at least one field.
google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
}
// CreateTask request message.
// The `CreateTask` request message.
message CreateTaskRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}`.
// The provider must be the Project ID (e.g. `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// Required. Must be in the format `providers/{provider}`. The `provider` must be the
// Google Cloud Project ID. For example, `sample-cloud-project`.
string parent = 3 [(google.api.field_behavior) = REQUIRED];
// Required. The Task ID must be unique for each provider. IDs are subject to
// the following normalization and restrictions:
// Required. The Task ID must be unique for each provider, but it should be not a
// shipment tracking ID. To store a shipment tracking ID, use the
// `tracking_id` field. Note that multiple tasks can have the same
// `tracking_id`. Task IDs are subject to the following restrictions:
//
// 1. IDs must be valid Unicode strings.
// 2. IDs are limited to a maximum length of 64 characters.
// 3. IDs will be normalized according to Unicode Normalization Form C
// * Task IDs must be valid Unicode strings.
// * Task IDs are limited to a maximum length of 64 characters.
// * Task IDs will be normalized according to Unicode Normalization Form C
// (http://www.unicode.org/reports/tr15/).
// 4. IDs may not contain any of the following ASCII characters: '/', ':',
// '\\', '?', or '#'.
// * Task IDs may not contain any of the following ASCII characters: '/',
// ':', '\\', '?', or '#'.
string task_id = 5 [(google.api.field_behavior) = REQUIRED];
// Required. Task entity to create.
// Required. The Task entity to create.
// When creating a Task, the following fields are required:
//
// * type
// * state (must be set to 'OPEN' or request will fail)
// * tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks
// but required for all other task types.)
// * planned_location (optional for UNAVAILABLE tasks)
// * task_duration
// * `type`
// * `state` (must be set to `OPEN`)
// * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
// tasks, but required for all other task types)
// * `planned_location` (optional for `UNAVAILABLE` tasks)
// * `task_duration`
//
// All other Task fields are ignored.
// Note: The Task's `name` field is ignored. All other Task fields must not be
// set; otherwise, an error is returned.
Task task = 4 [(google.api.field_behavior) = REQUIRED];
}
// GetTask request message.
// The `GetTask` request message.
message GetTaskRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}/tasks/{task}`.
// The provider must be the Project ID (e.g. `sample-cloud-project`) of the
// Google Cloud Project of which the service account making this call is a
// member.
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}/tasks/{task}`. The `provider`
// must be the Google Cloud Project ID. For example, `sample-cloud-project`.
string name = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -310,85 +300,80 @@ message GetTaskRequest {
];
}
// SearchTasks request message containing the tracking_id used to search Tasks.
// The `SearchTasks` request message that contains the `tracking_id`.
message SearchTasksRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}`.
// The provider must be the Project ID (for example, `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// The provider must be the Google Cloud Project ID. For example,
// `sample-cloud-project`.
string parent = 3 [(google.api.field_behavior) = REQUIRED];
// Required. Identifier for the related set of tasks that are being requested.
// Required. The identifier of the set of related Tasks being requested.
string tracking_id = 4 [(google.api.field_behavior) = REQUIRED];
// Optional. The maximum number of Tasks to return. The service may return
// fewer than this value. If unspecified, the server will decide the number of
// results to return.
// Optional. The maximum number of Tasks to return. The service may return fewer than
// this value. If you don't specify this value, then the server determines the
// number of results to return.
int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
// Optional. A page token, received from a previous `SearchTasks` call.
// Provide this to retrieve the subsequent page.
// Optional. A page token, received from a previous `SearchTasks` call. You must
// provide this value to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `SearchTasks` must match
// the call that provided the page token.
string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
}
// SearchTasks response containing list of Tasks which met the search criteria
// in the SearchTasksRequest.
// The `SearchTasks` response. It contains the set of Tasks that meet the search
// criteria in the `SearchTasksRequest`.
message SearchTasksResponse {
// The list of tasks for the requested tracking_id.
// The set of Tasks for the requested `tracking_id`.
repeated Task tasks = 1;
// Pass this token in the SearchTasksRequest to continue to
// list results. If all results have been returned, this field is an empty
// string or not present in the response.
// Pass this token in the `SearchTasksRequest` to continue to
// list results. If all results have been returned, then this field is either
// an empty string, or it doesn't appear in the response.
string next_page_token = 2;
}
// UpdateTask request message.
// The `UpdateTask` request message.
message UpdateTaskRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. The Task associated with the update.
// The following fields are maintained by the Fleet Engine. Do not update
// them using Task.update.
// * last_location
// * last_location_snappable
// * name
// * remaining_vehicle_journey_segments
// * task_outcome_location_source
// The following fields are maintained by Fleet Engine. Do not update
// them using `Task.update`.
//
// The task_outcome cannot be changed once it has been set.
// * `last_location`.
// * `last_location_snappable`.
// * `name`.
// * `remaining_vehicle_journey_segments`.
// * `task_outcome_location_source`.
//
// If the Task has been assigned a delivery vehicle, do not set the Task state
// to CLOSED using Task.update. Instead, remove the VehicleStop containing
// the Task from the delivery vehicle, which automatically sets the Task
// state to CLOSED.
// Note: You cannot change the value of `task_outcome` once you set it.
//
// If the Task has been assigned to a delivery vehicle, then don't set the
// Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
// that contains the Task from the delivery vehicle, which automatically sets
// the Task state to CLOSED.
Task task = 3 [(google.api.field_behavior) = REQUIRED];
// Required. The field mask indicating which fields in Task to
// update. The update_mask must contain at least one field.
google.protobuf.FieldMask update_mask = 4
[(google.api.field_behavior) = REQUIRED];
// Required. The field mask that indicates which Task fields to update.
// Note: The `update_mask` must contain at least one field.
google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
}
// ListTasks request message.
// The `ListTasks` request message.
message ListTasksRequest {
// Optional. The standard Fleet Engine request header.
maps.fleetengine.v1.RequestHeader header = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The standard Delivery API request header.
DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL];
// Required. Must be in the format `providers/{provider}`.
// The provider must be the Project ID (for example, `sample-cloud-project`)
// of the Google Cloud Project of which the service account making
// this call is a member.
// The `provider` must be the Google Cloud Project ID. For example,
// `sample-cloud-project`.
string parent = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -396,36 +381,39 @@ message ListTasksRequest {
}
];
// Optional. The maximum number of Tasks to return. The service may return
// fewer than this value. If unspecified, the server will decide the number of
// results to return.
// Optional. The maximum number of Tasks to return. The service may return fewer than
// this value. If you don't specify this value, then the server determines the
// number of results to return.
int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. A page token, received from a previous `ListTasks` call.
// Provide this to retrieve the subsequent page.
// Optional. A page token received from a previous `ListTasks` call.
// You can provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListTasks` must match
// the call that provided the page token.
string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
// Optional. A filter query to apply when listing tasks.
// See http://aip.dev/160 for examples of filter syntax.
// If no value is specified or filter is an empty string, all tasks will be
// returned.
// Optional. A filter query to apply when listing Tasks. See http://aip.dev/160 for
// examples of filter syntax. If you don't specify a value, or if you filter
// on an empty string, then all Tasks are returned. For information about the
// Task properties that you can filter on, see
// [Task
// list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-engine/deliveries_api#list_tasks).
string filter = 6 [(google.api.field_behavior) = OPTIONAL];
}
// ListTasks response containing list of Tasks which met the filter criteria
// in the ListTasksRequest.
// The `ListTasks` response that contains the set of Tasks that meet the filter
// criteria in the `ListTasksRequest`.
message ListTasksResponse {
// The list of tasks that meet the requested filtering criteria.
// The set of Tasks that meet the requested filtering criteria.
repeated Task tasks = 1;
// Pass this token in the ListTasksRequest to continue to list results.
// If all results have been returned, this field is an empty string or not
// present in the response.
// Pass this token in the `ListTasksRequest` to continue to list results.
// If all results have been returned, then this field is either an empty
// string, or it doesn't appear in the response.
string next_page_token = 2;
// Total number of tasks matching request criteria across all pages.
// The total number of Tasks that match the request criteria, across all
// pages.
int64 total_size = 3;
}

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -18,7 +18,7 @@ package maps.fleetengine.delivery.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/maps/fleetengine/v1/fleetengine.proto";
import "google/maps/fleetengine/delivery/v1/common.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "google/type/latlng.proto";
@ -27,184 +27,185 @@ option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/deli
option java_multiple_files = true;
option java_outer_classname = "DeliveryVehicles";
option java_package = "google.maps.fleetengine.delivery.v1";
option objc_class_prefix = "CFE";
option objc_class_prefix = "CFED";
// DeliveryVehicle metadata.
// The `DeliveryVehicle` message. A delivery vehicle transports shipments from a
// depot to a delivery location, and from a pickup location to the depot. In
// some cases, delivery vehicles also transport shipments directly from the
// pickup location to the delivery location.
message DeliveryVehicle {
option (google.api.resource) = {
type: "fleetengine.googleapis.com/DeliveryVehicle"
pattern: "providers/{provider}/deliveryVehicles/{vehicle}"
};
// The unique name for this vehicle.
// The format is providers/{provider}/deliveryVehicles/{vehicle}
// The unique name of this Delivery Vehicle.
// The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
string name = 1;
// The last reported location of the vehicle.
maps.fleetengine.v1.VehicleLocation last_location = 2;
// The last reported location of the Delivery Vehicle.
DeliveryVehicleLocation last_location = 2;
// The Vehicle's navigation status.
maps.fleetengine.v1.NavigationStatus navigation_status = 3;
// The Delivery Vehicle's navigation status.
DeliveryVehicleNavigationStatus navigation_status = 3;
// The encoded polyline specifying the route the navigation recommends taking
// to the next waypoint. Your driver app updates this every time a stop is
// reached or passed, or the navigation reroutes. These LatLngs are returned
// in `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
// for all active tasks assigned to the vehicle.
// The encoded polyline specifying the route that the navigation recommends
// taking to the next waypoint. Your driver app updates this every time a
// stop is reached or passed, and when the navigation reroutes. These LatLngs
// are returned in
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
// for all active Tasks assigned to the Vehicle.
//
// There are a few cases where this field may not be used to populate
// There are a few cases where this field might not be used to populate
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`:
//
// 1. The endpoint of the `current_route_segment` does not match
// * The endpoint of the `current_route_segment` does not match
// `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop`.
//
// 2. The driver app has not updated its location recently, so the last
// updated value for this field may be stale.
// * The driver app has not updated its location recently, so the last
// updated value for this field might be stale.
//
// 3. The driver app has recently updated its location, but the
// `current_route_segment` is stale and points to a previous vehicle stop.
// * The driver app has recently updated its location, but the
// `current_route_segment` is stale, and points to a previous vehicle stop.
//
// In these cases, Fleet Engine will populate this field with a
// route from the most recently passed VehicleStop to the upcoming VehicleStop
// to ensure the consumer of this field has the best available information on
// the current path of the delivery vehicle.
// In these cases, Fleet Engine populates this field with a route from the
// most recently passed VehicleStop to the upcoming VehicleStop to ensure that
// the consumer of this field has the best available information on the
// current path of the Delivery Vehicle.
bytes current_route_segment = 4;
// The location where the `current_route_segment` ends. This is not currently
// populated by the driver app, but it can be supplied on
// UpdateDeliveryVehicle calls as the latlng from the upcoming vehicle stop or
// the last latlng of the `current_route_segment`. Fleet Engine will then do
// its best to interpolate to an actual VehicleStop.
// populated by the driver app. But you can supply it on
// `UpdateDeliveryVehicle` calls. It's either the LatLng from the upcoming
// vehicle stop, or it's the last LatLng of the `current_route_segment`. Fleet
// Engine will then do its best to interpolate to an actual `VehicleStop`.
//
// This field is ignored in UpdateDeliveryVehicle calls if the
// This field is ignored in `UpdateDeliveryVehicle` calls if the
// `DeliveryVehicle.current_route_segment` field is empty.
google.type.LatLng current_route_segment_end_point = 5;
// The remaining driving distance for the `current_route_segment`.
// This value is usually updated by the driver app because it is considered to
// This value is usually updated by the driver app because it's considered to
// have more accurate information about the current route than Fleet Engine.
// However, it may be populated by Fleet Engine. For more information, see the
// documentation for `DeliveyVehicle.current_route_segment'. This field is
// returned in
// However, it might be populated by Fleet Engine. For more information, see
// [`DeliveyVehicle.current_route_segment`][]. This field is returned in
// `Task.remaining_vehicle_journey_segment[0].driving_distance_meters` for all
// active tasks assigned to the vehicle.
// active Tasks assigned to the Delivery Vehicle.
//
// This field is ignored in UpdateDeliveryVehicle calls if the
// This field is ignored in `UpdateDeliveryVehicle` calls if the
// `DeliveryVehicle.current_route_segment` field is empty.
google.protobuf.Int32Value remaining_distance_meters = 6;
// The remaining driving time for the `current_route_segment`.
// This value is usually updated by the driver app because it is considered to
// This value is usually updated by the driver app because it's considered to
// have more accurate information about the current route than Fleet Engine.
// However, it may be populated by Fleet Engine. For more information, see the
// documentation for `DeliveyVehicle.current_route_segment'. This field is
// However, it might be populated by Fleet Engine. For more information, see
// [`DeliveyVehicle.current_route_segment'][]. This field is
// returned in `Task.remaining_vehicle_journey_segment[0].driving_duration`
// for all active tasks assigned to the vehicle.
// for all active tasks assigned to the Delivery Vehicle.
//
// This field is ignored in UpdateDeliveryVehicle calls if the
// This field is ignored in `UpdateDeliveryVehicle` calls if the
// `DeliveryVehicle.current_route_segment` field is empty.
google.protobuf.Duration remaining_duration = 7;
// The journey segments assigned to this vehicle, starting from the vehicle's
// most recently reported location.
// The journey segments assigned to this Delivery Vehicle, starting from the
// Vehicle's most recently reported location.
repeated VehicleJourneySegment remaining_vehicle_journey_segments = 8;
// List of custom delivery vehicle attributes.
// Each attribute has a unique key.
repeated maps.fleetengine.v1.VehicleAttribute attributes = 9;
// A list of custom Delivery Vehicle attributes. Each attribute must have a
// unique key.
repeated DeliveryVehicleAttribute attributes = 9;
}
// A location with any additional identifiers.
message LocationInfo {
// The lat/lng of the location.
// The location's coordinates.
google.type.LatLng point = 1;
}
// Represents a vehicles travel segment from its previous stop to the
// current stop. If it is the first active stop, then it is from
// Represents a Vehicles travel segment - from its previous stop to the
// current stop. If it's the first active stop, then it's from the
// Vehicles current location to this stop.
message VehicleJourneySegment {
// Specifies the actual stop location and the tasks associated with
// the stop. Some fields of the VehicleStop may not be present if this journey
// segment is part of JourneySharingInfo.
// Specifies the stop location, along with the Tasks associated with
// the stop. Some fields of the VehicleStop might not be present if this
// journey segment is part of `JourneySharingInfo`.
VehicleStop stop = 1;
// Output only. The travel distance from the previous stop to this stop.
// If the current stop is the first stop in the list of journey
// segments, then the starting point is the vehicle's location recorded
// at the time that this stop was added to the list. This field may not be
// present if this journey segment is part of JourneySharingInfo.
// at the time that this stop was added to the list. This field might not be
// present if this journey segment is part of `JourneySharingInfo`.
google.protobuf.Int32Value driving_distance_meters = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The travel time from the previous stop to this stop.
// If the current stop is the first stop in the list of journey
// segments, then the starting point is the vehicle's location recorded
// segments, then the starting point is the Vehicle's location recorded
// at the time that this stop was added to the list.
//
// If this field is defined in the path
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].driving_duration`,
// then it may be populated with the value from
// `DeliveryVehicle.remaining_duration` so it provides the remaining driving
// duration from the driver app's latest known location, not the driving time
// from the previous stop.
// `DeliveryVehicle.remaining_duration` so that it provides the remaining
// driving duration from the driver app's latest known location, and not the
// driving time from the previous stop.
google.protobuf.Duration driving_duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// The path from the previous stop to this stop. If the current stop is the
// Output only. The path from the previous stop to this stop. If the current stop is the
// first stop in the list of journey segments, then this is the path from the
// vehicle's current location to this stop at the time that the stop was
// added to the list. This field may not be present if this journey segment is
// part of JourneySharingInfo.
// added to the list. This field might not be present if this journey segment
// is part of `JourneySharingInfo`.
//
// If this field is defined in the path
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`,
// then it may be populated with the LatLngs decoded from
// `DeliveryVehicle.current_route_segment` so it provides the driving
// `DeliveryVehicle.current_route_segment`. Note that it provides the driving
// path from the driver app's latest known location, not the path from
// the previous stop.
repeated google.type.LatLng path = 5;
repeated google.type.LatLng path = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Describes a point where a vehicle will stop on its journey to perform
// one or more tasks.
// Describes a point where a Vehicle stops to perform one or more Tasks.
message VehicleStop {
// Additional information about the task performed at this stop.
// Additional information about the Task performed at this stop.
message TaskInfo {
// The task ID. This field will not be present when returned as part
// of GetTaskResponse or SearchTasksResponse.
// The Task ID. This field won't be populated in the response of either a
// `GetTask`, or a `SearchTasks` call.
string task_id = 1;
// The time required to perform the task.
// The time required to perform the Task.
google.protobuf.Duration task_duration = 2;
}
// The current state of a VehicleStop.
// The current state of a `VehicleStop`.
enum State {
// Unknown.
STATE_UNSPECIFIED = 0;
// Created but not actively routing to.
// Created, but not actively routing.
NEW = 1;
// Assigned and actively routing to.
// Assigned and actively routing.
ENROUTE = 2;
// Arrived at stop. Assumes that when the vehicle is routing to the next
// stop, all previous stops are completed.
// Arrived at stop. Assumes that when the Vehicle is routing to the next
// stop, that all previous stops have been completed.
ARRIVED = 3;
}
// Required. The location of the stop. Note that the locations in the tasks may not
// exactly match this location, but will be within a short distance.
// This field will not be present when returned as part of GetTaskResponse and
// SearchTasksResponse.
// Required. The location of the stop. Note that the locations in the Tasks might not
// exactly match this location, but will be within a short distance of it.
// This field won't be populated in the response of either a `GetTask`, or a
// `SearchTasks` call.
LocationInfo planned_location = 1 [(google.api.field_behavior) = REQUIRED];
// The list of tasks to be performed at this stop. Some fields of TaskInfo
// will not be present when returned as part of GetTaskResponse or
// SearchTasksResponse.
// The list of Tasks to be performed at this stop. This field won't be
// populated in the response of either a `GetTask`, or a `SearchTasks` call.
repeated TaskInfo tasks = 2;
// The state of the VehicleStop. This field will not be present when returned
// as part of GetTaskResponse or SearchTasksResponse.
// The state of the `VehicleStop`. This field won't be populated in the
// response of either a `GetTask`, or a `SearchTasks` call.
State state = 3;
}

@ -11,7 +11,9 @@ apis:
documentation:
summary: |-
Enables Fleet Engine for access to the On Demand Rides and Deliveries and
Last Mile Fleet Solution APIs.
Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in
the Cloud Logging Services is subject to the Google Maps Platform Terms of
Service located at https://cloud.google.com/maps-platform/terms.
backend:
rules:

@ -0,0 +1,103 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package maps.fleetengine.delivery.v1;
import "google/api/field_behavior.proto";
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/delivery/v1;delivery";
option java_multiple_files = true;
option java_outer_classname = "Headers";
option java_package = "google.maps.fleetengine.delivery.v1";
option objc_class_prefix = "CFED";
// A RequestHeader contains fields common to all Delivery RPC requests.
message DeliveryRequestHeader {
// Possible types of SDK.
enum SdkType {
// The default value. This value is used if the `sdk_type` is omitted.
SDK_TYPE_UNSPECIFIED = 0;
// The calling SDK is Consumer.
CONSUMER = 1;
// The calling SDK is Driver.
DRIVER = 2;
// The calling SDK is JavaScript.
JAVASCRIPT = 3;
}
// The platform of the calling SDK.
enum Platform {
// The default value. This value is used if the platform is omitted.
PLATFORM_UNSPECIFIED = 0;
// The request is coming from Android.
ANDROID = 1;
// The request is coming from iOS.
IOS = 2;
// The request is coming from the web.
WEB = 3;
}
// The BCP-47 language code, such as en-US or sr-Latn. For more information,
// see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
// is specified, the response may be in any language, with a preference for
// English if such a name exists. Field value example: `en-US`.
string language_code = 1;
// Required. CLDR region code of the region where the request originates.
// Field value example: `US`.
string region_code = 2 [(google.api.field_behavior) = REQUIRED];
// Version of the calling SDK, if applicable.
// The version format is "major.minor.patch", example: `1.1.2`.
string sdk_version = 3;
// Version of the operating system on which the calling SDK is running.
// Field value examples: `4.4.1`, `12.1`.
string os_version = 4;
// Model of the device on which the calling SDK is running.
// Field value examples: `iPhone12,1`, `SM-G920F`.
string device_model = 5;
// The type of SDK sending the request.
SdkType sdk_type = 6;
// Version of the MapSDK which the calling SDK depends on, if applicable.
// The version format is "major.minor.patch", example: `5.2.1`.
string maps_sdk_version = 7;
// Version of the NavSDK which the calling SDK depends on, if applicable.
// The version format is "major.minor.patch", example: `2.1.0`.
string nav_sdk_version = 8;
// Platform of the calling SDK.
Platform platform = 9;
// Manufacturer of the Android device from the calling SDK, only applicable
// for the Android SDKs.
// Field value example: `Samsung`.
string manufacturer = 10;
// Android API level of the calling SDK, only applicable for the Android SDKs.
// Field value example: `23`.
int32 android_api_level = 11;
}

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -18,8 +18,8 @@ package maps.fleetengine.delivery.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/maps/fleetengine/delivery/v1/common.proto";
import "google/maps/fleetengine/delivery/v1/delivery_vehicles.proto";
import "google/maps/fleetengine/v1/fleetengine.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
@ -27,171 +27,169 @@ option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/deli
option java_multiple_files = true;
option java_outer_classname = "Tasks";
option java_package = "google.maps.fleetengine.delivery.v1";
option objc_class_prefix = "CFE";
// A task in the Delivery API represents a single action to track.
// In general there is a distinction between shipment-related tasks and break
// tasks. A shipment can have multiple tasks associated with it; for
// example, one task for the pickup and one for the dropoff or transfer.
// Different tasks for a given shipment can be handled by different vehicles;
// for example, one vehicle handles the pickup and drives the shipment to the
// hub, while another drives the same shipment from the hub to the dropoff.
option objc_class_prefix = "CFED";
// A Task in the Delivery API represents a single action to track. In general,
// there's a distinction between shipment-related Tasks, and break Tasks. A
// shipment can have multiple Tasks associated with it. For example, there could
// be one Task for the pickup, and one for the dropoff or transfer. And
// different Tasks for a given shipment can be handled by different vehicles.
// For example, one vehicle could handle the pickup, driving the shipment to the
// hub, while another vehicle drives the same shipment from the hub to the
// dropoff location.
message Task {
option (google.api.resource) = {
type: "fleetengine.googleapis.com/Task"
pattern: "providers/{provider}/tasks/{task}"
};
// Journey sharing specific fields.
message JourneySharingInfo {
// Tracking information for each stop that the assigned vehicle will
// travel to before completing this task. This list may contain stops
// from other tasks.
//
// The first segment,
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]`,
// contains route information from the driver's last known location to the
// upcoming VehicleStop. This current route information usually comes from
// the driver app except for some cases noted in the documentation for
// `DeliveyVehicle.current_route_segment`. The other segments in
// `Task.journey_sharing_info.remaining_vehicle_journey_segments` are
// populated by Fleet Engine and provide route information between the
// remaining VehicleStops.
repeated VehicleJourneySegment remaining_vehicle_journey_segments = 1;
// Indicates the last reported location of the assigned vehicle
// along the route.
maps.fleetengine.v1.VehicleLocation last_location = 2;
// Indicates whether the vehicle's lastLocation can be snapped to
// the `current_route_segment`. False if `last_location` or
// `current_route_segment` do not exist. This value is computed by
// Fleet Engine. Any update from clients will be ignored.
bool last_location_snappable = 3;
}
// The type of a Task.
// The type of Task.
enum Type {
// Default, the task type is not known.
// Default, the Task type is unknown.
TYPE_UNSPECIFIED = 0;
// A pickup task is the action taken for picking up a shipment from an end
// A pickup Task is the action taken for picking up a shipment from a
// customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
// type.
PICKUP = 1;
// A delivery task is the action taken for delivering a shipment to an end
// A delivery Task is the action taken for delivering a shipment to an end
// customer. Depot or feeder vehicle dropoffs should use the
// `SCHEDULED_STOP` type.
DELIVERY = 2;
// A scheduled stop task is used for planning purposes. For example, it may
// represent picking up or dropping off shipments at feeder vehicles or
// depots. It should not be used for any shipments that are picked up or
// A scheduled stop Task is used for planning purposes. For example, it
// could represent picking up or dropping off shipments from feeder vehicles
// or depots. It shouldn't be used for any shipments that are picked up or
// dropped off from an end customer.
SCHEDULED_STOP = 3;
// A task that indicates unavailability (e.g. driver breaks or vehicle
// refueling).
// A Task that means the Vehicle is not available for service. For example,
// this can happen when the driver takes a break, or when the vehicle
// is being refueled.
UNAVAILABLE = 4;
}
// The state of a Task indicating its progression.
// The state of a Task. This indicates the Tasks's progress.
enum State {
// Default, used for an unspecified or unrecognized Task state.
// Default. Used for an unspecified or unrecognized Task state.
STATE_UNSPECIFIED = 0;
// The task has not yet been assigned a delivery vehicle, or the delivery
// vehicle has not yet passed the task's assigned vehicle stop.
// Either the Task has not yet been assigned to a delivery vehicle, or the
// delivery vehicle has not yet passed the Task's assigned vehicle stop.
OPEN = 1;
// When the vehicle this task was assigned to passes the vehicle stop of
// this task.
// When the vehicle passes the vehicle stop for this Task.
CLOSED = 2;
}
// The outcome of attempting to execute a task. When TaskState is closed,
// this indicates whether it was completed successfully or not.
// The outcome of attempting to execute a Task. When `TaskState` is closed,
// `TaskOutcome` indicates whether it was completed successfully.
enum TaskOutcome {
// Task outcome before being set.
// The Task outcome before its value is set.
TASK_OUTCOME_UNSPECIFIED = 0;
// Task was completed successfully.
// The Task completed successfully.
SUCCEEDED = 1;
// Task could not be completed or was cancelled.
// Either the Task couldn't be completed, or it was cancelled.
FAILED = 2;
}
// The identity of the source which populated the task_outcome_location.
// The identity of the source that populated the `task_outcome_location`.
enum TaskOutcomeLocationSource {
// Task outcome before being set.
// The Task outcome before it is set.
TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0;
// The provider specified the task_outcome_location.
// The provider-specified the `task_outcome_location`.
PROVIDER = 2;
// The provider did not specify the task_outcome_location so Fleet Engine
// The provider didn't specify the `task_outcome_location`, so Fleet Engine
// used the last known vehicle location.
LAST_VEHICLE_LOCATION = 3;
}
// In the format `providers/{provider_id}/tasks/{task_id}`. The task_id must
// be a unique identifier and not a `tracking_id`. To store a `tracking_id` of
// a shipment use the `tracking_id` field. Multiple tasks can have the same
// `tracking_id`.
// Journey sharing specific fields.
message JourneySharingInfo {
// Tracking information for the stops that the assigned vehicle will make
// before it completes this Task. Note that this list can contain stops
// from other tasks.
//
// The first segment,
// `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]`,
// contains route information from the driver's last known location, to the
// upcoming `VehicleStop`. Current route information usually comes from
// the driver app, except for some cases noted in the documentation for
// [`DeliveyVehicle.current_route_segment'][]. The other segments in
// `Task.journey_sharing_info.remaining_vehicle_journey_segments` are
// populated by Fleet Engine. They provide route information between the
// remaining `VehicleStops`.
repeated VehicleJourneySegment remaining_vehicle_journey_segments = 1;
// Indicates the vehicle's last reported location of the assigned vehicle.
DeliveryVehicleLocation last_location = 2;
// Indicates whether the vehicle's lastLocation can be snapped to
// the `current_route_segment`. This value is False if either
// `last_location` or `current_route_segment` don't exist. This value is
// computed by Fleet Engine. Updates from clients are ignored.
bool last_location_snappable = 3;
}
// Must be in the format `providers/{provider}/tasks/{task}`.
string name = 1;
// Required. Immutable. Defines the type of the task; for example, a break or shipment.
// Required. Immutable. Defines the type of the Task. For example, a break or shipment.
Type type = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. The current execution state of the task.
// Required. The current execution state of the Task.
State state = 3 [(google.api.field_behavior) = REQUIRED];
// The outcome of the task.
// The outcome of the Task.
TaskOutcome task_outcome = 9;
// The timestamp of when the task's outcome was set (from provider).
// The timestamp that indicates when the Task's outcome was set by the
// provider.
google.protobuf.Timestamp task_outcome_time = 10;
// Location where the task's outcome was set. Updated as part of UpdateTask.
// redacted as part of SearchTasks requests. If not explicitly updated by
// provider then Fleet Engine will populate it by default with the last known
// vehicle location (raw location).
// The location where the Task's outcome was set. This value is updated as
// part of `UpdateTask`. If this value isn't explicitly updated by the
// provider, then Fleet Engine populates it by default with the last known
// vehicle location (the *raw* location).
LocationInfo task_outcome_location = 11;
// Indicates where the value of the `task_outcome_location` came from.
TaskOutcomeLocationSource task_outcome_location_source = 12;
// Immutable. This field facilitates the storing of an ID for the customer to avoid
// unnecessary or complicated mapping. Cannot be set for Tasks of type
// `UNAVAILABLE` or `SCHEDULED_STOP`. IDs are subject to the
// following normalization and restrictions:
// Immutable. This field facilitates the storing of an ID so you can avoid using a
// complicated mapping. You cannot set `tracking_id` for Tasks of type
// `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the
// following restrictions:
//
// 1. IDs must be valid Unicode strings.
// 2. IDs are limited to a maximum length of 64 characters.
// 3. IDs will be normalized according to Unicode Normalization Form C
// * Tracking IDs must be valid Unicode strings.
// * Tracking IDs are limited to a maximum length of 64 characters.
// * Tracking IDs will be normalized according to Unicode Normalization Form C
// (http://www.unicode.org/reports/tr15/).
// 4. IDs may not contain any of the following ASCII characters: '/', ':',
// '\\', '?', or '#'.
// * Tracking IDs may not contain any of the following ASCII characters: '/',
// ':', '\\', '?', or '#'.
string tracking_id = 4 [(google.api.field_behavior) = IMMUTABLE];
// Output only. The ID of the vehicle making this Task.
// Output only. The ID of the vehicle that is executing this Task.
string delivery_vehicle_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Immutable. The location where the task is to be completed.
// Optional for `UNAVAILABLE` Tasks, required for all others.
// Immutable. The location where the Task will be completed.
// Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
LocationInfo planned_location = 6 [(google.api.field_behavior) = IMMUTABLE];
// Required. Immutable. Additional time to perform an action at this location.
// Required. Immutable. The time needed to execute a Task at this location.
google.protobuf.Duration task_duration = 7 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Output only. Journey sharing specific fields. Not populated when state is `CLOSED`.
// Output only. Journey sharing-specific fields. Not populated when state is `CLOSED`.
JourneySharingInfo journey_sharing_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -104,6 +104,65 @@ message TripWaypoint {
google.protobuf.Duration duration = 8;
}
// The type of a trip.
enum TripType {
// Default, used for unspecified or unrecognized trip types.
UNKNOWN_TRIP_TYPE = 0;
// The trip may share a vehicle with other trips.
SHARED = 1;
// The trip is exclusive to a vehicle.
EXCLUSIVE = 2;
}
// The type of waypoint.
enum WaypointType {
// Unknown or unspecified waypoint type.
UNKNOWN_WAYPOINT_TYPE = 0;
// Waypoints for picking up riders or items.
PICKUP_WAYPOINT_TYPE = 1;
// Waypoints for dropping off riders or items.
DROP_OFF_WAYPOINT_TYPE = 2;
// Waypoints for intermediate destinations in a multi-destination trip.
INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3;
}
// The type of polyline format.
enum PolylineFormatType {
// The format is unspecified or unknown.
UNKNOWN_FORMAT_TYPE = 0;
// A list of `google.type.LatLng`.
LAT_LNG_LIST_TYPE = 1;
// A polyline encoded with a polyline compression algorithm. Decoding is not
// yet supported.
ENCODED_POLYLINE_TYPE = 2;
}
// The vehicle's navigation status.
enum NavigationStatus {
// Unspecified navigation status.
UNKNOWN_NAVIGATION_STATUS = 0;
// The Driver app's navigation is in `FREE_NAV` mode.
NO_GUIDANCE = 1;
// Turn-by-turn navigation is available and the Driver app navigation has
// entered `GUIDED_NAV` mode.
ENROUTE_TO_DESTINATION = 2;
// The vehicle has gone off the suggested route.
OFF_ROUTE = 3;
// The vehicle is within approximately 50m of the destination.
ARRIVED_AT_DESTINATION = 4;
}
// Describes a vehicle attribute as a key-value pair. The "key:value" string
// length cannot exceed 256 characters.
message VehicleAttribute {
@ -211,65 +270,6 @@ message VehicleLocation {
bool road_snapped = 26 [deprecated = true];
}
// The type of a trip.
enum TripType {
// Default, used for unspecified or unrecognized trip types.
UNKNOWN_TRIP_TYPE = 0;
// The trip may share a vehicle with other trips.
SHARED = 1;
// The trip is exclusive to a vehicle.
EXCLUSIVE = 2;
}
// The type of waypoint.
enum WaypointType {
// Unknown or unspecified waypoint type.
UNKNOWN_WAYPOINT_TYPE = 0;
// Waypoints for picking up riders or items.
PICKUP_WAYPOINT_TYPE = 1;
// Waypoints for dropping off riders or items.
DROP_OFF_WAYPOINT_TYPE = 2;
// Waypoints for intermediate destinations in a multi-destination trip.
INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3;
}
// The type of polyline format.
enum PolylineFormatType {
// The format is unspecified or unknown.
UNKNOWN_FORMAT_TYPE = 0;
// A list of `google.type.LatLng`.
LAT_LNG_LIST_TYPE = 1;
// A polyline encoded with a polyline compression algorithm. Decoding is not
// yet supported.
ENCODED_POLYLINE_TYPE = 2;
}
// The vehicle's navigation status.
enum NavigationStatus {
// Unspecified navigation status.
UNKNOWN_NAVIGATION_STATUS = 0;
// The Driver app's navigation is in `FREE_NAV` mode.
NO_GUIDANCE = 1;
// Turn-by-turn navigation is available and the Driver app navigation has
// entered `GUIDED_NAV` mode.
ENROUTE_TO_DESTINATION = 2;
// The vehicle has gone off the suggested route.
OFF_ROUTE = 3;
// The vehicle is within approximately 50m of the destination.
ARRIVED_AT_DESTINATION = 4;
}
// The sensor or methodology used to determine the location.
enum LocationSensor {
// The sensor is unspecified or unknown.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -17,6 +17,7 @@ syntax = "proto3";
package maps.fleetengine.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/maps/fleetengine/v1/fleetengine.proto";
@ -26,7 +27,6 @@ import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/api/client.proto";
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/v1;fleetengine";
option java_multiple_files = true;

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -17,6 +17,7 @@ syntax = "proto3";
package maps.fleetengine.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/maps/fleetengine/v1/fleetengine.proto";
@ -27,7 +28,6 @@ import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/latlng.proto";
import "google/api/client.proto";
option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/v1;fleetengine";
option java_multiple_files = true;
@ -429,10 +429,12 @@ message SearchVehiclesRequest {
// ```
// (required_attributes[0] AND required_attributes[1] AND ...)
// AND
// (required_one_of_attributes[0][0] AND required_one_of_attributes[0][1] AND
// (required_one_of_attribute_sets[0][0] AND
// required_one_of_attribute_sets[0][1] AND
// ...)
// OR
// (required_one_of_attributes[1][0] AND required_one_of_attributes[1][1] AND
// (required_one_of_attribute_sets[1][0] AND
// required_one_of_attribute_sets[1][1] AND
// ...)
// ```
//

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -80,7 +80,7 @@ message Vehicle {
int32 maximum_capacity = 6;
// List of vehicle attributes. A vehicle can have at most 50
// attributes, and each attribute has a unique key.
// attributes, and each attribute must have a unique key.
repeated VehicleAttribute attributes = 8;
// The type of this vehicle. Can be used to filter vehicles in

Loading…
Cancel
Save