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

namespace MyTelegram.Schema.Account;

///<summary>
/// A list of saved notification sounds
/// See <a href="https://corefork.telegram.org/constructor/account.savedRingtones" />
///</summary>
[TlObject(0xc1e92cc5)]
public sealed class TSavedRingtones : ISavedRingtones
{
    public uint ConstructorId => 0xc1e92cc5;
    ///<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>
    /// Saved notification sounds
    ///</summary>
    public TVector<MyTelegram.Schema.IDocument> Ringtones { get; set; }

    public void ComputeFlag()
    {

    }

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

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