Record Class SendAnimationDTO
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.core.dto.SendAnimationDTO
- Record Components:
animation- the animation file to be sentcaption- the caption for the animationhasSpoiler- indicates if the animation has a spoiler
- All Implemented Interfaces:
Closeable, AutoCloseable
public record SendAnimationDTO(InputFileDTO animation, String caption, boolean hasSpoiler)
extends Record
implements Closeable
DTO for sending animation files via Telegram.
-
Constructor Summary
ConstructorsConstructorDescriptionSendAnimationDTO(InputFileDTO animation, String caption, boolean hasSpoiler) Creates an instance of aSendAnimationDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanimationrecord component.caption()Returns the value of thecaptionrecord component.voidclose()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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SendAnimationDTO
Creates an instance of aSendAnimationDTOrecord class.- Parameters:
animation- the value for theanimationrecord componentcaption- the value for thecaptionrecord componenthasSpoiler- the value for thehasSpoilerrecord component
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
animation
-
caption
-
hasSpoiler
public boolean hasSpoiler()Returns the value of thehasSpoilerrecord component.- Returns:
- the value of the
hasSpoilerrecord component
-