feat: add TaskAttributes

feat: add TaskTrackingViewConfig
docs: fix grouping in complicated attribute query examples

PiperOrigin-RevId: 536850535
pull/807/head^2
Google APIs 2 years ago committed by Copybara-Service
parent af329a3465
commit 6782d08a0f
  1. 22
      google/maps/fleetengine/delivery/v1/common.proto
  2. 3
      google/maps/fleetengine/delivery/v1/task_tracking_info.proto
  3. 69
      google/maps/fleetengine/delivery/v1/tasks.proto
  4. 39
      google/maps/fleetengine/v1/vehicle_api.proto

@ -30,7 +30,7 @@ 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 (:).
// The attribute's key.
string key = 1;
// The attribute's value.
@ -199,3 +199,23 @@ message TimeWindow {
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = REQUIRED];
}
// Describes a task attribute as a key-value pair. The "key:value" string length
// cannot exceed 256 characters.
message TaskAttribute {
// The attribute's key. Keys may not contain the colon character (:).
string key = 1;
// The attribute's value, can be in string, bool, or double type. If none are
// set the TaskAttribute string_value will be stored as the empty string "".
oneof task_attribute_value {
// String typed attribute value.
string string_value = 2;
// Boolean typed attribute value.
bool bool_value = 3;
// Double typed attribute value.
double number_value = 4;
}
}

@ -91,4 +91,7 @@ message TaskTrackingInfo {
// The time window during which the task should be completed.
TimeWindow target_time_window = 13;
// The custom attributes set on the task.
repeated TaskAttribute attributes = 14;
}

@ -214,4 +214,73 @@ message Task {
// `CLOSED`.
JourneySharingInfo journey_sharing_info = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
// The configuration for task tracking that specifies which data elements are
// visible to the end users under what circumstances.
TaskTrackingViewConfig task_tracking_view_config = 13;
// A list of custom Task attributes. Each attribute must have a unique key.
repeated TaskAttribute attributes = 15;
}
// The configuration message that defines when a data element of a Task should
// be visible to the end users.
message TaskTrackingViewConfig {
// The option message that defines when a data element should be visible to
// the end users.
message VisibilityOption {
oneof visibility_option {
// This data element is visible to the end users if the remaining stop
// count <= remaining_stop_count_threshold.
int32 remaining_stop_count_threshold = 1;
// This data element is visible to the end users if the ETA to the stop
// <= duration_until_estimated_arrival_time_threshold.
google.protobuf.Duration duration_until_estimated_arrival_time_threshold =
2;
// This data element is visible to the end users if the remaining
// driving distance in meters <=
// remaining_driving_distance_meters_threshold.
int32 remaining_driving_distance_meters_threshold = 3;
// If set to true, this data element is always visible to the end users
// with no thresholds. This field cannot be set to false.
bool always = 4;
// If set to true, this data element is always hidden from the end users
// with no thresholds. This field cannot be set to false.
bool never = 5;
}
}
// The field that specifies when route polyline points can be visible. If this
// field is not specified, the project level default visibility configuration
// for this data will be used.
VisibilityOption route_polyline_points_visibility = 1;
// The field that specifies when estimated arrival time can be visible. If
// this field is not specified, the project level default visibility
// configuration for this data will be used.
VisibilityOption estimated_arrival_time_visibility = 2;
// The field that specifies when estimated task completion time can be
// visible. If this field is not specified, the project level default
// visibility configuration for this data will be used.
VisibilityOption estimated_task_completion_time_visibility = 3;
// The field that specifies when remaining driving distance can be visible. If
// this field is not specified, the project level default visibility
// configuration for this data will be used.
VisibilityOption remaining_driving_distance_visibility = 4;
// The field that specifies when remaining stop count can be visible. If this
// field is not specified, the project level default visibility configuration
// for this data will be used.
VisibilityOption remaining_stop_count_visibility = 5;
// The field that specifies when vehicle location can be visible. If this
// field is not specified, the project level default visibility configuration
// for this data will be used.
VisibilityOption vehicle_location_visibility = 6;
}

@ -509,13 +509,15 @@ message SearchVehiclesRequest {
// ```
// (required_attributes[0] AND required_attributes[1] AND ...)
// AND
// (required_one_of_attribute_sets[0][0] AND
// required_one_of_attribute_sets[0][1] AND
// ...)
// OR
// (required_one_of_attribute_sets[1][0] AND
// required_one_of_attribute_sets[1][1] AND
// ...)
// (
// (required_one_of_attribute_sets[0][0] AND
// required_one_of_attribute_sets[0][1] AND
// ...)
// OR
// (required_one_of_attribute_sets[1][0] AND
// required_one_of_attribute_sets[1][1] AND
// ...)
// )
// ```
//
// Restricts the search to only those vehicles with all the attributes in a
@ -616,9 +618,9 @@ message ListVehiclesRequest {
// ```
//
// Restricts the response to vehicles with the specified attributes. This
// field is a conjunction/AND operation. Your app can specify up to 100
// attributes; however, the combined key:value string length cannot exceed
// 1024 characters.
// field is a conjunction/AND operation. A max of 50 required_attributes is
// allowed. This matches the maximum number of attributes allowed on a
// vehicle. Each repeated string should be of the format "key:value".
repeated string required_attributes = 10;
// Restricts the response to vehicles with at least one of the specified
@ -626,7 +628,8 @@ message ListVehiclesRequest {
// match at least one of the attributes. This field is an inclusive
// disjunction/OR operation in each `VehicleAttributeList` and a
// conjunction/AND operation across the collection of `VehicleAttributeList`.
// Format: key1:value1|key2:value2|key3:value3...
// Each repeated string should be of the format
// "key1:value1|key2:value2|key3:value3".
repeated string required_one_of_attributes = 13;
// `required_one_of_attribute_sets` provides additional functionality.
@ -638,11 +641,15 @@ message ListVehiclesRequest {
// ```
// (required_attributes[0] AND required_attributes[1] AND ...)
// AND
// (required_one_of_attributes[0][0] AND required_one_of_attributes[0][1] AND
// ...)
// OR
// (required_one_of_attributes[1][0] AND required_one_of_attributes[1][1] AND
// ...)
// (
// (required_one_of_attribute_sets[0][0] AND
// required_one_of_attribute_sets[0][1] AND
// ...)
// OR
// (required_one_of_attribute_sets[1][0] AND
// required_one_of_attribute_sets[1][1] AND
// ...)
// )
// ```
//
// Restricts the response to vehicles that match all the attributes in a

Loading…
Cancel
Save