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

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

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

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

  public CkDns() {
    this(chilkatJNI.new_CkDns(), true);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  public int get_MaxWaitMs() {
    return chilkatJNI.CkDns_get_MaxWaitMs(swigCPtr, this);
  }

  public void put_MaxWaitMs(int newVal) {
    chilkatJNI.CkDns_put_MaxWaitMs(swigCPtr, this, newVal);
  }

  public int get_NumNameservers() {
    return chilkatJNI.CkDns_get_NumNameservers(swigCPtr, this);
  }

  public int get_TlsPref() {
    return chilkatJNI.CkDns_get_TlsPref(swigCPtr, this);
  }

  public void put_TlsPref(int newVal) {
    chilkatJNI.CkDns_put_TlsPref(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

  public void AddDefaultNameservers() {
    chilkatJNI.CkDns_AddDefaultNameservers(swigCPtr, this);
  }

  public void AddNameserver(String ipAddr, boolean supportsTls) {
    chilkatJNI.CkDns_AddNameserver(swigCPtr, this, ipAddr, supportsTls);
  }

  public boolean GetNameserver(int index, CkString outStr) {
    return chilkatJNI.CkDns_GetNameserver(swigCPtr, this, index, CkString.getCPtr(outStr), outStr);
  }

  public String getNameserver(int index) {
    return chilkatJNI.CkDns_getNameserver(swigCPtr, this, index);
  }

  public String nameserver(int index) {
    return chilkatJNI.CkDns_nameserver(swigCPtr, this, index);
  }

  public boolean Query(String recordType, String domain, CkJsonObject answer) {
    return chilkatJNI.CkDns_Query(swigCPtr, this, recordType, domain, CkJsonObject.getCPtr(answer), answer);
  }

  public CkTask QueryAsync(String recordType, String domain, CkJsonObject answer) {
    long cPtr = chilkatJNI.CkDns_QueryAsync(swigCPtr, this, recordType, domain, CkJsonObject.getCPtr(answer), answer);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public void RemoveAllNameservers() {
    chilkatJNI.CkDns_RemoveAllNameservers(swigCPtr, this);
  }

  public void RemoveNameserver(String ipAddr) {
    chilkatJNI.CkDns_RemoveNameserver(swigCPtr, this, ipAddr);
  }

}
