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

namespace MyTelegram.Schema;

///<summary>
/// The participant list of a certain group call has changed
/// See <a href="https://corefork.telegram.org/constructor/updateGroupCallParticipants" />
///</summary>
[TlObject(0xf2ebdb4e)]
public sealed class TUpdateGroupCallParticipants : IUpdate
{
    public uint ConstructorId => 0xf2ebdb4e;
    ///<summary>
    /// Group call
    /// See <a href="https://corefork.telegram.org/type/InputGroupCall" />
    ///</summary>
    public MyTelegram.Schema.IInputGroupCall Call { get; set; }

    ///<summary>
    /// New participant list
    ///</summary>
    public TVector<MyTelegram.Schema.IGroupCallParticipant> Participants { get; set; }

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

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Call = buffer.Read<MyTelegram.Schema.IInputGroupCall>();
        Participants = buffer.Read<TVector<MyTelegram.Schema.IGroupCallParticipant>>();
        Version = buffer.ReadInt32();
    }
}