TaskLog

Deliveries API 中任务资源的日志。

JSON 表示法
{
  "name": string,
  "type": enum (TaskTypeLog),
  "state": enum (TaskStateLog),
  "taskOutcome": enum (TaskOutcomeLog),
  "taskOutcomeTime": string,
  "taskOutcomeLocation": {
    object (LocationInfoLog)
  },
  "taskOutcomeLocationSource": enum (TaskOutcomeLocationSourceLog),
  "trackingId": string,
  "deliveryVehicleId": string,
  "plannedLocation": {
    object (LocationInfoLog)
  },
  "taskDuration": string,
  "targetTimeWindow": {
    object (TimeWindowLog)
  },
  "journeySharingInfo": {
    object (JourneySharingInfoLog)
  },
  "taskTrackingViewConfig": {
    object (TaskTrackingViewConfigLog)
  },
  "attributes": [
    {
      object (TaskAttributeLog)
    }
  ]
}
字段
name

string

任务资源名称,格式为 providers/{providerId}/tasks/{taskId}

type

enum (TaskTypeLog)

任务类型。

state

enum (TaskStateLog)

指示任务进度的任务状态。

taskOutcome

enum (TaskOutcomeLog)

尝试执行任务的结果。当 TaskState 关闭时,指示其是否成功完成。

taskOutcomeTime

string (Timestamp format)

设置任务结果时的时间戳(来自提供程序)。

时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

taskOutcomeLocation

object (LocationInfoLog)

设置任务结果的位置。

taskOutcomeLocationSource

enum (TaskOutcomeLocationSourceLog)

指示 taskOutcomeLocation 的值的来源。

trackingId

string

此字段便于为客户存储 ID,以避免不必要或复杂的映射。

deliveryVehicleId

string

执行此任务的车辆的 ID。

plannedLocation

object (LocationInfoLog)

完成任务的位置。

taskDuration

string (Duration format)

在此位置执行操作所需的额外时间。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

targetTimeWindow

object (TimeWindowLog)

应完成任务的时间范围。

journeySharingInfo

object (JourneySharingInfoLog)

历程共享特定字段。

taskTrackingViewConfig

object (TaskTrackingViewConfigLog)

任务跟踪配置,用于指定在什么情况下最终用户可以看到哪些数据元素。

attributes[]

object (TaskAttributeLog)

自定义任务属性列表。每个属性必须具有唯一的键。

JourneySharingInfoLog

历程共享特定字段。

JSON 表示法
{
  "remainingVehicleJourneySegments": [
    {
      object (VehicleJourneySegmentLog)
    }
  ],
  "lastLocation": {
    object (DeliveryVehicleLocationLog)
  },
  "lastLocationSnappable": boolean
}
字段
remainingVehicleJourneySegments[]

object (VehicleJourneySegmentLog)

在完成此任务之前,分配车辆将要到达的每个经停点的跟踪信息。此列表可能包含其他任务的经停点。

lastLocation

object (DeliveryVehicleLocationLog)

上次报告的车辆位置。

lastLocationSnappable

boolean

指示车辆的 lastLocation 是否可以贴靠 currentRouteSegment。如果 lastLocationcurrentRouteSegment 不存在,则返回 False

TaskTrackingViewConfigLog

用于定义任务数据元素何时对最终用户可见的配置消息。

JSON 表示法
{
  "routePolylinePointsVisibility": {
    object (VisibilityOptionLog)
  },
  "estimatedArrivalTimeVisibility": {
    object (VisibilityOptionLog)
  },
  "estimatedTaskCompletionTimeVisibility": {
    object (VisibilityOptionLog)
  },
  "remainingDrivingDistanceVisibility": {
    object (VisibilityOptionLog)
  },
  "remainingStopCountVisibility": {
    object (VisibilityOptionLog)
  },
  "vehicleLocationVisibility": {
    object (VisibilityOptionLog)
  }
}
字段
routePolylinePointsVisibility

object (VisibilityOptionLog)

用于指定路线多段线点何时可见的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

estimatedArrivalTimeVisibility

object (VisibilityOptionLog)

用于指定预计到达时间何时可见的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

estimatedTaskCompletionTimeVisibility

object (VisibilityOptionLog)

用于指定何时可以看到预计任务完成时间的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

remainingDrivingDistanceVisibility

object (VisibilityOptionLog)

用于指定在何时显示剩余行驶距离的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

remainingStopCountVisibility

object (VisibilityOptionLog)

用于指定显示剩余经停点数的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

vehicleLocationVisibility

object (VisibilityOptionLog)

用于指定在什么情况下显示车辆位置信息的字段。如果未指定此字段,系统将使用此数据的项目级默认可见性配置。

VisibilityOptionLog

定义数据元素何时对最终用户可见的选项消息。

JSON 表示法
{

  // Union field visibility_option can be only one of the following:
  "remainingStopCountThreshold": integer,
  "durationUntilEstimatedArrivalTimeThreshold": string,
  "remainingDrivingDistanceMetersThreshold": integer,
  "always": boolean,
  "never": boolean
  // End of list of possible types for union field visibility_option.
}
字段

联合字段 visibility_option

visibility_option 只能是下列其中一项:

remainingStopCountThreshold

integer

如果剩余停靠点数 <= remainingStopCountThreshold,则最终用户可以看到此数据元素。

durationUntilEstimatedArrivalTimeThreshold

string (Duration format)

如果到达站点的预计到达时间 <=durationUntilEstimatedArrivalTimeThreshold,则最终用户可以看到此数据元素。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

remainingDrivingDistanceMetersThreshold

integer

如果剩余行驶距离(以米为单位)<= remainingDrivingDistanceMetersThreshold,则最终用户可以看到此数据元素。

always

boolean

如果此政策设为 true,此数据元素将始终对最终用户可见,没有阈值。

never

boolean

如果此政策设为 true,系统会始终对最终用户隐藏此数据元素,没有任何阈值。

TaskAttributeLog

将任务属性描述为键值对。“key:value”字符串长度不能超过 256 个字符。

JSON 表示法
{
  "key": string,

  // Union field task_attribute_value can be only one of the following:
  "stringValue": string,
  "boolValue": boolean,
  "numberValue": number
  // End of list of possible types for union field task_attribute_value.
}
字段
key

string

属性的键。键不得包含冒号字符 (:)。

联合字段 task_attribute_value。该属性的值可以是字符串、bool 或双精度类型。如果未设置,TaskAttribute string_value 将存储为空字符串 ""。task_attribute_value 只能是下列其中一项:
stringValue

string

字符串类型的属性值。

boolValue

boolean

布尔值类型的属性值。

numberValue

number

双精度型属性值。