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

namespace MyTelegram.Schema;

///<summary>
/// Collage of media
/// See <a href="https://corefork.telegram.org/constructor/pageBlockCollage" />
///</summary>
[TlObject(0x65a0fa4d)]
public sealed class TPageBlockCollage : IPageBlock
{
    public uint ConstructorId => 0x65a0fa4d;
    ///<summary>
    /// Media elements
    ///</summary>
    public TVector<MyTelegram.Schema.IPageBlock> Items { get; set; }

    ///<summary>
    /// Caption
    /// See <a href="https://corefork.telegram.org/type/PageCaption" />
    ///</summary>
    public MyTelegram.Schema.IPageCaption Caption { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Items = buffer.Read<TVector<MyTelegram.Schema.IPageBlock>>();
        Caption = buffer.Read<MyTelegram.Schema.IPageCaption>();
    }
}