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

namespace MyTelegram.Schema.Help;

///<summary>
/// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only
/// <para>Possible errors</para>
/// Code Type Description
/// 400 USER_BOT_REQUIRED This method can only be called by a bot.
/// See <a href="https://corefork.telegram.org/method/help.setBotUpdatesStatus" />
///</summary>
[TlObject(0xec22cfcd)]
public sealed class RequestSetBotUpdatesStatus : IRequest<IBool>
{
    public uint ConstructorId => 0xec22cfcd;
    ///<summary>
    /// Number of pending updates
    ///</summary>
    public int PendingUpdatesCount { get; set; }

    ///<summary>
    /// Error message, if present
    ///</summary>
    public string Message { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PendingUpdatesCount = buffer.ReadInt32();
        Message = buffer.ReadString();
    }
}
