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

package com.chilkatsoft;

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

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

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

  protected static long swigRelease(CkHttpCurl 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;
  }

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

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

  public CkHttpCurl() {
    this(chilkatJNI.new_CkHttpCurl(), true);
  }

  public void LastErrorXml(CkString str) {
    chilkatJNI.CkHttpCurl_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorHtml(CkString str) {
    chilkatJNI.CkHttpCurl_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorText(CkString str) {
    chilkatJNI.CkHttpCurl_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void put_EventCallbackObject(CkBaseProgress progress) {
    chilkatJNI.CkHttpCurl_put_EventCallbackObject(swigCPtr, this, CkBaseProgress.getCPtr(progress), progress);
  }

  public void get_DebugLogFilePath(CkString str) {
    chilkatJNI.CkHttpCurl_get_DebugLogFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String debugLogFilePath() {
    return chilkatJNI.CkHttpCurl_debugLogFilePath(swigCPtr, this);
  }

  public void put_DebugLogFilePath(String newVal) {
    chilkatJNI.CkHttpCurl_put_DebugLogFilePath(swigCPtr, this, newVal);
  }

  public boolean get_EnableBodyVars() {
    return chilkatJNI.CkHttpCurl_get_EnableBodyVars(swigCPtr, this);
  }

  public void put_EnableBodyVars(boolean newVal) {
    chilkatJNI.CkHttpCurl_put_EnableBodyVars(swigCPtr, this, newVal);
  }

  public void get_FailedCurl(CkString str) {
    chilkatJNI.CkHttpCurl_get_FailedCurl(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String failedCurl() {
    return chilkatJNI.CkHttpCurl_failedCurl(swigCPtr, this);
  }

  public int get_FailReason() {
    return chilkatJNI.CkHttpCurl_get_FailReason(swigCPtr, this);
  }

  public int get_HeartbeatMs() {
    return chilkatJNI.CkHttpCurl_get_HeartbeatMs(swigCPtr, this);
  }

  public void put_HeartbeatMs(int newVal) {
    chilkatJNI.CkHttpCurl_put_HeartbeatMs(swigCPtr, this, newVal);
  }

  public void get_LastErrorHtml(CkString str) {
    chilkatJNI.CkHttpCurl_get_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorHtml() {
    return chilkatJNI.CkHttpCurl_lastErrorHtml(swigCPtr, this);
  }

  public void get_LastErrorText(CkString str) {
    chilkatJNI.CkHttpCurl_get_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorText() {
    return chilkatJNI.CkHttpCurl_lastErrorText(swigCPtr, this);
  }

  public void get_LastErrorXml(CkString str) {
    chilkatJNI.CkHttpCurl_get_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorXml() {
    return chilkatJNI.CkHttpCurl_lastErrorXml(swigCPtr, this);
  }

  public boolean get_LastMethodSuccess() {
    return chilkatJNI.CkHttpCurl_get_LastMethodSuccess(swigCPtr, this);
  }

  public void put_LastMethodSuccess(boolean newVal) {
    chilkatJNI.CkHttpCurl_put_LastMethodSuccess(swigCPtr, this, newVal);
  }

  public void get_ResponseBodyStr(CkString str) {
    chilkatJNI.CkHttpCurl_get_ResponseBodyStr(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String responseBodyStr() {
    return chilkatJNI.CkHttpCurl_responseBodyStr(swigCPtr, this);
  }

  public void get_ResponseFilePath(CkString str) {
    chilkatJNI.CkHttpCurl_get_ResponseFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String responseFilePath() {
    return chilkatJNI.CkHttpCurl_responseFilePath(swigCPtr, this);
  }

  public void put_ResponseFilePath(String newVal) {
    chilkatJNI.CkHttpCurl_put_ResponseFilePath(swigCPtr, this, newVal);
  }

  public int get_StatusCode() {
    return chilkatJNI.CkHttpCurl_get_StatusCode(swigCPtr, this);
  }

  public void get_UncommonOptions(CkString str) {
    chilkatJNI.CkHttpCurl_get_UncommonOptions(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String uncommonOptions() {
    return chilkatJNI.CkHttpCurl_uncommonOptions(swigCPtr, this);
  }

  public void put_UncommonOptions(String newVal) {
    chilkatJNI.CkHttpCurl_put_UncommonOptions(swigCPtr, this, newVal);
  }

  public boolean get_VerboseLogging() {
    return chilkatJNI.CkHttpCurl_get_VerboseLogging(swigCPtr, this);
  }

  public void put_VerboseLogging(boolean newVal) {
    chilkatJNI.CkHttpCurl_put_VerboseLogging(swigCPtr, this, newVal);
  }

  public void get_Version(CkString str) {
    chilkatJNI.CkHttpCurl_get_Version(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String version() {
    return chilkatJNI.CkHttpCurl_version(swigCPtr, this);
  }

  public boolean AddFunction(String funcName, String curl) {
    return chilkatJNI.CkHttpCurl_AddFunction(swigCPtr, this, funcName, curl);
  }

  public boolean AddOutput(String funcName, String jsonPath, String varName) {
    return chilkatJNI.CkHttpCurl_AddOutput(swigCPtr, this, funcName, jsonPath, varName);
  }

  public boolean AddOutput2(String funcName, String arrayPath, String wherePath, String whereValue, boolean caseSensitive, String subPath, String varName) {
    return chilkatJNI.CkHttpCurl_AddOutput2(swigCPtr, this, funcName, arrayPath, wherePath, whereValue, caseSensitive, subPath, varName);
  }

  public void AddTargetOutput(String jsonPath, String varName) {
    chilkatJNI.CkHttpCurl_AddTargetOutput(swigCPtr, this, jsonPath, varName);
  }

  public void ClearTargetOutput(String varName) {
    chilkatJNI.CkHttpCurl_ClearTargetOutput(swigCPtr, this, varName);
  }

  public void ClearVar(String varName) {
    chilkatJNI.CkHttpCurl_ClearVar(swigCPtr, this, varName);
  }

  public boolean DoYourThing(String targetCurl) {
    return chilkatJNI.CkHttpCurl_DoYourThing(swigCPtr, this, targetCurl);
  }

  public CkTask DoYourThingAsync(String targetCurl) {
    long cPtr = chilkatJNI.CkHttpCurl_DoYourThingAsync(swigCPtr, this, targetCurl);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean ExaminePlan(String curl, CkJsonObject json) {
    return chilkatJNI.CkHttpCurl_ExaminePlan(swigCPtr, this, curl, CkJsonObject.getCPtr(json), json);
  }

  public void GetAllVars(CkJsonObject json) {
    chilkatJNI.CkHttpCurl_GetAllVars(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public boolean GetResponseBd(CkBinData bd) {
    return chilkatJNI.CkHttpCurl_GetResponseBd(swigCPtr, this, CkBinData.getCPtr(bd), bd);
  }

  public boolean GetResponseJarr(CkJsonArray jarr) {
    return chilkatJNI.CkHttpCurl_GetResponseJarr(swigCPtr, this, CkJsonArray.getCPtr(jarr), jarr);
  }

  public boolean GetResponseJson(CkJsonObject json) {
    return chilkatJNI.CkHttpCurl_GetResponseJson(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public boolean GetResponseSb(CkStringBuilder sb) {
    return chilkatJNI.CkHttpCurl_GetResponseSb(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb);
  }

  public boolean GetResponseXml(CkXml xml) {
    return chilkatJNI.CkHttpCurl_GetResponseXml(swigCPtr, this, CkXml.getCPtr(xml), xml);
  }

  public boolean GetVar(String varName, CkString outStr) {
    return chilkatJNI.CkHttpCurl_GetVar(swigCPtr, this, varName, CkString.getCPtr(outStr), outStr);
  }

  public String getVar(String varName) {
    return chilkatJNI.CkHttpCurl_getVar(swigCPtr, this, varName);
  }

  public String var(String varName) {
    return chilkatJNI.CkHttpCurl_var(swigCPtr, this, varName);
  }

  public boolean SetAuth(CkJsonObject json) {
    return chilkatJNI.CkHttpCurl_SetAuth(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public void SetVar(String varName, String varValue) {
    chilkatJNI.CkHttpCurl_SetVar(swigCPtr, this, varName, varValue);
  }

  public boolean ToRawRequest(String curlCommand, CkStringBuilder sb) {
    return chilkatJNI.CkHttpCurl_ToRawRequest(swigCPtr, this, curlCommand, CkStringBuilder.getCPtr(sb), sb);
  }

  public boolean VarDefined(String varName) {
    return chilkatJNI.CkHttpCurl_VarDefined(swigCPtr, this, varName);
  }

}
