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

namespace MyTelegram.Schema;

///<summary>
/// The peer list of a <a href="https://corefork.telegram.org/api/folders#peer-folders">peer folder</a> was updated
/// See <a href="https://corefork.telegram.org/constructor/updateFolderPeers" />
///</summary>
[TlObject(0x19360dc0)]
public sealed class TUpdateFolderPeers : IUpdate
{
    public uint ConstructorId => 0x19360dc0;
    ///<summary>
    /// New peer list
    ///</summary>
    public TVector<MyTelegram.Schema.IFolderPeer> FolderPeers { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/updates">Event count after generation</a>
    ///</summary>
    public int Pts { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/updates">Number of events that were generated</a>
    ///</summary>
    public int PtsCount { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(FolderPeers);
        writer.Write(Pts);
        writer.Write(PtsCount);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        FolderPeers = buffer.Read<TVector<MyTelegram.Schema.IFolderPeer>>();
        Pts = buffer.ReadInt32();
        PtsCount = buffer.ReadInt32();
    }
}