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

namespace MyTelegram.Schema;

///<summary>
/// Messages with animated stickers can have a compressed svg (&lt; 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.
/// See <a href="https://corefork.telegram.org/constructor/photoPathSize" />
///</summary>
[TlObject(0xd8214d41)]
public sealed class TPhotoPathSize : IPhotoSize
{
    public uint ConstructorId => 0xd8214d41;
    ///<summary>
    /// Always <code>j</code>
    ///</summary>
    public string Type { get; set; }

    ///<summary>
    /// Compressed SVG path payload, <a href="https://corefork.telegram.org/api/files#vector-thumbnails">see here for decompression instructions</a>
    ///</summary>
    public byte[] Bytes { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Type = buffer.ReadString();
        Bytes = buffer.ReadBytes();
    }
}