Module it.auties.cobalt
Record Class GroupInviteMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.standard.GroupInviteMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ContextualMessage,Message
public record GroupInviteMessage(Jid group, String code, long expirationSeconds, String groupName, Optional<byte[]> thumbnail, Optional<String> caption, Optional<ContextInfo> contextInfo, GroupInviteMessage.Type groupType)
extends Record
implements ContextualMessage
A model class that represents a message holding a whatsapp group invite inside
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecaptionrecord component.private final StringThe field for thecoderecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final longThe field for theexpirationSecondsrecord component.private final JidThe field for thegrouprecord component.private final StringThe field for thegroupNamerecord component.private final GroupInviteMessage.TypeThe field for thegroupTyperecord component.private final Optional<byte[]> The field for thethumbnailrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGroupInviteMessage(Jid group, String code, long expirationSeconds, String groupName, Optional<byte[]> thumbnail, Optional<String> caption, Optional<ContextInfo> contextInfo, GroupInviteMessage.Type groupType) Creates an instance of aGroupInviteMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaption()Returns the value of thecaptionrecord component.category()Return message categorycode()Returns the value of thecoderecord component.Returns the value of thecontextInforecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpirationSecondsrecord component.group()Returns the value of thegrouprecord component.Returns the value of thegroupNamerecord component.Returns the value of thegroupTyperecord component.final inthashCode()Returns a hash code value for this object.Optional<byte[]> Returns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.type()Return message type
-
Field Details
-
group
The field for thegrouprecord component. -
code
The field for thecoderecord component. -
expirationSeconds
private final long expirationSecondsThe field for theexpirationSecondsrecord component. -
groupName
The field for thegroupNamerecord component. -
thumbnail
The field for thethumbnailrecord component. -
caption
The field for thecaptionrecord component. -
contextInfo
The field for thecontextInforecord component. -
groupType
The field for thegroupTyperecord component.
-
-
Constructor Details
-
GroupInviteMessage
public GroupInviteMessage(Jid group, String code, long expirationSeconds, String groupName, Optional<byte[]> thumbnail, Optional<String> caption, Optional<ContextInfo> contextInfo, GroupInviteMessage.Type groupType) Creates an instance of aGroupInviteMessagerecord class.- Parameters:
group- the value for thegrouprecord componentcode- the value for thecoderecord componentexpirationSeconds- the value for theexpirationSecondsrecord componentgroupName- the value for thegroupNamerecord componentthumbnail- the value for thethumbnailrecord componentcaption- the value for thecaptionrecord componentcontextInfo- the value for thecontextInforecord componentgroupType- the value for thegroupTyperecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message type -
category
Description copied from interface:MessageReturn message category -
expiration
-
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 '=='. -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
expirationSeconds
public long expirationSeconds()Returns the value of theexpirationSecondsrecord component.- Returns:
- the value of the
expirationSecondsrecord component
-
groupName
Returns the value of thegroupNamerecord component.- Returns:
- the value of the
groupNamerecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-
groupType
Returns the value of thegroupTyperecord component.- Returns:
- the value of the
groupTyperecord component
-