Method: providers.deliveryVehicles.patch
Zapisuje zaktualizowane dane DeliveryVehicle
w Fleet Engine i przypisuje Tasks
do DeliveryVehicle
. Nie można zaktualizować nazwy elementu DeliveryVehicle
. Możesz zaktualizować zasób remainingVehicleJourneySegments
, ale musi on zawierać wszystkie VehicleJourneySegment
, aby zachować je w DeliveryVehicle
. Wartości taskId
są pobierane z poziomu remainingVehicleJourneySegments
, a odpowiednie wartości Tasks
są przypisywane do DeliveryVehicle
, jeśli nie zostały jeszcze przypisane.
Żądanie HTTP
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
deliveryVehicle.name |
string
Niepowtarzalna nazwa tego pojazdu dostawczego. Format to providers/{provider}/deliveryVehicles/{vehicle} .
|
Parametry zapytania
Parametry |
header |
object (DeliveryRequestHeader )
Opcjonalnie: standardowy nagłówek żądania interfejsu Delivery API;
|
updateMask |
string (FieldMask format)
Wymagane. Maska pola, która wskazuje, które pola DeliveryVehicle mają zostać zaktualizowane. Pamiętaj, że updateMask musi zawierać co najmniej 1 pole. Jest to lista pełnych nazw pól rozdzielona przecinkami. Przykład: "remainingVehicleJourneySegments" .
|
Treść żądania
Treść żądania zawiera wystąpienie elementu DeliveryVehicle
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu DeliveryVehicle
.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-11-08 UTC.
[null,null,["Ostatnia aktualizacja: 2024-11-08 UTC."],[[["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"]]