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

namespace MyTelegram.Schema;

///<summary>
/// Invoke a method within a <a href="https://corefork.telegram.org/api/takeout">takeout session, see here » for more info</a>.
/// See <a href="https://corefork.telegram.org/method/invokeWithTakeout" />
///</summary>
[TlObject(0xaca9fd2e)]
public sealed class RequestInvokeWithTakeout : IRequest<IObject>, IHasSubQuery
{
    public uint ConstructorId => 0xaca9fd2e;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/takeout">Takeout session ID »</a>
    ///</summary>
    public long TakeoutId { get; set; }

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

    public void ComputeFlag()
    {

    }

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

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