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

namespace MyTelegram.Schema;

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

    ///<summary>
    /// Position up to which all outgoing messages are read.
    ///</summary>
    public int MaxId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        ChannelId = buffer.ReadInt64();
        MaxId = buffer.ReadInt32();
    }
}