/* ----------------------------------------------------------------------------
 * 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 CkAi {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected static long swigRelease(CkAi 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_CkAi(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CkAi() {
    this(chilkatJNI.new_CkAi(), true);
  }

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

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

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

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

  public void get_ApiKey(CkString str) {
    chilkatJNI.CkAi_get_ApiKey(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String apiKey() {
    return chilkatJNI.CkAi_apiKey(swigCPtr, this);
  }

  public void put_ApiKey(String newVal) {
    chilkatJNI.CkAi_put_ApiKey(swigCPtr, this, newVal);
  }

  public void get_ApiKeyHeader(CkString str) {
    chilkatJNI.CkAi_get_ApiKeyHeader(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String apiKeyHeader() {
    return chilkatJNI.CkAi_apiKeyHeader(swigCPtr, this);
  }

  public void put_ApiKeyHeader(String newVal) {
    chilkatJNI.CkAi_put_ApiKeyHeader(swigCPtr, this, newVal);
  }

  public void get_ApiSpec(CkString str) {
    chilkatJNI.CkAi_get_ApiSpec(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String apiSpec() {
    return chilkatJNI.CkAi_apiSpec(swigCPtr, this);
  }

  public void put_ApiSpec(String newVal) {
    chilkatJNI.CkAi_put_ApiSpec(swigCPtr, this, newVal);
  }

  public void get_BaseUrl(CkString str) {
    chilkatJNI.CkAi_get_BaseUrl(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String baseUrl() {
    return chilkatJNI.CkAi_baseUrl(swigCPtr, this);
  }

  public void put_BaseUrl(String newVal) {
    chilkatJNI.CkAi_put_BaseUrl(swigCPtr, this, newVal);
  }

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

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

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

  public boolean get_EnableSecrets() {
    return chilkatJNI.CkAi_get_EnableSecrets(swigCPtr, this);
  }

  public void put_EnableSecrets(boolean newVal) {
    chilkatJNI.CkAi_put_EnableSecrets(swigCPtr, this, newVal);
  }

  public boolean get_FullTranscript() {
    return chilkatJNI.CkAi_get_FullTranscript(swigCPtr, this);
  }

  public void put_FullTranscript(boolean newVal) {
    chilkatJNI.CkAi_put_FullTranscript(swigCPtr, this, newVal);
  }

  public boolean get_HasFunctionCalls() {
    return chilkatJNI.CkAi_get_HasFunctionCalls(swigCPtr, this);
  }

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

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

  public boolean get_HostedConvo() {
    return chilkatJNI.CkAi_get_HostedConvo(swigCPtr, this);
  }

  public void put_HostedConvo(boolean newVal) {
    chilkatJNI.CkAi_put_HostedConvo(swigCPtr, this, newVal);
  }

  public int get_IdleTimeoutMs() {
    return chilkatJNI.CkAi_get_IdleTimeoutMs(swigCPtr, this);
  }

  public void put_IdleTimeoutMs(int newVal) {
    chilkatJNI.CkAi_put_IdleTimeoutMs(swigCPtr, this, newVal);
  }

  public int get_JsToolTimeout() {
    return chilkatJNI.CkAi_get_JsToolTimeout(swigCPtr, this);
  }

  public void put_JsToolTimeout(int newVal) {
    chilkatJNI.CkAi_put_JsToolTimeout(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

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

  public void get_Model(CkString str) {
    chilkatJNI.CkAi_get_Model(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String model() {
    return chilkatJNI.CkAi_model(swigCPtr, this);
  }

  public void put_Model(String newVal) {
    chilkatJNI.CkAi_put_Model(swigCPtr, this, newVal);
  }

  public void get_Provider(CkString str) {
    chilkatJNI.CkAi_get_Provider(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String provider() {
    return chilkatJNI.CkAi_provider(swigCPtr, this);
  }

  public void put_Provider(String newVal) {
    chilkatJNI.CkAi_put_Provider(swigCPtr, this, newVal);
  }

  public int get_ResponseStatusCode() {
    return chilkatJNI.CkAi_get_ResponseStatusCode(swigCPtr, this);
  }

  public void get_SelectedConvo(CkString str) {
    chilkatJNI.CkAi_get_SelectedConvo(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String selectedConvo() {
    return chilkatJNI.CkAi_selectedConvo(swigCPtr, this);
  }

  public void put_SelectedConvo(String newVal) {
    chilkatJNI.CkAi_put_SelectedConvo(swigCPtr, this, newVal);
  }

  public boolean get_Streaming() {
    return chilkatJNI.CkAi_get_Streaming(swigCPtr, this);
  }

  public void put_Streaming(boolean newVal) {
    chilkatJNI.CkAi_put_Streaming(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

  public boolean Ask(String outputType) {
    return chilkatJNI.CkAi_Ask(swigCPtr, this, outputType);
  }

  public CkTask AskAsync(String outputType) {
    long cPtr = chilkatJNI.CkAi_AskAsync(swigCPtr, this, outputType);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean DeleteConvo(String name) {
    return chilkatJNI.CkAi_DeleteConvo(swigCPtr, this, name);
  }

  public boolean ExportConvo(String name, CkJsonObject json) {
    return chilkatJNI.CkAi_ExportConvo(swigCPtr, this, name, CkJsonObject.getCPtr(json), json);
  }

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

  public void GetLastJsonData(CkJsonObject json) {
    chilkatJNI.CkAi_GetLastJsonData(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public boolean GetModels(CkStringTable st) {
    return chilkatJNI.CkAi_GetModels(swigCPtr, this, CkStringTable.getCPtr(st), st);
  }

  public CkTask GetModelsAsync(CkStringTable st) {
    long cPtr = chilkatJNI.CkAi_GetModelsAsync(swigCPtr, this, CkStringTable.getCPtr(st), st);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

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

  public boolean GetOutputText(CkString outStr) {
    return chilkatJNI.CkAi_GetOutputText(swigCPtr, this, CkString.getCPtr(outStr), outStr);
  }

  public String getOutputText() {
    return chilkatJNI.CkAi_getOutputText(swigCPtr, this);
  }

  public String outputText() {
    return chilkatJNI.CkAi_outputText(swigCPtr, this);
  }

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

  public boolean ImportConvo(String name, CkJsonObject json) {
    return chilkatJNI.CkAi_ImportConvo(swigCPtr, this, name, CkJsonObject.getCPtr(json), json);
  }

  public boolean InputAddFileData(String filename, CkBinData bd, String summary) {
    return chilkatJNI.CkAi_InputAddFileData(swigCPtr, this, filename, CkBinData.getCPtr(bd), bd, summary);
  }

  public boolean InputAddFileId(String file_id, String mime_type) {
    return chilkatJNI.CkAi_InputAddFileId(swigCPtr, this, file_id, mime_type);
  }

  public boolean InputAddFileUrl(String url, String summary) {
    return chilkatJNI.CkAi_InputAddFileUrl(swigCPtr, this, url, summary);
  }

  public boolean InputAddFnResult(String call_id, String fnResult) {
    return chilkatJNI.CkAi_InputAddFnResult(swigCPtr, this, call_id, fnResult);
  }

  public boolean InputAddImageData(CkBinData bd, String summary) {
    return chilkatJNI.CkAi_InputAddImageData(swigCPtr, this, CkBinData.getCPtr(bd), bd, summary);
  }

  public boolean InputAddImageFileId(String file_id, String mime_type) {
    return chilkatJNI.CkAi_InputAddImageFileId(swigCPtr, this, file_id, mime_type);
  }

  public boolean InputAddImageUrl(String url, String summary) {
    return chilkatJNI.CkAi_InputAddImageUrl(swigCPtr, this, url, summary);
  }

  public boolean InputAddText(String text) {
    return chilkatJNI.CkAi_InputAddText(swigCPtr, this, text);
  }

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

  public void InputClear() {
    chilkatJNI.CkAi_InputClear(swigCPtr, this);
  }

  public boolean ListConvos(CkStringTable st) {
    return chilkatJNI.CkAi_ListConvos(swigCPtr, this, CkStringTable.getCPtr(st), st);
  }

  public boolean NewConvo(String name, String sysMsg, String devMsg) {
    return chilkatJNI.CkAi_NewConvo(swigCPtr, this, name, sysMsg, devMsg);
  }

  public boolean NextAiEvent(int maxWaitMs, CkStringBuilder sbName, CkStringBuilder sbDelta) {
    return chilkatJNI.CkAi_NextAiEvent(swigCPtr, this, maxWaitMs, CkStringBuilder.getCPtr(sbName), sbName, CkStringBuilder.getCPtr(sbDelta), sbDelta);
  }

  public int PollAi(boolean abort) {
    return chilkatJNI.CkAi_PollAi(swigCPtr, this, abort);
  }

  public boolean RegisterJsTools(CkStringBuilder sb, boolean evalOnly, boolean allowAllKeyword) {
    return chilkatJNI.CkAi_RegisterJsTools(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, evalOnly, allowAllKeyword);
  }

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

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

  public boolean SetConnectionSettings(CkSocket sock) {
    return chilkatJNI.CkAi_SetConnectionSettings(swigCPtr, this, CkSocket.getCPtr(sock), sock);
  }

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

  public void SleepMs(int millisec) {
    chilkatJNI.CkAi_SleepMs(swigCPtr, this, millisec);
  }

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

  public CkTask StreamingJsToolCallAsync(CkStringBuilder sb) {
    long cPtr = chilkatJNI.CkAi_StreamingJsToolCallAsync(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean UploadFile(String path, String mimeType, CkString outStr) {
    return chilkatJNI.CkAi_UploadFile(swigCPtr, this, path, mimeType, CkString.getCPtr(outStr), outStr);
  }

  public String uploadFile(String path, String mimeType) {
    return chilkatJNI.CkAi_uploadFile(swigCPtr, this, path, mimeType);
  }

  public CkTask UploadFileAsync(String path, String mimeType) {
    long cPtr = chilkatJNI.CkAi_UploadFileAsync(swigCPtr, this, path, mimeType);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean UploadFileBd(CkBinData bd, String filename, String mimeType, CkString outStr) {
    return chilkatJNI.CkAi_UploadFileBd(swigCPtr, this, CkBinData.getCPtr(bd), bd, filename, mimeType, CkString.getCPtr(outStr), outStr);
  }

  public String uploadFileBd(CkBinData bd, String filename, String mimeType) {
    return chilkatJNI.CkAi_uploadFileBd(swigCPtr, this, CkBinData.getCPtr(bd), bd, filename, mimeType);
  }

  public CkTask UploadFileBdAsync(CkBinData bd, String filename, String mimeType) {
    long cPtr = chilkatJNI.CkAi_UploadFileBdAsync(swigCPtr, this, CkBinData.getCPtr(bd), bd, filename, mimeType);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean UploadFileSb(CkStringBuilder sb, String filename, String mimeType, CkString outStr) {
    return chilkatJNI.CkAi_UploadFileSb(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, filename, mimeType, CkString.getCPtr(outStr), outStr);
  }

  public String uploadFileSb(CkStringBuilder sb, String filename, String mimeType) {
    return chilkatJNI.CkAi_uploadFileSb(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, filename, mimeType);
  }

  public CkTask UploadFileSbAsync(CkStringBuilder sb, String filename, String mimeType) {
    long cPtr = chilkatJNI.CkAi_UploadFileSbAsync(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, filename, mimeType);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

}
