Class ValidationMessage
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ValidationMessage>
public final class ValidationMessage
extends Object
implements com.azure.json.JsonSerializable<ValidationMessage>
Validation message object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationMessagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ValidationMessage from the JsonReader.message()Get the message property: Validation message string.state()Get the state property: Severity of validation message.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMessage(String message) Set the message property: Validation message string.withState(ValidationState state) Set the state property: Severity of validation message.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ValidationMessage
public ValidationMessage()Creates an instance of ValidationMessage class.
-
-
Method Details
-
state
Get the state property: Severity of validation message.- Returns:
- the state value.
-
withState
Set the state property: Severity of validation message.- Parameters:
state- the state value to set.- Returns:
- the ValidationMessage object itself.
-
message
Get the message property: Validation message string.- Returns:
- the message value.
-
withMessage
Set the message property: Validation message string.- Parameters:
message- the message value to set.- Returns:
- the ValidationMessage object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ValidationMessage>- Throws:
IOException
-
fromJson
Reads an instance of ValidationMessage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ValidationMessage 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 ValidationMessage.
-