Class GenericGalleryParameter

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

public class GenericGalleryParameter extends Object implements com.azure.json.JsonSerializable<GenericGalleryParameter>
The definition of a generic gallery parameter.
  • Constructor Details

    • GenericGalleryParameter

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

    • name

      public String name()
      Get the name property: The name of the parameter.
      Returns:
      the name value.
    • withName

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

      public Boolean required()
      Get the required property: Indicates whether this parameter must be passed.
      Returns:
      the required value.
    • withRequired

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

      public String defaultValue()
      Get the defaultValue property: The default value of the parameter, only applies to string types.
      Returns:
      the defaultValue value.
    • withDefaultValue

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

      public String description()
      Get the description property: A description to help users understand what this parameter means.
      Returns:
      the description value.
    • withDescription

      public GenericGalleryParameter withDescription(String description)
      Set the description property: A description to help users understand what this parameter means.
      Parameters:
      description - the description value to set.
      Returns:
      the GenericGalleryParameter 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<GenericGalleryParameter>
      Throws:
      IOException
    • fromJson

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