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

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

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

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

  public CkImap() {
    this(chilkatJNI.new_CkImap(), true);
  }

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

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

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

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

  public boolean get_AbortCurrent() {
    return chilkatJNI.CkImap_get_AbortCurrent(swigCPtr, this);
  }

  public void put_AbortCurrent(boolean newVal) {
    chilkatJNI.CkImap_put_AbortCurrent(swigCPtr, this, newVal);
  }

  public boolean get_AppendSeen() {
    return chilkatJNI.CkImap_get_AppendSeen(swigCPtr, this);
  }

  public void put_AppendSeen(boolean newVal) {
    chilkatJNI.CkImap_put_AppendSeen(swigCPtr, this, newVal);
  }

  public int get_AppendUid() {
    return chilkatJNI.CkImap_get_AppendUid(swigCPtr, this);
  }

  public void get_AuthMethod(CkString str) {
    chilkatJNI.CkImap_get_AuthMethod(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String authMethod() {
    return chilkatJNI.CkImap_authMethod(swigCPtr, this);
  }

  public void put_AuthMethod(String newVal) {
    chilkatJNI.CkImap_put_AuthMethod(swigCPtr, this, newVal);
  }

  public void get_AuthzId(CkString str) {
    chilkatJNI.CkImap_get_AuthzId(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String authzId() {
    return chilkatJNI.CkImap_authzId(swigCPtr, this);
  }

  public void put_AuthzId(String newVal) {
    chilkatJNI.CkImap_put_AuthzId(swigCPtr, this, newVal);
  }

  public boolean get_AutoDownloadAttachments() {
    return chilkatJNI.CkImap_get_AutoDownloadAttachments(swigCPtr, this);
  }

  public void put_AutoDownloadAttachments(boolean newVal) {
    chilkatJNI.CkImap_put_AutoDownloadAttachments(swigCPtr, this, newVal);
  }

  public boolean get_AutoFix() {
    return chilkatJNI.CkImap_get_AutoFix(swigCPtr, this);
  }

  public void put_AutoFix(boolean newVal) {
    chilkatJNI.CkImap_put_AutoFix(swigCPtr, this, newVal);
  }

  public void get_ClientIpAddress(CkString str) {
    chilkatJNI.CkImap_get_ClientIpAddress(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String clientIpAddress() {
    return chilkatJNI.CkImap_clientIpAddress(swigCPtr, this);
  }

  public void put_ClientIpAddress(String newVal) {
    chilkatJNI.CkImap_put_ClientIpAddress(swigCPtr, this, newVal);
  }

  public void get_ConnectedToHost(CkString str) {
    chilkatJNI.CkImap_get_ConnectedToHost(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String connectedToHost() {
    return chilkatJNI.CkImap_connectedToHost(swigCPtr, this);
  }

  public int get_ConnectTimeout() {
    return chilkatJNI.CkImap_get_ConnectTimeout(swigCPtr, this);
  }

  public void put_ConnectTimeout(int newVal) {
    chilkatJNI.CkImap_put_ConnectTimeout(swigCPtr, this, newVal);
  }

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

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

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

  public void get_Domain(CkString str) {
    chilkatJNI.CkImap_get_Domain(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String domain() {
    return chilkatJNI.CkImap_domain(swigCPtr, this);
  }

  public void put_Domain(String newVal) {
    chilkatJNI.CkImap_put_Domain(swigCPtr, this, newVal);
  }

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

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

  public void get_HighestModSeq(CkString str) {
    chilkatJNI.CkImap_get_HighestModSeq(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String highestModSeq() {
    return chilkatJNI.CkImap_highestModSeq(swigCPtr, this);
  }

  public void get_HttpProxyAuthMethod(CkString str) {
    chilkatJNI.CkImap_get_HttpProxyAuthMethod(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String httpProxyAuthMethod() {
    return chilkatJNI.CkImap_httpProxyAuthMethod(swigCPtr, this);
  }

  public void put_HttpProxyAuthMethod(String newVal) {
    chilkatJNI.CkImap_put_HttpProxyAuthMethod(swigCPtr, this, newVal);
  }

  public void get_HttpProxyDomain(CkString str) {
    chilkatJNI.CkImap_get_HttpProxyDomain(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String httpProxyDomain() {
    return chilkatJNI.CkImap_httpProxyDomain(swigCPtr, this);
  }

  public void put_HttpProxyDomain(String newVal) {
    chilkatJNI.CkImap_put_HttpProxyDomain(swigCPtr, this, newVal);
  }

  public void get_HttpProxyHostname(CkString str) {
    chilkatJNI.CkImap_get_HttpProxyHostname(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String httpProxyHostname() {
    return chilkatJNI.CkImap_httpProxyHostname(swigCPtr, this);
  }

  public void put_HttpProxyHostname(String newVal) {
    chilkatJNI.CkImap_put_HttpProxyHostname(swigCPtr, this, newVal);
  }

  public void get_HttpProxyPassword(CkString str) {
    chilkatJNI.CkImap_get_HttpProxyPassword(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String httpProxyPassword() {
    return chilkatJNI.CkImap_httpProxyPassword(swigCPtr, this);
  }

  public void put_HttpProxyPassword(String newVal) {
    chilkatJNI.CkImap_put_HttpProxyPassword(swigCPtr, this, newVal);
  }

  public int get_HttpProxyPort() {
    return chilkatJNI.CkImap_get_HttpProxyPort(swigCPtr, this);
  }

  public void put_HttpProxyPort(int newVal) {
    chilkatJNI.CkImap_put_HttpProxyPort(swigCPtr, this, newVal);
  }

  public void get_HttpProxyUsername(CkString str) {
    chilkatJNI.CkImap_get_HttpProxyUsername(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String httpProxyUsername() {
    return chilkatJNI.CkImap_httpProxyUsername(swigCPtr, this);
  }

  public void put_HttpProxyUsername(String newVal) {
    chilkatJNI.CkImap_put_HttpProxyUsername(swigCPtr, this, newVal);
  }

  public boolean get_KeepSessionLog() {
    return chilkatJNI.CkImap_get_KeepSessionLog(swigCPtr, this);
  }

  public void put_KeepSessionLog(boolean newVal) {
    chilkatJNI.CkImap_put_KeepSessionLog(swigCPtr, this, newVal);
  }

  public void get_LastAppendedMime(CkString str) {
    chilkatJNI.CkImap_get_LastAppendedMime(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastAppendedMime() {
    return chilkatJNI.CkImap_lastAppendedMime(swigCPtr, this);
  }

  public void get_LastCommand(CkString str) {
    chilkatJNI.CkImap_get_LastCommand(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastCommand() {
    return chilkatJNI.CkImap_lastCommand(swigCPtr, this);
  }

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

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

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

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

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

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

  public void get_LastIntermediateResponse(CkString str) {
    chilkatJNI.CkImap_get_LastIntermediateResponse(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastIntermediateResponse() {
    return chilkatJNI.CkImap_lastIntermediateResponse(swigCPtr, this);
  }

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

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

  public void get_LastResponse(CkString str) {
    chilkatJNI.CkImap_get_LastResponse(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastResponse() {
    return chilkatJNI.CkImap_lastResponse(swigCPtr, this);
  }

  public void get_LastResponseCode(CkString str) {
    chilkatJNI.CkImap_get_LastResponseCode(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastResponseCode() {
    return chilkatJNI.CkImap_lastResponseCode(swigCPtr, this);
  }

  public void get_LoggedInUser(CkString str) {
    chilkatJNI.CkImap_get_LoggedInUser(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String loggedInUser() {
    return chilkatJNI.CkImap_loggedInUser(swigCPtr, this);
  }

  public int get_NumMessages() {
    return chilkatJNI.CkImap_get_NumMessages(swigCPtr, this);
  }

  public boolean get_PeekMode() {
    return chilkatJNI.CkImap_get_PeekMode(swigCPtr, this);
  }

  public void put_PeekMode(boolean newVal) {
    chilkatJNI.CkImap_put_PeekMode(swigCPtr, this, newVal);
  }

  public int get_PercentDoneScale() {
    return chilkatJNI.CkImap_get_PercentDoneScale(swigCPtr, this);
  }

  public void put_PercentDoneScale(int newVal) {
    chilkatJNI.CkImap_put_PercentDoneScale(swigCPtr, this, newVal);
  }

  public int get_Port() {
    return chilkatJNI.CkImap_get_Port(swigCPtr, this);
  }

  public void put_Port(int newVal) {
    chilkatJNI.CkImap_put_Port(swigCPtr, this, newVal);
  }

  public boolean get_PreferIpv6() {
    return chilkatJNI.CkImap_get_PreferIpv6(swigCPtr, this);
  }

  public void put_PreferIpv6(boolean newVal) {
    chilkatJNI.CkImap_put_PreferIpv6(swigCPtr, this, newVal);
  }

  public int get_ReadTimeout() {
    return chilkatJNI.CkImap_get_ReadTimeout(swigCPtr, this);
  }

  public void put_ReadTimeout(int newVal) {
    chilkatJNI.CkImap_put_ReadTimeout(swigCPtr, this, newVal);
  }

  public boolean get_RequireSslCertVerify() {
    return chilkatJNI.CkImap_get_RequireSslCertVerify(swigCPtr, this);
  }

  public void put_RequireSslCertVerify(boolean newVal) {
    chilkatJNI.CkImap_put_RequireSslCertVerify(swigCPtr, this, newVal);
  }

  public void get_SearchCharset(CkString str) {
    chilkatJNI.CkImap_get_SearchCharset(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String searchCharset() {
    return chilkatJNI.CkImap_searchCharset(swigCPtr, this);
  }

  public void put_SearchCharset(String newVal) {
    chilkatJNI.CkImap_put_SearchCharset(swigCPtr, this, newVal);
  }

  public void get_SelectedMailbox(CkString str) {
    chilkatJNI.CkImap_get_SelectedMailbox(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String selectedMailbox() {
    return chilkatJNI.CkImap_selectedMailbox(swigCPtr, this);
  }

  public int get_SendBufferSize() {
    return chilkatJNI.CkImap_get_SendBufferSize(swigCPtr, this);
  }

  public void put_SendBufferSize(int newVal) {
    chilkatJNI.CkImap_put_SendBufferSize(swigCPtr, this, newVal);
  }

  public void get_SeparatorChar(CkString str) {
    chilkatJNI.CkImap_get_SeparatorChar(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String separatorChar() {
    return chilkatJNI.CkImap_separatorChar(swigCPtr, this);
  }

  public void put_SeparatorChar(String newVal) {
    chilkatJNI.CkImap_put_SeparatorChar(swigCPtr, this, newVal);
  }

  public void get_SessionLog(CkString str) {
    chilkatJNI.CkImap_get_SessionLog(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String sessionLog() {
    return chilkatJNI.CkImap_sessionLog(swigCPtr, this);
  }

  public void get_SocksHostname(CkString str) {
    chilkatJNI.CkImap_get_SocksHostname(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String socksHostname() {
    return chilkatJNI.CkImap_socksHostname(swigCPtr, this);
  }

  public void put_SocksHostname(String newVal) {
    chilkatJNI.CkImap_put_SocksHostname(swigCPtr, this, newVal);
  }

  public void get_SocksPassword(CkString str) {
    chilkatJNI.CkImap_get_SocksPassword(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String socksPassword() {
    return chilkatJNI.CkImap_socksPassword(swigCPtr, this);
  }

  public void put_SocksPassword(String newVal) {
    chilkatJNI.CkImap_put_SocksPassword(swigCPtr, this, newVal);
  }

  public int get_SocksPort() {
    return chilkatJNI.CkImap_get_SocksPort(swigCPtr, this);
  }

  public void put_SocksPort(int newVal) {
    chilkatJNI.CkImap_put_SocksPort(swigCPtr, this, newVal);
  }

  public void get_SocksUsername(CkString str) {
    chilkatJNI.CkImap_get_SocksUsername(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String socksUsername() {
    return chilkatJNI.CkImap_socksUsername(swigCPtr, this);
  }

  public void put_SocksUsername(String newVal) {
    chilkatJNI.CkImap_put_SocksUsername(swigCPtr, this, newVal);
  }

  public int get_SocksVersion() {
    return chilkatJNI.CkImap_get_SocksVersion(swigCPtr, this);
  }

  public void put_SocksVersion(int newVal) {
    chilkatJNI.CkImap_put_SocksVersion(swigCPtr, this, newVal);
  }

  public int get_SoRcvBuf() {
    return chilkatJNI.CkImap_get_SoRcvBuf(swigCPtr, this);
  }

  public void put_SoRcvBuf(int newVal) {
    chilkatJNI.CkImap_put_SoRcvBuf(swigCPtr, this, newVal);
  }

  public void get_SortCriteria(CkString str) {
    chilkatJNI.CkImap_get_SortCriteria(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String sortCriteria() {
    return chilkatJNI.CkImap_sortCriteria(swigCPtr, this);
  }

  public void put_SortCriteria(String newVal) {
    chilkatJNI.CkImap_put_SortCriteria(swigCPtr, this, newVal);
  }

  public int get_SoSndBuf() {
    return chilkatJNI.CkImap_get_SoSndBuf(swigCPtr, this);
  }

  public void put_SoSndBuf(int newVal) {
    chilkatJNI.CkImap_put_SoSndBuf(swigCPtr, this, newVal);
  }

  public boolean get_Ssl() {
    return chilkatJNI.CkImap_get_Ssl(swigCPtr, this);
  }

  public void put_Ssl(boolean newVal) {
    chilkatJNI.CkImap_put_Ssl(swigCPtr, this, newVal);
  }

  public void get_SslAllowedCiphers(CkString str) {
    chilkatJNI.CkImap_get_SslAllowedCiphers(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String sslAllowedCiphers() {
    return chilkatJNI.CkImap_sslAllowedCiphers(swigCPtr, this);
  }

  public void put_SslAllowedCiphers(String newVal) {
    chilkatJNI.CkImap_put_SslAllowedCiphers(swigCPtr, this, newVal);
  }

  public void get_SslProtocol(CkString str) {
    chilkatJNI.CkImap_get_SslProtocol(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String sslProtocol() {
    return chilkatJNI.CkImap_sslProtocol(swigCPtr, this);
  }

  public void put_SslProtocol(String newVal) {
    chilkatJNI.CkImap_put_SslProtocol(swigCPtr, this, newVal);
  }

  public boolean get_SslServerCertVerified() {
    return chilkatJNI.CkImap_get_SslServerCertVerified(swigCPtr, this);
  }

  public boolean get_StartTls() {
    return chilkatJNI.CkImap_get_StartTls(swigCPtr, this);
  }

  public void put_StartTls(boolean newVal) {
    chilkatJNI.CkImap_put_StartTls(swigCPtr, this, newVal);
  }

  public void get_TlsCipherSuite(CkString str) {
    chilkatJNI.CkImap_get_TlsCipherSuite(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String tlsCipherSuite() {
    return chilkatJNI.CkImap_tlsCipherSuite(swigCPtr, this);
  }

  public void get_TlsPinSet(CkString str) {
    chilkatJNI.CkImap_get_TlsPinSet(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String tlsPinSet() {
    return chilkatJNI.CkImap_tlsPinSet(swigCPtr, this);
  }

  public void put_TlsPinSet(String newVal) {
    chilkatJNI.CkImap_put_TlsPinSet(swigCPtr, this, newVal);
  }

  public void get_TlsVersion(CkString str) {
    chilkatJNI.CkImap_get_TlsVersion(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String tlsVersion() {
    return chilkatJNI.CkImap_tlsVersion(swigCPtr, this);
  }

  public long get_UidNext() {
    return chilkatJNI.CkImap_get_UidNext(swigCPtr, this);
  }

  public long get_UidValidity() {
    return chilkatJNI.CkImap_get_UidValidity(swigCPtr, this);
  }

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

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

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

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

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

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

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

  public boolean AddPfxSourceBd(CkBinData bd, String password) {
    return chilkatJNI.CkImap_AddPfxSourceBd(swigCPtr, this, CkBinData.getCPtr(bd), bd, password);
  }

  public boolean AddPfxSourceData(CkByteData pfxBytes, String pfxPassword) {
    return chilkatJNI.CkImap_AddPfxSourceData(swigCPtr, this, CkByteData.getCPtr(pfxBytes), pfxBytes, pfxPassword);
  }

  public boolean AddPfxSourceFile(String pfxFilePath, String pfxPassword) {
    return chilkatJNI.CkImap_AddPfxSourceFile(swigCPtr, this, pfxFilePath, pfxPassword);
  }

  public boolean AppendMail(String mailbox, CkEmail email) {
    return chilkatJNI.CkImap_AppendMail(swigCPtr, this, mailbox, CkEmail.getCPtr(email), email);
  }

  public CkTask AppendMailAsync(String mailbox, CkEmail email) {
    long cPtr = chilkatJNI.CkImap_AppendMailAsync(swigCPtr, this, mailbox, CkEmail.getCPtr(email), email);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean AppendMime(String mailbox, String mimeText) {
    return chilkatJNI.CkImap_AppendMime(swigCPtr, this, mailbox, mimeText);
  }

  public CkTask AppendMimeAsync(String mailbox, String mimeText) {
    long cPtr = chilkatJNI.CkImap_AppendMimeAsync(swigCPtr, this, mailbox, mimeText);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean AppendMimeWithDateStr(String mailbox, String mimeText, String internalDateStr) {
    return chilkatJNI.CkImap_AppendMimeWithDateStr(swigCPtr, this, mailbox, mimeText, internalDateStr);
  }

  public CkTask AppendMimeWithDateStrAsync(String mailbox, String mimeText, String internalDateStr) {
    long cPtr = chilkatJNI.CkImap_AppendMimeWithDateStrAsync(swigCPtr, this, mailbox, mimeText, internalDateStr);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean AppendMimeWithFlags(String mailbox, String mimeText, boolean seen, boolean flagged, boolean answered, boolean draft) {
    return chilkatJNI.CkImap_AppendMimeWithFlags(swigCPtr, this, mailbox, mimeText, seen, flagged, answered, draft);
  }

  public CkTask AppendMimeWithFlagsAsync(String mailbox, String mimeText, boolean seen, boolean flagged, boolean answered, boolean draft) {
    long cPtr = chilkatJNI.CkImap_AppendMimeWithFlagsAsync(swigCPtr, this, mailbox, mimeText, seen, flagged, answered, draft);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean AppendMimeWithFlagsSb(String mailbox, CkStringBuilder sbMime, boolean seen, boolean flagged, boolean answered, boolean draft) {
    return chilkatJNI.CkImap_AppendMimeWithFlagsSb(swigCPtr, this, mailbox, CkStringBuilder.getCPtr(sbMime), sbMime, seen, flagged, answered, draft);
  }

  public CkTask AppendMimeWithFlagsSbAsync(String mailbox, CkStringBuilder sbMime, boolean seen, boolean flagged, boolean answered, boolean draft) {
    long cPtr = chilkatJNI.CkImap_AppendMimeWithFlagsSbAsync(swigCPtr, this, mailbox, CkStringBuilder.getCPtr(sbMime), sbMime, seen, flagged, answered, draft);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

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

  public String capability() {
    return chilkatJNI.CkImap_capability(swigCPtr, this);
  }

  public CkTask CapabilityAsync() {
    long cPtr = chilkatJNI.CkImap_CapabilityAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean CheckConnection() {
    return chilkatJNI.CkImap_CheckConnection(swigCPtr, this);
  }

  public CkMessageSet CheckForNewEmail() {
    long cPtr = chilkatJNI.CkImap_CheckForNewEmail(swigCPtr, this);
    return (cPtr == 0) ? null : new CkMessageSet(cPtr, true);
  }

  public CkTask CheckForNewEmailAsync() {
    long cPtr = chilkatJNI.CkImap_CheckForNewEmailAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public void ClearSessionLog() {
    chilkatJNI.CkImap_ClearSessionLog(swigCPtr, this);
  }

  public boolean CloseMailbox(String mailbox) {
    return chilkatJNI.CkImap_CloseMailbox(swigCPtr, this, mailbox);
  }

  public CkTask CloseMailboxAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_CloseMailboxAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Connect(String domainName) {
    return chilkatJNI.CkImap_Connect(swigCPtr, this, domainName);
  }

  public CkTask ConnectAsync(String domainName) {
    long cPtr = chilkatJNI.CkImap_ConnectAsync(swigCPtr, this, domainName);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Copy(long msgId, boolean bUid, String copyToMailbox) {
    return chilkatJNI.CkImap_Copy(swigCPtr, this, msgId, bUid, copyToMailbox);
  }

  public CkTask CopyAsync(long msgId, boolean bUid, String copyToMailbox) {
    long cPtr = chilkatJNI.CkImap_CopyAsync(swigCPtr, this, msgId, bUid, copyToMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean CopyMultiple(CkMessageSet messageSet, String copyToMailbox) {
    return chilkatJNI.CkImap_CopyMultiple(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, copyToMailbox);
  }

  public CkTask CopyMultipleAsync(CkMessageSet messageSet, String copyToMailbox) {
    long cPtr = chilkatJNI.CkImap_CopyMultipleAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, copyToMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean CopySequence(int startSeqNum, int count, String copyToMailbox) {
    return chilkatJNI.CkImap_CopySequence(swigCPtr, this, startSeqNum, count, copyToMailbox);
  }

  public CkTask CopySequenceAsync(int startSeqNum, int count, String copyToMailbox) {
    long cPtr = chilkatJNI.CkImap_CopySequenceAsync(swigCPtr, this, startSeqNum, count, copyToMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean CreateMailbox(String mailbox) {
    return chilkatJNI.CkImap_CreateMailbox(swigCPtr, this, mailbox);
  }

  public CkTask CreateMailboxAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_CreateMailboxAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean DeleteMailbox(String mailbox) {
    return chilkatJNI.CkImap_DeleteMailbox(swigCPtr, this, mailbox);
  }

  public CkTask DeleteMailboxAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_DeleteMailboxAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Disconnect() {
    return chilkatJNI.CkImap_Disconnect(swigCPtr, this);
  }

  public CkTask DisconnectAsync() {
    long cPtr = chilkatJNI.CkImap_DisconnectAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean ExamineMailbox(String mailbox) {
    return chilkatJNI.CkImap_ExamineMailbox(swigCPtr, this, mailbox);
  }

  public CkTask ExamineMailboxAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_ExamineMailboxAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Expunge() {
    return chilkatJNI.CkImap_Expunge(swigCPtr, this);
  }

  public CkTask ExpungeAsync() {
    long cPtr = chilkatJNI.CkImap_ExpungeAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean ExpungeAndClose() {
    return chilkatJNI.CkImap_ExpungeAndClose(swigCPtr, this);
  }

  public CkTask ExpungeAndCloseAsync() {
    long cPtr = chilkatJNI.CkImap_ExpungeAndCloseAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchAttachment(CkEmail emailObject, int attachmentIndex, String saveToPath) {
    return chilkatJNI.CkImap_FetchAttachment(swigCPtr, this, CkEmail.getCPtr(emailObject), emailObject, attachmentIndex, saveToPath);
  }

  public CkTask FetchAttachmentAsync(CkEmail emailObject, int attachmentIndex, String saveToPath) {
    long cPtr = chilkatJNI.CkImap_FetchAttachmentAsync(swigCPtr, this, CkEmail.getCPtr(emailObject), emailObject, attachmentIndex, saveToPath);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchAttachmentBd(CkEmail email, int attachmentIndex, CkBinData binData) {
    return chilkatJNI.CkImap_FetchAttachmentBd(swigCPtr, this, CkEmail.getCPtr(email), email, attachmentIndex, CkBinData.getCPtr(binData), binData);
  }

  public CkTask FetchAttachmentBdAsync(CkEmail email, int attachmentIndex, CkBinData binData) {
    long cPtr = chilkatJNI.CkImap_FetchAttachmentBdAsync(swigCPtr, this, CkEmail.getCPtr(email), email, attachmentIndex, CkBinData.getCPtr(binData), binData);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchAttachmentBytes(CkEmail email, int attachIndex, CkByteData outBytes) {
    return chilkatJNI.CkImap_FetchAttachmentBytes(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex, CkByteData.getCPtr(outBytes), outBytes);
  }

  public CkTask FetchAttachmentBytesAsync(CkEmail email, int attachIndex) {
    long cPtr = chilkatJNI.CkImap_FetchAttachmentBytesAsync(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchAttachmentSb(CkEmail email, int attachmentIndex, String charset, CkStringBuilder sb) {
    return chilkatJNI.CkImap_FetchAttachmentSb(swigCPtr, this, CkEmail.getCPtr(email), email, attachmentIndex, charset, CkStringBuilder.getCPtr(sb), sb);
  }

  public CkTask FetchAttachmentSbAsync(CkEmail email, int attachmentIndex, String charset, CkStringBuilder sb) {
    long cPtr = chilkatJNI.CkImap_FetchAttachmentSbAsync(swigCPtr, this, CkEmail.getCPtr(email), email, attachmentIndex, charset, CkStringBuilder.getCPtr(sb), sb);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchAttachmentString(CkEmail emailObject, int attachmentIndex, String charset, CkString outStr) {
    return chilkatJNI.CkImap_FetchAttachmentString(swigCPtr, this, CkEmail.getCPtr(emailObject), emailObject, attachmentIndex, charset, CkString.getCPtr(outStr), outStr);
  }

  public String fetchAttachmentString(CkEmail emailObject, int attachmentIndex, String charset) {
    return chilkatJNI.CkImap_fetchAttachmentString(swigCPtr, this, CkEmail.getCPtr(emailObject), emailObject, attachmentIndex, charset);
  }

  public CkTask FetchAttachmentStringAsync(CkEmail emailObject, int attachmentIndex, String charset) {
    long cPtr = chilkatJNI.CkImap_FetchAttachmentStringAsync(swigCPtr, this, CkEmail.getCPtr(emailObject), emailObject, attachmentIndex, charset);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmailBundle FetchBundle(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchBundle(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkEmailBundle(cPtr, true);
  }

  public CkTask FetchBundleAsync(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchBundleAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkStringArray FetchBundleAsMime(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchBundleAsMime(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkStringArray(cPtr, true);
  }

  public CkTask FetchBundleAsMimeAsync(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchBundleAsMimeAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmailBundle FetchChunk(int startSeqNum, int count, CkMessageSet failedSet, CkMessageSet fetchedSet) {
    long cPtr = chilkatJNI.CkImap_FetchChunk(swigCPtr, this, startSeqNum, count, CkMessageSet.getCPtr(failedSet), failedSet, CkMessageSet.getCPtr(fetchedSet), fetchedSet);
    return (cPtr == 0) ? null : new CkEmailBundle(cPtr, true);
  }

  public CkTask FetchChunkAsync(int startSeqNum, int count, CkMessageSet failedSet, CkMessageSet fetchedSet) {
    long cPtr = chilkatJNI.CkImap_FetchChunkAsync(swigCPtr, this, startSeqNum, count, CkMessageSet.getCPtr(failedSet), failedSet, CkMessageSet.getCPtr(fetchedSet), fetchedSet);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchChunk2(int seqnum, int count, CkMessageSet failedSet, CkMessageSet fetchedSet, CkEmailBundle bundle) {
    return chilkatJNI.CkImap_FetchChunk2(swigCPtr, this, seqnum, count, CkMessageSet.getCPtr(failedSet), failedSet, CkMessageSet.getCPtr(fetchedSet), fetchedSet, CkEmailBundle.getCPtr(bundle), bundle);
  }

  public CkTask FetchChunk2Async(int seqnum, int count, CkMessageSet failedSet, CkMessageSet fetchedSet, CkEmailBundle bundle) {
    long cPtr = chilkatJNI.CkImap_FetchChunk2Async(swigCPtr, this, seqnum, count, CkMessageSet.getCPtr(failedSet), failedSet, CkMessageSet.getCPtr(fetchedSet), fetchedSet, CkEmailBundle.getCPtr(bundle), bundle);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchEmail(boolean headerOnly, long msgId, boolean bUid, CkEmail email) {
    return chilkatJNI.CkImap_FetchEmail(swigCPtr, this, headerOnly, msgId, bUid, CkEmail.getCPtr(email), email);
  }

  public CkTask FetchEmailAsync(boolean headerOnly, long msgId, boolean bUid, CkEmail email) {
    long cPtr = chilkatJNI.CkImap_FetchEmailAsync(swigCPtr, this, headerOnly, msgId, bUid, CkEmail.getCPtr(email), email);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchFlags(long msgId, boolean bUid, CkString outStrFlags) {
    return chilkatJNI.CkImap_FetchFlags(swigCPtr, this, msgId, bUid, CkString.getCPtr(outStrFlags), outStrFlags);
  }

  public String fetchFlags(long msgId, boolean bUid) {
    return chilkatJNI.CkImap_fetchFlags(swigCPtr, this, msgId, bUid);
  }

  public CkTask FetchFlagsAsync(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchFlagsAsync(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmailBundle FetchHeaders(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchHeaders(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkEmailBundle(cPtr, true);
  }

  public CkTask FetchHeadersAsync(CkMessageSet messageSet) {
    long cPtr = chilkatJNI.CkImap_FetchHeadersAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchMsgSet(boolean headersOnly, CkMessageSet msgSet, CkEmailBundle bundle) {
    return chilkatJNI.CkImap_FetchMsgSet(swigCPtr, this, headersOnly, CkMessageSet.getCPtr(msgSet), msgSet, CkEmailBundle.getCPtr(bundle), bundle);
  }

  public CkTask FetchMsgSetAsync(boolean headersOnly, CkMessageSet msgSet, CkEmailBundle bundle) {
    long cPtr = chilkatJNI.CkImap_FetchMsgSetAsync(swigCPtr, this, headersOnly, CkMessageSet.getCPtr(msgSet), msgSet, CkEmailBundle.getCPtr(bundle), bundle);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchRange(boolean headersOnly, int seqnum, int count, CkEmailBundle bundle) {
    return chilkatJNI.CkImap_FetchRange(swigCPtr, this, headersOnly, seqnum, count, CkEmailBundle.getCPtr(bundle), bundle);
  }

  public CkTask FetchRangeAsync(boolean headersOnly, int seqnum, int count, CkEmailBundle bundle) {
    long cPtr = chilkatJNI.CkImap_FetchRangeAsync(swigCPtr, this, headersOnly, seqnum, count, CkEmailBundle.getCPtr(bundle), bundle);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmailBundle FetchSequence(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequence(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkEmailBundle(cPtr, true);
  }

  public CkTask FetchSequenceAsync(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequenceAsync(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkStringArray FetchSequenceAsMime(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequenceAsMime(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkStringArray(cPtr, true);
  }

  public CkTask FetchSequenceAsMimeAsync(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequenceAsMimeAsync(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmailBundle FetchSequenceHeaders(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequenceHeaders(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkEmailBundle(cPtr, true);
  }

  public CkTask FetchSequenceHeadersAsync(int startSeqNum, int numMessages) {
    long cPtr = chilkatJNI.CkImap_FetchSequenceHeadersAsync(swigCPtr, this, startSeqNum, numMessages);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmail FetchSingle(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchSingle(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkEmail(cPtr, true);
  }

  public CkTask FetchSingleAsync(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchSingleAsync(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchSingleAsMime(long msgId, boolean bUid, CkString outStrMime) {
    return chilkatJNI.CkImap_FetchSingleAsMime(swigCPtr, this, msgId, bUid, CkString.getCPtr(outStrMime), outStrMime);
  }

  public String fetchSingleAsMime(long msgId, boolean bUid) {
    return chilkatJNI.CkImap_fetchSingleAsMime(swigCPtr, this, msgId, bUid);
  }

  public CkTask FetchSingleAsMimeAsync(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchSingleAsMimeAsync(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchSingleAsMimeSb(long msgId, boolean bUid, CkStringBuilder sbMime) {
    return chilkatJNI.CkImap_FetchSingleAsMimeSb(swigCPtr, this, msgId, bUid, CkStringBuilder.getCPtr(sbMime), sbMime);
  }

  public CkTask FetchSingleAsMimeSbAsync(long msgId, boolean bUid, CkStringBuilder sbMime) {
    long cPtr = chilkatJNI.CkImap_FetchSingleAsMimeSbAsync(swigCPtr, this, msgId, bUid, CkStringBuilder.getCPtr(sbMime), sbMime);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchSingleBd(long msgId, boolean bUid, CkBinData mimeData) {
    return chilkatJNI.CkImap_FetchSingleBd(swigCPtr, this, msgId, bUid, CkBinData.getCPtr(mimeData), mimeData);
  }

  public CkTask FetchSingleBdAsync(long msgId, boolean bUid, CkBinData mimeData) {
    long cPtr = chilkatJNI.CkImap_FetchSingleBdAsync(swigCPtr, this, msgId, bUid, CkBinData.getCPtr(mimeData), mimeData);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkEmail FetchSingleHeader(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchSingleHeader(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkEmail(cPtr, true);
  }

  public CkTask FetchSingleHeaderAsync(long msgId, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_FetchSingleHeaderAsync(swigCPtr, this, msgId, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean FetchSingleHeaderAsMime(long msgId, boolean bUID, CkString outStr) {
    return chilkatJNI.CkImap_FetchSingleHeaderAsMime(swigCPtr, this, msgId, bUID, CkString.getCPtr(outStr), outStr);
  }

  public String fetchSingleHeaderAsMime(long msgId, boolean bUID) {
    return chilkatJNI.CkImap_fetchSingleHeaderAsMime(swigCPtr, this, msgId, bUID);
  }

  public CkTask FetchSingleHeaderAsMimeAsync(long msgId, boolean bUID) {
    long cPtr = chilkatJNI.CkImap_FetchSingleHeaderAsMimeAsync(swigCPtr, this, msgId, bUID);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkMessageSet GetAllUids() {
    long cPtr = chilkatJNI.CkImap_GetAllUids(swigCPtr, this);
    return (cPtr == 0) ? null : new CkMessageSet(cPtr, true);
  }

  public CkTask GetAllUidsAsync() {
    long cPtr = chilkatJNI.CkImap_GetAllUidsAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean GetMailAttachFilename(CkEmail email, int attachIndex, CkString outStrFilename) {
    return chilkatJNI.CkImap_GetMailAttachFilename(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex, CkString.getCPtr(outStrFilename), outStrFilename);
  }

  public String getMailAttachFilename(CkEmail email, int attachIndex) {
    return chilkatJNI.CkImap_getMailAttachFilename(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex);
  }

  public String mailAttachFilename(CkEmail email, int attachIndex) {
    return chilkatJNI.CkImap_mailAttachFilename(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex);
  }

  public int GetMailAttachSize(CkEmail email, int attachIndex) {
    return chilkatJNI.CkImap_GetMailAttachSize(swigCPtr, this, CkEmail.getCPtr(email), email, attachIndex);
  }

  public boolean GetMailboxStatus(String mailbox, CkString outStr) {
    return chilkatJNI.CkImap_GetMailboxStatus(swigCPtr, this, mailbox, CkString.getCPtr(outStr), outStr);
  }

  public String getMailboxStatus(String mailbox) {
    return chilkatJNI.CkImap_getMailboxStatus(swigCPtr, this, mailbox);
  }

  public String mailboxStatus(String mailbox) {
    return chilkatJNI.CkImap_mailboxStatus(swigCPtr, this, mailbox);
  }

  public CkTask GetMailboxStatusAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_GetMailboxStatusAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public int GetMailFlag(CkEmail email, String flagName) {
    return chilkatJNI.CkImap_GetMailFlag(swigCPtr, this, CkEmail.getCPtr(email), email, flagName);
  }

  public int GetMailNumAttach(CkEmail email) {
    return chilkatJNI.CkImap_GetMailNumAttach(swigCPtr, this, CkEmail.getCPtr(email), email);
  }

  public int GetMailSize(CkEmail email) {
    return chilkatJNI.CkImap_GetMailSize(swigCPtr, this, CkEmail.getCPtr(email), email);
  }

  public boolean GetQuota(String quotaRoot, CkString outStr) {
    return chilkatJNI.CkImap_GetQuota(swigCPtr, this, quotaRoot, CkString.getCPtr(outStr), outStr);
  }

  public String getQuota(String quotaRoot) {
    return chilkatJNI.CkImap_getQuota(swigCPtr, this, quotaRoot);
  }

  public String quota(String quotaRoot) {
    return chilkatJNI.CkImap_quota(swigCPtr, this, quotaRoot);
  }

  public CkTask GetQuotaAsync(String quotaRoot) {
    long cPtr = chilkatJNI.CkImap_GetQuotaAsync(swigCPtr, this, quotaRoot);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean GetQuotaRoot(String mailboxName, CkString outStr) {
    return chilkatJNI.CkImap_GetQuotaRoot(swigCPtr, this, mailboxName, CkString.getCPtr(outStr), outStr);
  }

  public String getQuotaRoot(String mailboxName) {
    return chilkatJNI.CkImap_getQuotaRoot(swigCPtr, this, mailboxName);
  }

  public String quotaRoot(String mailboxName) {
    return chilkatJNI.CkImap_quotaRoot(swigCPtr, this, mailboxName);
  }

  public CkTask GetQuotaRootAsync(String mailboxName) {
    long cPtr = chilkatJNI.CkImap_GetQuotaRootAsync(swigCPtr, this, mailboxName);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean GetServerCert(CkCert cert) {
    return chilkatJNI.CkImap_GetServerCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public CkCert GetSslServerCert() {
    long cPtr = chilkatJNI.CkImap_GetSslServerCert(swigCPtr, this);
    return (cPtr == 0) ? null : new CkCert(cPtr, true);
  }

  public boolean HasCapability(String name, String capabilityResponse) {
    return chilkatJNI.CkImap_HasCapability(swigCPtr, this, name, capabilityResponse);
  }

  public boolean IdleCheck(int timeoutMs, CkString outStr) {
    return chilkatJNI.CkImap_IdleCheck(swigCPtr, this, timeoutMs, CkString.getCPtr(outStr), outStr);
  }

  public String idleCheck(int timeoutMs) {
    return chilkatJNI.CkImap_idleCheck(swigCPtr, this, timeoutMs);
  }

  public CkTask IdleCheckAsync(int timeoutMs) {
    long cPtr = chilkatJNI.CkImap_IdleCheckAsync(swigCPtr, this, timeoutMs);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean IdleDone() {
    return chilkatJNI.CkImap_IdleDone(swigCPtr, this);
  }

  public CkTask IdleDoneAsync() {
    long cPtr = chilkatJNI.CkImap_IdleDoneAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean IdleStart() {
    return chilkatJNI.CkImap_IdleStart(swigCPtr, this);
  }

  public CkTask IdleStartAsync() {
    long cPtr = chilkatJNI.CkImap_IdleStartAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean IsConnected() {
    return chilkatJNI.CkImap_IsConnected(swigCPtr, this);
  }

  public boolean IsLoggedIn() {
    return chilkatJNI.CkImap_IsLoggedIn(swigCPtr, this);
  }

  public CkMailboxes ListMailboxes(String reference, String wildcardedMailbox) {
    long cPtr = chilkatJNI.CkImap_ListMailboxes(swigCPtr, this, reference, wildcardedMailbox);
    return (cPtr == 0) ? null : new CkMailboxes(cPtr, true);
  }

  public CkTask ListMailboxesAsync(String reference, String wildcardedMailbox) {
    long cPtr = chilkatJNI.CkImap_ListMailboxesAsync(swigCPtr, this, reference, wildcardedMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkMailboxes ListSubscribed(String reference, String wildcardedMailbox) {
    long cPtr = chilkatJNI.CkImap_ListSubscribed(swigCPtr, this, reference, wildcardedMailbox);
    return (cPtr == 0) ? null : new CkMailboxes(cPtr, true);
  }

  public CkTask ListSubscribedAsync(String reference, String wildcardedMailbox) {
    long cPtr = chilkatJNI.CkImap_ListSubscribedAsync(swigCPtr, this, reference, wildcardedMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean LoadTaskCaller(CkTask task) {
    return chilkatJNI.CkImap_LoadTaskCaller(swigCPtr, this, CkTask.getCPtr(task), task);
  }

  public boolean Login(String loginName, String password) {
    return chilkatJNI.CkImap_Login(swigCPtr, this, loginName, password);
  }

  public CkTask LoginAsync(String loginName, String password) {
    long cPtr = chilkatJNI.CkImap_LoginAsync(swigCPtr, this, loginName, password);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean LoginSecure(CkSecureString loginName, CkSecureString password) {
    return chilkatJNI.CkImap_LoginSecure(swigCPtr, this, CkSecureString.getCPtr(loginName), loginName, CkSecureString.getCPtr(password), password);
  }

  public CkTask LoginSecureAsync(CkSecureString loginName, CkSecureString password) {
    long cPtr = chilkatJNI.CkImap_LoginSecureAsync(swigCPtr, this, CkSecureString.getCPtr(loginName), loginName, CkSecureString.getCPtr(password), password);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Logout() {
    return chilkatJNI.CkImap_Logout(swigCPtr, this);
  }

  public CkTask LogoutAsync() {
    long cPtr = chilkatJNI.CkImap_LogoutAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean MbxList(boolean subscribed, String reference, String mbxPattern, CkMailboxes mboxes) {
    return chilkatJNI.CkImap_MbxList(swigCPtr, this, subscribed, reference, mbxPattern, CkMailboxes.getCPtr(mboxes), mboxes);
  }

  public CkTask MbxListAsync(boolean subscribed, String reference, String mbxPattern, CkMailboxes mboxes) {
    long cPtr = chilkatJNI.CkImap_MbxListAsync(swigCPtr, this, subscribed, reference, mbxPattern, CkMailboxes.getCPtr(mboxes), mboxes);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean MoveMessages(CkMessageSet messageSet, String destFolder) {
    return chilkatJNI.CkImap_MoveMessages(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, destFolder);
  }

  public CkTask MoveMessagesAsync(CkMessageSet messageSet, String destFolder) {
    long cPtr = chilkatJNI.CkImap_MoveMessagesAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, destFolder);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Noop() {
    return chilkatJNI.CkImap_Noop(swigCPtr, this);
  }

  public CkTask NoopAsync() {
    long cPtr = chilkatJNI.CkImap_NoopAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean QueryMbx(String criteria, boolean bUid, CkMessageSet msgSet) {
    return chilkatJNI.CkImap_QueryMbx(swigCPtr, this, criteria, bUid, CkMessageSet.getCPtr(msgSet), msgSet);
  }

  public CkTask QueryMbxAsync(String criteria, boolean bUid, CkMessageSet msgSet) {
    long cPtr = chilkatJNI.CkImap_QueryMbxAsync(swigCPtr, this, criteria, bUid, CkMessageSet.getCPtr(msgSet), msgSet);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean QueryThread(String threadAlg, String searchCriteria, boolean bUid, CkJsonObject json) {
    return chilkatJNI.CkImap_QueryThread(swigCPtr, this, threadAlg, searchCriteria, bUid, CkJsonObject.getCPtr(json), json);
  }

  public CkTask QueryThreadAsync(String threadAlg, String searchCriteria, boolean bUid, CkJsonObject json) {
    long cPtr = chilkatJNI.CkImap_QueryThreadAsync(swigCPtr, this, threadAlg, searchCriteria, bUid, CkJsonObject.getCPtr(json), json);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean RawCommandBd(CkBinData bdCmd, CkBinData bdResp) {
    return chilkatJNI.CkImap_RawCommandBd(swigCPtr, this, CkBinData.getCPtr(bdCmd), bdCmd, CkBinData.getCPtr(bdResp), bdResp);
  }

  public CkTask RawCommandBdAsync(CkBinData bdCmd, CkBinData bdResp) {
    long cPtr = chilkatJNI.CkImap_RawCommandBdAsync(swigCPtr, this, CkBinData.getCPtr(bdCmd), bdCmd, CkBinData.getCPtr(bdResp), bdResp);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean RefetchMailFlags(CkEmail email) {
    return chilkatJNI.CkImap_RefetchMailFlags(swigCPtr, this, CkEmail.getCPtr(email), email);
  }

  public CkTask RefetchMailFlagsAsync(CkEmail email) {
    long cPtr = chilkatJNI.CkImap_RefetchMailFlagsAsync(swigCPtr, this, CkEmail.getCPtr(email), email);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean RenameMailbox(String fromMailbox, String toMailbox) {
    return chilkatJNI.CkImap_RenameMailbox(swigCPtr, this, fromMailbox, toMailbox);
  }

  public CkTask RenameMailboxAsync(String fromMailbox, String toMailbox) {
    long cPtr = chilkatJNI.CkImap_RenameMailboxAsync(swigCPtr, this, fromMailbox, toMailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkMessageSet Search(String criteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_Search(swigCPtr, this, criteria, bUid);
    return (cPtr == 0) ? null : new CkMessageSet(cPtr, true);
  }

  public CkTask SearchAsync(String criteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_SearchAsync(swigCPtr, this, criteria, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SelectMailbox(String mailbox) {
    return chilkatJNI.CkImap_SelectMailbox(swigCPtr, this, mailbox);
  }

  public CkTask SelectMailboxAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_SelectMailboxAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SendRawCommand(String cmd, CkString outRawResponse) {
    return chilkatJNI.CkImap_SendRawCommand(swigCPtr, this, cmd, CkString.getCPtr(outRawResponse), outRawResponse);
  }

  public String sendRawCommand(String cmd) {
    return chilkatJNI.CkImap_sendRawCommand(swigCPtr, this, cmd);
  }

  public CkTask SendRawCommandAsync(String cmd) {
    long cPtr = chilkatJNI.CkImap_SendRawCommandAsync(swigCPtr, this, cmd);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SendRawCommandB(String cmd, CkByteData outBytes) {
    return chilkatJNI.CkImap_SendRawCommandB(swigCPtr, this, cmd, CkByteData.getCPtr(outBytes), outBytes);
  }

  public CkTask SendRawCommandBAsync(String cmd) {
    long cPtr = chilkatJNI.CkImap_SendRawCommandBAsync(swigCPtr, this, cmd);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SendRawCommandC(CkByteData cmd, CkByteData outBytes) {
    return chilkatJNI.CkImap_SendRawCommandC(swigCPtr, this, CkByteData.getCPtr(cmd), cmd, CkByteData.getCPtr(outBytes), outBytes);
  }

  public CkTask SendRawCommandCAsync(CkByteData cmd) {
    long cPtr = chilkatJNI.CkImap_SendRawCommandCAsync(swigCPtr, this, CkByteData.getCPtr(cmd), cmd);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SetDecryptCert(CkCert cert) {
    return chilkatJNI.CkImap_SetDecryptCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public boolean SetDecryptCert2(CkCert cert, CkPrivateKey key) {
    return chilkatJNI.CkImap_SetDecryptCert2(swigCPtr, this, CkCert.getCPtr(cert), cert, CkPrivateKey.getCPtr(key), key);
  }

  public boolean SetFlag(long msgId, boolean bUid, String flagName, int value) {
    return chilkatJNI.CkImap_SetFlag(swigCPtr, this, msgId, bUid, flagName, value);
  }

  public CkTask SetFlagAsync(long msgId, boolean bUid, String flagName, int value) {
    long cPtr = chilkatJNI.CkImap_SetFlagAsync(swigCPtr, this, msgId, bUid, flagName, value);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SetFlags(CkMessageSet messageSet, String flagName, int value) {
    return chilkatJNI.CkImap_SetFlags(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, flagName, value);
  }

  public CkTask SetFlagsAsync(CkMessageSet messageSet, String flagName, int value) {
    long cPtr = chilkatJNI.CkImap_SetFlagsAsync(swigCPtr, this, CkMessageSet.getCPtr(messageSet), messageSet, flagName, value);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SetMailFlag(CkEmail email, String flagName, int value) {
    return chilkatJNI.CkImap_SetMailFlag(swigCPtr, this, CkEmail.getCPtr(email), email, flagName, value);
  }

  public CkTask SetMailFlagAsync(CkEmail email, String flagName, int value) {
    long cPtr = chilkatJNI.CkImap_SetMailFlagAsync(swigCPtr, this, CkEmail.getCPtr(email), email, flagName, value);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SetQuota(String quotaRoot, String resource, int quota) {
    return chilkatJNI.CkImap_SetQuota(swigCPtr, this, quotaRoot, resource, quota);
  }

  public CkTask SetQuotaAsync(String quotaRoot, String resource, int quota) {
    long cPtr = chilkatJNI.CkImap_SetQuotaAsync(swigCPtr, this, quotaRoot, resource, quota);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SetSslClientCert(CkCert cert) {
    return chilkatJNI.CkImap_SetSslClientCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public boolean SetSslClientCertPem(String pemDataOrFilename, String pemPassword) {
    return chilkatJNI.CkImap_SetSslClientCertPem(swigCPtr, this, pemDataOrFilename, pemPassword);
  }

  public boolean SetSslClientCertPfx(String pfxFilename, String pfxPassword) {
    return chilkatJNI.CkImap_SetSslClientCertPfx(swigCPtr, this, pfxFilename, pfxPassword);
  }

  public CkMessageSet Sort(String sortCriteria, String charset, String searchCriteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_Sort(swigCPtr, this, sortCriteria, charset, searchCriteria, bUid);
    return (cPtr == 0) ? null : new CkMessageSet(cPtr, true);
  }

  public CkTask SortAsync(String sortCriteria, String charset, String searchCriteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_SortAsync(swigCPtr, this, sortCriteria, charset, searchCriteria, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SshAuthenticatePk(String sshLogin, CkSshKey privateKey) {
    return chilkatJNI.CkImap_SshAuthenticatePk(swigCPtr, this, sshLogin, CkSshKey.getCPtr(privateKey), privateKey);
  }

  public CkTask SshAuthenticatePkAsync(String sshLogin, CkSshKey privateKey) {
    long cPtr = chilkatJNI.CkImap_SshAuthenticatePkAsync(swigCPtr, this, sshLogin, CkSshKey.getCPtr(privateKey), privateKey);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SshAuthenticatePw(String sshLogin, String sshPassword) {
    return chilkatJNI.CkImap_SshAuthenticatePw(swigCPtr, this, sshLogin, sshPassword);
  }

  public CkTask SshAuthenticatePwAsync(String sshLogin, String sshPassword) {
    long cPtr = chilkatJNI.CkImap_SshAuthenticatePwAsync(swigCPtr, this, sshLogin, sshPassword);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SshCloseTunnel() {
    return chilkatJNI.CkImap_SshCloseTunnel(swigCPtr, this);
  }

  public CkTask SshCloseTunnelAsync() {
    long cPtr = chilkatJNI.CkImap_SshCloseTunnelAsync(swigCPtr, this);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SshOpenTunnel(String sshHostname, int sshPort) {
    return chilkatJNI.CkImap_SshOpenTunnel(swigCPtr, this, sshHostname, sshPort);
  }

  public CkTask SshOpenTunnelAsync(String sshHostname, int sshPort) {
    long cPtr = chilkatJNI.CkImap_SshOpenTunnelAsync(swigCPtr, this, sshHostname, sshPort);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean StoreFlags(long msgId, boolean bUid, String flagNames, int value) {
    return chilkatJNI.CkImap_StoreFlags(swigCPtr, this, msgId, bUid, flagNames, value);
  }

  public CkTask StoreFlagsAsync(long msgId, boolean bUid, String flagNames, int value) {
    long cPtr = chilkatJNI.CkImap_StoreFlagsAsync(swigCPtr, this, msgId, bUid, flagNames, value);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Subscribe(String mailbox) {
    return chilkatJNI.CkImap_Subscribe(swigCPtr, this, mailbox);
  }

  public CkTask SubscribeAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_SubscribeAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public CkJsonObject ThreadCmd(String threadAlg, String charset, String searchCriteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_ThreadCmd(swigCPtr, this, threadAlg, charset, searchCriteria, bUid);
    return (cPtr == 0) ? null : new CkJsonObject(cPtr, true);
  }

  public CkTask ThreadCmdAsync(String threadAlg, String charset, String searchCriteria, boolean bUid) {
    long cPtr = chilkatJNI.CkImap_ThreadCmdAsync(swigCPtr, this, threadAlg, charset, searchCriteria, bUid);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean Unsubscribe(String mailbox) {
    return chilkatJNI.CkImap_Unsubscribe(swigCPtr, this, mailbox);
  }

  public CkTask UnsubscribeAsync(String mailbox) {
    long cPtr = chilkatJNI.CkImap_UnsubscribeAsync(swigCPtr, this, mailbox);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean UseCertVault(CkXmlCertVault vault) {
    return chilkatJNI.CkImap_UseCertVault(swigCPtr, this, CkXmlCertVault.getCPtr(vault), vault);
  }

  public boolean UseSsh(CkSsh ssh) {
    return chilkatJNI.CkImap_UseSsh(swigCPtr, this, CkSsh.getCPtr(ssh), ssh);
  }

  public boolean UseSshTunnel(CkSocket tunnel) {
    return chilkatJNI.CkImap_UseSshTunnel(swigCPtr, this, CkSocket.getCPtr(tunnel), tunnel);
  }

}
