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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Report a <a href="https://corefork.telegram.org/api/sponsored-messages">sponsored message »</a>, see <a href="https://corefork.telegram.org/api/sponsored-messages#reporting-sponsored-messages">here »</a> for more info on the full flow.
/// See <a href="https://corefork.telegram.org/method/messages.reportSponsoredMessage" />
///</summary>
[TlObject(0x12cbf0c4)]
public sealed class RequestReportSponsoredMessage : IRequest<MyTelegram.Schema.Channels.ISponsoredMessageReportResult>
{
    public uint ConstructorId => 0x12cbf0c4;
    ///<summary>
    /// The ad's unique ID.
    ///</summary>
    public ReadOnlyMemory<byte> RandomId { get; set; }

    ///<summary>
    /// Chosen report option, initially an empty string, see <a href="https://corefork.telegram.org/api/sponsored-messages#reporting-sponsored-messages">here »</a> for more info on the full flow.
    ///</summary>
    public ReadOnlyMemory<byte> Option { get; set; }

    public void ComputeFlag()
    {

    }

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

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