Method: providers.deliveryVehicles.patch
將更新後的 DeliveryVehicle
資料寫入 Fleet Engine,並將 Tasks
指派給 DeliveryVehicle
。您無法更新「DeliveryVehicle
」的名稱。您可以更新 remainingVehicleJourneySegments
,但必須包含所有要在 DeliveryVehicle
上保留的 VehicleJourneySegment
。系統會從 remainingVehicleJourneySegments
擷取 taskId
,並將對應的 Tasks
指派給 DeliveryVehicle
(如果尚未指派)。
HTTP 要求
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
deliveryVehicle.name |
string
這個傳送媒介的不重複名稱。格式為 providers/{provider}/deliveryVehicles/{vehicle} 。
|
查詢參數
參數 |
header |
object (DeliveryRequestHeader )
選用設定。標準 Delivery API 要求標頭。
|
updateMask |
string (FieldMask format)
必要欄位。欄位遮罩,用於指出要更新哪些 DeliveryVehicle 欄位。請注意,updateMask 必須包含至少一個欄位。 這是以半形逗號分隔的完整欄位名稱清單。範例:"remainingVehicleJourneySegments" 。
|
要求主體
要求主體包含 DeliveryVehicle
的例項。
回應主體
如果成功,回應主體會包含 DeliveryVehicle
的執行例項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
[null,null,["上次更新時間:2024-11-08 (世界標準時間)。"],[[["Updates `DeliveryVehicle` data and assigns `Tasks` in Fleet Engine, requiring all `VehicleJourneySegment`s for persistence."],["Supports updating `remainingVehicleJourneySegments` and assigns corresponding `Tasks` retrieved from it."],["Uses the `PATCH` method with a URL containing the `DeliveryVehicle` name for identification."],["Requires a `header` for Delivery API requests and `updateMask` specifying fields to update."],["Provides a response containing the updated `DeliveryVehicle` instance upon successful completion."]]],["This describes updating `DeliveryVehicle` data within Fleet Engine using a PATCH request. The request targets a specific vehicle via its unique name in the URL. It updates fields defined by the `updateMask`, which is required. The `remainingVehicleJourneySegments` can be updated, including all segments. Corresponding `Tasks` are assigned to the vehicle if not already assigned. The request body contains updated `DeliveryVehicle` data, and the response body returns the updated `DeliveryVehicle` if the update is successful. The vehicle name cannot be updated.\n"]]