Class CommandPostBody

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

public final class CommandPostBody extends Object implements com.azure.json.JsonSerializable<CommandPostBody>
Specification of which command to run where.
  • Constructor Details

    • CommandPostBody

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

    • command

      public String command()
      Get the command property: The command which should be run.
      Returns:
      the command value.
    • withCommand

      public CommandPostBody withCommand(String command)
      Set the command property: The command which should be run.
      Parameters:
      command - the command value to set.
      Returns:
      the CommandPostBody object itself.
    • arguments

      public Map<String,String> arguments()
      Get the arguments property: The arguments for the command to be run.
      Returns:
      the arguments value.
    • withArguments

      public CommandPostBody withArguments(Map<String,String> arguments)
      Set the arguments property: The arguments for the command to be run.
      Parameters:
      arguments - the arguments value to set.
      Returns:
      the CommandPostBody object itself.
    • host

      public String host()
      Get the host property: IP address of the cassandra host to run the command on.
      Returns:
      the host value.
    • withHost

      public CommandPostBody withHost(String host)
      Set the host property: IP address of the cassandra host to run the command on.
      Parameters:
      host - the host value to set.
      Returns:
      the CommandPostBody object itself.
    • cassandraStopStart

      public Boolean cassandraStopStart()
      Get the cassandraStopStart property: If true, stops cassandra before executing the command and then start it again.
      Returns:
      the cassandraStopStart value.
    • withCassandraStopStart

      public CommandPostBody withCassandraStopStart(Boolean cassandraStopStart)
      Set the cassandraStopStart property: If true, stops cassandra before executing the command and then start it again.
      Parameters:
      cassandraStopStart - the cassandraStopStart value to set.
      Returns:
      the CommandPostBody object itself.
    • readwrite

      public Boolean readwrite()
      Get the readwrite property: If true, allows the command to *write* to the cassandra directory, otherwise read-only.
      Returns:
      the readwrite value.
    • withReadwrite

      public CommandPostBody withReadwrite(Boolean readwrite)
      Set the readwrite property: If true, allows the command to *write* to the cassandra directory, otherwise read-only.
      Parameters:
      readwrite - the readwrite value to set.
      Returns:
      the CommandPostBody 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<CommandPostBody>
      Throws:
      IOException
    • fromJson

      public static CommandPostBody fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CommandPostBody from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CommandPostBody if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the CommandPostBody.