org.telegram.api.channel.participants.TLChannelParticipant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegramapi Show documentation
Show all versions of telegramapi Show documentation
Java library to create Telegram Clients
package org.telegram.api.channel.participants;
import org.telegram.tl.StreamingUtils;
import org.telegram.tl.TLContext;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* @author Ruben Bermudez
* @version 1.0
* @brief Channel participant
* @date 18 of September of 2015
*/
public class TLChannelParticipant extends TLAbsChannelParticipant {
public static final int CLASS_ID = 0x15ebac1d;
private int userId;
private int date;
public TLChannelParticipant() {
super();
}
@Override
public int getClassId() {
return CLASS_ID;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getDate() {
return date;
}
public void setDate(int date) {
this.date = date;
}
@Override
public void serializeBody(OutputStream stream) throws IOException {
StreamingUtils.writeInt(userId, stream);
StreamingUtils.writeInt(date, stream);
}
@Override
public void deserializeBody(InputStream stream, TLContext context) throws IOException {
this.userId = StreamingUtils.readInt(stream);
this.date = StreamingUtils.readInt(stream);
}
@Override
public String toString() {
return "channel.participants.TLChannelParticipant#15ebac1d";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy