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

namespace MyTelegram.Schema;

///<summary>
/// An <a href="https://corefork.telegram.org/api/files#animated-profile-pictures">animated profile picture</a> based on a <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji sticker</a>.
/// See <a href="https://corefork.telegram.org/constructor/videoSizeEmojiMarkup" />
///</summary>
[TlObject(0xf85c413c)]
public sealed class TVideoSizeEmojiMarkup : IVideoSize
{
    public uint ConstructorId => 0xf85c413c;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/custom-emoji">Custom emoji ID</a>: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it.
    ///</summary>
    public long EmojiId { get; set; }

    ///<summary>
    /// 1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how <a href="https://corefork.telegram.org/api/wallpapers#fill-types">fill wallpapers</a> are generated. The rotation angle for gradient backgrounds is 0.
    ///</summary>
    public TVector<int> BackgroundColors { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        EmojiId = buffer.ReadInt64();
        BackgroundColors = buffer.Read<TVector<int>>();
    }
}