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

namespace MyTelegram.Schema.Contacts;

///<summary>
/// Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.Use <a href="https://corefork.telegram.org/method/contacts.addContact">contacts.addContact</a> to add Telegram contacts without actually using their phone number.
/// See <a href="https://corefork.telegram.org/method/contacts.importContacts" />
///</summary>
[TlObject(0x2c800be5)]
public sealed class RequestImportContacts : IRequest<MyTelegram.Schema.Contacts.IImportedContacts>
{
    public uint ConstructorId => 0x2c800be5;
    ///<summary>
    /// List of contacts to import
    ///</summary>
    public TVector<MyTelegram.Schema.IInputContact> Contacts { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Contacts = buffer.Read<TVector<MyTelegram.Schema.IInputContact>>();
    }
}
