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

namespace MyTelegram.Schema.Bots;

///<summary>
/// Obtain a list of bot commands for the specified bot scope and language code
/// <para>Possible errors</para>
/// Code Type Description
/// 400 USER_BOT_INVALID User accounts must provide the <code>bot</code> method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
/// 400 USER_BOT_REQUIRED This method can only be called by a bot.
/// See <a href="https://corefork.telegram.org/method/bots.getBotCommands" />
///</summary>
[TlObject(0xe34c0dd6)]
public sealed class RequestGetBotCommands : IRequest<TVector<MyTelegram.Schema.IBotCommand>>
{
    public uint ConstructorId => 0xe34c0dd6;
    ///<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();
    }
}
