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

namespace MyTelegram.Schema;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/updateReadMonoForumOutbox" />
///</summary>
[TlObject(0xa4a79376)]
public sealed class TUpdateReadMonoForumOutbox : IUpdate
{
    public uint ConstructorId => 0xa4a79376;
    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();
    }
}