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 aInteractiveCollection
record class. -
Method Summary
Modifier and TypeMethodDescriptionbusiness()
Returns the value of thebusiness
record component.Returns the type of this contentfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.int
version()
Returns the value of theversion
record component.
-
Field Details
-
business
The field for thebusiness
record component. -
id
The field for theid
record component. -
version
private final int versionThe field for theversion
record component.
-
-
Constructor Details
-
InteractiveCollection
Creates an instance of aInteractiveCollection
record class.- Parameters:
business
- the value for thebusiness
record componentid
- the value for theid
record componentversion
- the value for theversion
record component
-
-
Method Details
-
contentType
Description copied from interface:InteractiveMessageContent
Returns the type of this content- Specified by:
contentType
in 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 thebusiness
record component.- Returns:
- the value of the
business
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
version
public int version()Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-