Freigeben über


Error Class

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

Implements

public final class Error
implements JsonSerializable<Error>

The error code compose of code and message.

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: The code of error.

static Error fromJson(JsonReader jsonReader)

Reads an instance of Error from the JsonReader.

String message()

Get the message property: The message of error.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Error withCode(String code)

Set the code property: The code of error.

Error withMessage(String message)

Set the message property: The message of error.

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: The code of error.

Returns:

the code 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.

message

public String message()

Get the message property: The message of error.

Returns:

the message value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCode

public Error withCode(String code)

Set the code property: The code of error.

Parameters:

code - the code value to set.

Returns:

the Error object itself.

withMessage

public Error withMessage(String message)

Set the message property: The message of error.

Parameters:

message - the message value to set.

Returns:

the Error object itself.

Applies to