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 "Zulu" ที่มีความละเอียดระดับนาโนวินาทีและมีตัวเลขเศษส่วนได้สูงสุด 9 หลัก ตัวอย่าง: "2014-10-02T15:01:23Z" และ "2014-10-02T15:01:23.045123456Z"

taskOutcomeLocation

object (LocationInfoLog)

ตำแหน่งที่มีการตั้งค่าผลลัพธ์ของงาน

taskOutcomeLocationSource

enum (TaskOutcomeLocationSourceLog)

บ่งบอกว่าค่าของ taskOutcomeLocation มาจากที่ใด

trackingId

string

ช่องนี้ช่วยให้จัดเก็บรหัสของลูกค้าได้เพื่อหลีกเลี่ยงการแมปที่ไม่จำเป็นหรือซับซ้อน

deliveryVehicleId

string

รหัสของยานพาหนะที่ดำเนินงานนี้

plannedLocation

object (LocationInfoLog)

ตําแหน่งที่ทํางานเสร็จแล้ว

taskDuration

string (Duration format)

เวลาเพิ่มเติมสำหรับดำเนินการในสถานที่นี้

ระยะเวลาเป็นวินาทีโดยมีตัวเลขเศษส่วนไม่เกิน 9 หลัก ซึ่งลงท้ายด้วย "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 ได้หรือไม่ False หากยังไม่มี lastLocation หรือ currentRouteSegment

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)

องค์ประกอบข้อมูลนี้จะปรากฏแก่ผู้ใช้ปลายทางหากเวลาถึงโดยประมาณที่หยุด <= periodUntilEstimatedArrivalTimeThreshold

ระยะเวลาเป็นวินาทีโดยมีตัวเลขเศษส่วนไม่เกิน 9 หลัก ซึ่งลงท้ายด้วย "s" เช่น "3.5s"

remainingDrivingDistanceMetersThreshold

integer

องค์ประกอบข้อมูลนี้จะปรากฏแก่ผู้ใช้ปลายทางหากระยะทางการขับขี่ที่เหลืออยู่ในหน่วยเมตร <= remainingDrivingDistanceMetersThreshold

always

boolean

หากตั้งค่าเป็น "จริง" ผู้ใช้ปลายทางที่ไม่มีเกณฑ์จะเห็นองค์ประกอบข้อมูลนี้เสมอ

never

boolean

หากตั้งค่าเป็น "จริง" องค์ประกอบข้อมูลนี้จะถูกซ่อนจากผู้ใช้ปลายทางโดยไม่มีเกณฑ์เสมอ

TaskAttributeLog

อธิบายแอตทริบิวต์ของ Tasks ว่าเป็นคู่คีย์-ค่า สตริง "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 ค่าแอตทริบิวต์อาจเป็นสตริง บูลีน หรือประเภทคู่ หากไม่ได้ตั้งค่าไว้ ระบบจะเก็บ TaskAttribute string_value เป็นสตริงว่าง "" ค่า task_attribute_value จะเป็นได้เพียงค่าใดค่าหนึ่งต่อไปนี้
stringValue

string

ค่าแอตทริบิวต์ที่พิมพ์สตริง

boolValue

boolean

ค่าแอตทริบิวต์ที่พิมพ์ด้วยบูลีน

numberValue

number

ค่าแอตทริบิวต์แบบพิมพ์คู่