Record Class Interactions.ResponseEncountered

java.lang.Object
java.lang.Record
org.diabetestechnology.drh.service.http.Interactions.ResponseEncountered
Enclosing class:
Interactions

public static record Interactions.ResponseEncountered(UUID requestId, UUID responseId, int status, Instant encounteredAt, List<Interactions.Header> headers, byte[] responseBody) extends Record
  • Constructor Details

    • ResponseEncountered

      public ResponseEncountered(jakarta.servlet.http.HttpServletResponse response, Interactions.RequestEncountered requestEncountered, byte[] responseBody)
    • ResponseEncountered

      public ResponseEncountered(UUID requestId, UUID responseId, int status, Instant encounteredAt, List<Interactions.Header> headers, byte[] responseBody)
      Creates an instance of a ResponseEncountered record class.
      Parameters:
      requestId - the value for the requestId record component
      responseId - the value for the responseId record component
      status - the value for the status record component
      encounteredAt - the value for the encounteredAt record component
      headers - the value for the headers record component
      responseBody - the value for the responseBody 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.
    • requestId

      public UUID requestId()
      Returns the value of the requestId record component.
      Returns:
      the value of the requestId record component
    • responseId

      public UUID responseId()
      Returns the value of the responseId record component.
      Returns:
      the value of the responseId record component
    • status

      public int status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • encounteredAt

      public Instant encounteredAt()
      Returns the value of the encounteredAt record component.
      Returns:
      the value of the encounteredAt record component
    • headers

      public List<Interactions.Header> headers()
      Returns the value of the headers record component.
      Returns:
      the value of the headers record component
    • responseBody

      public byte[] responseBody()
      Returns the value of the responseBody record component.
      Returns:
      the value of the responseBody record component