Operation
यह संसाधन, लंबे समय तक चलने वाली कार्रवाई को दिखाता है, जो कि नेटवर्क एपीआई कॉल की वजह से होती है.
JSON के काेड में दिखाना |
{
"name": string,
"metadata": {
"@type": string,
field1: ...,
...
},
"done": boolean,
// Union field result can be only one of the following:
"error": {
object (Status )
},
"response": {
"@type": string,
field1: ...,
...
}
// End of list of possible types for union field result .
} |
फ़ील्ड |
name |
string
सर्वर का असाइन किया गया नाम. यह नाम सिर्फ़ उस सेवा के लिए यूनीक होता है जिससे वह मूल रूप से मैच करता है. अगर आपने डिफ़ॉल्ट एचटीटीपी मैपिंग का इस्तेमाल किया है, तो name , संसाधन का नाम होना चाहिए जिसके आखिर में operations/{unique_id} हो.
|
metadata |
object
ऑपरेशन से जुड़ा, किसी खास सेवा का मेटाडेटा. आम तौर पर, इसमें गेम की प्रोग्रेस की जानकारी और सामान्य मेटाडेटा शामिल होता है. जैसे, कॉन्टेंट बनाने का समय. ऐसा हो सकता है कि कुछ सेवाएं इस तरह का मेटाडेटा उपलब्ध न कराएं. लंबे समय तक चलने वाली कार्रवाई दिखाने वाले किसी भी तरीके में, अगर कोई है, तो मेटाडेटा टाइप का दस्तावेज़ होना चाहिए. ऐसा ऑब्जेक्ट जिसमें आर्बिट्रेरी टाइप के फ़ील्ड शामिल होते हैं. अतिरिक्त फ़ील्ड "@type" में, टाइप की पहचान करने वाला यूआरआई होता है. उदाहरण: { "id": 1234, "@type": "types.example.com/standard/id" } .
|
done |
boolean
अगर वैल्यू false है, तो इसका मतलब है कि कार्रवाई अब भी चल रही है. अगर true है, तो कार्रवाई पूरी हो गई है और error या response उपलब्ध है.
|
यूनियन फ़ील्ड result . कार्रवाई का नतीजा, जो कोई error या मान्य response हो सकता है. अगर done == false है, तो error या response में से कोई भी वैल्यू सेट नहीं होती. अगर done == true है, तो error या response में से कोई एक सेट हो सकता है. ऐसा हो सकता है कि कुछ सेवाएं नतीजे न दिखा पाएं. result इनमें से सिर्फ़ एक हो सकता है: |
error |
object (Status )
कार्रवाई न हो पाने या रद्द करने की स्थिति में, कार्रवाई का नतीजा.
|
response |
object
कार्रवाई का सामान्य, सफल जवाब. अगर ओरिजनल तरीके से सही नतीजा पाने के लिए कोई डेटा नहीं मिलता है, जैसे कि Delete , तो रिस्पॉन्स google.protobuf.Empty होगा. अगर मूल तरीका स्टैंडर्ड Get /Create /Update है, तो जवाब संसाधन होना चाहिए. दूसरे तरीकों के लिए, जवाब XxxResponse टाइप होना चाहिए, जिसमें Xxx मूल तरीके का नाम है. उदाहरण के लिए, अगर मूल तरीके का नाम TakeSnapshot() है, तो अनुमानित रिस्पॉन्स टाइप TakeSnapshotResponse होता है. ऐसा ऑब्जेक्ट जिसमें आर्बिट्रेरी टाइप के फ़ील्ड शामिल होते हैं. अतिरिक्त फ़ील्ड "@type" में, टाइप की पहचान करने वाला यूआरआई होता है. उदाहरण: { "id": 1234, "@type": "types.example.com/standard/id" } .
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-09-10 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-09-10 (UTC) को अपडेट किया गया."],[[["This resource describes the JSON representation of a long-running operation initiated by a network API call."],["The representation includes fields for operation name (`name`), metadata (`metadata`), completion status (`done`), and result (`result`)."],["The `result` field provides either an error (`error`) or a response (`response`) based on the operation outcome."],["While the operation is in progress, `done` is `false` and neither `error` nor `response` are set; upon completion, `done` becomes `true` and either `error` or `response` is populated."]]],["This content defines the structure of a long-running operation's JSON representation. It includes fields for `name` (server-assigned identifier), `metadata` (service-specific data), and `done` (operation status). If `done` is true, the `result` field will contain either an `error` object (for failed operations) or a `response` object (for successful ones). `result` field can only contain one of them. Otherwise, it contains neither of them.\n"]]