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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using <a href="https://corefork.telegram.org/method/help.getConfig">help.getConfig, <code>reactions_default</code> field</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 REACTION_INVALID The specified reaction is invalid.
/// See <a href="https://corefork.telegram.org/method/messages.setDefaultReaction" />
///</summary>
[TlObject(0x4f47a016)]
public sealed class RequestSetDefaultReaction : IRequest<IBool>
{
    public uint ConstructorId => 0x4f47a016;
    ///<summary>
    /// New emoji reaction
    /// See <a href="https://corefork.telegram.org/type/Reaction" />
    ///</summary>
    public MyTelegram.Schema.IReaction Reaction { get; set; }

    public void ComputeFlag()
    {

    }

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

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