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

namespace MyTelegram.Schema.Bots;

///<summary>
/// Clear bot commands for the specified bot scope and language code
/// <para>Possible errors</para>
/// Code Type Description
/// 400 LANG_CODE_INVALID The specified language code is invalid.
/// 400 USER_BOT_REQUIRED This method can only be called by a bot.
/// See <a href="https://corefork.telegram.org/method/bots.resetBotCommands" />
///</summary>
[TlObject(0x3d8de0f9)]
public sealed class RequestResetBotCommands : IRequest<IBool>
{
    public uint ConstructorId => 0x3d8de0f9;
    ///<summary>
    /// Command scope
    /// See <a href="https://corefork.telegram.org/type/BotCommandScope" />
    ///</summary>
    public MyTelegram.Schema.IBotCommandScope Scope { get; set; }

    ///<summary>
    /// Language code
    ///</summary>
    public string LangCode { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Scope = buffer.Read<MyTelegram.Schema.IBotCommandScope>();
        LangCode = buffer.ReadString();
    }
}
