/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.libtorrent4j.swig;

public class create_file_entry {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected create_file_entry(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(create_file_entry obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libtorrent_jni.delete_create_file_entry(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public create_file_entry(String fn, long sz, file_flags_t f, long ts, String sl) {
    this(libtorrent_jni.new_create_file_entry__SWIG_0(fn, sz, file_flags_t.getCPtr(f), f, ts, sl), true);
  }

  public create_file_entry(String fn, long sz, file_flags_t f, long ts) {
    this(libtorrent_jni.new_create_file_entry__SWIG_1(fn, sz, file_flags_t.getCPtr(f), f, ts), true);
  }

  public create_file_entry(String fn, long sz, file_flags_t f) {
    this(libtorrent_jni.new_create_file_entry__SWIG_2(fn, sz, file_flags_t.getCPtr(f), f), true);
  }

  public create_file_entry(String fn, long sz) {
    this(libtorrent_jni.new_create_file_entry__SWIG_3(fn, sz), true);
  }

  public void setFilename(String value) {
    libtorrent_jni.create_file_entry_filename_set(swigCPtr, this, value);
  }

  public String getFilename() {
    return libtorrent_jni.create_file_entry_filename_get(swigCPtr, this);
  }

  public void setSize(long value) {
    libtorrent_jni.create_file_entry_size_set(swigCPtr, this, value);
  }

  public long getSize() {
    return libtorrent_jni.create_file_entry_size_get(swigCPtr, this);
  }

  public void setFlags(file_flags_t value) {
    libtorrent_jni.create_file_entry_flags_set(swigCPtr, this, file_flags_t.getCPtr(value), value);
  }

  public file_flags_t getFlags() {
    long cPtr = libtorrent_jni.create_file_entry_flags_get(swigCPtr, this);
    return (cPtr == 0) ? null : new file_flags_t(cPtr, false);
  }

  public void setMtime(long value) {
    libtorrent_jni.create_file_entry_mtime_set(swigCPtr, this, value);
  }

  public long getMtime() {
    return libtorrent_jni.create_file_entry_mtime_get(swigCPtr, this);
  }

  public void setSymlink(String value) {
    libtorrent_jni.create_file_entry_symlink_set(swigCPtr, this, value);
  }

  public String getSymlink() {
    return libtorrent_jni.create_file_entry_symlink_get(swigCPtr, this);
  }

}
