Method: providers.deliveryVehicles.patch
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เขียนข้อมูล DeliveryVehicle
ที่อัปเดตไปยัง Fleet Engine และกำหนด Tasks
ให้กับ DeliveryVehicle
คุณอัปเดตชื่อของ DeliveryVehicle
ไม่ได้ คุณสามารถอัปเดต remainingVehicleJourneySegments
แต่ต้องมี VehicleJourneySegment
ทั้งหมดจึงจะคงไว้ใน DeliveryVehicle
ได้ ระบบดึงข้อมูล taskId
จาก remainingVehicleJourneySegments
และ Tasks
ที่เกี่ยวข้องจะถูกกำหนดให้กับ DeliveryVehicle
หากยังไม่ได้กำหนด
คำขอ HTTP
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
deliveryVehicle.name |
string
ชื่อที่ไม่ซ้ำกันของยานพาหนะนำส่งนี้ รูปแบบคือ providers/{provider}/deliveryVehicles/{vehicle}
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
header |
object (DeliveryRequestHeader )
ไม่บังคับ ส่วนหัวของคำขอ Delivery API แบบมาตรฐาน
|
updateMask |
string (FieldMask format)
ต้องระบุ มาสก์ของช่องที่บ่งบอกว่าต้องอัปเดตช่อง DeliveryVehicle ใด โปรดทราบว่า updateMask ต้องมีช่องอย่างน้อย 1 ช่อง ซึ่งเป็นรายการชื่อของช่องที่มีคุณสมบัติครบถ้วนและคั่นด้วยคอมมา ตัวอย่าง: "remainingVehicleJourneySegments"
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ DeliveryVehicle
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ DeliveryVehicle
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eUpdates \u003ccode\u003eDeliveryVehicle\u003c/code\u003e data and assigns \u003ccode\u003eTasks\u003c/code\u003e in Fleet Engine, requiring all \u003ccode\u003eVehicleJourneySegment\u003c/code\u003es for persistence.\u003c/p\u003e\n"],["\u003cp\u003eSupports updating \u003ccode\u003eremainingVehicleJourneySegments\u003c/code\u003e and assigns corresponding \u003ccode\u003eTasks\u003c/code\u003e retrieved from it.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePATCH\u003c/code\u003e method with a URL containing the \u003ccode\u003eDeliveryVehicle\u003c/code\u003e name for identification.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003eheader\u003c/code\u003e for Delivery API requests and \u003ccode\u003eupdateMask\u003c/code\u003e specifying fields to update.\u003c/p\u003e\n"],["\u003cp\u003eProvides a response containing the updated \u003ccode\u003eDeliveryVehicle\u003c/code\u003e instance upon successful completion.\u003c/p\u003e\n"]]],["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"],null,["# Method: providers.deliveryVehicles.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n\nWrites updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* update `remainingVehicleJourneySegments`, but it must contain all of the `VehicleJourneySegment`s to be persisted on the `DeliveryVehicle`. The `taskId`s are retrieved from `remainingVehicleJourneySegments`, and their corresponding `Tasks` are assigned to the `DeliveryVehicle` if they have not yet been assigned.\n\n### HTTP request\n\n`PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------------|---------------------------------------------------------------------------------------------------------------------|\n| `deliveryVehicle.name` | `string` The unique name of this Delivery Vehicle. The format is `providers/{provider}/deliveryVehicles/{vehicle}`. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[DeliveryRequestHeader](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryRequestHeader)`)` Optional. The standard Delivery API request header. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. A field mask that indicates which `DeliveryVehicle` fields to update. Note that the updateMask must contain at least one field. This is a comma-separated list of fully qualified names of fields. Example: `\"remainingVehicleJourneySegments\"`. |\n\n### Request body\n\nThe request body contains an instance of [DeliveryVehicle](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles#DeliveryVehicle).\n\n### Response body\n\nIf successful, the response body contains an instance of [DeliveryVehicle](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles#DeliveryVehicle)."]]