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

namespace MyTelegram.Schema;

///<summary>
/// Someone scored in a game
/// See <a href="https://corefork.telegram.org/constructor/messageActionGameScore" />
///</summary>
[TlObject(0x92a72876)]
public sealed class TMessageActionGameScore : IMessageAction
{
    public uint ConstructorId => 0x92a72876;
    ///<summary>
    /// Game ID
    ///</summary>
    public long GameId { get; set; }

    ///<summary>
    /// Score
    ///</summary>
    public int Score { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        GameId = buffer.ReadInt64();
        Score = buffer.ReadInt32();
    }
}