All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.telegram.api.page.TLPageFull Maven / Gradle / Ivy

There is a newer version: 66.2
Show newest version
package org.telegram.api.page;

import org.telegram.api.document.TLAbsDocument;
import org.telegram.api.page.block.TLAbsPageBlock;
import org.telegram.api.photo.TLAbsPhoto;
import org.telegram.tl.StreamingUtils;
import org.telegram.tl.TLContext;
import org.telegram.tl.TLObject;
import org.telegram.tl.TLVector;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * @author Ruben Bermudez
 * @version 1.0
 */
public class TLPageFull extends TLAbsPage {
    public static final int CLASS_ID = 0xd7a19d69;

    private TLVector blocks;
    private TLVector photos;
    private TLVector videos;

    public TLPageFull() {
        super();
    }

    @Override
    public int getClassId() {
        return CLASS_ID;
    }

    public TLVector getBlocks() {
        return blocks;
    }

    public TLVector getPhotos() {
        return photos;
    }

    public TLVector getVideos() {
        return videos;
    }

    @Override
    public void serializeBody(OutputStream stream) throws IOException {
        StreamingUtils.writeTLVector(blocks, stream);
        StreamingUtils.writeTLVector(photos, stream);
        StreamingUtils.writeTLVector(videos, stream);
    }

    @Override
    public void deserializeBody(InputStream stream, TLContext context) throws IOException {
        blocks = StreamingUtils.readTLVector(stream, context, TLAbsPageBlock.class);
        photos = StreamingUtils.readTLVector(stream, context, TLAbsPhoto.class);
        videos = StreamingUtils.readTLVector(stream, context, TLAbsDocument.class);
    }

    @Override
    public String toString() {
        return "pageFull#d7a19d69";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy