Class Error
- java.lang.Object
-
- com.azure.resourcemanager.appplatform.models.Error
-
public final class Error extends Object
The error code compose of code and message.
-
-
Constructor Summary
Constructors Constructor Description Error()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcode()Get the code property: The code of error.Stringmessage()Get the message property: The message of error.voidvalidate()Validates the instance.ErrorwithCode(String code)Set the code property: The code of error.ErrorwithMessage(String message)Set the message property: The message of error.
-
-
-
Method Detail
-
code
public String code()
Get the code property: The code of error.- Returns:
- the code value.
-
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.
-
message
public String message()
Get the message property: The message of error.- Returns:
- the message value.
-
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.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-