Class ErrorResponse
- java.lang.Object
-
- com.azure.resourcemanager.storagecache.models.ErrorResponse
-
public final class ErrorResponse extends Object
Describes the format of Error response.
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
code()
Get the code property: Error code.String
message()
Get the message property: Error message indicating why the operation failed.void
validate()
Validates the instance.ErrorResponse
withCode(String code)
Set the code property: Error code.ErrorResponse
withMessage(String message)
Set the message property: Error message indicating why the operation failed.
-
-
-
Method Detail
-
code
public String code()
Get the code property: Error code.- Returns:
- the code value.
-
withCode
public ErrorResponse withCode(String code)
Set the code property: Error code.- Parameters:
code
- the code value to set.- Returns:
- the ErrorResponse object itself.
-
message
public String message()
Get the message property: Error message indicating why the operation failed.- Returns:
- the message value.
-
withMessage
public ErrorResponse withMessage(String message)
Set the message property: Error message indicating why the operation failed.- Parameters:
message
- the message value to set.- Returns:
- the ErrorResponse object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-