java.lang.Object
java.lang.Record
it.auties.whatsapp.model.chat.GroupMetadata
public record GroupMetadata(Jid jid, String subject, Optional<Jid> subjectAuthor, Optional<ZonedDateTime> subjectTimestamp, Optional<ZonedDateTime> foundationTimestamp, Optional<Jid> founder, Optional<String> description, Optional<String> descriptionId, Map<GroupSetting,ChatSettingPolicy> policies, List<GroupParticipant> participants, Optional<ZonedDateTime> ephemeralExpiration, boolean isCommunity, boolean isOpenCommunity)
extends Record
This model class represents the metadata of a group
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thedescriptionrecord component.The field for thedescriptionIdrecord component.private final Optional<ZonedDateTime> The field for theephemeralExpirationrecord component.private final Optional<ZonedDateTime> The field for thefoundationTimestamprecord component.The field for thefounderrecord component.private final booleanThe field for theisCommunityrecord component.private final booleanThe field for theisOpenCommunityrecord component.private final JidThe field for thejidrecord component.private final List<GroupParticipant> The field for theparticipantsrecord component.private final Map<GroupSetting, ChatSettingPolicy> The field for thepoliciesrecord component.private final StringThe field for thesubjectrecord component.The field for thesubjectAuthorrecord component.private final Optional<ZonedDateTime> The field for thesubjectTimestamprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGroupMetadata(Jid jid, String subject, Optional<Jid> subjectAuthor, Optional<ZonedDateTime> subjectTimestamp, Optional<ZonedDateTime> foundationTimestamp, Optional<Jid> founder, Optional<String> description, Optional<String> descriptionId, Map<GroupSetting, ChatSettingPolicy> policies, List<GroupParticipant> participants, Optional<ZonedDateTime> ephemeralExpiration, boolean isCommunity, boolean isOpenCommunity) Creates an instance of aGroupMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.Returns the value of thedescriptionIdrecord component.Returns the value of theephemeralExpirationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefoundationTimestamprecord component.founder()Returns the value of thefounderrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCommunityrecord component.booleanReturns the value of theisOpenCommunityrecord component.jid()Returns the value of thejidrecord component.Returns the value of theparticipantsrecord component.policies()Returns the value of thepoliciesrecord component.subject()Returns the value of thesubjectrecord component.Returns the value of thesubjectAuthorrecord component.Returns the value of thesubjectTimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
jid
The field for thejidrecord component. -
subject
The field for thesubjectrecord component. -
subjectAuthor
The field for thesubjectAuthorrecord component. -
subjectTimestamp
The field for thesubjectTimestamprecord component. -
foundationTimestamp
The field for thefoundationTimestamprecord component. -
founder
The field for thefounderrecord component. -
description
The field for thedescriptionrecord component. -
descriptionId
The field for thedescriptionIdrecord component. -
policies
The field for thepoliciesrecord component. -
participants
The field for theparticipantsrecord component. -
ephemeralExpiration
The field for theephemeralExpirationrecord component. -
isCommunity
private final boolean isCommunityThe field for theisCommunityrecord component. -
isOpenCommunity
private final boolean isOpenCommunityThe field for theisOpenCommunityrecord component.
-
-
Constructor Details
-
GroupMetadata
public GroupMetadata(Jid jid, String subject, Optional<Jid> subjectAuthor, Optional<ZonedDateTime> subjectTimestamp, Optional<ZonedDateTime> foundationTimestamp, Optional<Jid> founder, Optional<String> description, Optional<String> descriptionId, Map<GroupSetting, ChatSettingPolicy> policies, List<GroupParticipant> participants, Optional<ZonedDateTime> ephemeralExpiration, boolean isCommunity, boolean isOpenCommunity) Creates an instance of aGroupMetadatarecord class.- Parameters:
jid- the value for thejidrecord componentsubject- the value for thesubjectrecord componentsubjectAuthor- the value for thesubjectAuthorrecord componentsubjectTimestamp- the value for thesubjectTimestamprecord componentfoundationTimestamp- the value for thefoundationTimestamprecord componentfounder- the value for thefounderrecord componentdescription- the value for thedescriptionrecord componentdescriptionId- the value for thedescriptionIdrecord componentpolicies- the value for thepoliciesrecord componentparticipants- the value for theparticipantsrecord componentephemeralExpiration- the value for theephemeralExpirationrecord componentisCommunity- the value for theisCommunityrecord componentisOpenCommunity- the value for theisOpenCommunityrecord 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 '=='. -
jid
Returns the value of thejidrecord component.- Returns:
- the value of the
jidrecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
subjectAuthor
Returns the value of thesubjectAuthorrecord component.- Returns:
- the value of the
subjectAuthorrecord component
-
subjectTimestamp
Returns the value of thesubjectTimestamprecord component.- Returns:
- the value of the
subjectTimestamprecord component
-
foundationTimestamp
Returns the value of thefoundationTimestamprecord component.- Returns:
- the value of the
foundationTimestamprecord component
-
founder
Returns the value of thefounderrecord component.- Returns:
- the value of the
founderrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
descriptionId
Returns the value of thedescriptionIdrecord component.- Returns:
- the value of the
descriptionIdrecord component
-
policies
Returns the value of thepoliciesrecord component.- Returns:
- the value of the
policiesrecord component
-
participants
Returns the value of theparticipantsrecord component.- Returns:
- the value of the
participantsrecord component
-
ephemeralExpiration
Returns the value of theephemeralExpirationrecord component.- Returns:
- the value of the
ephemeralExpirationrecord component
-
isCommunity
public boolean isCommunity()Returns the value of theisCommunityrecord component.- Returns:
- the value of the
isCommunityrecord component
-
isOpenCommunity
public boolean isOpenCommunity()Returns the value of theisOpenCommunityrecord component.- Returns:
- the value of the
isOpenCommunityrecord component
-