Package io.qameta.allure.http
Record Class HttpExchange
java.lang.Object
java.lang.Record
io.qameta.allure.http.HttpExchange
- Record Components:
schemaVersion- the HTTP exchange schema versionrequest- the captured requestresponse- the captured responseerror- the captured errorstart- the exchange start timestampstop- 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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpExchange(int schemaVersion, HttpExchangeRequest request, HttpExchangeResponse response, HttpExchangeError error, Long start, Long stop) Creates an instance of aHttpExchangerecord class.HttpExchange(HttpExchangeRequest request, HttpExchangeResponse response, HttpExchangeError error, Long start, Long stop) -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpExchange.Builderbuilder()Creates an HTTP exchange builder.static HttpExchange.Builderbuilder(HttpExchangeRequest request) Creates an HTTP exchange builder initialized with a request.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.request()Returns the value of therequestrecord component.response()Returns the value of theresponserecord component.intReturns the value of theschemaVersionrecord component.start()Returns the value of thestartrecord component.stop()Returns the value of thestoprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SCHEMA_VERSION
public static final int SCHEMA_VERSION- See Also:
-
CONTENT_TYPE
- See Also:
-
FILE_EXTENSION
- See Also:
-
REDACTED_VALUE
- See Also:
-
DEFAULT_MAX_BODY_SIZE
public static final long DEFAULT_MAX_BODY_SIZE- See Also:
-
-
Constructor Details
-
HttpExchange
public HttpExchange(int schemaVersion, HttpExchangeRequest request, HttpExchangeResponse response, HttpExchangeError error, Long start, Long stop) Creates an instance of aHttpExchangerecord class.- Parameters:
schemaVersion- the value for theschemaVersionrecord componentrequest- the value for therequestrecord componentresponse- the value for theresponserecord componenterror- the value for theerrorrecord componentstart- the value for thestartrecord componentstop- the value for thestoprecord component
-
HttpExchange
public HttpExchange(HttpExchangeRequest request, HttpExchangeResponse response, HttpExchangeError error, Long start, Long stop)
-
-
Method Details
-
builder
Creates an HTTP exchange builder.- Returns:
- exchange builder
-
builder
Creates an HTTP exchange builder initialized with a request.- Parameters:
request- the captured request- Returns:
- exchange builder
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
schemaVersion
public int schemaVersion()Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
request
Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-
response
Returns the value of theresponserecord component.- Returns:
- the value of the
responserecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
stop
Returns the value of thestoprecord component.- Returns:
- the value of the
stoprecord component
-