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 Details

    • RunCommandInput

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

    • commandId

      public String commandId()
      Get the commandId property: The run command id.
      Returns:
      the commandId value.
    • withCommandId

      public RunCommandInput withCommandId(String commandId)
      Set the commandId property: The run command id.
      Parameters:
      commandId - the commandId value to set.
      Returns:
      the RunCommandInput object itself.
    • script

      public List<String> 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

      public RunCommandInput withScript(List<String> script)
      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

      public List<RunCommandInputParameter> parameters()
      Get the parameters property: The run command parameters.
      Returns:
      the parameters value.
    • withParameters

      public RunCommandInput withParameters(List<RunCommandInputParameter> parameters)
      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

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

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