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 Details

    • ValidationMessage

      public ValidationMessage()
      Creates an instance of ValidationMessage class.
  • Method Details

    • state

      public ValidationState state()
      Get the state property: Severity of validation message.
      Returns:
      the state value.
    • withState

      public ValidationMessage withState(ValidationState state)
      Set the state property: Severity of validation message.
      Parameters:
      state - the state value to set.
      Returns:
      the ValidationMessage object itself.
    • message

      public String message()
      Get the message property: Validation message string.
      Returns:
      the message value.
    • withMessage

      public ValidationMessage withMessage(String message)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ValidationMessage>
      Throws:
      IOException
    • fromJson

      public static ValidationMessage fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.