Class ResponseContract

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

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

    • ResponseContract

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

    • statusCode

      public int statusCode()
      Get the statusCode property: Operation response HTTP status code.
      Returns:
      the statusCode value.
    • withStatusCode

      public ResponseContract withStatusCode(int statusCode)
      Set the statusCode property: Operation response HTTP status code.
      Parameters:
      statusCode - the statusCode value to set.
      Returns:
      the ResponseContract object itself.
    • description

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

      public ResponseContract withDescription(String description)
      Set the description property: Operation response description.
      Parameters:
      description - the description value to set.
      Returns:
      the ResponseContract object itself.
    • representations

      public List<RepresentationContract> representations()
      Get the representations property: Collection of operation response representations.
      Returns:
      the representations value.
    • withRepresentations

      public ResponseContract withRepresentations(List<RepresentationContract> representations)
      Set the representations property: Collection of operation response representations.
      Parameters:
      representations - the representations value to set.
      Returns:
      the ResponseContract object itself.
    • headers

      public List<ParameterContract> headers()
      Get the headers property: Collection of operation response headers.
      Returns:
      the headers value.
    • withHeaders

      public ResponseContract withHeaders(List<ParameterContract> headers)
      Set the headers property: Collection of operation response headers.
      Parameters:
      headers - the headers value to set.
      Returns:
      the ResponseContract 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<ResponseContract>
      Throws:
      IOException
    • fromJson

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