java.lang.Object
java.lang.Record
it.auties.whatsapp.model.chat.GroupPastParticipant
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record GroupPastParticipant(Jid jid, GroupPastParticipant.Reason reason, long timestampSeconds)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
Class representing a past participant in a chat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the errorReason for a past participant leaving the chat. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JidThe field for thejidrecord component.private final GroupPastParticipant.ReasonThe field for thereasonrecord component.private final longThe field for thetimestampSecondsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGroupPastParticipant(Jid jid, GroupPastParticipant.Reason reason, long timestampSeconds) Creates an instance of aGroupPastParticipantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jid()Returns the value of thejidrecord component.reason()Returns the value of thereasonrecord component.Returns when the past participant left the chatlongReturns the value of thetimestampSecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
jid
The field for thejidrecord component. -
reason
The field for thereasonrecord component. -
timestampSeconds
private final long timestampSecondsThe field for thetimestampSecondsrecord component.
-
-
Constructor Details
-
GroupPastParticipant
Creates an instance of aGroupPastParticipantrecord class.- Parameters:
jid- the value for thejidrecord componentreason- the value for thereasonrecord componenttimestampSeconds- the value for thetimestampSecondsrecord component
-
-
Method Details
-
timestamp
Returns when the past participant left the chat- Returns:
- an optional
-
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 '=='. -
jid
Returns the value of thejidrecord component.- Returns:
- the value of the
jidrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
timestampSeconds
public long timestampSeconds()Returns the value of thetimestampSecondsrecord component.- Returns:
- the value of the
timestampSecondsrecord component
-