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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Recently used stickers
/// See <a href="https://corefork.telegram.org/constructor/messages.recentStickers" />
///</summary>
[TlObject(0x88d37c56)]
public sealed class TRecentStickers : IRecentStickers
{
    public uint ConstructorId => 0x88d37c56;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash used for caching, for more info click here</a>
    ///</summary>
    public long Hash { get; set; }

    ///<summary>
    /// Emojis associated to stickers
    ///</summary>
    public TVector<MyTelegram.Schema.IStickerPack> Packs { get; set; }

    ///<summary>
    /// Recent stickers
    ///</summary>
    public TVector<MyTelegram.Schema.IDocument> Stickers { get; set; }

    ///<summary>
    /// When was each sticker last used
    ///</summary>
    public TVector<int> Dates { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Hash);
        writer.Write(Packs);
        writer.Write(Stickers);
        writer.Write(Dates);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Hash = buffer.ReadInt64();
        Packs = buffer.Read<TVector<MyTelegram.Schema.IStickerPack>>();
        Stickers = buffer.Read<TVector<MyTelegram.Schema.IDocument>>();
        Dates = buffer.Read<TVector<int>>();
    }
}