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 )
ต้องระบุ รายการแอตทริบิวต์ยานพาหนะทั้งหมดที่อัปเดต รวมถึงแอตทริบิวต์ใหม่ ที่มีการดัดแปลง และที่ยังไม่ได้ปรับแต่ง
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 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,["- [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\nHTTP 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\nPath 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\nRequest 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\nResponse body `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. |"]]