Record Class SendPhotoDTO
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.core.dto.SendPhotoDTO
- Record Components:
photo- the photo to sendcaption- the caption of the photohasSpoiler- whether the photo has a spoiler
- All Implemented Interfaces:
Closeable, AutoCloseable
public record SendPhotoDTO(InputFileDTO photo, String caption, Boolean hasSpoiler)
extends Record
implements Closeable
DTO for sending a photo message.
-
Constructor Summary
ConstructorsConstructorDescriptionSendPhotoDTO(InputFileDTO photo, String caption, Boolean hasSpoiler) Creates an instance of aSendPhotoDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaption()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.Returns the value of thehasSpoilerrecord component.photo()Returns the value of thephotorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SendPhotoDTO
Creates an instance of aSendPhotoDTOrecord class.- Parameters:
photo- the value for thephotorecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
photo
-
caption
-
hasSpoiler
Returns the value of thehasSpoilerrecord component.- Returns:
- the value of the
hasSpoilerrecord component
-