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

namespace MyTelegram.Schema;

///<summary>
/// Messages were deleted.
/// See <a href="https://corefork.telegram.org/constructor/updateDeleteMessages" />
///</summary>
[TlObject(0xa20db0e5)]
public sealed class TUpdateDeleteMessages : IUpdate
{
    public uint ConstructorId => 0xa20db0e5;
    ///<summary>
    /// List of identifiers of deleted messages
    ///</summary>
    public TVector<int> Messages { get; set; }

    ///<summary>
    /// New quality of actions in a message box
    ///</summary>
    public int Pts { get; set; }

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

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Messages = buffer.Read<TVector<int>>();
        Pts = buffer.ReadInt32();
        PtsCount = buffer.ReadInt32();
    }
}