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

namespace MyTelegram.Schema.Bots;

///<summary>
/// Allow the specified bot to send us messages
/// <para>Possible errors</para>
/// Code Type Description
/// 400 BOT_INVALID This is not a valid bot.
/// See <a href="https://corefork.telegram.org/method/bots.allowSendMessage" />
///</summary>
[TlObject(0xf132e3ef)]
public sealed class RequestAllowSendMessage : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0xf132e3ef;
    ///<summary>
    /// The bot
    /// See <a href="https://corefork.telegram.org/type/InputUser" />
    ///</summary>
    public MyTelegram.Schema.IInputUser Bot { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Bot = buffer.Read<MyTelegram.Schema.IInputUser>();
    }
}
