Record Class Game
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Game
- All Implemented Interfaces:
Serializable,ApiResult
public record Game(String title, String description, PhotoSize[] photo, @Nullable String text, @Nullable MessageEntity[] textEntities, @Nullable Animation animation)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable AnimationReturns the value of theanimationrecord 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.photo()Returns the value of thephotorecord component.@Nullable Stringtext()Returns the value of thetextrecord component.@Nullable MessageEntity[]Returns the value of thetextEntitiesrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Game
public Game(String title, String description, PhotoSize[] photo, @Nullable @Nullable String text, @Nullable @Nullable MessageEntity[] textEntities, @Nullable @Nullable Animation animation) Creates an instance of aGamerecord class.- Parameters:
title- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentphoto- the value for thephotorecord componenttext- the value for thetextrecord componenttextEntities- the value for thetextEntitiesrecord componentanimation- the value for theanimationrecord component
-
-
Method Details
-
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
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
photo
Returns the value of thephotorecord component.- Returns:
- the value of the
photorecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
textEntities
Returns the value of thetextEntitiesrecord component.- Returns:
- the value of the
textEntitiesrecord component
-
animation
Returns the value of theanimationrecord component.- Returns:
- the value of the
animationrecord component
-