Class ResponseContract


  • public final class ResponseContract
    extends Object
    Operation response details.
    • Constructor Detail

      • ResponseContract

        public ResponseContract()
    • Method Detail

      • 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.