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

namespace MyTelegram.Schema.Account;

///<summary>
/// Installed themes
/// See <a href="https://corefork.telegram.org/constructor/account.themes" />
///</summary>
[TlObject(0x9a3d8c6d)]
public sealed class TThemes : IThemes
{
    public uint ConstructorId => 0x9a3d8c6d;
    ///<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>
    /// Themes
    ///</summary>
    public TVector<MyTelegram.Schema.ITheme> Themes { get; set; }

    public void ComputeFlag()
    {

    }

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

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