Share via


Error Class

  • java.lang.Object
    • com.azure.resourcemanager.workloads.models.Error

Implements

public class Error
implements JsonSerializable<Error>

Standard error object.

Constructor Summary

Constructor Description
Error()

Creates an instance of Error class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: Server-defined set of error codes.

List<Error> details()

Get the details property: Array of details about specific errors that led to this reported error.

static Error fromJson(JsonReader jsonReader)

Reads an instance of Error from the JsonReader.

ErrorInnerError innerError()

Get the innerError property: Object containing more specific information than the current object about the error.

String message()

Get the message property: Human-readable representation of the error.

String target()

Get the target property: Target of the error.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Methods inherited from java.lang.Object

Constructor Details

Error

public Error()

Creates an instance of Error class.

Method Details

code

public String code()

Get the code property: Server-defined set of error codes.

Returns:

the code value.

details

public List<Error> details()

Get the details property: Array of details about specific errors that led to this reported error.

Returns:

the details value.

fromJson

public static Error fromJson(JsonReader jsonReader)

Reads an instance of Error from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

innerError

public ErrorInnerError innerError()

Get the innerError property: Object containing more specific information than the current object about the error.

Returns:

the innerError value.

message

public String message()

Get the message property: Human-readable representation of the error.

Returns:

the message value.

target

public String target()

Get the target property: Target of the error.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Applies to