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

namespace MyTelegram.Schema;

///<summary>
/// A <a href="https://corefork.telegram.org/api/sponsored-messages#reporting-sponsored-messages">report option for a sponsored message »</a>.
/// See <a href="https://corefork.telegram.org/constructor/sponsoredMessageReportOption" />
///</summary>
[TlObject(0x430d3150)]
public sealed class TSponsoredMessageReportOption : ISponsoredMessageReportOption
{
    public uint ConstructorId => 0x430d3150;
    ///<summary>
    /// Localized description of the option.
    ///</summary>
    public string Text { get; set; }

    ///<summary>
    /// Option identifier to pass to <a href="https://corefork.telegram.org/method/channels.reportSponsoredMessage">channels.reportSponsoredMessage</a>.
    ///</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();
    }
}