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

namespace MyTelegram.Schema;

///<summary>
/// Page caption
/// See <a href="https://corefork.telegram.org/constructor/pageCaption" />
///</summary>
[TlObject(0x6f747657)]
public sealed class TPageCaption : IPageCaption
{
    public uint ConstructorId => 0x6f747657;
    ///<summary>
    /// Caption
    /// See <a href="https://corefork.telegram.org/type/RichText" />
    ///</summary>
    public MyTelegram.Schema.IRichText Text { get; set; }

    ///<summary>
    /// Credits
    /// See <a href="https://corefork.telegram.org/type/RichText" />
    ///</summary>
    public MyTelegram.Schema.IRichText Credit { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Text = buffer.Read<MyTelegram.Schema.IRichText>();
        Credit = buffer.Read<MyTelegram.Schema.IRichText>();
    }
}