ApiError Class

public final class ApiError
extends ManagementError

An error response from the Compute service.

Constructor Summary

Constructor Description
ApiError()

Creates an instance of ApiError class.

Method Summary

Modifier and Type Method and Description
static ApiError fromJson(JsonReader jsonReader)

Reads an instance of ApiError from the JsonReader.

List<AdditionalInfo> getAdditionalInfo()

Get the additionalInfo property: Additional info for the error.

String getCode()

Get the code property: The error code parsed from the body of the http error response.

List<ManagementError> getDetails()

Get the details property: Details for the error.

InnerError getInnererror()

Get the innererror property: The Api inner error.

String getMessage()

Get the message property: The error message parsed from the body of the http error response.

String getTarget()

Get the target property: The target of the error.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Methods inherited from ManagementError

Methods inherited from java.lang.Object

Constructor Details

ApiError

public ApiError()

Creates an instance of ApiError class.

Method Details

fromJson

public static ApiError fromJson(JsonReader jsonReader)

Reads an instance of ApiError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ApiError 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 ApiError.

getAdditionalInfo

public List getAdditionalInfo()

Get the additionalInfo property: Additional info for the error.

Overrides:

ApiError.getAdditionalInfo()

Returns:

the additionalInfo value.

getCode

public String getCode()

Get the code property: The error code parsed from the body of the http error response.

Overrides:

ApiError.getCode()

Returns:

the code value.

getDetails

public List getDetails()

Get the details property: Details for the error.

Overrides:

ApiError.getDetails()

Returns:

the details value.

getInnererror

public InnerError getInnererror()

Get the innererror property: The Api inner error.

Returns:

the innererror value.

getMessage

public String getMessage()

Get the message property: The error message parsed from the body of the http error response.

Overrides:

ApiError.getMessage()

Returns:

the message value.

getTarget

public String getTarget()

Get the target property: The target of the error.

Overrides:

ApiError.getTarget()

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ApiError.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Applies to