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

namespace MyTelegram.Schema.Contacts;

///<summary>
/// Enable/disable <a href="https://corefork.telegram.org/api/top-rating">top peers</a>
/// See <a href="https://corefork.telegram.org/method/contacts.toggleTopPeers" />
///</summary>
[TlObject(0x8514bdda)]
public sealed class RequestToggleTopPeers : IRequest<IBool>
{
    public uint ConstructorId => 0x8514bdda;
    ///<summary>
    /// Enable/disable
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Enabled { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Enabled = buffer.Read();
    }
}
