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

namespace MyTelegram.Schema;

///<summary>
/// Ordered list of <a href="https://instantview.telegram.org/">IV</a> blocks
/// See <a href="https://corefork.telegram.org/constructor/pageListOrderedItemBlocks" />
///</summary>
[TlObject(0x98dd8936)]
public sealed class TPageListOrderedItemBlocks : IPageListOrderedItem
{
    public uint ConstructorId => 0x98dd8936;
    ///<summary>
    /// Number of element within ordered list
    ///</summary>
    public string Num { get; set; }

    ///<summary>
    /// Item contents
    ///</summary>
    public TVector<MyTelegram.Schema.IPageBlock> Blocks { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Num = buffer.ReadString();
        Blocks = buffer.Read<TVector<MyTelegram.Schema.IPageBlock>>();
    }
}