Class ScriptSource
java.lang.Object
com.azure.resourcemanager.compute.models.ScriptSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScriptSource>
public final class ScriptSource
extends Object
implements com.azure.json.JsonSerializable<ScriptSource>
The source script from which the Script Version is going to be created.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptSourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ScriptSource from the JsonReader.Get the parameters property: Optional.Get the scriptLink property: Required.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withParameters(List<GalleryScriptParameter> parameters) Set the parameters property: Optional.withScriptLink(String scriptLink) Set the scriptLink property: Required.Methods inherited from class 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
-
ScriptSource
public ScriptSource()Creates an instance of ScriptSource class.
-
-
Method Details
-
scriptLink
Get the scriptLink property: Required. The link of the source script, it must be a readable storage blob with SAS URI or publicly accessible URI or managed identity enabled.- Returns:
- the scriptLink value.
-
withScriptLink
Set the scriptLink property: Required. The link of the source script, it must be a readable storage blob with SAS URI or publicly accessible URI or managed identity enabled.- Parameters:
scriptLink- the scriptLink value to set.- Returns:
- the ScriptSource object itself.
-
parameters
Get the parameters property: Optional. Any input parameters that needs to passed to the script and are accessed within the script for its execution.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: Optional. Any input parameters that needs to passed to the script and are accessed within the script for its execution.- Parameters:
parameters- the parameters value to set.- Returns:
- the ScriptSource 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<ScriptSource>- Throws:
IOException
-
fromJson
Reads an instance of ScriptSource from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ScriptSource 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 ScriptSource.
-