public class TLMessage extends TLAbsMessage
Modifier and Type | Field and Description |
---|---|
static int |
CLASS_ID
The constant CLASS_ID.
|
Constructor and Description |
---|
TLMessage()
Instantiates a new TL message.
|
Modifier and Type | Method and Description |
---|---|
void |
deserializeBody(InputStream stream,
TLContext context)
Deserializing object from stream and context
|
int |
getChatId() |
int |
getClassId()
Getting TL Class identification
|
int |
getDate()
Gets date.
|
int |
getEditDate() |
TLVector<TLAbsMessageEntity> |
getEntities() |
int |
getFlags()
Gets flags.
|
int |
getFromId()
Gets from id.
|
TLMessageFwdHeader |
getFwdFrom() |
int |
getId()
Gets id.
|
TLAbsMessageMedia |
getMedia()
Gets media.
|
String |
getMessage()
Gets message.
|
TLAbsReplyMarkup |
getReplyMarkup() |
int |
getReplyToMsgId()
Gets reply to msg id.
|
TLAbsPeer |
getToId()
Gets to id.
|
int |
getViaBotId() |
int |
getViews() |
boolean |
hasEntities() |
boolean |
hasFromId() |
boolean |
hasMedia()
Check if the message has any media content
|
boolean |
hasReplyKeyboard() |
boolean |
hasText()
Check if the message has text content
|
boolean |
isForwarded() |
boolean |
isMention() |
boolean |
isPost() |
boolean |
isReply() |
boolean |
isSent()
Is sent.
|
boolean |
isSilent() |
boolean |
isUnreadContent() |
void |
serializeBody(OutputStream stream)
Serializing object body to stream
|
void |
setDate(int date)
Sets date.
|
void |
setEditDate(int editDate) |
void |
setEntities(TLVector<TLAbsMessageEntity> entities) |
void |
setFlags(int flags)
Sets flags.
|
void |
setFromId(int fromId)
Sets from id.
|
void |
setFwdFrom(TLMessageFwdHeader fwdFrom) |
void |
setId(int id)
Sets id.
|
void |
setMedia(TLAbsMessageMedia media)
Sets media.
|
void |
setMessage(String message)
Sets message.
|
void |
setReplyMarkup(TLAbsReplyMarkup replyMarkup) |
void |
setReplyToMsgId(int replyToMsgId)
Sets reply to msg id.
|
void |
setToId(TLAbsPeer toId)
Sets to id.
|
void |
setViaBotId(int viaBotId) |
void |
setViews(int views) |
String |
toString()
Custom toString method
|
deserialize, serialize, serialize
public static final int CLASS_ID
public int getClassId()
TLObject
getClassId
in class TLObject
public int getId()
public void setId(int id)
id
- the idpublic TLAbsMessageMedia getMedia()
public void setMedia(TLAbsMessageMedia media)
media
- the mediapublic String getMessage()
public void setMessage(String message)
message
- the messagepublic int getDate()
public void setDate(int date)
date
- the datepublic int getFlags()
public void setFlags(int flags)
flags
- the flagspublic TLAbsPeer getToId()
public void setToId(TLAbsPeer toId)
toId
- the to idpublic int getChatId()
getChatId
in class TLAbsMessage
public int getFromId()
public void setFromId(int fromId)
fromId
- the from idpublic int getEditDate()
public void setEditDate(int editDate)
public int getReplyToMsgId()
public void setReplyToMsgId(int replyToMsgId)
replyToMsgId
- the reply to msg idpublic TLAbsReplyMarkup getReplyMarkup()
public void setReplyMarkup(TLAbsReplyMarkup replyMarkup)
public TLVector<TLAbsMessageEntity> getEntities()
public void setEntities(TLVector<TLAbsMessageEntity> entities)
public int getViews()
public void setViews(int views)
public boolean isPost()
public boolean isSilent()
public boolean isSent()
public boolean isMention()
public boolean isUnreadContent()
public boolean isForwarded()
public boolean isReply()
public boolean hasReplyKeyboard()
public boolean hasEntities()
public boolean hasText()
public boolean hasMedia()
public int getViaBotId()
public void setViaBotId(int viaBotId)
public TLMessageFwdHeader getFwdFrom()
public void setFwdFrom(TLMessageFwdHeader fwdFrom)
public boolean hasFromId()
public void serializeBody(OutputStream stream) throws IOException
TLObject
serializeBody
in class TLObject
stream
- destination streamIOException
public void deserializeBody(InputStream stream, TLContext context) throws IOException
TLObject
deserializeBody
in class TLObject
stream
- source streamcontext
- tl contextIOException
Copyright © 2016. All rights reserved.