Package google.longrunning
कार्रवाई
यह संसाधन, लंबे समय तक चलने वाली कार्रवाई दिखाता है. यह कार्रवाई किसी नेटवर्क एपीआई कॉल का नतीजा होती है.
फ़ील्ड |
name |
string
सर्वर से असाइन किया गया नाम, जो सिर्फ़ उसी सेवा में यूनीक होता है जिसमें इसे मूल रूप से लौटाया जाता है. अगर डिफ़ॉल्ट एचटीटीपी मैपिंग का इस्तेमाल किया जाता है, तो name एक ऐसे संसाधन का नाम होना चाहिए जिसके आखिर में operations/{unique_id} हो.
|
metadata |
Any
कार्रवाई से जुड़ा सेवा-खास मेटाडेटा. आम तौर पर, इसमें प्रोग्रेस की जानकारी और बनाने के समय जैसा सामान्य मेटाडेटा होता है. ऐसा हो सकता है कि कुछ सेवाएं इस तरह का मेटाडेटा उपलब्ध न कराएं. लंबे समय तक चलने वाली कार्रवाई को लौटाने वाले किसी भी तरीके को, अगर कोई मेटाडेटा प्रकार दिया गया है, तो उसे दस्तावेज़ के तौर पर दर्ज करना चाहिए.
|
done |
bool
अगर वैल्यू false है, तो इसका मतलब है कि कार्रवाई अब भी चल रही है. अगर true , कार्रवाई पूरी हो गई है और error या response उपलब्ध है.
|
यूनियन फ़ील्ड result . कार्रवाई का नतीजा, जो error या मान्य response हो सकता है. अगर done == false है, तो error या response दोनों ही सेट नहीं हैं. अगर done == true है, तो error या response में से कोई एक सेट किया जा सकता है. ऐसा हो सकता है कि कुछ सेवाओं से नतीजे न मिलें. result इनमें से सिर्फ़ एक हो सकता है: |
error |
Status
विफल या रद्द होने की स्थिति में कार्रवाई का गड़बड़ी परिणाम.
|
response |
Any
कार्रवाई का सामान्य और सफल जवाब. अगर मूल तरीका सफल होने पर कोई डेटा नहीं दिखाता है, जैसे कि Delete , तो रिस्पॉन्स google.protobuf.Empty है. अगर मूल तरीका स्टैंडर्ड Get /Create /Update है, तो रिस्पॉन्स, रिसॉर्स होना चाहिए. अन्य तरीकों के लिए, रिस्पॉन्स का XxxResponse टाइप होना चाहिए, जिसमें Xxx ओरिजनल तरीके का नाम है. उदाहरण के लिए, अगर मूल तरीके का नाम TakeSnapshot() है, तो अनुमानित रिस्पॉन्स टाइप TakeSnapshotResponse है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2023-12-01 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2023-12-01 (UTC) को अपडेट किया गया."],[[["The `Operation` resource represents a long-running operation initiated by a network API call."],["Each operation has a unique name, metadata (often with progress information), and a status indicating if it's done."],["Upon completion (`done` is `true`), an operation provides either an `error` or a `response` indicating the outcome."],["The `response` field contains the operation's result, which varies depending on the original API method called."]]],["A long-running network API call is represented by an \"Operation\" resource. This resource includes a unique `name`, service-specific `metadata` about progress, and a `done` status flag. Upon completion (`done` is true), the `result` field will contain either an `error` status or a successful `response`. If the operation is in progress (`done` is false) `result` will not be set. The `response` contains data if it was a successful operation.\n"]]