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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Highscores in a game
/// See <a href="https://corefork.telegram.org/constructor/messages.highScores" />
///</summary>
[TlObject(0x9a3bfd99)]
public sealed class THighScores : IHighScores
{
    public uint ConstructorId => 0x9a3bfd99;
    ///<summary>
    /// Highscores
    ///</summary>
    public TVector<MyTelegram.Schema.IHighScore> Scores { get; set; }

    ///<summary>
    /// Users, associated to the highscores
    ///</summary>
    public TVector<MyTelegram.Schema.IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Scores = buffer.Read<TVector<MyTelegram.Schema.IHighScore>>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}