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

namespace MyTelegram.Schema;

///<summary>
/// Represents a list of <a href="https://corefork.telegram.org/api/custom-emoji">custom emojis</a>.
/// See <a href="https://corefork.telegram.org/constructor/emojiList" />
///</summary>
[TlObject(0x7a1e11d1)]
public sealed class TEmojiList : IEmojiList
{
    public uint ConstructorId => 0x7a1e11d1;
    ///<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>
    /// Custom emoji IDs
    ///</summary>
    public TVector<long> DocumentId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Hash = buffer.ReadInt64();
        DocumentId = buffer.Read<TVector<long>>();
    }
}