Record Class PaymentBackground

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.payment.PaymentBackground
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject

public record PaymentBackground(String id, long mediaSize, int width, int height, String mimetype, int placeholderArgb, int textArgb, int subtextArgb, Optional<PaymentMediaData> mediaData, PaymentBackground.PaymentBackgroundType type) extends Record implements it.auties.protobuf.model.ProtobufMessage
  • Field Details

    • id

      private final String id
      The field for the id record component.
    • mediaSize

      private final long mediaSize
      The field for the mediaSize record component.
    • width

      private final int width
      The field for the width record component.
    • height

      private final int height
      The field for the height record component.
    • mimetype

      private final String mimetype
      The field for the mimetype record component.
    • placeholderArgb

      private final int placeholderArgb
      The field for the placeholderArgb record component.
    • textArgb

      private final int textArgb
      The field for the textArgb record component.
    • subtextArgb

      private final int subtextArgb
      The field for the subtextArgb record component.
    • mediaData

      private final Optional<PaymentMediaData> mediaData
      The field for the mediaData record component.
    • type

      The field for the type record component.
  • Constructor Details

    • PaymentBackground

      public PaymentBackground(String id, long mediaSize, int width, int height, String mimetype, int placeholderArgb, int textArgb, int subtextArgb, Optional<PaymentMediaData> mediaData, PaymentBackground.PaymentBackgroundType type)
      Creates an instance of a PaymentBackground record class.
      Parameters:
      id - the value for the id record component
      mediaSize - the value for the mediaSize record component
      width - the value for the width record component
      height - the value for the height record component
      mimetype - the value for the mimetype record component
      placeholderArgb - the value for the placeholderArgb record component
      textArgb - the value for the textArgb record component
      subtextArgb - the value for the subtextArgb record component
      mediaData - the value for the mediaData record component
      type - the value for the type 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • mediaSize

      public long mediaSize()
      Returns the value of the mediaSize record component.
      Returns:
      the value of the mediaSize record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • mimetype

      public String mimetype()
      Returns the value of the mimetype record component.
      Returns:
      the value of the mimetype record component
    • placeholderArgb

      public int placeholderArgb()
      Returns the value of the placeholderArgb record component.
      Returns:
      the value of the placeholderArgb record component
    • textArgb

      public int textArgb()
      Returns the value of the textArgb record component.
      Returns:
      the value of the textArgb record component
    • subtextArgb

      public int subtextArgb()
      Returns the value of the subtextArgb record component.
      Returns:
      the value of the subtextArgb record component
    • mediaData

      public Optional<PaymentMediaData> mediaData()
      Returns the value of the mediaData record component.
      Returns:
      the value of the mediaData record component
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component