Class CassandraError

java.lang.Object
com.azure.resourcemanager.cosmos.models.CassandraError
All Implemented Interfaces:
com.azure.json.JsonSerializable<CassandraError>

public final class CassandraError extends Object implements com.azure.json.JsonSerializable<CassandraError>
The CassandraError model.
  • Constructor Details

    • CassandraError

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

    • code

      public String code()
      Get the code property: The code of error that occurred.
      Returns:
      the code value.
    • withCode

      public CassandraError withCode(String code)
      Set the code property: The code of error that occurred.
      Parameters:
      code - the code value to set.
      Returns:
      the CassandraError object itself.
    • message

      public String message()
      Get the message property: The message of the error.
      Returns:
      the message value.
    • withMessage

      public CassandraError withMessage(String message)
      Set the message property: The message of the error.
      Parameters:
      message - the message value to set.
      Returns:
      the CassandraError object itself.
    • target

      public String target()
      Get the target property: The target resource of the error.
      Returns:
      the target value.
    • withTarget

      public CassandraError withTarget(String target)
      Set the target property: The target resource of the error.
      Parameters:
      target - the target value to set.
      Returns:
      the CassandraError object itself.
    • additionalErrorInfo

      public String additionalErrorInfo()
      Get the additionalErrorInfo property: Additional information about the error.
      Returns:
      the additionalErrorInfo value.
    • withAdditionalErrorInfo

      public CassandraError withAdditionalErrorInfo(String additionalErrorInfo)
      Set the additionalErrorInfo property: Additional information about the error.
      Parameters:
      additionalErrorInfo - the additionalErrorInfo value to set.
      Returns:
      the CassandraError 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<CassandraError>
      Throws:
      IOException
    • fromJson

      public static CassandraError fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CassandraError from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CassandraError 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 CassandraError.