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 Summary
ConstructorsConstructorDescriptionCreates an instance of GenericGalleryParameter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the defaultValue property: The default value of the parameter, only applies to string types.Get the description property: A description to help users understand what this parameter means.static GenericGalleryParameterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GenericGalleryParameter from the JsonReader.name()Get the name property: The name of the parameter.required()Get the required property: Indicates whether this parameter must be passed.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDefaultValue(String defaultValue) Set the defaultValue property: The default value of the parameter, only applies to string types.withDescription(String description) Set the description property: A description to help users understand what this parameter means.Set the name property: The name of the parameter.withRequired(Boolean required) Set the required property: Indicates whether this parameter must be passed.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
-
GenericGalleryParameter
public GenericGalleryParameter()Creates an instance of GenericGalleryParameter class.
-
-
Method Details
-
name
-
withName
Set the name property: The name of the parameter.- Parameters:
name- the name value to set.- Returns:
- the GenericGalleryParameter object itself.
-
required
Get the required property: Indicates whether this parameter must be passed.- Returns:
- the required value.
-
withRequired
Set the required property: Indicates whether this parameter must be passed.- Parameters:
required- the required value to set.- Returns:
- the GenericGalleryParameter object itself.
-
defaultValue
Get the defaultValue property: The default value of the parameter, only applies to string types.- Returns:
- the defaultValue value.
-
withDefaultValue
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
Get the description property: A description to help users understand what this parameter means.- Returns:
- the description value.
-
withDescription
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
- Specified by:
toJsonin interfacecom.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.
-