Package com.azure.core.util.polling
Class PollOperationDetails
java.lang.Object
com.azure.core.util.polling.PollOperationDetails
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PollOperationDetails>
public final class PollOperationDetails
extends Object
implements com.azure.json.JsonSerializable<PollOperationDetails>
PollOperationDetails provides details for long running operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PollOperationDetailsfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aPollOperationDetails.getError()Gets the error object that describes the error when status is "Failed".Gets the unique ID of the operation.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Writes the object to the passedJsonWriter.
-
Method Details
-
getOperationId
Gets the unique ID of the operation.- Returns:
- the unique ID of the operation.
-
getError
Gets the error object that describes the error when status is "Failed".- Returns:
- the error object that describes the error when status is "Failed".
-
toJson
Description copied from interface:com.azure.json.JsonSerializableWrites the object to the passedJsonWriter.The contract for writing JSON to
JsonWriteris that the object being written will handle opening and closing its own JSON object. So, for objects calling out to otherJsonSerializableobjects for serialization, they'll write the field name only then pass theJsonWriterto the otherJsonSerializableobject. This way objects writing JSON will be self-encapsulated for writing properly formatted JSON.- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PollOperationDetails>- Parameters:
jsonWriter- Where the object's JSON will be written.- Returns:
- The
JsonWriterwhere the JSON was written. - Throws:
IOException- If the object fails to be written to thejsonWriter.
-
fromJson
public static PollOperationDetails fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads a JSON stream into aPollOperationDetails.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
PollOperationDetailsthat the JSON stream represented, or null if it pointed to JSON null. - Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If aPollOperationDetailsfails to be read from thejsonReader.
-