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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the arguments property: The arguments for the command to be run.Get the cassandraStopStart property: If true, stops cassandra before executing the command and then start it again.command()Get the command property: The command which should be run.static CommandPostBodyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CommandPostBody from the JsonReader.host()Get the host property: IP address of the cassandra host to run the command on.Get the readwrite property: If true, allows the command to *write* to the cassandra directory, otherwise read-only.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withArguments(Map<String, String> arguments) Set the arguments property: The arguments for the command to be run.withCassandraStopStart(Boolean cassandraStopStart) Set the cassandraStopStart property: If true, stops cassandra before executing the command and then start it again.withCommand(String command) Set the command property: The command which should be run.Set the host property: IP address of the cassandra host to run the command on.withReadwrite(Boolean readwrite) Set the readwrite property: If true, allows the command to *write* to the cassandra directory, otherwise read-only.Methods inherited from class java.lang.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
-
CommandPostBody
public CommandPostBody()Creates an instance of CommandPostBody class.
-
-
Method Details
-
command
Get the command property: The command which should be run.- Returns:
- the command value.
-
withCommand
Set the command property: The command which should be run.- Parameters:
command- the command value to set.- Returns:
- the CommandPostBody object itself.
-
arguments
Get the arguments property: The arguments for the command to be run.- Returns:
- the arguments value.
-
withArguments
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
Get the host property: IP address of the cassandra host to run the command on.- Returns:
- the host value.
-
withHost
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
Get the cassandraStopStart property: If true, stops cassandra before executing the command and then start it again.- Returns:
- the cassandraStopStart value.
-
withCassandraStopStart
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
Get the readwrite property: If true, allows the command to *write* to the cassandra directory, otherwise read-only.- Returns:
- the readwrite value.
-
withReadwrite
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CommandPostBody>- Throws:
IOException
-
fromJson
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.
-