/* ###
 * IP: Apache License 2.0 with LLVM Exceptions
 */
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.1
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package SWIG;

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

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

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

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

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

  public SBStructuredData() {
    this(lldbJNI.new_SBStructuredData__SWIG_0(), true);
  }

  public SBStructuredData(SBStructuredData rhs) {
    this(lldbJNI.new_SBStructuredData__SWIG_1(SBStructuredData.getCPtr(rhs), rhs), true);
  }

  public SBStructuredData(SWIGTYPE_p_std__shared_ptrT_lldb_private__Event_t event_sp) {
    this(lldbJNI.new_SBStructuredData__SWIG_2(SWIGTYPE_p_std__shared_ptrT_lldb_private__Event_t.getCPtr(event_sp)), true);
  }

  public boolean IsValid() {
    return lldbJNI.SBStructuredData_IsValid(swigCPtr, this);
  }

  public void Clear() {
    lldbJNI.SBStructuredData_Clear(swigCPtr, this);
  }

  public StructuredDataType GetType() {
    return StructuredDataType.swigToEnum(lldbJNI.SBStructuredData_GetType(swigCPtr, this));
  }

  public long GetSize() {
    return lldbJNI.SBStructuredData_GetSize(swigCPtr, this);
  }

  public boolean GetKeys(SBStringList keys) {
    return lldbJNI.SBStructuredData_GetKeys(swigCPtr, this, SBStringList.getCPtr(keys), keys);
  }

  public SBStructuredData GetValueForKey(String key) {
    return new SBStructuredData(lldbJNI.SBStructuredData_GetValueForKey(swigCPtr, this, key), true);
  }

  public SBStructuredData GetItemAtIndex(long idx) {
    return new SBStructuredData(lldbJNI.SBStructuredData_GetItemAtIndex(swigCPtr, this, idx), true);
  }

  public java.math.BigInteger GetIntegerValue(java.math.BigInteger fail_value) {
    return lldbJNI.SBStructuredData_GetIntegerValue__SWIG_0(swigCPtr, this, fail_value);
  }

  public java.math.BigInteger GetIntegerValue() {
    return lldbJNI.SBStructuredData_GetIntegerValue__SWIG_1(swigCPtr, this);
  }

  public double GetFloatValue(double fail_value) {
    return lldbJNI.SBStructuredData_GetFloatValue__SWIG_0(swigCPtr, this, fail_value);
  }

  public double GetFloatValue() {
    return lldbJNI.SBStructuredData_GetFloatValue__SWIG_1(swigCPtr, this);
  }

  public boolean GetBooleanValue(boolean fail_value) {
    return lldbJNI.SBStructuredData_GetBooleanValue__SWIG_0(swigCPtr, this, fail_value);
  }

  public boolean GetBooleanValue() {
    return lldbJNI.SBStructuredData_GetBooleanValue__SWIG_1(swigCPtr, this);
  }

  public long GetStringValue(String dst, long dst_len) {
    return lldbJNI.SBStructuredData_GetStringValue(swigCPtr, this, dst, dst_len);
  }

  public SBError GetAsJSON(SBStream stream) {
    return new SBError(lldbJNI.SBStructuredData_GetAsJSON(swigCPtr, this, SBStream.getCPtr(stream), stream), true);
  }

  public SBError GetDescription(SBStream stream) {
    return new SBError(lldbJNI.SBStructuredData_GetDescription(swigCPtr, this, SBStream.getCPtr(stream), stream), true);
  }

  public SBError SetFromJSON(SBStream stream) {
    return new SBError(lldbJNI.SBStructuredData_SetFromJSON__SWIG_0(swigCPtr, this, SBStream.getCPtr(stream), stream), true);
  }

  public SBError SetFromJSON(String json) {
    return new SBError(lldbJNI.SBStructuredData_SetFromJSON__SWIG_1(swigCPtr, this, json), true);
  }

}
