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

namespace MyTelegram.Schema;

///<summary>
/// The history of a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> was hidden.
/// See <a href="https://corefork.telegram.org/constructor/updateChannelAvailableMessages" />
///</summary>
[TlObject(0xb23fc698)]
public sealed class TUpdateChannelAvailableMessages : IUpdate
{
    public uint ConstructorId => 0xb23fc698;
    ///<summary>
    /// Channel/supergroup ID
    ///</summary>
    public long ChannelId { get; set; }

    ///<summary>
    /// Identifier of a maximum unavailable message in a channel due to hidden history.
    ///</summary>
    public int AvailableMinId { get; set; }

    public void ComputeFlag()
    {

    }

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

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