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

namespace MyTelegram.Schema.Contacts;

///<summary>
/// Reset <a href="https://corefork.telegram.org/api/top-rating">rating</a> of top peer
/// <para>Possible errors</para>
/// Code Type Description
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/contacts.resetTopPeerRating" />
///</summary>
[TlObject(0x1ae373ac)]
public sealed class RequestResetTopPeerRating : IRequest<IBool>
{
    public uint ConstructorId => 0x1ae373ac;
    ///<summary>
    /// Top peer category
    /// See <a href="https://corefork.telegram.org/type/TopPeerCategory" />
    ///</summary>
    public MyTelegram.Schema.ITopPeerCategory Category { get; set; }

    ///<summary>
    /// Peer whose rating should be reset
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Category = buffer.Read<MyTelegram.Schema.ITopPeerCategory>();
        Peer = buffer.Read<MyTelegram.Schema.IInputPeer>();
    }
}
