Module it.auties.cobalt
Record Class InteractiveCollection
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.interactive.InteractiveCollection
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,InteractiveMessageContent
public record InteractiveCollection(Jid business, String id, int version)
extends Record
implements InteractiveMessageContent
A model class that represents a business collection
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.message.button.InteractiveMessageContent
InteractiveMessageContent.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInteractiveCollection(Jid business, String id, int version) Creates an instance of aInteractiveCollectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbusiness()Returns the value of thebusinessrecord component.Returns 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.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Field Details
-
business
The field for thebusinessrecord component. -
id
The field for theidrecord component. -
version
private final int versionThe field for theversionrecord component.
-
-
Constructor Details
-
InteractiveCollection
Creates an instance of aInteractiveCollectionrecord class.- Parameters:
business- the value for thebusinessrecord componentid- the value for theidrecord 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 '=='. -
business
Returns the value of thebusinessrecord component.- Returns:
- the value of the
businessrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-