Package com.azure.maps.render.models
Class ErrorResponse
java.lang.Object
com.azure.maps.render.models.ErrorResponse
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ErrorResponse>
public final class ErrorResponse
extends Object
implements com.azure.json.JsonSerializable<ErrorResponse>
Error response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also
follows the OData error response format.).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorResponse
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ErrorResponse from the JsonReader.getError()
Get the error property: The error object.setError
(ErrorDetail error) Set the error property: The error object.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ErrorResponse
public ErrorResponse()Creates an instance of ErrorResponse class.
-
-
Method Details
-
getError
Get the error property: The error object.- Returns:
- the error value.
-
setError
Set the error property: The error object.- Parameters:
error
- the error value to set.- Returns:
- the ErrorResponse object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ErrorResponse>
- Throws:
IOException
-
fromJson
Reads an instance of ErrorResponse from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ErrorResponse if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the ErrorResponse.
-