Record Class MediaConnection

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.media.MediaConnection

public record MediaConnection(@NonNull String auth, int ttl, int maxBuckets, long timestamp, @NonNull List<@NonNull String> hosts) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @NonNull String
    The field for the auth record component.
    private final @NonNull List<@NonNull String>
    The field for the hosts record component.
    private final int
    The field for the maxBuckets record component.
    private final long
    The field for the timestamp record component.
    private final int
    The field for the ttl record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MediaConnection(@NonNull String auth, int ttl, int maxBuckets, long timestamp, @NonNull List<@NonNull String> hosts)
    Creates an instance of a MediaConnection record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull String
    Returns the value of the auth record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NonNull List<@NonNull String>
    Returns the value of the hosts record component.
    int
    Returns the value of the maxBuckets record component.
    of(Node node)
     
    long
    Returns the value of the timestamp record component.
    final String
    Returns a string representation of this record class.
    int
    ttl()
    Returns the value of the ttl record component.

    Methods inherited from class java.lang.Object

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

    • auth

      @NonNull private final @NonNull String auth
      The field for the auth record component.
    • ttl

      private final int ttl
      The field for the ttl record component.
    • maxBuckets

      private final int maxBuckets
      The field for the maxBuckets record component.
    • timestamp

      private final long timestamp
      The field for the timestamp record component.
    • hosts

      @NonNull private final @NonNull List<@NonNull String> hosts
      The field for the hosts record component.
  • Constructor Details

    • MediaConnection

      public MediaConnection(@NonNull @NonNull String auth, int ttl, int maxBuckets, long timestamp, @NonNull @NonNull List<@NonNull String> hosts)
      Creates an instance of a MediaConnection record class.
      Parameters:
      auth - the value for the auth record component
      ttl - the value for the ttl record component
      maxBuckets - the value for the maxBuckets record component
      timestamp - the value for the timestamp record component
      hosts - the value for the hosts record component
  • Method Details

    • of

      public static MediaConnection of(Node node)
    • 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.
    • auth

      @NonNull public @NonNull String auth()
      Returns the value of the auth record component.
      Returns:
      the value of the auth record component
    • ttl

      public int ttl()
      Returns the value of the ttl record component.
      Returns:
      the value of the ttl record component
    • maxBuckets

      public int maxBuckets()
      Returns the value of the maxBuckets record component.
      Returns:
      the value of the maxBuckets record component
    • timestamp

      public long timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • hosts

      @NonNull public @NonNull List<@NonNull String> hosts()
      Returns the value of the hosts record component.
      Returns:
      the value of the hosts record component