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

namespace MyTelegram.Schema;

///<summary>
/// A new <a href="https://corefork.telegram.org/api/revenue#revenue-statistics">channel ad revenue transaction was made, see here »</a> for more info.
/// See <a href="https://corefork.telegram.org/constructor/updateBroadcastRevenueTransactions" />
///</summary>
[TlObject(0xdfd961f5)]
public sealed class TUpdateBroadcastRevenueTransactions : IUpdate
{
    public uint ConstructorId => 0xdfd961f5;
    ///<summary>
    /// Channel
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// New ad revenue balance.
    /// See <a href="https://corefork.telegram.org/type/BroadcastRevenueBalances" />
    ///</summary>
    public MyTelegram.Schema.IBroadcastRevenueBalances Balances { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IPeer>();
        Balances = buffer.Read<MyTelegram.Schema.IBroadcastRevenueBalances>();
    }
}