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

namespace MyTelegram.Schema;

///<summary>
/// Report menu option
/// See <a href="https://corefork.telegram.org/constructor/messageReportOption" />
///</summary>
[TlObject(0x7903e3d9)]
public sealed class TMessageReportOption : IMessageReportOption
{
    public uint ConstructorId => 0x7903e3d9;
    ///<summary>
    /// Option title
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// Option identifier: if the user selects this option, re-invoke <a href="https://corefork.telegram.org/method/messages.report">messages.report</a>, passing this option to <code>option</code>
    ///</summary>
    public ReadOnlyMemory<byte> Option { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Text = buffer.ReadString();
        Option = buffer.ReadBytes();
    }
}