Class ParameterDefinitionsValue

java.lang.Object
com.azure.resourcemanager.resources.models.ParameterDefinitionsValue
All Implemented Interfaces:
com.azure.json.JsonSerializable<ParameterDefinitionsValue>

public final class ParameterDefinitionsValue extends Object implements com.azure.json.JsonSerializable<ParameterDefinitionsValue>
The definition of a parameter that can be provided to the policy.
  • Constructor Details

    • ParameterDefinitionsValue

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

    • type

      public ParameterType type()
      Get the type property: The data type of the parameter.
      Returns:
      the type value.
    • withType

      public ParameterDefinitionsValue withType(ParameterType type)
      Set the type property: The data type of the parameter.
      Parameters:
      type - the type value to set.
      Returns:
      the ParameterDefinitionsValue object itself.
    • allowedValues

      public List<Object> allowedValues()
      Get the allowedValues property: The allowed values for the parameter.
      Returns:
      the allowedValues value.
    • withAllowedValues

      public ParameterDefinitionsValue withAllowedValues(List<Object> allowedValues)
      Set the allowedValues property: The allowed values for the parameter.
      Parameters:
      allowedValues - the allowedValues value to set.
      Returns:
      the ParameterDefinitionsValue object itself.
    • defaultValue

      public Object defaultValue()
      Get the defaultValue property: The default value for the parameter if no value is provided.
      Returns:
      the defaultValue value.
    • withDefaultValue

      public ParameterDefinitionsValue withDefaultValue(Object defaultValue)
      Set the defaultValue property: The default value for the parameter if no value is provided.
      Parameters:
      defaultValue - the defaultValue value to set.
      Returns:
      the ParameterDefinitionsValue object itself.
    • schema

      public Object schema()
      Get the schema property: Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
      Returns:
      the schema value.
    • withSchema

      public ParameterDefinitionsValue withSchema(Object schema)
      Set the schema property: Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
      Parameters:
      schema - the schema value to set.
      Returns:
      the ParameterDefinitionsValue object itself.
    • metadata

      Get the metadata property: General metadata for the parameter.
      Returns:
      the metadata value.
    • withMetadata

      Set the metadata property: General metadata for the parameter.
      Parameters:
      metadata - the metadata value to set.
      Returns:
      the ParameterDefinitionsValue 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<ParameterDefinitionsValue>
      Throws:
      IOException
    • fromJson

      public static ParameterDefinitionsValue fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ParameterDefinitionsValue from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ParameterDefinitionsValue if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ParameterDefinitionsValue.