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

namespace MyTelegram.Schema;

///<summary>
/// Notifications generated by a <a href="https://corefork.telegram.org/api/forum#forum-topics">topic</a> in a <a href="https://corefork.telegram.org/api/forum">forum</a>.
/// See <a href="https://corefork.telegram.org/constructor/notifyForumTopic" />
///</summary>
[TlObject(0x226e6308)]
public sealed class TNotifyForumTopic : INotifyPeer
{
    public uint ConstructorId => 0x226e6308;
    ///<summary>
    /// Forum ID
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/forum#forum-topics">Topic ID</a>
    ///</summary>
    public int TopMsgId { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Peer);
        writer.Write(TopMsgId);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IPeer>();
        TopMsgId = buffer.ReadInt32();
    }
}