java.lang.Object
java.lang.Record
it.auties.whatsapp4j.response.impl.json.AckResponse
- Record Components:
cmd
- a nullable identifier for the requestids
- a non null array of message ids that this update regardsack
- an unsigned int representingMessageInfo.MessageInfoStatus
from
- the sender of the messages that this update regardsto
- chat of the messages that this update regardstimestamp
- the time in seconds sinceInstant.EPOCH
when the update was dispatched by the serverparticipant
- ifto
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
ack()
Returns the value of theack
record component.cmd()
Returns the value of thecmd
record component.boolean
Indicates whether some other object is "equal to" this one.@NonNull String
from()
Returns the value of thefrom
record component.int
hashCode()
Returns a hash code value for this object.String[]
ids()
Returns the value of theids
record component.Returns the value of theparticipant
record component.int
Returns the value of thetimestamp
record component.@NonNull String
to()
Returns the value of theto
record component.toString()
Returns a string representation of this record class.
-
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 aAckResponse
record class.- Parameters:
cmd
- the value for thecmd
record componentids
- the value for theids
record componentack
- the value for theack
record componentfrom
- the value for thefrom
record componentto
- the value for theto
record componenttimestamp
- the value for thetimestamp
record componentparticipant
- the value for theparticipant
record component
-
-
Method Details
-
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 '=='. -
cmd
Returns the value of thecmd
record component.- Returns:
- the value of the
cmd
record component
-
ids
Returns the value of theids
record component.- Returns:
- the value of the
ids
record component
-
ack
public int ack()Returns the value of theack
record component.- Returns:
- the value of the
ack
record component
-
from
Returns the value of thefrom
record component.- Returns:
- the value of the
from
record component
-
to
Returns the value of theto
record component.- Returns:
- the value of the
to
record component
-
timestamp
public int timestamp()Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-
participant
Returns the value of theparticipant
record component.- Returns:
- the value of the
participant
record component
-