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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Obtains information about a chat export file, generated by a foreign chat app, <a href="https://corefork.telegram.org/api/import">click here for more info about imported chats »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
/// See <a href="https://corefork.telegram.org/method/messages.checkHistoryImport" />
///</summary>
[TlObject(0x43fe19f3)]
public sealed class RequestCheckHistoryImport : IRequest<MyTelegram.Schema.Messages.IHistoryImportParsed>
{
    public uint ConstructorId => 0x43fe19f3;
    ///<summary>
    /// Beginning of the message file; up to 100 lines.
    ///</summary>
    public string ImportHead { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        ImportHead = buffer.ReadString();
    }
}
