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

namespace MyTelegram.Schema;

///<summary>
/// The <a href="https://corefork.telegram.org/api/stars#revenue-statistics">Telegram Star balance of a channel/bot we own has changed »</a>.
/// See <a href="https://corefork.telegram.org/constructor/updateStarsRevenueStatus" />
///</summary>
[TlObject(0xa584b019)]
public sealed class TUpdateStarsRevenueStatus : IUpdate
{
    public uint ConstructorId => 0xa584b019;
    ///<summary>
    /// Channel/bot
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// New Telegram Star balance.
    /// See <a href="https://corefork.telegram.org/type/StarsRevenueStatus" />
    ///</summary>
    public MyTelegram.Schema.IStarsRevenueStatus Status { get; set; }

    public void ComputeFlag()
    {

    }

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

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