Record Class GroupMetadata

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 Details

    • jid

      private final Jid jid
      The field for the jid record component.
    • subject

      private final String subject
      The field for the subject record component.
    • subjectAuthor

      private final Optional<Jid> subjectAuthor
      The field for the subjectAuthor record component.
    • subjectTimestamp

      private final Optional<ZonedDateTime> subjectTimestamp
      The field for the subjectTimestamp record component.
    • foundationTimestamp

      private final Optional<ZonedDateTime> foundationTimestamp
      The field for the foundationTimestamp record component.
    • founder

      private final Optional<Jid> founder
      The field for the founder record component.
    • description

      private final Optional<String> description
      The field for the description record component.
    • descriptionId

      private final Optional<String> descriptionId
      The field for the descriptionId record component.
    • policies

      private final Map<GroupSetting,ChatSettingPolicy> policies
      The field for the policies record component.
    • participants

      private final List<GroupParticipant> participants
      The field for the participants record component.
    • ephemeralExpiration

      private final Optional<ZonedDateTime> ephemeralExpiration
      The field for the ephemeralExpiration record component.
    • isCommunity

      private final boolean isCommunity
      The field for the isCommunity record component.
    • isOpenCommunity

      private final boolean isOpenCommunity
      The field for the isOpenCommunity record 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 a GroupMetadata record class.
      Parameters:
      jid - the value for the jid record component
      subject - the value for the subject record component
      subjectAuthor - the value for the subjectAuthor record component
      subjectTimestamp - the value for the subjectTimestamp record component
      foundationTimestamp - the value for the foundationTimestamp record component
      founder - the value for the founder record component
      description - the value for the description record component
      descriptionId - the value for the descriptionId record component
      policies - the value for the policies record component
      participants - the value for the participants record component
      ephemeralExpiration - the value for the ephemeralExpiration record component
      isCommunity - the value for the isCommunity record component
      isOpenCommunity - the value for the isOpenCommunity 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.
    • jid

      public Jid jid()
      Returns the value of the jid record component.
      Returns:
      the value of the jid record component
    • subject

      public String subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • subjectAuthor

      public Optional<Jid> subjectAuthor()
      Returns the value of the subjectAuthor record component.
      Returns:
      the value of the subjectAuthor record component
    • subjectTimestamp

      public Optional<ZonedDateTime> subjectTimestamp()
      Returns the value of the subjectTimestamp record component.
      Returns:
      the value of the subjectTimestamp record component
    • foundationTimestamp

      public Optional<ZonedDateTime> foundationTimestamp()
      Returns the value of the foundationTimestamp record component.
      Returns:
      the value of the foundationTimestamp record component
    • founder

      public Optional<Jid> founder()
      Returns the value of the founder record component.
      Returns:
      the value of the founder record component
    • description

      public Optional<String> description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • descriptionId

      public Optional<String> descriptionId()
      Returns the value of the descriptionId record component.
      Returns:
      the value of the descriptionId record component
    • policies

      public Map<GroupSetting,ChatSettingPolicy> policies()
      Returns the value of the policies record component.
      Returns:
      the value of the policies record component
    • participants

      public List<GroupParticipant> participants()
      Returns the value of the participants record component.
      Returns:
      the value of the participants record component
    • ephemeralExpiration

      public Optional<ZonedDateTime> ephemeralExpiration()
      Returns the value of the ephemeralExpiration record component.
      Returns:
      the value of the ephemeralExpiration record component
    • isCommunity

      public boolean isCommunity()
      Returns the value of the isCommunity record component.
      Returns:
      the value of the isCommunity record component
    • isOpenCommunity

      public boolean isOpenCommunity()
      Returns the value of the isOpenCommunity record component.
      Returns:
      the value of the isOpenCommunity record component