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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Mark or unmark a sticker as favorite
/// <para>Possible errors</para>
/// Code Type Description
/// 400 STICKER_ID_INVALID The provided sticker ID is invalid.
/// See <a href="https://corefork.telegram.org/method/messages.faveSticker" />
///</summary>
[TlObject(0xb9ffc55b)]
public sealed class RequestFaveSticker : IRequest<IBool>
{
    public uint ConstructorId => 0xb9ffc55b;
    ///<summary>
    /// Sticker in question
    /// See <a href="https://corefork.telegram.org/type/InputDocument" />
    ///</summary>
    public MyTelegram.Schema.IInputDocument Id { get; set; }

    ///<summary>
    /// Whether to add or remove a sticker from favorites
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Unfave { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.Read<MyTelegram.Schema.IInputDocument>();
        Unfave = buffer.Read();
    }
}
