Record Class InputMediaPhotoDTO
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.core.dto.InputMediaPhotoDTO
- Record Components:
mediaStream- the input stream of the photo mediafileName- the name of the filehasSpoiler- indicates if the photo has a spoiler
- All Implemented Interfaces:
InputMediaDTO, Closeable, AutoCloseable
public record InputMediaPhotoDTO(InputStream mediaStream, String fileName, Boolean hasSpoiler)
extends Record
implements InputMediaDTO
DTO representing a photo media input.
-
Constructor Summary
ConstructorsConstructorDescriptionInputMediaPhotoDTO(InputStream mediaStream, String fileName, Boolean hasSpoiler) Creates an instance of aInputMediaPhotoDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehasSpoilerrecord component.Returns the value of themediaStreamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InputMediaPhotoDTO
Creates an instance of aInputMediaPhotoDTOrecord class.- Parameters:
mediaStream- the value for themediaStreamrecord componentfileName- the value for thefileNamerecord 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). -
mediaStream
Returns the value of themediaStreamrecord component.- Returns:
- the value of the
mediaStreamrecord component
-
fileName
-
hasSpoiler
Returns the value of thehasSpoilerrecord component.- Returns:
- the value of the
hasSpoilerrecord component
-