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

namespace MyTelegram.Schema;

///<summary>
/// Related articles
/// See <a href="https://corefork.telegram.org/constructor/pageBlockRelatedArticles" />
///</summary>
[TlObject(0x16115a96)]
public sealed class TPageBlockRelatedArticles : IPageBlock
{
    public uint ConstructorId => 0x16115a96;
    ///<summary>
    /// Title
    /// See <a href="https://corefork.telegram.org/type/RichText" />
    ///</summary>
    public MyTelegram.Schema.IRichText Title { get; set; }

    ///<summary>
    /// Related articles
    ///</summary>
    public TVector<MyTelegram.Schema.IPageRelatedArticle> Articles { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Title = buffer.Read<MyTelegram.Schema.IRichText>();
        Articles = buffer.Read<TVector<MyTelegram.Schema.IPageRelatedArticle>>();
    }
}