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

namespace MyTelegram.Schema;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/updateReadMonoForumInbox" />
///</summary>
[TlObject(0x77b0e372)]
public sealed class TUpdateReadMonoForumInbox : IUpdate
{
    public uint ConstructorId => 0x77b0e372;
    public long ChannelId { get; set; }
    public MyTelegram.Schema.IPeer SavedPeerId { get; set; }
    public int ReadMaxId { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(ChannelId);
        writer.Write(SavedPeerId);
        writer.Write(ReadMaxId);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        ChannelId = buffer.ReadInt64();
        SavedPeerId = buffer.Read<MyTelegram.Schema.IPeer>();
        ReadMaxId = buffer.ReadInt32();
    }
}