Class RunCommandInput
java.lang.Object
com.azure.resourcemanager.compute.models.RunCommandInput
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RunCommandInput>
public final class RunCommandInput
extends Object
implements com.azure.json.JsonSerializable<RunCommandInput>
Capture Virtual Machine parameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the commandId property: The run command id.static RunCommandInputfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RunCommandInput from the JsonReader.Get the parameters property: The run command parameters.script()Get the script property: Optional.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCommandId(String commandId) Set the commandId property: The run command id.withParameters(List<RunCommandInputParameter> parameters) Set the parameters property: The run command parameters.withScript(List<String> script) Set the script property: Optional.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
-
RunCommandInput
public RunCommandInput()Creates an instance of RunCommandInput class.
-
-
Method Details
-
commandId
Get the commandId property: The run command id.- Returns:
- the commandId value.
-
withCommandId
Set the commandId property: The run command id.- Parameters:
commandId- the commandId value to set.- Returns:
- the RunCommandInput object itself.
-
script
Get the script property: Optional. The script to be executed. When this value is given, the given script will override the default script of the command.- Returns:
- the script value.
-
withScript
Set the script property: Optional. The script to be executed. When this value is given, the given script will override the default script of the command.- Parameters:
script- the script value to set.- Returns:
- the RunCommandInput object itself.
-
parameters
Get the parameters property: The run command parameters.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: The run command parameters.- Parameters:
parameters- the parameters value to set.- Returns:
- the RunCommandInput 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<RunCommandInput>- Throws:
IOException
-
fromJson
Reads an instance of RunCommandInput from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RunCommandInput 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 RunCommandInput.
-