Method: providers.deliveryVehicles.patch
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Grava dados atualizados de DeliveryVehicle
no Fleet Engine e atribui Tasks
ao DeliveryVehicle
. Não é possível atualizar o nome de DeliveryVehicle
. Você pode atualizar o remainingVehicleJourneySegments
, mas ele precisa conter todos os VehicleJourneySegment
s para serem mantidos no DeliveryVehicle
. As taskId
s são recuperadas do remainingVehicleJourneySegments
, e o Tasks
correspondente é atribuído ao DeliveryVehicle
, se ainda não tiver sido atribuído.
Solicitação HTTP
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
O URL usa a sintaxe de transcodificação gRPC.
Parâmetros de caminho
Parâmetros |
deliveryVehicle.name |
string
O nome exclusivo do Veículo de entrega. O formato é providers/{provider}/deliveryVehicles/{vehicle} .
|
Parâmetros de consulta
Parâmetros |
header |
object (DeliveryRequestHeader )
Opcional. O cabeçalho de solicitação padrão da API Delivery.
|
updateMask |
string (FieldMask format)
Obrigatório. Uma máscara de campo que indica quais campos DeliveryVehicle serão atualizados. A updateMask precisa conter pelo menos um campo. É uma lista separada por vírgulas de nomes de campos totalmente qualificados. Exemplo: "remainingVehicleJourneySegments" .
|
Corpo da solicitação
O corpo da solicitação contém uma instância de DeliveryVehicle
.
Corpo da resposta
Se a solicitação for bem-sucedida, o corpo da resposta conterá uma instância de DeliveryVehicle
.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-08-31 UTC.
[null,null,["Última atualização 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)."]]