Record Class InputMediaDTO
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.dto.InputMediaDTO
- Record Components:
type- the type of the mediainputFile- the input file associated with the media
Data Transfer Object for input media used in Telegram.
It can represent different types of media such as animation, photo, or video.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTypes of media that can be represented in anInputMediaDTO. -
Constructor Summary
ConstructorsConstructorDescriptionInputMediaDTO(InputMediaDTO.Type type, InputFileDTO inputFile) Creates an instance of aInputMediaDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputMediaDTOanimation(InputFileDTO animation) Creates anInputMediaDTOfor an animation.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 theinputFilerecord component.static InputMediaDTOphoto(InputFileDTO photo) Creates anInputMediaDTOfor a photo.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
animation
Creates anInputMediaDTOfor an animation.- Parameters:
animation- the input file representing the animation- Returns:
- a new
InputMediaDTOinstance for the animation
-
photo
Creates anInputMediaDTOfor a photo.- Parameters:
photo- the input file representing the photo- Returns:
- a new
InputMediaDTOinstance for the photo
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
inputFile
Returns the value of theinputFilerecord component.- Returns:
- the value of the
inputFilerecord component
-