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

namespace MyTelegram.Schema.Stickers;

///<summary>
/// Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
/// 406 STICKERSET_INVALID The provided sticker set is invalid.
/// 400 STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
/// 400 STICKER_PNG_NOPNG One of the specified stickers is not a valid PNG file.
/// 400 STICKER_TGS_NOTGS Invalid TGS sticker provided.
/// See <a href="https://corefork.telegram.org/method/stickers.addStickerToSet" />
///</summary>
[TlObject(0x8653febe)]
public sealed class RequestAddStickerToSet : IRequest<MyTelegram.Schema.Messages.IStickerSet>
{
    public uint ConstructorId => 0x8653febe;
    ///<summary>
    /// The stickerset
    /// See <a href="https://corefork.telegram.org/type/InputStickerSet" />
    ///</summary>
    public MyTelegram.Schema.IInputStickerSet Stickerset { get; set; }

    ///<summary>
    /// The sticker
    /// See <a href="https://corefork.telegram.org/type/InputStickerSetItem" />
    ///</summary>
    public MyTelegram.Schema.IInputStickerSetItem Sticker { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Stickerset = buffer.Read<MyTelegram.Schema.IInputStickerSet>();
        Sticker = buffer.Read<MyTelegram.Schema.IInputStickerSetItem>();
    }
}
