Module whatsapp4j

Record Class AckResponse

java.lang.Object
java.lang.Record
it.auties.whatsapp4j.response.impl.json.AckResponse
Record Components:
cmd - a nullable identifier for the request
ids - a non null array of message ids that this update regards
ack - an unsigned int representing MessageInfo.MessageInfoStatus
from - the sender of the messages that this update regards
to - chat of the messages that this update regards
timestamp - the time in seconds since Instant.EPOCH when the update was dispatched by the server
participant - if to is a group, the participant that this update regards
All Implemented Interfaces:
ResponseModel, JsonResponseModel

public record AckResponse(String cmd, String[] ids, int ack, @NonNull String from, @NonNull String to, int timestamp, String participant) extends Record implements JsonResponseModel
A json model that contains information regarding an update about the read status of a message
  • Constructor Details

    • AckResponse

      public AckResponse(String cmd, String[] ids, int ack, @NonNull @NonNull String from, @NonNull @NonNull String to, int timestamp, String participant)
      Creates an instance of a AckResponse record class.
      Parameters:
      cmd - the value for the cmd record component
      ids - the value for the ids record component
      ack - the value for the ack record component
      from - the value for the from record component
      to - the value for the to record component
      timestamp - the value for the timestamp record component
      participant - the value for the participant 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.
    • cmd

      public String cmd()
      Returns the value of the cmd record component.
      Returns:
      the value of the cmd record component
    • ids

      public String[] ids()
      Returns the value of the ids record component.
      Returns:
      the value of the ids record component
    • ack

      public int ack()
      Returns the value of the ack record component.
      Returns:
      the value of the ack record component
    • from

      @NonNull public @NonNull String from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      @NonNull public @NonNull String to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • timestamp

      public int timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • participant

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