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

namespace MyTelegram.Schema.Channels.LayerN;

///<summary>
/// Represents multiple channel participants
/// See <a href="https://corefork.telegram.org/constructor/channels.channelParticipants" />
///</summary>
[TlObject(0xf56ee2a8)]
public sealed class TChannelParticipants : IObject
{
    public uint ConstructorId => 0xf56ee2a8;
    ///<summary>
    /// Total number of participants that correspond to the given query
    ///</summary>
    public int Count { get; set; }

    ///<summary>
    /// Participants
    ///</summary>
    public TVector<MyTelegram.Schema.IChannelParticipant> Participants { get; set; }

    ///<summary>
    /// Users mentioned in participant info
    ///</summary>
    public TVector<IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Count);
        writer.Write(Participants);
        writer.Write(Users);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Count = buffer.ReadInt32();
        Participants = buffer.Read<TVector<MyTelegram.Schema.IChannelParticipant>>();
        Users = buffer.Read<TVector<IUser>>();
    }
}