// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema;

///<summary>
/// Information about an active admin in a supergroup
/// See <a href="https://corefork.telegram.org/constructor/statsGroupTopAdmin" />
///</summary>
[TlObject(0xd7584c87)]
public sealed class TStatsGroupTopAdmin : IStatsGroupTopAdmin
{
    public uint ConstructorId => 0xd7584c87;
    ///<summary>
    /// User ID
    ///</summary>
    public long UserId { get; set; }

    ///<summary>
    /// Number of deleted messages for <a href="https://corefork.telegram.org/api/stats">statistics</a> period in consideration
    ///</summary>
    public int Deleted { get; set; }

    ///<summary>
    /// Number of kicked users for <a href="https://corefork.telegram.org/api/stats">statistics</a> period in consideration
    ///</summary>
    public int Kicked { get; set; }

    ///<summary>
    /// Number of banned users for <a href="https://corefork.telegram.org/api/stats">statistics</a> period in consideration
    ///</summary>
    public int Banned { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(UserId);
        writer.Write(Deleted);
        writer.Write(Kicked);
        writer.Write(Banned);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        UserId = buffer.ReadInt64();
        Deleted = buffer.ReadInt32();
        Kicked = buffer.ReadInt32();
        Banned = buffer.ReadInt32();
    }
}