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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Info about a chat invite
/// See <a href="https://corefork.telegram.org/constructor/messages.exportedChatInvite" />
///</summary>
[TlObject(0x1871be50)]
public sealed class TExportedChatInvite : IExportedChatInvite
{
    public uint ConstructorId => 0x1871be50;
    ///<summary>
    /// Info about the chat invite
    /// See <a href="https://corefork.telegram.org/type/ExportedChatInvite" />
    ///</summary>
    public MyTelegram.Schema.IExportedChatInvite Invite { get; set; }

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

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Invite = buffer.Read<MyTelegram.Schema.IExportedChatInvite>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}