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

org.telegram.api.channel.TLChannelParticipant Maven / Gradle / Ivy

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

import org.telegram.api.channel.participants.TLAbsChannelParticipant;
import org.telegram.api.user.TLAbsUser;
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
 * @brief Channel participants
 * @date 24 of September of 2015
 */
public class TLChannelParticipant extends TLObject {
    public static final int CLASS_ID = 0xd0d9b163;

    private TLAbsChannelParticipant participant;
    private TLVector users;

    public TLChannelParticipant() {
        super();
    }

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

    public TLVector getUsers() {
        return users;
    }

    public void setUsers(TLVector users) {
        this.users = users;
    }

    public TLAbsChannelParticipant getParticipant() {
        return participant;
    }

    public void setParticipant(TLAbsChannelParticipant participant) {
        this.participant = participant;
    }

    @Override
    public void serializeBody(OutputStream stream) throws IOException {
        StreamingUtils.writeTLObject(participant, stream);
        StreamingUtils.writeTLVector(users, stream);
    }

    @Override
    public void deserializeBody(InputStream stream, TLContext context) throws IOException {
        this.participant = (TLAbsChannelParticipant) StreamingUtils.readTLObject(stream, context);
        this.users = (TLVector) StreamingUtils.readTLVector(stream, context);
    }

    @Override
    public String toString() {
        return "channel.TLChannelParticipant#d0d9b163";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy