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

namespace MyTelegram.Schema.Upload;

///<summary>
/// The file was cleared from the temporary RAM cache of the <a href="https://corefork.telegram.org/cdn">CDN</a> and has to be re-uploaded.
/// See <a href="https://corefork.telegram.org/constructor/upload.cdnFileReuploadNeeded" />
///</summary>
[TlObject(0xeea8e46e)]
public sealed class TCdnFileReuploadNeeded : ICdnFile
{
    public uint ConstructorId => 0xeea8e46e;
    ///<summary>
    /// Request token (see <a href="https://corefork.telegram.org/cdn">CDN</a>)
    ///</summary>
    public ReadOnlyMemory<byte> RequestToken { get; set; }

    public void ComputeFlag()
    {

    }

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

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