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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Saved gifs
/// See <a href="https://corefork.telegram.org/constructor/messages.savedGifs" />
///</summary>
[TlObject(0x84a02a0d)]
public sealed class TSavedGifs : ISavedGifs
{
    public uint ConstructorId => 0x84a02a0d;
    ///<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>
    /// List of saved gifs
    ///</summary>
    public TVector<MyTelegram.Schema.IDocument> Gifs { get; set; }

    public void ComputeFlag()
    {

    }

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

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