Module it.auties.cobalt
Record Class ListResponseMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.button.ListResponseMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ButtonMessage,ButtonReplyMessage,ContextualMessage,Message
public record ListResponseMessage(String title, SingleSelectReplyButton reply, Optional<ContextInfo> contextInfo, Optional<String> description, ListResponseMessage.Type listType)
extends Record
implements ButtonReplyMessage
A model class that represents a message that contains a newsletters to a previous
ListMessage-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various types ofListMessage -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<ContextInfo> The field for thecontextInforecord component.The field for thedescriptionrecord component.private final ListResponseMessage.TypeThe field for thelistTyperecord component.private final SingleSelectReplyButtonThe field for thereplyrecord component.private final StringThe field for thetitlerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionListResponseMessage(String title, SingleSelectReplyButton reply, Optional<ContextInfo> contextInfo, Optional<String> description, ListResponseMessage.Type listType) Creates an instance of aListResponseMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextInforecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.listType()Returns the value of thelistTyperecord component.reply()Returns the value of thereplyrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.type()Return message typeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.ButtonMessage
category
-
Field Details
-
title
The field for thetitlerecord component. -
reply
The field for thereplyrecord component. -
contextInfo
The field for thecontextInforecord component. -
description
The field for thedescriptionrecord component. -
listType
The field for thelistTyperecord component.
-
-
Constructor Details
-
ListResponseMessage
public ListResponseMessage(String title, SingleSelectReplyButton reply, Optional<ContextInfo> contextInfo, Optional<String> description, ListResponseMessage.Type listType) Creates an instance of aListResponseMessagerecord class.- Parameters:
title- the value for thetitlerecord componentreply- the value for thereplyrecord componentcontextInfo- the value for thecontextInforecord componentdescription- the value for thedescriptionrecord componentlistType- the value for thelistTyperecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message 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. All components in this record class are compared withObjects::equals(Object,Object). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
reply
Returns the value of thereplyrecord component.- Returns:
- the value of the
replyrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
listType
Returns the value of thelistTyperecord component.- Returns:
- the value of the
listTyperecord component
-