Record Class InputMediaAnimation
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.InputMediaAnimation
- All Implemented Interfaces:
Serializable,ApiResult,InputMedia
public record InputMediaAnimation(@NotNull InputFile media, @Nullable InputFile thumbnail, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, boolean showCaptionAboveMedia, int width, int height, int duration, boolean hasSpoiler)
extends Record
implements InputMedia
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.InputMedia
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionInputMediaAnimation(@NotNull InputFile media, @Nullable InputFile thumbnail, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, boolean showCaptionAboveMedia, int width, int height, int duration, boolean hasSpoiler) Creates an instance of aInputMediaAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringcaption()Returns the value of thecaptionrecord component.@Nullable MessageEntity[]Returns the value of thecaptionEntitiesrecord component.intduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasSpoilerrecord component.intheight()Returns the value of theheightrecord component.@NotNull InputFilemedia()Returns the value of themediarecord component.static @NotNull lombok.Builder@Nullable ParseModeReturns the value of theparseModerecord component.booleanReturns the value of theshowCaptionAboveMediarecord component.@Nullable InputFileReturns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.type()intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
InputMediaAnimation
public InputMediaAnimation(@NotNull @NotNull InputFile media, @Nullable @Nullable InputFile thumbnail, @Nullable @Nullable String caption, @Nullable @Nullable ParseMode parseMode, @Nullable @Nullable MessageEntity[] captionEntities, boolean showCaptionAboveMedia, int width, int height, int duration, boolean hasSpoiler) Creates an instance of aInputMediaAnimationrecord class.- Parameters:
media- the value for themediarecord componentthumbnail- the value for thethumbnailrecord componentcaption- the value for thecaptionrecord componentparseMode- the value for theparseModerecord componentcaptionEntities- the value for thecaptionEntitiesrecord componentshowCaptionAboveMedia- the value for theshowCaptionAboveMediarecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentduration- the value for thedurationrecord componenthasSpoiler- the value for thehasSpoilerrecord component
-
-
Method Details
-
ofBuilder
-
type
- Specified by:
typein interfaceInputMedia
-
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 '=='. -
media
Returns the value of themediarecord component.- Returns:
- the value of the
mediarecord 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
-
parseMode
Returns the value of theparseModerecord component.- Returns:
- the value of the
parseModerecord component
-
captionEntities
Returns the value of thecaptionEntitiesrecord component.- Returns:
- the value of the
captionEntitiesrecord component
-
showCaptionAboveMedia
public boolean showCaptionAboveMedia()Returns the value of theshowCaptionAboveMediarecord component.- Returns:
- the value of the
showCaptionAboveMediarecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
hasSpoiler
public boolean hasSpoiler()Returns the value of thehasSpoilerrecord component.- Returns:
- the value of the
hasSpoilerrecord component
-