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

namespace MyTelegram.Schema;

///<summary>
/// Invokes a query after successful completion of one of the previous queries.
/// See <a href="https://corefork.telegram.org/method/invokeAfterMsg" />
///</summary>
[TlObject(0xcb9f372d)]
public sealed class RequestInvokeAfterMsg : IRequest<IObject>, IHasSubQuery
{
    public uint ConstructorId => 0xcb9f372d;
    ///<summary>
    /// Message identifier on which a current query depends
    ///</summary>
    public long MsgId { get; set; }

    ///<summary>
    /// The query itself
    ///</summary>
    public IObject Query { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        MsgId = buffer.ReadInt64();
        Query = buffer.Read<IObject>();
    }
}
