org.telegram.api.webpage.TLWebPagePending 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
The newest version!
/*
* This is the source code of bot v. 2.0
* It is licensed under GNU GPL v. 3 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Ruben Bermudez, 9/01/15.
*/
package org.telegram.api.webpage;
import org.telegram.tl.StreamingUtils;
import org.telegram.tl.TLContext;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* The type TL web page pending.
* @author Ruben Bermudez
* @version 2.0
* @brief TLWebPagePending
* @date 9 /01/15
*/
public class TLWebPagePending extends TLAbsWebPage {
/**
* The constant CLASS_ID.
*/
public static final int CLASS_ID = 0xc586da1c;
private long id;
private int date;
/**
* Instantiates a new TL web page pending.
*/
public TLWebPagePending() {
super();
}
@Override
public int getClassId() {
return CLASS_ID;
}
/**
* Gets id.
*
* @return the id
*/
public long getId() {
return this.id;
}
/**
* Sets id.
*
* @param id the id
*/
public void setId(long id) {
this.id = id;
}
/**
* Gets date.
*
* @return the date
*/
public int getDate() {
return this.date;
}
/**
* Sets date.
*
* @param date the date
*/
public void setDate(int date) {
this.date = date;
}
@Override
public void serializeBody(OutputStream stream)
throws IOException {
StreamingUtils.writeLong(this.id, stream);
StreamingUtils.writeInt(this.date, stream);
}
@Override
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.id = StreamingUtils.readLong(stream);
this.date = StreamingUtils.readInt(stream);
}
@Override
public String toString() {
return "webPagePending#c586da1c";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy