Record Class RequestExplanation.ExplainedRequest

java.lang.Object
java.lang.Record
org.mockserver.client.RequestExplanation.ExplainedRequest
Record Components:
timestamp - when the request was recorded, as the event log formats it
method - the request method
path - the request path
bodyTruncated - whether the event log kept only the start of the body, so body matching used that copy
bodyTruncatedNote - the server's note on the truncated body, or null
Enclosing class:
RequestExplanation

public static record RequestExplanation.ExplainedRequest(String timestamp, String method, String path, boolean bodyTruncated, String bodyTruncatedNote) extends Record
  • Constructor Details

    • ExplainedRequest

      public ExplainedRequest(String timestamp, String method, String path, boolean bodyTruncated, String bodyTruncatedNote)
      Creates an instance of a ExplainedRequest record class.
      Parameters:
      timestamp - the value for the timestamp record component
      method - the value for the method record component
      path - the value for the path record component
      bodyTruncated - the value for the bodyTruncated record component
      bodyTruncatedNote - the value for the bodyTruncatedNote record component
  • Method Details

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

      public String timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • method

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • bodyTruncated

      public boolean bodyTruncated()
      Returns the value of the bodyTruncated record component.
      Returns:
      the value of the bodyTruncated record component
    • bodyTruncatedNote

      public String bodyTruncatedNote()
      Returns the value of the bodyTruncatedNote record component.
      Returns:
      the value of the bodyTruncatedNote record component