Class RunCommandDocumentInner
java.lang.Object
com.azure.resourcemanager.compute.fluent.models.RunCommandDocumentBaseInner
com.azure.resourcemanager.compute.fluent.models.RunCommandDocumentInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RunCommandDocumentBaseInner>
Describes the properties of a Run Command.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RunCommandDocumentInner class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RunCommandDocumentInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RunCommandDocumentInner from the JsonReader.Get the parameters property: The parameters used by the script.script()Get the script property: The script to be executed.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDescription(String description) Set the description property: The VM run command description.Set the id property: The VM run command id.Set the label property: The VM run command label.withOsType(OperatingSystemTypes osType) Set the osType property: The Operating System type.withParameters(List<RunCommandParameterDefinition> parameters) Set the parameters property: The parameters used by the script.withSchema(String schema) Set the schema property: The VM run command schema.withScript(List<String> script) Set the script property: The script to be executed.Methods inherited from class com.azure.resourcemanager.compute.fluent.models.RunCommandDocumentBaseInner
description, id, label, osType, schemaMethods 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
-
RunCommandDocumentInner
public RunCommandDocumentInner()Creates an instance of RunCommandDocumentInner class.
-
-
Method Details
-
script
Get the script property: The script to be executed.- Returns:
- the script value.
-
withScript
Set the script property: The script to be executed.- Parameters:
script- the script value to set.- Returns:
- the RunCommandDocumentInner object itself.
-
parameters
Get the parameters property: The parameters used by the script.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: The parameters used by the script.- Parameters:
parameters- the parameters value to set.- Returns:
- the RunCommandDocumentInner object itself.
-
withSchema
Set the schema property: The VM run command schema.- Overrides:
withSchemain classRunCommandDocumentBaseInner- Parameters:
schema- the schema value to set.- Returns:
- the RunCommandDocumentBaseInner object itself.
-
withId
Set the id property: The VM run command id.- Overrides:
withIdin classRunCommandDocumentBaseInner- Parameters:
id- the id value to set.- Returns:
- the RunCommandDocumentBaseInner object itself.
-
withOsType
Set the osType property: The Operating System type.- Overrides:
withOsTypein classRunCommandDocumentBaseInner- Parameters:
osType- the osType value to set.- Returns:
- the RunCommandDocumentBaseInner object itself.
-
withLabel
Set the label property: The VM run command label.- Overrides:
withLabelin classRunCommandDocumentBaseInner- Parameters:
label- the label value to set.- Returns:
- the RunCommandDocumentBaseInner object itself.
-
withDescription
Set the description property: The VM run command description.- Overrides:
withDescriptionin classRunCommandDocumentBaseInner- Parameters:
description- the description value to set.- Returns:
- the RunCommandDocumentBaseInner object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classRunCommandDocumentBaseInner- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RunCommandDocumentBaseInner>- Overrides:
toJsonin classRunCommandDocumentBaseInner- Throws:
IOException
-
fromJson
public static RunCommandDocumentInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RunCommandDocumentInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RunCommandDocumentInner 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 RunCommandDocumentInner.
-