Error Class
- java.
lang. Object - com.
azure. resourcemanager. appplatform. models. Error
- com.
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 Json |
String |
message()
Get the message property: The message of error. |
Json |
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:
fromJson
public static Error fromJson(JsonReader jsonReader)
Reads an instance of Error from the JsonReader.
Parameters:
Returns:
Throws:
message
public String message()
Get the message property: The message of error.
Returns:
toJson
validate
public void validate()
Validates the instance.
withCode
public Error withCode(String code)
Set the code property: The code of error.
Parameters:
Returns:
withMessage
public Error withMessage(String message)
Set the message property: The message of error.
Parameters:
Returns:
Applies to
Azure SDK for Java