Package com.jtelegram.api.message
Class Message<T>
- java.lang.Object
-
- com.jtelegram.api.message.Message<T>
-
- Direct Known Subclasses:
AnimationMessage
,CaptionableMessage
,ContactMessage
,GameMessage
,InvoiceMessage
,LocationMessage
,ServiceMessage
,StickerMessage
,SuccessfulPaymentMessage
,TextMessage
,VenueMessage
public abstract class Message<T> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Message.Deserializer
-
Constructor Summary
Constructors Constructor Description Message()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthorSignature()
CHANNEL FIELDS *Chat
getChat()
abstract T
getContent()
long
getDate()
long
getEditDate()
long
getForwardDate()
User
getForwardedFrom()
FORWARDING FIELDS *Chat
getForwardedFromChat()
int
getForwardedFromMessageId()
java.lang.String
getForwardSignature()
User
getFrom()
int
getMessageId()
Message
getReplyToMessage()
User
getSender()
DeleteMessage.DeleteMessageBuilder
toDeleteRequest()
Creates a request builder for deleting this message.EditMessageReplyMarkup.EditMessageReplyMarkupBuilder
toEditReplyMarkupRequest()
Creates a request builder for editing the reply markup of this message.ForwardMessage.ForwardMessageBuilder
toForwardRequest()
Creates a request builder for forwarding this message to another chat.java.lang.String
toString()
-
-
-
Method Detail
-
getContent
public abstract T getContent()
-
getSender
public User getSender()
-
toEditReplyMarkupRequest
public EditMessageReplyMarkup.EditMessageReplyMarkupBuilder toEditReplyMarkupRequest()
Creates a request builder for editing the reply markup of this message.- Returns:
- the request builder
-
toForwardRequest
public ForwardMessage.ForwardMessageBuilder toForwardRequest()
Creates a request builder for forwarding this message to another chat.- Returns:
- the request builder
-
toDeleteRequest
public DeleteMessage.DeleteMessageBuilder toDeleteRequest()
Creates a request builder for deleting this message.- Returns:
- the request builder
-
getMessageId
public int getMessageId()
-
getFrom
public User getFrom()
-
getDate
public long getDate()
-
getChat
public Chat getChat()
-
getReplyToMessage
public Message getReplyToMessage()
-
getEditDate
public long getEditDate()
-
getAuthorSignature
public java.lang.String getAuthorSignature()
CHANNEL FIELDS *
-
getForwardedFrom
public User getForwardedFrom()
FORWARDING FIELDS *
-
getForwardedFromChat
public Chat getForwardedFromChat()
-
getForwardedFromMessageId
public int getForwardedFromMessageId()
-
getForwardSignature
public java.lang.String getForwardSignature()
-
getForwardDate
public long getForwardDate()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-