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 Details

    • ErrorResponse

      public ErrorResponse()
      Creates an instance of ErrorResponse class.
  • Method Details

    • getError

      public ErrorDetail getError()
      Get the error property: The error object.
      Returns:
      the error value.
    • setError

      public ErrorResponse setError(ErrorDetail error)
      Set the error property: The error object.
      Parameters:
      error - the error value to set.
      Returns:
      the ErrorResponse object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ErrorResponse>
      Throws:
      IOException
    • fromJson

      public static ErrorResponse fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.