Class ParameterExampleContract

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

public final class ParameterExampleContract extends Object implements com.azure.json.JsonSerializable<ParameterExampleContract>
Parameter example.
  • Constructor Details

    • ParameterExampleContract

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

    • summary

      public String summary()
      Get the summary property: Short description for the example.
      Returns:
      the summary value.
    • withSummary

      public ParameterExampleContract withSummary(String summary)
      Set the summary property: Short description for the example.
      Parameters:
      summary - the summary value to set.
      Returns:
      the ParameterExampleContract object itself.
    • description

      public String description()
      Get the description property: Long description for the example.
      Returns:
      the description value.
    • withDescription

      public ParameterExampleContract withDescription(String description)
      Set the description property: Long description for the example.
      Parameters:
      description - the description value to set.
      Returns:
      the ParameterExampleContract object itself.
    • value

      public Object value()
      Get the value property: Example value. May be a primitive value, or an object.
      Returns:
      the value value.
    • withValue

      public ParameterExampleContract withValue(Object value)
      Set the value property: Example value. May be a primitive value, or an object.
      Parameters:
      value - the value value to set.
      Returns:
      the ParameterExampleContract object itself.
    • externalValue

      public String externalValue()
      Get the externalValue property: A URL that points to the literal example.
      Returns:
      the externalValue value.
    • withExternalValue

      public ParameterExampleContract withExternalValue(String externalValue)
      Set the externalValue property: A URL that points to the literal example.
      Parameters:
      externalValue - the externalValue value to set.
      Returns:
      the ParameterExampleContract 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<ParameterExampleContract>
      Throws:
      IOException
    • fromJson

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