Module it.auties.cobalt
Record Class InteractiveShop
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.interactive.InteractiveShop
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,InteractiveMessageContent
public record InteractiveShop(String id, InteractiveShop.SurfaceType surfaceType, int version)
extends Record
implements InteractiveMessageContent
A model class that represents a shop
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various types of surfaces that aInteractiveShopcan haveNested classes/interfaces inherited from interface it.auties.whatsapp.model.message.button.InteractiveMessageContent
InteractiveMessageContent.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theidrecord component.private final InteractiveShop.SurfaceTypeThe field for thesurfaceTyperecord component.private final intThe field for theversionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInteractiveShop(String id, InteractiveShop.SurfaceType surfaceType, int version) Creates an instance of aInteractiveShoprecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this contentfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesurfaceTyperecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Field Details
-
id
The field for theidrecord component. -
surfaceType
The field for thesurfaceTyperecord component. -
version
private final int versionThe field for theversionrecord component.
-
-
Constructor Details
-
InteractiveShop
Creates an instance of aInteractiveShoprecord class.- Parameters:
id- the value for theidrecord componentsurfaceType- the value for thesurfaceTyperecord componentversion- the value for theversionrecord component
-
-
Method Details
-
contentType
Description copied from interface:InteractiveMessageContentReturns the type of this content- Specified by:
contentTypein interfaceInteractiveMessageContent- Returns:
- a non-null type
-
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
-
surfaceType
Returns the value of thesurfaceTyperecord component.- Returns:
- the value of the
surfaceTyperecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-