Method: providers.vehicles.update
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
फ़्लीट इंजन में वाहन का अपडेट किया गया डेटा लिखता है.
Vehicle
को अपडेट करते समय, इन फ़ील्ड को अपडेट नहीं किया जा सकता, क्योंकि इन्हें सर्वर मैनेज करता है:
currentTrips
availableCapacity
currentRouteSegmentVersion
waypointsVersion
name
वाहन को भी अपडेट नहीं किया जा सकता.
अगर attributes
फ़ील्ड को अपडेट किया जाता है, तो वाहन के सभी एट्रिब्यूट, अनुरोध में दिए गए एट्रिब्यूट से बदल दिए जाते हैं. अगर आपको सिर्फ़ कुछ एट्रिब्यूट अपडेट करने हैं, तो vehicles.updateAttributes
तरीका देखें. इसी तरह, waypoints
फ़ील्ड को भी अपडेट किया जा सकता है. हालांकि, इसमें वाहन के सभी वेपॉइंट शामिल होने चाहिए, न कि कोई अन्य वेपॉइंट.
एचटीटीपी अनुरोध
PUT https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
name |
string
ज़रूरी है. providers/{provider}/vehicles/{vehicle} फ़ॉर्मैट में होना चाहिए. {provider} उस Google Cloud प्रोजेक्ट का प्रोजेक्ट आईडी (उदाहरण के लिए, sample-cloud-project ) होना चाहिए जिसका यह कॉल करने वाला सेवा खाता सदस्य है.
|
क्वेरी पैरामीटर
पैरामीटर |
header |
object (RequestHeader )
स्टैंडर्ड फ़्लीट इंजन अनुरोध का हेडर.
|
updateMask |
string (FieldMask format)
ज़रूरी है. फ़ील्ड मास्क, जो दिखाता है कि Vehicle के किन फ़ील्ड को अपडेट करना है. कम से कम एक फ़ील्ड का नाम देना ज़रूरी है. यह फ़ील्ड के पूरी तरह क्वालिफ़ाइड नाम की सूची है, जिसे कॉमा लगाकर अलग किया गया है. उदाहरण: "user.displayName,photo" .
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Vehicle
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Vehicle
का एक इंस्टेंस शामिल किया जाता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eUpdates vehicle data in Fleet Engine, replacing existing data with the provided information.\u003c/p\u003e\n"],["\u003cp\u003eCertain fields like \u003ccode\u003ecurrentTrips\u003c/code\u003e, \u003ccode\u003eavailableCapacity\u003c/code\u003e, and \u003ccode\u003ename\u003c/code\u003e cannot be updated using this method.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating \u003ccode\u003eattributes\u003c/code\u003e or \u003ccode\u003ewaypoints\u003c/code\u003e, the entire field is replaced; use \u003ccode\u003evehicles.updateAttributes\u003c/code\u003e for partial attribute updates.\u003c/p\u003e\n"],["\u003cp\u003eThe request must specify the vehicle's provider and ID, along with a field mask indicating the fields to be updated.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated \u003ccode\u003eVehicle\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["- [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 vehicle data to the Fleet Engine.\n\nWhen updating a `Vehicle`, the following fields cannot be updated since they are managed by the server:\n\n- `currentTrips`\n- `availableCapacity`\n- `currentRouteSegmentVersion`\n- `waypointsVersion`\n\nThe vehicle `name` also cannot be updated.\n\nIf the `attributes` field is updated, **all** the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the `vehicles.updateAttributes` method. Likewise, the `waypoints` field can be updated, but must contain all the waypoints currently on the vehicle, and no other waypoints.\n\nHTTP request\n\n`PUT https://fleetengine.googleapis.com/v1/{name=providers/*/vehicles/*}`\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\nQuery parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[RequestHeader](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/RequestHeader)`)` The standard Fleet Engine request header. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. A field mask indicating which fields of the `Vehicle` to update. At least one field name must be provided. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\nRequest body\n\nThe request body contains an instance of [Vehicle](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#Vehicle).\n\nResponse body\n\nIf successful, the response body contains an instance of [Vehicle](/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/providers.vehicles#Vehicle)."]]