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

namespace MyTelegram.Schema;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/updateGroupCallChainBlocks" />
///</summary>
[TlObject(0xa477288f)]
public sealed class TUpdateGroupCallChainBlocks : IUpdate
{
    public uint ConstructorId => 0xa477288f;
    public MyTelegram.Schema.IInputGroupCall Call { get; set; }
    public int SubChainId { get; set; }
    public TVector<ReadOnlyMemory<byte>> Blocks { get; set; }
    public int NextOffset { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Call);
        writer.Write(SubChainId);
        writer.Write(Blocks);
        writer.Write(NextOffset);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Call = buffer.Read<MyTelegram.Schema.IInputGroupCall>();
        SubChainId = buffer.ReadInt32();
        Blocks = buffer.Read<TVector<ReadOnlyMemory<byte>>>();
        NextOffset = buffer.ReadInt32();
    }
}