Record Class CallMessage

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.standard.CallMessage
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, Message

public record CallMessage(byte[] key, String source, byte[] data, int delay) extends Record implements Message
A message that contains information related to a call
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The field for the data record component.
    private final int
    The field for the delay record component.
    private final byte[]
    The field for the key record component.
    private final String
    The field for the source record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CallMessage(byte[] key, String source, byte[] data, int delay)
    Creates an instance of a CallMessage record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return message category
    byte[]
    Returns the value of the data record component.
    int
    Returns the value of the delay record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    byte[]
    key()
    Returns the value of the key record component.
    Returns the value of the source record component.
    final String
    Returns a string representation of this record class.
    Return message type

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • key

      private final byte[] key
      The field for the key record component.
    • source

      private final String source
      The field for the source record component.
    • data

      private final byte[] data
      The field for the data record component.
    • delay

      private final int delay
      The field for the delay record component.
  • Constructor Details

    • CallMessage

      public CallMessage(byte[] key, String source, byte[] data, int delay)
      Creates an instance of a CallMessage record class.
      Parameters:
      key - the value for the key record component
      source - the value for the source record component
      data - the value for the data record component
      delay - the value for the delay record component
  • Method Details

    • type

      public MessageType type()
      Description copied from interface: Message
      Return message type
      Specified by:
      type in interface Message
      Returns:
      a non-null message type
    • category

      public MessageCategory category()
      Description copied from interface: Message
      Return message category
      Specified by:
      category in interface Message
      Returns:
      a non-null message category
    • 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.
    • key

      public byte[] key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • source

      public String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • data

      public byte[] data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • delay

      public int delay()
      Returns the value of the delay record component.
      Returns:
      the value of the delay record component