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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Inactive chat list
/// See <a href="https://corefork.telegram.org/constructor/messages.inactiveChats" />
///</summary>
[TlObject(0xa927fec5)]
public sealed class TInactiveChats : IInactiveChats
{
    public uint ConstructorId => 0xa927fec5;
    ///<summary>
    /// When was the chat last active
    ///</summary>
    public TVector<int> Dates { get; set; }

    ///<summary>
    /// Chat list
    ///</summary>
    public TVector<MyTelegram.Schema.IChat> Chats { get; set; }

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

    public void ComputeFlag()
    {

    }

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

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