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

namespace MyTelegram.Schema;

///<summary>
/// Some messages in a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a> were deleted
/// See <a href="https://corefork.telegram.org/constructor/updateDeleteChannelMessages" />
///</summary>
[TlObject(0xc32d5b12)]
public sealed class TUpdateDeleteChannelMessages : IUpdate
{
    public uint ConstructorId => 0xc32d5b12;
    ///<summary>
    /// Channel ID
    ///</summary>
    public long ChannelId { get; set; }

    ///<summary>
    /// IDs of messages that were deleted
    ///</summary>
    public TVector<int> Messages { 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(ChannelId);
        writer.Write(Messages);
        writer.Write(Pts);
        writer.Write(PtsCount);
    }

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