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

package com.frostwire.jlibtorrent.swig;

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

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

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

  protected static long swigRelease(add_torrent_params obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

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

  public void setVersion(int value) {
    libtorrent_jni.add_torrent_params_version_set(swigCPtr, this, value);
  }

  public int getVersion() {
    return libtorrent_jni.add_torrent_params_version_get(swigCPtr, this);
  }

  public void setName(String value) {
    libtorrent_jni.add_torrent_params_name_set(swigCPtr, this, value);
  }

  public String getName() {
    return libtorrent_jni.add_torrent_params_name_get(swigCPtr, this);
  }

  public void setSave_path(String value) {
    libtorrent_jni.add_torrent_params_save_path_set(swigCPtr, this, value);
  }

  public String getSave_path() {
    return libtorrent_jni.add_torrent_params_save_path_get(swigCPtr, this);
  }

  public void setStorage_mode(storage_mode_t value) {
    libtorrent_jni.add_torrent_params_storage_mode_set(swigCPtr, this, value.swigValue());
  }

  public storage_mode_t getStorage_mode() {
    return storage_mode_t.swigToEnum(libtorrent_jni.add_torrent_params_storage_mode_get(swigCPtr, this));
  }

  public void setTrackerid(String value) {
    libtorrent_jni.add_torrent_params_trackerid_set(swigCPtr, this, value);
  }

  public String getTrackerid() {
    return libtorrent_jni.add_torrent_params_trackerid_get(swigCPtr, this);
  }

  public void setFlags(torrent_flags_t value) {
    libtorrent_jni.add_torrent_params_flags_set(swigCPtr, this, torrent_flags_t.getCPtr(value), value);
  }

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

  public void setInfo_hashes(info_hash_t value) {
    libtorrent_jni.add_torrent_params_info_hashes_set(swigCPtr, this, info_hash_t.getCPtr(value), value);
  }

  public info_hash_t getInfo_hashes() {
    long cPtr = libtorrent_jni.add_torrent_params_info_hashes_get(swigCPtr, this);
    return (cPtr == 0) ? null : new info_hash_t(cPtr, false);
  }

  public void setMax_uploads(int value) {
    libtorrent_jni.add_torrent_params_max_uploads_set(swigCPtr, this, value);
  }

  public int getMax_uploads() {
    return libtorrent_jni.add_torrent_params_max_uploads_get(swigCPtr, this);
  }

  public void setMax_connections(int value) {
    libtorrent_jni.add_torrent_params_max_connections_set(swigCPtr, this, value);
  }

  public int getMax_connections() {
    return libtorrent_jni.add_torrent_params_max_connections_get(swigCPtr, this);
  }

  public void setUpload_limit(int value) {
    libtorrent_jni.add_torrent_params_upload_limit_set(swigCPtr, this, value);
  }

  public int getUpload_limit() {
    return libtorrent_jni.add_torrent_params_upload_limit_get(swigCPtr, this);
  }

  public void setDownload_limit(int value) {
    libtorrent_jni.add_torrent_params_download_limit_set(swigCPtr, this, value);
  }

  public int getDownload_limit() {
    return libtorrent_jni.add_torrent_params_download_limit_get(swigCPtr, this);
  }

  public void setTotal_uploaded(long value) {
    libtorrent_jni.add_torrent_params_total_uploaded_set(swigCPtr, this, value);
  }

  public long getTotal_uploaded() {
    return libtorrent_jni.add_torrent_params_total_uploaded_get(swigCPtr, this);
  }

  public void setTotal_downloaded(long value) {
    libtorrent_jni.add_torrent_params_total_downloaded_set(swigCPtr, this, value);
  }

  public long getTotal_downloaded() {
    return libtorrent_jni.add_torrent_params_total_downloaded_get(swigCPtr, this);
  }

  public void setActive_time(int value) {
    libtorrent_jni.add_torrent_params_active_time_set(swigCPtr, this, value);
  }

  public int getActive_time() {
    return libtorrent_jni.add_torrent_params_active_time_get(swigCPtr, this);
  }

  public void setFinished_time(int value) {
    libtorrent_jni.add_torrent_params_finished_time_set(swigCPtr, this, value);
  }

  public int getFinished_time() {
    return libtorrent_jni.add_torrent_params_finished_time_get(swigCPtr, this);
  }

  public void setSeeding_time(int value) {
    libtorrent_jni.add_torrent_params_seeding_time_set(swigCPtr, this, value);
  }

  public int getSeeding_time() {
    return libtorrent_jni.add_torrent_params_seeding_time_get(swigCPtr, this);
  }

  public void setAdded_time(long value) {
    libtorrent_jni.add_torrent_params_added_time_set(swigCPtr, this, value);
  }

  public long getAdded_time() {
    return libtorrent_jni.add_torrent_params_added_time_get(swigCPtr, this);
  }

  public void setCompleted_time(long value) {
    libtorrent_jni.add_torrent_params_completed_time_set(swigCPtr, this, value);
  }

  public long getCompleted_time() {
    return libtorrent_jni.add_torrent_params_completed_time_get(swigCPtr, this);
  }

  public void setLast_seen_complete(long value) {
    libtorrent_jni.add_torrent_params_last_seen_complete_set(swigCPtr, this, value);
  }

  public long getLast_seen_complete() {
    return libtorrent_jni.add_torrent_params_last_seen_complete_get(swigCPtr, this);
  }

  public void setNum_complete(int value) {
    libtorrent_jni.add_torrent_params_num_complete_set(swigCPtr, this, value);
  }

  public int getNum_complete() {
    return libtorrent_jni.add_torrent_params_num_complete_get(swigCPtr, this);
  }

  public void setNum_incomplete(int value) {
    libtorrent_jni.add_torrent_params_num_incomplete_set(swigCPtr, this, value);
  }

  public int getNum_incomplete() {
    return libtorrent_jni.add_torrent_params_num_incomplete_get(swigCPtr, this);
  }

  public void setNum_downloaded(int value) {
    libtorrent_jni.add_torrent_params_num_downloaded_set(swigCPtr, this, value);
  }

  public int getNum_downloaded() {
    return libtorrent_jni.add_torrent_params_num_downloaded_get(swigCPtr, this);
  }

  public void setLast_download(long value) {
    libtorrent_jni.add_torrent_params_last_download_set(swigCPtr, this, value);
  }

  public long getLast_download() {
    return libtorrent_jni.add_torrent_params_last_download_get(swigCPtr, this);
  }

  public void setLast_upload(long value) {
    libtorrent_jni.add_torrent_params_last_upload_set(swigCPtr, this, value);
  }

  public long getLast_upload() {
    return libtorrent_jni.add_torrent_params_last_upload_get(swigCPtr, this);
  }

  public torrent_info ti_ptr() {
    long cPtr = libtorrent_jni.add_torrent_params_ti_ptr(swigCPtr, this);
    return (cPtr == 0) ? null : new torrent_info(cPtr, false);
  }

  public void set_ti(torrent_info ti) {
    libtorrent_jni.add_torrent_params_set_ti(swigCPtr, this, torrent_info.getCPtr(ti), ti);
  }

  public byte_vector get_file_priorities() {
    return new byte_vector(libtorrent_jni.add_torrent_params_get_file_priorities(swigCPtr, this), true);
  }

  public void set_renamed_files(SWIGTYPE_p_std__mapT_file_index_t_std__string_std__lessT_file_index_t_t_t renamed_files) {
    libtorrent_jni.add_torrent_params_set_renamed_files__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__mapT_file_index_t_std__string_std__lessT_file_index_t_t_t.getCPtr(renamed_files));
  }

  public void set_renamed_files(int_string_map v) {
    libtorrent_jni.add_torrent_params_set_renamed_files__SWIG_1(swigCPtr, this, int_string_map.getCPtr(v), v);
  }

  public int_vector get_tracker_tiers() {
    return new int_vector(libtorrent_jni.add_torrent_params_get_tracker_tiers(swigCPtr, this), true);
  }

  public void set_tracker_tiers(int_vector tracker_tiers) {
    libtorrent_jni.add_torrent_params_set_tracker_tiers(swigCPtr, this, int_vector.getCPtr(tracker_tiers), tracker_tiers);
  }

  public tcp_endpoint_vector get_banned_peers() {
    return new tcp_endpoint_vector(libtorrent_jni.add_torrent_params_get_banned_peers(swigCPtr, this), true);
  }

  public void set_banned_peers(tcp_endpoint_vector banned_peers) {
    libtorrent_jni.add_torrent_params_set_banned_peers(swigCPtr, this, tcp_endpoint_vector.getCPtr(banned_peers), banned_peers);
  }

  public tcp_endpoint_vector get_peers() {
    return new tcp_endpoint_vector(libtorrent_jni.add_torrent_params_get_peers(swigCPtr, this), true);
  }

  public void set_peers(tcp_endpoint_vector peers) {
    libtorrent_jni.add_torrent_params_set_peers(swigCPtr, this, tcp_endpoint_vector.getCPtr(peers), peers);
  }

  public void set_file_priorities2(byte_vector file_priorities) {
    libtorrent_jni.add_torrent_params_set_file_priorities2(swigCPtr, this, byte_vector.getCPtr(file_priorities), file_priorities);
  }

  public void set_file_priorities(byte_vector v) {
    libtorrent_jni.add_torrent_params_set_file_priorities(swigCPtr, this, byte_vector.getCPtr(v), v);
  }

  public byte_vector get_piece_priorities() {
    return new byte_vector(libtorrent_jni.add_torrent_params_get_piece_priorities(swigCPtr, this), true);
  }

  public void set_piece_priorities(byte_vector v) {
    libtorrent_jni.add_torrent_params_set_piece_priorities(swigCPtr, this, byte_vector.getCPtr(v), v);
  }

  public string_int_pair_vector get_dht_nodes() {
    return new string_int_pair_vector(libtorrent_jni.add_torrent_params_get_dht_nodes(swigCPtr, this), true);
  }

  public void set_dht_nodes(string_int_pair_vector dht_nodes) {
    libtorrent_jni.add_torrent_params_set_dht_nodes(swigCPtr, this, string_int_pair_vector.getCPtr(dht_nodes), dht_nodes);
  }

  public void set_http_seeds(string_vector http_seeds) {
    libtorrent_jni.add_torrent_params_set_http_seeds(swigCPtr, this, string_vector.getCPtr(http_seeds), http_seeds);
  }

  public string_vector get_url_seeds() {
    return new string_vector(libtorrent_jni.add_torrent_params_get_url_seeds(swigCPtr, this), true);
  }

  public void set_url_seeds(string_vector url_seeds) {
    libtorrent_jni.add_torrent_params_set_url_seeds(swigCPtr, this, string_vector.getCPtr(url_seeds), url_seeds);
  }

  public string_vector get_trackers() {
    return new string_vector(libtorrent_jni.add_torrent_params_get_trackers(swigCPtr, this), true);
  }

  public void set_trackers(string_vector trackers) {
    libtorrent_jni.add_torrent_params_set_trackers(swigCPtr, this, string_vector.getCPtr(trackers), trackers);
  }

  public sha256_hash_vector_vector get_merkle_trees() {
    return new sha256_hash_vector_vector(libtorrent_jni.add_torrent_params_get_merkle_trees(swigCPtr, this), true);
  }

  public void set_merkle_trees(sha256_hash_vector_vector v) {
    libtorrent_jni.add_torrent_params_set_merkle_trees(swigCPtr, this, sha256_hash_vector_vector.getCPtr(v), v);
  }

  public bitfield_vector get_merkle_tree_mask() {
    return new bitfield_vector(libtorrent_jni.add_torrent_params_get_merkle_tree_mask(swigCPtr, this), true);
  }

  public void set_piece_priorities2(byte_vector piece_priorities) {
    libtorrent_jni.add_torrent_params_set_piece_priorities2(swigCPtr, this, byte_vector.getCPtr(piece_priorities), piece_priorities);
  }

  public bool_vector_vector get_verified_leaf_hashes_old() {
    return new bool_vector_vector(libtorrent_jni.add_torrent_params_get_verified_leaf_hashes_old(swigCPtr, this), false);
  }

  public bitfield_vector get_verified_leaf_hashes() {
    return new bitfield_vector(libtorrent_jni.add_torrent_params_get_verified_leaf_hashes(swigCPtr, this), true);
  }

  public int_bitfield_map get_unfinished_pieces() {
    return new int_bitfield_map(libtorrent_jni.add_torrent_params_get_unfinished_pieces(swigCPtr, this), true);
  }

  public void set_unfinished_pieces(int_bitfield_map v) {
    libtorrent_jni.add_torrent_params_set_unfinished_pieces(swigCPtr, this, int_bitfield_map.getCPtr(v), v);
  }

  public int_string_map get_renamed_files() {
    return new int_string_map(libtorrent_jni.add_torrent_params_get_renamed_files(swigCPtr, this), true);
  }

  public bitfield get_have_pieces() {
    return new bitfield(libtorrent_jni.add_torrent_params_get_have_pieces(swigCPtr, this), true);
  }

  public void set_have_pieces(bitfield v) {
    libtorrent_jni.add_torrent_params_set_have_pieces(swigCPtr, this, bitfield.getCPtr(v), v);
  }

  public bitfield get_verified_pieces() {
    return new bitfield(libtorrent_jni.add_torrent_params_get_verified_pieces(swigCPtr, this), true);
  }

  public void set_verified_pieces(bitfield v) {
    libtorrent_jni.add_torrent_params_set_verified_pieces(swigCPtr, this, bitfield.getCPtr(v), v);
  }

  public static add_torrent_params create_instance() {
    return new add_torrent_params(libtorrent_jni.add_torrent_params_create_instance(), true);
  }

  public static add_torrent_params read_resume_data(bdecode_node rd, error_code ec) {
    return new add_torrent_params(libtorrent_jni.add_torrent_params_read_resume_data__SWIG_0(bdecode_node.getCPtr(rd), rd, error_code.getCPtr(ec), ec), true);
  }

  public static add_torrent_params read_resume_data(byte_vector buffer, error_code ec) {
    return new add_torrent_params(libtorrent_jni.add_torrent_params_read_resume_data__SWIG_1(byte_vector.getCPtr(buffer), buffer, error_code.getCPtr(ec), ec), true);
  }

  public static entry write_resume_data(add_torrent_params atp) {
    return new entry(libtorrent_jni.add_torrent_params_write_resume_data(add_torrent_params.getCPtr(atp), atp), true);
  }

  public static byte_vector write_resume_data_buf(add_torrent_params atp) {
    return new byte_vector(libtorrent_jni.add_torrent_params_write_resume_data_buf(add_torrent_params.getCPtr(atp), atp), true);
  }

  public static add_torrent_params parse_magnet_uri(String uri, error_code ec) {
    return new add_torrent_params(libtorrent_jni.add_torrent_params_parse_magnet_uri(uri, error_code.getCPtr(ec), ec), true);
  }

}
