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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Favorited stickers
/// See <a href="https://corefork.telegram.org/constructor/messages.favedStickers" />
///</summary>
[TlObject(0x2cb51097)]
public sealed class TFavedStickers : IFavedStickers
{
    public uint ConstructorId => 0x2cb51097;
    ///<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>
    /// Favorited stickers
    ///</summary>
    public TVector<MyTelegram.Schema.IDocument> Stickers { get; set; }

    public void ComputeFlag()
    {

    }

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

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