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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Fetch one or more <a href="https://corefork.telegram.org/api/factcheck">factchecks, see here »</a> for the full flow.
/// <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/messages.getFactCheck" />
///</summary>
[TlObject(0xb9cdc5ee)]
public sealed class RequestGetFactCheck : IRequest<TVector<MyTelegram.Schema.IFactCheck>>
{
    public uint ConstructorId => 0xb9cdc5ee;
    ///<summary>
    /// Peer where the messages were sent.
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// Messages that have associated <a href="https://corefork.telegram.org/constructor/factCheck">factCheck</a> constructors with the <code>need_check</code> flag set.
    ///</summary>
    public TVector<int> MsgId { get; set; }

    public void ComputeFlag()
    {

    }

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

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