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

namespace MyTelegram.Schema.Channels;

///<summary>
/// Admin log events
/// See <a href="https://corefork.telegram.org/constructor/channels.adminLogResults" />
///</summary>
[TlObject(0xed8af74d)]
public sealed class TAdminLogResults : IAdminLogResults
{
    public uint ConstructorId => 0xed8af74d;
    ///<summary>
    /// Admin log events
    ///</summary>
    public TVector<MyTelegram.Schema.IChannelAdminLogEvent> Events { get; set; }

    ///<summary>
    /// Chats mentioned in events
    ///</summary>
    public TVector<MyTelegram.Schema.IChat> Chats { get; set; }

    ///<summary>
    /// Users mentioned in events
    ///</summary>
    public TVector<MyTelegram.Schema.IUser> Users { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Events = buffer.Read<TVector<MyTelegram.Schema.IChannelAdminLogEvent>>();
        Chats = buffer.Read<TVector<MyTelegram.Schema.IChat>>();
        Users = buffer.Read<TVector<MyTelegram.Schema.IUser>>();
    }
}