Record Class MessageEntity
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.MessageEntity
- All Implemented Interfaces:
Serializable,ApiResult
public record MessageEntity(String type, int offset, int length, @Nullable String url, @Nullable User user, @Nullable String language, @Nullable String customEmojiId)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thecustomEmojiIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringlanguage()Returns the value of thelanguagerecord component.intlength()Returns the value of thelengthrecord component.static @NotNull lombok.Builderintoffset()Returns the value of theoffsetrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.@Nullable Stringurl()Returns the value of theurlrecord component.@Nullable Useruser()Returns the value of theuserrecord component.
-
Constructor Details
-
MessageEntity
public MessageEntity(String type, int offset, int length, @Nullable @Nullable String url, @Nullable @Nullable User user, @Nullable @Nullable String language, @Nullable @Nullable String customEmojiId) Creates an instance of aMessageEntityrecord class.- Parameters:
type- the value for thetyperecord componentoffset- the value for theoffsetrecord componentlength- the value for thelengthrecord componenturl- the value for theurlrecord componentuser- the value for theuserrecord componentlanguage- the value for thelanguagerecord componentcustomEmojiId- the value for thecustomEmojiIdrecord component
-
-
Method Details
-
ofBuilder
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
customEmojiId
Returns the value of thecustomEmojiIdrecord component.- Returns:
- the value of the
customEmojiIdrecord component
-