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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theheightrecord component.private final StringThe field for theidrecord component.private final Optional<PaymentMediaData> The field for themediaDatarecord component.private final longThe field for themediaSizerecord component.private final StringThe field for themimetyperecord component.private final intThe field for theplaceholderArgbrecord component.private final intThe field for thesubtextArgbrecord component.private final intThe field for thetextArgbrecord component.private final PaymentBackground.PaymentBackgroundTypeThe field for thetyperecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPaymentBackground(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 aPaymentBackgroundrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.id()Returns the value of theidrecord component.Returns the value of themediaDatarecord component.longReturns the value of themediaSizerecord component.mimetype()Returns the value of themimetyperecord component.intReturns the value of theplaceholderArgbrecord component.intReturns the value of thesubtextArgbrecord component.inttextArgb()Returns the value of thetextArgbrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
id
The field for theidrecord component. -
mediaSize
private final long mediaSizeThe field for themediaSizerecord component. -
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
mimetype
The field for themimetyperecord component. -
placeholderArgb
private final int placeholderArgbThe field for theplaceholderArgbrecord component. -
textArgb
private final int textArgbThe field for thetextArgbrecord component. -
subtextArgb
private final int subtextArgbThe field for thesubtextArgbrecord component. -
mediaData
The field for themediaDatarecord component. -
type
The field for thetyperecord 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 aPaymentBackgroundrecord class.- Parameters:
id- the value for theidrecord componentmediaSize- the value for themediaSizerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentmimetype- the value for themimetyperecord componentplaceholderArgb- the value for theplaceholderArgbrecord componenttextArgb- the value for thetextArgbrecord componentsubtextArgb- the value for thesubtextArgbrecord componentmediaData- the value for themediaDatarecord componenttype- the value for thetyperecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
mediaSize
public long mediaSize()Returns the value of themediaSizerecord component.- Returns:
- the value of the
mediaSizerecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
mimetype
Returns the value of themimetyperecord component.- Returns:
- the value of the
mimetyperecord component
-
placeholderArgb
public int placeholderArgb()Returns the value of theplaceholderArgbrecord component.- Returns:
- the value of the
placeholderArgbrecord component
-
textArgb
public int textArgb()Returns the value of thetextArgbrecord component.- Returns:
- the value of the
textArgbrecord component
-
subtextArgb
public int subtextArgb()Returns the value of thesubtextArgbrecord component.- Returns:
- the value of the
subtextArgbrecord component
-
mediaData
Returns the value of themediaDatarecord component.- Returns:
- the value of the
mediaDatarecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-