Class GalleryScriptParameter

java.lang.Object
com.azure.resourcemanager.compute.models.GenericGalleryParameter
com.azure.resourcemanager.compute.models.GalleryScriptParameter
All Implemented Interfaces:
com.azure.json.JsonSerializable<GenericGalleryParameter>

public final class GalleryScriptParameter extends GenericGalleryParameter
The definition of a parameter that can be passed to a script of a Gallery Script Version.
  • Constructor Details

    • GalleryScriptParameter

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

    • type

      Get the type property: Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum.
      Returns:
      the type value.
    • withType

      Set the type property: Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum.
      Parameters:
      type - the type value to set.
      Returns:
      the GalleryScriptParameter object itself.
    • minValue

      public String minValue()
      Get the minValue property: The minimum value of parameter.
      Returns:
      the minValue value.
    • withMinValue

      public GalleryScriptParameter withMinValue(String minValue)
      Set the minValue property: The minimum value of parameter.
      Parameters:
      minValue - the minValue value to set.
      Returns:
      the GalleryScriptParameter object itself.
    • maxValue

      public String maxValue()
      Get the maxValue property: The minimum value of parameter.
      Returns:
      the maxValue value.
    • withMaxValue

      public GalleryScriptParameter withMaxValue(String maxValue)
      Set the maxValue property: The minimum value of parameter.
      Parameters:
      maxValue - the maxValue value to set.
      Returns:
      the GalleryScriptParameter object itself.
    • enumValues

      public List<String> enumValues()
      Get the enumValues property: A list of permissible values. Only applicable values are from 'enum' values defined in 'GalleryScriptParameter'.
      Returns:
      the enumValues value.
    • withEnumValues

      public GalleryScriptParameter withEnumValues(List<String> enumValues)
      Set the enumValues property: A list of permissible values. Only applicable values are from 'enum' values defined in 'GalleryScriptParameter'.
      Parameters:
      enumValues - the enumValues value to set.
      Returns:
      the GalleryScriptParameter object itself.
    • withName

      public GalleryScriptParameter withName(String name)
      Set the name property: The name of the parameter.
      Overrides:
      withName in class GenericGalleryParameter
      Parameters:
      name - the name value to set.
      Returns:
      the GenericGalleryParameter object itself.
    • withRequired

      public GalleryScriptParameter withRequired(Boolean required)
      Set the required property: Indicates whether this parameter must be passed.
      Overrides:
      withRequired in class GenericGalleryParameter
      Parameters:
      required - the required value to set.
      Returns:
      the GenericGalleryParameter object itself.
    • withDefaultValue

      public GalleryScriptParameter withDefaultValue(String defaultValue)
      Set the defaultValue property: The default value of the parameter, only applies to string types.
      Overrides:
      withDefaultValue in class GenericGalleryParameter
      Parameters:
      defaultValue - the defaultValue value to set.
      Returns:
      the GenericGalleryParameter object itself.
    • withDescription

      public GalleryScriptParameter withDescription(String description)
      Set the description property: A description to help users understand what this parameter means.
      Overrides:
      withDescription in class GenericGalleryParameter
      Parameters:
      description - the description value to set.
      Returns:
      the GenericGalleryParameter object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class GenericGalleryParameter
      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<GenericGalleryParameter>
      Overrides:
      toJson in class GenericGalleryParameter
      Throws:
      IOException
    • fromJson

      public static GalleryScriptParameter fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of GalleryScriptParameter from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of GalleryScriptParameter 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 GalleryScriptParameter.