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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Info about the users that joined the chat using a specific chat invite
/// See <a href="https://corefork.telegram.org/constructor/messages.chatInviteImporters" />
///</summary>
[TlObject(0x81b6b00a)]
public sealed class TChatInviteImporters : IChatInviteImporters
{
    public uint ConstructorId => 0x81b6b00a;
    ///<summary>
    /// Number of users that joined
    ///</summary>
    public int Count { get; set; }

    ///<summary>
    /// The users that joined
    ///</summary>
    public TVector<MyTelegram.Schema.IChatInviteImporter> Importers { get; set; }

    ///<summary>
    /// The users that joined
    ///</summary>
    public TVector<MyTelegram.Schema.IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Count = buffer.ReadInt32();
        Importers = buffer.Read<TVector<MyTelegram.Schema.IChatInviteImporter>>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}