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

namespace MyTelegram.Schema.Messages;

///<summary>
/// See <a href="https://corefork.telegram.org/method/messages.readSavedHistory" />
///</summary>
[TlObject(0xba4a3b5b)]
public sealed class RequestReadSavedHistory : IRequest<IBool>
{
    public uint ConstructorId => 0xba4a3b5b;
    public MyTelegram.Schema.IInputPeer ParentPeer { get; set; }
    public MyTelegram.Schema.IInputPeer Peer { get; set; }
    public int MaxId { get; set; }

    public void ComputeFlag()
    {

    }

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

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