Class ParameterContract

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

public final class ParameterContract extends Object implements com.azure.json.JsonSerializable<ParameterContract>
Operation parameters details.
  • Constructor Details

    • ParameterContract

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

    • name

      public String name()
      Get the name property: Parameter name.
      Returns:
      the name value.
    • withName

      public ParameterContract withName(String name)
      Set the name property: Parameter name.
      Parameters:
      name - the name value to set.
      Returns:
      the ParameterContract object itself.
    • description

      public String description()
      Get the description property: Parameter description.
      Returns:
      the description value.
    • withDescription

      public ParameterContract withDescription(String description)
      Set the description property: Parameter description.
      Parameters:
      description - the description value to set.
      Returns:
      the ParameterContract object itself.
    • type

      public String type()
      Get the type property: Parameter type.
      Returns:
      the type value.
    • withType

      public ParameterContract withType(String type)
      Set the type property: Parameter type.
      Parameters:
      type - the type value to set.
      Returns:
      the ParameterContract object itself.
    • defaultValue

      public String defaultValue()
      Get the defaultValue property: Default parameter value.
      Returns:
      the defaultValue value.
    • withDefaultValue

      public ParameterContract withDefaultValue(String defaultValue)
      Set the defaultValue property: Default parameter value.
      Parameters:
      defaultValue - the defaultValue value to set.
      Returns:
      the ParameterContract object itself.
    • required

      public Boolean required()
      Get the required property: Specifies whether parameter is required or not.
      Returns:
      the required value.
    • withRequired

      public ParameterContract withRequired(Boolean required)
      Set the required property: Specifies whether parameter is required or not.
      Parameters:
      required - the required value to set.
      Returns:
      the ParameterContract object itself.
    • values

      public List<String> values()
      Get the values property: Parameter values.
      Returns:
      the values value.
    • withValues

      public ParameterContract withValues(List<String> values)
      Set the values property: Parameter values.
      Parameters:
      values - the values value to set.
      Returns:
      the ParameterContract object itself.
    • schemaId

      public String schemaId()
      Get the schemaId property: Schema identifier.
      Returns:
      the schemaId value.
    • withSchemaId

      public ParameterContract withSchemaId(String schemaId)
      Set the schemaId property: Schema identifier.
      Parameters:
      schemaId - the schemaId value to set.
      Returns:
      the ParameterContract object itself.
    • typeName

      public String typeName()
      Get the typeName property: Type name defined by the schema.
      Returns:
      the typeName value.
    • withTypeName

      public ParameterContract withTypeName(String typeName)
      Set the typeName property: Type name defined by the schema.
      Parameters:
      typeName - the typeName value to set.
      Returns:
      the ParameterContract object itself.
    • examples

      public Map<String,ParameterExampleContract> examples()
      Get the examples property: Exampled defined for the parameter.
      Returns:
      the examples value.
    • withExamples

      public ParameterContract withExamples(Map<String,ParameterExampleContract> examples)
      Set the examples property: Exampled defined for the parameter.
      Parameters:
      examples - the examples value to set.
      Returns:
      the ParameterContract 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<ParameterContract>
      Throws:
      IOException
    • fromJson

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