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

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

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

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

  public CkOAuth2() {
    this(chilkatJNI.new_CkOAuth2(), true);
  }

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

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

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

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

  public void get_AccessToken(CkString str) {
    chilkatJNI.CkOAuth2_get_AccessToken(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String accessToken() {
    return chilkatJNI.CkOAuth2_accessToken(swigCPtr, this);
  }

  public void put_AccessToken(String newVal) {
    chilkatJNI.CkOAuth2_put_AccessToken(swigCPtr, this, newVal);
  }

  public void get_AccessTokenResponse(CkString str) {
    chilkatJNI.CkOAuth2_get_AccessTokenResponse(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String accessTokenResponse() {
    return chilkatJNI.CkOAuth2_accessTokenResponse(swigCPtr, this);
  }

  public void get_AppCallbackUrl(CkString str) {
    chilkatJNI.CkOAuth2_get_AppCallbackUrl(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String appCallbackUrl() {
    return chilkatJNI.CkOAuth2_appCallbackUrl(swigCPtr, this);
  }

  public void put_AppCallbackUrl(String newVal) {
    chilkatJNI.CkOAuth2_put_AppCallbackUrl(swigCPtr, this, newVal);
  }

  public int get_AuthFlowState() {
    return chilkatJNI.CkOAuth2_get_AuthFlowState(swigCPtr, this);
  }

  public void get_AuthorizationEndpoint(CkString str) {
    chilkatJNI.CkOAuth2_get_AuthorizationEndpoint(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String authorizationEndpoint() {
    return chilkatJNI.CkOAuth2_authorizationEndpoint(swigCPtr, this);
  }

  public void put_AuthorizationEndpoint(String newVal) {
    chilkatJNI.CkOAuth2_put_AuthorizationEndpoint(swigCPtr, this, newVal);
  }

  public void get_ClientId(CkString str) {
    chilkatJNI.CkOAuth2_get_ClientId(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String clientId() {
    return chilkatJNI.CkOAuth2_clientId(swigCPtr, this);
  }

  public void put_ClientId(String newVal) {
    chilkatJNI.CkOAuth2_put_ClientId(swigCPtr, this, newVal);
  }

  public void get_ClientSecret(CkString str) {
    chilkatJNI.CkOAuth2_get_ClientSecret(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String clientSecret() {
    return chilkatJNI.CkOAuth2_clientSecret(swigCPtr, this);
  }

  public void put_ClientSecret(String newVal) {
    chilkatJNI.CkOAuth2_put_ClientSecret(swigCPtr, this, newVal);
  }

  public boolean get_CodeChallenge() {
    return chilkatJNI.CkOAuth2_get_CodeChallenge(swigCPtr, this);
  }

  public void put_CodeChallenge(boolean newVal) {
    chilkatJNI.CkOAuth2_put_CodeChallenge(swigCPtr, this, newVal);
  }

  public void get_CodeChallengeMethod(CkString str) {
    chilkatJNI.CkOAuth2_get_CodeChallengeMethod(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String codeChallengeMethod() {
    return chilkatJNI.CkOAuth2_codeChallengeMethod(swigCPtr, this);
  }

  public void put_CodeChallengeMethod(String newVal) {
    chilkatJNI.CkOAuth2_put_CodeChallengeMethod(swigCPtr, this, newVal);
  }

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

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

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

  public void get_FailureInfo(CkString str) {
    chilkatJNI.CkOAuth2_get_FailureInfo(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String failureInfo() {
    return chilkatJNI.CkOAuth2_failureInfo(swigCPtr, this);
  }

  public boolean get_IncludeNonce() {
    return chilkatJNI.CkOAuth2_get_IncludeNonce(swigCPtr, this);
  }

  public void put_IncludeNonce(boolean newVal) {
    chilkatJNI.CkOAuth2_put_IncludeNonce(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

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

  public int get_ListenPort() {
    return chilkatJNI.CkOAuth2_get_ListenPort(swigCPtr, this);
  }

  public void put_ListenPort(int newVal) {
    chilkatJNI.CkOAuth2_put_ListenPort(swigCPtr, this, newVal);
  }

  public int get_ListenPortRangeEnd() {
    return chilkatJNI.CkOAuth2_get_ListenPortRangeEnd(swigCPtr, this);
  }

  public void put_ListenPortRangeEnd(int newVal) {
    chilkatJNI.CkOAuth2_put_ListenPortRangeEnd(swigCPtr, this, newVal);
  }

  public int get_ListenPortSelected() {
    return chilkatJNI.CkOAuth2_get_ListenPortSelected(swigCPtr, this);
  }

  public void get_LocalHost(CkString str) {
    chilkatJNI.CkOAuth2_get_LocalHost(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String localHost() {
    return chilkatJNI.CkOAuth2_localHost(swigCPtr, this);
  }

  public void put_LocalHost(String newVal) {
    chilkatJNI.CkOAuth2_put_LocalHost(swigCPtr, this, newVal);
  }

  public int get_NonceLength() {
    return chilkatJNI.CkOAuth2_get_NonceLength(swigCPtr, this);
  }

  public void put_NonceLength(int newVal) {
    chilkatJNI.CkOAuth2_put_NonceLength(swigCPtr, this, newVal);
  }

  public boolean get_Oob() {
    return chilkatJNI.CkOAuth2_get_Oob(swigCPtr, this);
  }

  public void put_Oob(boolean newVal) {
    chilkatJNI.CkOAuth2_put_Oob(swigCPtr, this, newVal);
  }

  public void get_RedirectAllowHtml(CkString str) {
    chilkatJNI.CkOAuth2_get_RedirectAllowHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String redirectAllowHtml() {
    return chilkatJNI.CkOAuth2_redirectAllowHtml(swigCPtr, this);
  }

  public void put_RedirectAllowHtml(String newVal) {
    chilkatJNI.CkOAuth2_put_RedirectAllowHtml(swigCPtr, this, newVal);
  }

  public void get_RedirectDenyHtml(CkString str) {
    chilkatJNI.CkOAuth2_get_RedirectDenyHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String redirectDenyHtml() {
    return chilkatJNI.CkOAuth2_redirectDenyHtml(swigCPtr, this);
  }

  public void put_RedirectDenyHtml(String newVal) {
    chilkatJNI.CkOAuth2_put_RedirectDenyHtml(swigCPtr, this, newVal);
  }

  public void get_RedirectReqReceived(CkString str) {
    chilkatJNI.CkOAuth2_get_RedirectReqReceived(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String redirectReqReceived() {
    return chilkatJNI.CkOAuth2_redirectReqReceived(swigCPtr, this);
  }

  public void get_RefreshToken(CkString str) {
    chilkatJNI.CkOAuth2_get_RefreshToken(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String refreshToken() {
    return chilkatJNI.CkOAuth2_refreshToken(swigCPtr, this);
  }

  public void put_RefreshToken(String newVal) {
    chilkatJNI.CkOAuth2_put_RefreshToken(swigCPtr, this, newVal);
  }

  public void get_Resource(CkString str) {
    chilkatJNI.CkOAuth2_get_Resource(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String resource() {
    return chilkatJNI.CkOAuth2_resource(swigCPtr, this);
  }

  public void put_Resource(String newVal) {
    chilkatJNI.CkOAuth2_put_Resource(swigCPtr, this, newVal);
  }

  public void get_ResponseMode(CkString str) {
    chilkatJNI.CkOAuth2_get_ResponseMode(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String responseMode() {
    return chilkatJNI.CkOAuth2_responseMode(swigCPtr, this);
  }

  public void put_ResponseMode(String newVal) {
    chilkatJNI.CkOAuth2_put_ResponseMode(swigCPtr, this, newVal);
  }

  public void get_ResponseType(CkString str) {
    chilkatJNI.CkOAuth2_get_ResponseType(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String responseType() {
    return chilkatJNI.CkOAuth2_responseType(swigCPtr, this);
  }

  public void put_ResponseType(String newVal) {
    chilkatJNI.CkOAuth2_put_ResponseType(swigCPtr, this, newVal);
  }

  public void get_Scope(CkString str) {
    chilkatJNI.CkOAuth2_get_Scope(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String scope() {
    return chilkatJNI.CkOAuth2_scope(swigCPtr, this);
  }

  public void put_Scope(String newVal) {
    chilkatJNI.CkOAuth2_put_Scope(swigCPtr, this, newVal);
  }

  public void get_StateParam(CkString str) {
    chilkatJNI.CkOAuth2_get_StateParam(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String stateParam() {
    return chilkatJNI.CkOAuth2_stateParam(swigCPtr, this);
  }

  public void put_StateParam(String newVal) {
    chilkatJNI.CkOAuth2_put_StateParam(swigCPtr, this, newVal);
  }

  public void get_TokenEndpoint(CkString str) {
    chilkatJNI.CkOAuth2_get_TokenEndpoint(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String tokenEndpoint() {
    return chilkatJNI.CkOAuth2_tokenEndpoint(swigCPtr, this);
  }

  public void put_TokenEndpoint(String newVal) {
    chilkatJNI.CkOAuth2_put_TokenEndpoint(swigCPtr, this, newVal);
  }

  public void get_TokenType(CkString str) {
    chilkatJNI.CkOAuth2_get_TokenType(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String tokenType() {
    return chilkatJNI.CkOAuth2_tokenType(swigCPtr, this);
  }

  public void put_TokenType(String newVal) {
    chilkatJNI.CkOAuth2_put_TokenType(swigCPtr, this, newVal);
  }

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

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

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

  public boolean get_UseBasicAuth() {
    return chilkatJNI.CkOAuth2_get_UseBasicAuth(swigCPtr, this);
  }

  public void put_UseBasicAuth(boolean newVal) {
    chilkatJNI.CkOAuth2_put_UseBasicAuth(swigCPtr, this, newVal);
  }

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

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

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

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

  public boolean AddAuthQueryParam(String name, String value) {
    return chilkatJNI.CkOAuth2_AddAuthQueryParam(swigCPtr, this, name, value);
  }

  public boolean AddRefreshQueryParam(String name, String value) {
    return chilkatJNI.CkOAuth2_AddRefreshQueryParam(swigCPtr, this, name, value);
  }

  public boolean AddTokenQueryParam(String name, String value) {
    return chilkatJNI.CkOAuth2_AddTokenQueryParam(swigCPtr, this, name, value);
  }

  public boolean Cancel() {
    return chilkatJNI.CkOAuth2_Cancel(swigCPtr, this);
  }

  public boolean ExchangeCodeForToken(String code) {
    return chilkatJNI.CkOAuth2_ExchangeCodeForToken(swigCPtr, this, code);
  }

  public CkTask ExchangeCodeForTokenAsync(String code) {
    long cPtr = chilkatJNI.CkOAuth2_ExchangeCodeForTokenAsync(swigCPtr, this, code);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

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

  public boolean GetRedirectRequestParam(String paramName, CkString outStr) {
    return chilkatJNI.CkOAuth2_GetRedirectRequestParam(swigCPtr, this, paramName, CkString.getCPtr(outStr), outStr);
  }

  public String getRedirectRequestParam(String paramName) {
    return chilkatJNI.CkOAuth2_getRedirectRequestParam(swigCPtr, this, paramName);
  }

  public String redirectRequestParam(String paramName) {
    return chilkatJNI.CkOAuth2_redirectRequestParam(swigCPtr, this, paramName);
  }

  public boolean LaunchBrowser(String url) {
    return chilkatJNI.CkOAuth2_LaunchBrowser(swigCPtr, this, url);
  }

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

  public boolean RefreshAccessToken() {
    return chilkatJNI.CkOAuth2_RefreshAccessToken(swigCPtr, this);
  }

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

  public boolean SetRefreshHeader(String name, String value) {
    return chilkatJNI.CkOAuth2_SetRefreshHeader(swigCPtr, this, name, value);
  }

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

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

  public String startAuth() {
    return chilkatJNI.CkOAuth2_startAuth(swigCPtr, this);
  }

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

}
