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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Install a stickerset
/// <para>Possible errors</para>
/// Code Type Description
/// 406 STICKERSET_INVALID The provided sticker set is invalid.
/// See <a href="https://corefork.telegram.org/method/messages.installStickerSet" />
///</summary>
[TlObject(0xc78fe460)]
public sealed class RequestInstallStickerSet : IRequest<MyTelegram.Schema.Messages.IStickerSetInstallResult>
{
    public uint ConstructorId => 0xc78fe460;
    ///<summary>
    /// Stickerset to install
    /// See <a href="https://corefork.telegram.org/type/InputStickerSet" />
    ///</summary>
    public MyTelegram.Schema.IInputStickerSet Stickerset { get; set; }

    ///<summary>
    /// Whether to archive stickerset
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Archived { get; set; }

    public void ComputeFlag()
    {

    }

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

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