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

namespace MyTelegram.Schema;

///<summary>
/// A new member was accepted to the chat by an admin
/// See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionParticipantJoinByRequest" />
///</summary>
[TlObject(0xafb6144a)]
public sealed class TChannelAdminLogEventActionParticipantJoinByRequest : IChannelAdminLogEventAction
{
    public uint ConstructorId => 0xafb6144a;
    ///<summary>
    /// The invite link that was used to join the chat
    /// See <a href="https://corefork.telegram.org/type/ExportedChatInvite" />
    ///</summary>
    public MyTelegram.Schema.IExportedChatInvite Invite { get; set; }

    ///<summary>
    /// ID of the admin that approved the invite
    ///</summary>
    public long ApprovedBy { get; set; }

    public void ComputeFlag()
    {

    }

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

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