Method: providers.vehicles.updateAttributes
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Частично обновляет характеристики автомобиля. Будут обновлены только атрибуты, указанные в запросе, остальные атрибуты НЕ будут изменены. Примечание. В vehicles.update
все по-другому, где все поле attributes
будет заменено полем в UpdateVehicleRequest
, атрибуты, отсутствующие в запросе, будут удалены.
HTTP-запрос
POST https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}:updateAttributes
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
name | string Необходимый. Должно быть в формате providers/{provider}/vehicles/{vehicle} . Поставщиком должен быть идентификатор проекта (например, sample-cloud-project ) проекта Google Cloud, участником которого является сервисный аккаунт, выполняющий этот вызов. |
Тело запроса
Тело запроса содержит данные следующей структуры:
Поля |
---|
header | object ( RequestHeader ) Стандартный заголовок запроса Fleet Engine. |
attributes[] | object ( VehicleAttribute ) Необходимый. Атрибуты автомобиля, которые необходимо обновить. Неупомянутые атрибуты не изменяются и не удаляются. |
Тело ответа
Ответное сообщение vehicles.updateAttributes
.
В случае успеха тело ответа содержит данные следующей структуры:
Поля |
---|
attributes[] | object ( VehicleAttribute ) Необходимый. Обновленный полный список атрибутов автомобиля, включая новые, измененные и нетронутые атрибуты. |
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-08-29 UTC.
[null,null,["Последнее обновление: 2025-08-29 UTC."],[[["\u003cp\u003ePartially updates a vehicle's attributes, only changing the attributes specified in the request.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePOST\u003c/code\u003e method and the \u003ccode\u003ehttps://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}:updateAttributes\u003c/code\u003e endpoint.\u003c/p\u003e\n"],["\u003cp\u003eRequires a request body containing a \u003ccode\u003eRequestHeader\u003c/code\u003e and an array of \u003ccode\u003eVehicleAttributes\u003c/code\u003e to update.\u003c/p\u003e\n"],["\u003cp\u003eThe response body provides the complete, updated list of vehicle attributes.\u003c/p\u003e\n"],["\u003cp\u003eDiffers from \u003ccode\u003evehicles.update\u003c/code\u003e by only modifying provided attributes, instead of replacing the entire \u003ccode\u003eattributes\u003c/code\u003e field.\u003c/p\u003e\n"]]],[],null,["# Method: providers.vehicles.updateAttributes\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UpdateVehicleAttributesResponse.SCHEMA_REPRESENTATION)\n\nPartially updates a vehicle's attributes. Only the attributes mentioned in the request will be updated, other attributes will NOT be altered. Note: this is different in `vehicles.update`, where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`, attributes not in the request would be removed.\n\n### HTTP request\n\n`POST https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}:updateAttributes`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. The provider must be the Project ID (for example, `sample-cloud-project`) of the Google Cloud Project of which the service account making this call is a member. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"header\": { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader) }, \"attributes\": [ { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#VehicleAttribute) } ] } ``` |\n\n| Fields ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[RequestHeader](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader)`)` The standard Fleet Engine request header. |\n| `attributes[]` | `object (`[VehicleAttribute](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#VehicleAttribute)`)` Required. The vehicle attributes to update. Unmentioned attributes are not altered or removed. |\n\n### Response body\n\n`vehicles.updateAttributes` response message.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"attributes\": [ { object (/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#VehicleAttribute) } ] } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attributes[]` | `object (`[VehicleAttribute](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#VehicleAttribute)`)` Required. The updated full list of vehicle attributes, including new, altered, and untouched attributes. |"]]