Record Class MessageResultDto

java.lang.Object
java.lang.Record
ch.admin.bit.jeap.messageexchange.web.api.dto.MessageResultDto

public record MessageResultDto(UUID messageId, String messageType, String groupId, String partnerTopic) extends Record
  • Constructor Details

    • MessageResultDto

      public MessageResultDto(UUID messageId, String messageType, String groupId, String partnerTopic)
      Creates an instance of a MessageResultDto record class.
      Parameters:
      messageId - the value for the messageId record component
      messageType - the value for the messageType record component
      groupId - the value for the groupId record component
      partnerTopic - the value for the partnerTopic record component
  • Method Details

    • createV2Dto

      public static MessageResultDto createV2Dto(MessageSearchResultDto domainDto)
      Creates a message search result that does not include the groupId and partnerTopic in the response, conforming to the schema of the response in the partner API v2.
    • createV3Dto

      public static MessageResultDto createV3Dto(MessageSearchResultDto domainDto)
      Creates a message search result that includes the groupId and partnerTopic in the response.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • messageId

      public UUID messageId()
      Returns the value of the messageId record component.
      Returns:
      the value of the messageId record component
    • messageType

      public String messageType()
      Returns the value of the messageType record component.
      Returns:
      the value of the messageType record component
    • groupId

      public String groupId()
      Returns the value of the groupId record component.
      Returns:
      the value of the groupId record component
    • partnerTopic

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