Record Class HttpExchange

java.lang.Object
java.lang.Record
io.qameta.allure.http.HttpExchange
Record Components:
schemaVersion - the HTTP exchange schema version
request - the captured request
response - the captured response
error - the captured error
start - the exchange start timestamp
stop - the exchange stop timestamp

public record HttpExchange(int schemaVersion, HttpExchangeRequest request, HttpExchangeResponse response, HttpExchangeError error, Long start, Long stop) extends Record
Allure HTTP exchange attachment payload.
  • Field Details

  • Constructor Details

  • Method Details

    • builder

      public static HttpExchange.Builder builder()
      Creates an HTTP exchange builder.
      Returns:
      exchange builder
    • builder

      public static HttpExchange.Builder builder(HttpExchangeRequest request)
      Creates an HTTP exchange builder initialized with a request.
      Parameters:
      request - the captured request
      Returns:
      exchange builder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schemaVersion

      public int schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • request

      public HttpExchangeRequest request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • response

      public HttpExchangeResponse response()
      Returns the value of the response record component.
      Returns:
      the value of the response record component
    • error

      public HttpExchangeError error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component
    • start

      public Long start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • stop

      public Long stop()
      Returns the value of the stop record component.
      Returns:
      the value of the stop record component