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

namespace MyTelegram.Schema;

///<summary>
/// Assigns a big file (over 10 MB in size), saved in part using the method <a href="https://corefork.telegram.org/method/upload.saveBigFilePart">upload.saveBigFilePart</a>.
/// See <a href="https://corefork.telegram.org/constructor/inputFileBig" />
///</summary>
[TlObject(0xfa4f0bb5)]
public sealed class TInputFileBig : IInputFile
{
    public uint ConstructorId => 0xfa4f0bb5;
    ///<summary>
    /// Random file id, created by the client
    ///</summary>
    public long Id { get; set; }

    ///<summary>
    /// Number of parts saved
    ///</summary>
    public int Parts { get; set; }

    ///<summary>
    /// Full file name
    ///</summary>
    public string Name { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadInt64();
        Parts = buffer.ReadInt32();
        Name = buffer.ReadString();
    }
}