Class RepresentationContract

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

public final class RepresentationContract extends Object implements com.azure.json.JsonSerializable<RepresentationContract>
Operation request/response representation details.
  • Constructor Details

    • RepresentationContract

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

    • contentType

      public String contentType()
      Get the contentType property: Specifies a registered or custom content type for this representation, e.g. application/xml.
      Returns:
      the contentType value.
    • withContentType

      public RepresentationContract withContentType(String contentType)
      Set the contentType property: Specifies a registered or custom content type for this representation, e.g. application/xml.
      Parameters:
      contentType - the contentType value to set.
      Returns:
      the RepresentationContract object itself.
    • schemaId

      public String schemaId()
      Get the schemaId property: Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
      Returns:
      the schemaId value.
    • withSchemaId

      public RepresentationContract withSchemaId(String schemaId)
      Set the schemaId property: Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
      Parameters:
      schemaId - the schemaId value to set.
      Returns:
      the RepresentationContract object itself.
    • typeName

      public String typeName()
      Get the typeName property: Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
      Returns:
      the typeName value.
    • withTypeName

      public RepresentationContract withTypeName(String typeName)
      Set the typeName property: Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
      Parameters:
      typeName - the typeName value to set.
      Returns:
      the RepresentationContract object itself.
    • formParameters

      public List<ParameterContract> formParameters()
      Get the formParameters property: Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
      Returns:
      the formParameters value.
    • withFormParameters

      public RepresentationContract withFormParameters(List<ParameterContract> formParameters)
      Set the formParameters property: Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
      Parameters:
      formParameters - the formParameters value to set.
      Returns:
      the RepresentationContract object itself.
    • examples

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

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

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