Record Class Chat
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Chat
- All Implemented Interfaces:
Serializable,ApiResult
public record Chat(String id, String type, @Nullable String title, @Nullable String username, @Nullable String firstName, @Nullable String lastName, boolean isForum, boolean isDirectMessages)
extends Record
implements ApiResult
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable StringReturns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanbooleanReturns the value of theisDirectMessagesrecord component.booleanisForum()Returns the value of theisForumrecord component.booleanisGroup()booleanbooleanisUser()@Nullable StringlastName()Returns the value of thelastNamerecord component.@Nullable Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.@Nullable Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
Chat
public Chat(String id, String type, @Nullable @Nullable String title, @Nullable @Nullable String username, @Nullable @Nullable String firstName, @Nullable @Nullable String lastName, boolean isForum, boolean isDirectMessages) Creates an instance of aChatrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componenttitle- the value for thetitlerecord componentusername- the value for theusernamerecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentisForum- the value for theisForumrecord componentisDirectMessages- the value for theisDirectMessagesrecord component
-
-
Method Details
-
isGroup
public boolean isGroup() -
isChannel
public boolean isChannel() -
isUser
public boolean isUser() -
isSuperGroup
public boolean isSuperGroup() -
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
isForum
public boolean isForum()Returns the value of theisForumrecord component.- Returns:
- the value of the
isForumrecord component
-
isDirectMessages
public boolean isDirectMessages()Returns the value of theisDirectMessagesrecord component.- Returns:
- the value of the
isDirectMessagesrecord component
-