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 Details

    • ScriptSource

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

    • scriptLink

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

      public ScriptSource withScriptLink(String scriptLink)
      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

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

      public ScriptSource withParameters(List<GalleryScriptParameter> parameters)
      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

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

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