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
实例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\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)."]]