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

namespace MyTelegram.Schema;

///<summary>
/// Group members.
/// See <a href="https://corefork.telegram.org/constructor/chatParticipants" />
///</summary>
[TlObject(0x3cbc93f8)]
public sealed class TChatParticipants : IChatParticipants
{
    public uint ConstructorId => 0x3cbc93f8;
    ///<summary>
    /// Group identifier
    ///</summary>
    public long ChatId { get; set; }

    ///<summary>
    /// List of group members
    ///</summary>
    public TVector<MyTelegram.Schema.IChatParticipant> Participants { get; set; }

    ///<summary>
    /// Group version number
    ///</summary>
    public int Version { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        ChatId = buffer.ReadInt64();
        Participants = buffer.Read<TVector<MyTelegram.Schema.IChatParticipant>>();
        Version = buffer.ReadInt32();
    }
}