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

namespace MyTelegram.Schema;

///<summary>
/// A low-resolution compressed JPG payload
/// See <a href="https://corefork.telegram.org/constructor/photoStrippedSize" />
///</summary>
[TlObject(0xe0b0bc2e)]
public sealed class TPhotoStrippedSize : IPhotoSize
{
    public uint ConstructorId => 0xe0b0bc2e;
    ///<summary>
    /// Thumbnail type
    ///</summary>
    public string Type { get; set; }

    ///<summary>
    /// Thumbnail data, see <a href="https://corefork.telegram.org/api/files#stripped-thumbnails">here for more info on decompression »</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();
    }
}