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

namespace MyTelegram.Schema.Stats;

///<summary>
/// Fetch <a href="https://corefork.telegram.org/api/revenue">channel ad revenue transaction history »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHANNEL_INVALID The provided channel is invalid.
/// See <a href="https://corefork.telegram.org/method/stats.getBroadcastRevenueTransactions" />
///</summary>
[TlObject(0x70990b6d)]
public sealed class RequestGetBroadcastRevenueTransactions : IRequest<MyTelegram.Schema.Stats.IBroadcastRevenueTransactions>
{
    public uint ConstructorId => 0x70990b6d;
    ///<summary>
    /// Get ad revenue transactions for the specified channel or bot
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/offsets">Offset for pagination</a>
    ///</summary>
    public int Offset { get; set; }

    ///<summary>
    /// Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a>
    ///</summary>
    public int Limit { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Peer);
        writer.Write(Offset);
        writer.Write(Limit);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IInputPeer>();
        Offset = buffer.ReadInt32();
        Limit = buffer.ReadInt32();
    }
}
