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

namespace MyTelegram.Schema;

///<summary>
/// Preformatted (<code>&lt;pre&gt;</code> text)
/// See <a href="https://corefork.telegram.org/constructor/pageBlockPreformatted" />
///</summary>
[TlObject(0xc070d93e)]
public sealed class TPageBlockPreformatted : IPageBlock
{
    public uint ConstructorId => 0xc070d93e;
    ///<summary>
    /// Text
    /// See <a href="https://corefork.telegram.org/type/RichText" />
    ///</summary>
    public MyTelegram.Schema.IRichText Text { get; set; }

    ///<summary>
    /// Programming language of preformatted text
    ///</summary>
    public string Language { get; set; }

    public void ComputeFlag()
    {

    }

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

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