/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.robotraconteur;

public class RobotRaconteurVersion implements java.lang.Comparable<RobotRaconteurVersion> {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

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

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


public boolean equals(Object o)
{
	if (o instanceof RobotRaconteurVersion)
	{
		return RobotRaconteurJava.RobotRaconteurVersion_eq(this, (RobotRaconteurVersion)o);
	}
	return false;
}

public int compareTo(RobotRaconteurVersion o)
{
	if (RobotRaconteurJava.RobotRaconteurVersion_eq(this,o)) return 0;
	if (RobotRaconteurJava.RobotRaconteurVersion_lt(this,o)) return -1;
	if (RobotRaconteurJava.RobotRaconteurVersion_gt(this,o)) return 1;
	throw new IllegalArgumentException("");
}


  public RobotRaconteurVersion() {
    this(RobotRaconteurJavaJNI.new_RobotRaconteurVersion__SWIG_0(), true);
  }

  public RobotRaconteurVersion(long major, long minor, long patch, long tweak) {
    this(RobotRaconteurJavaJNI.new_RobotRaconteurVersion__SWIG_1(major, minor, patch, tweak), true);
  }

  public RobotRaconteurVersion(long major, long minor, long patch) {
    this(RobotRaconteurJavaJNI.new_RobotRaconteurVersion__SWIG_2(major, minor, patch), true);
  }

  public RobotRaconteurVersion(long major, long minor) {
    this(RobotRaconteurJavaJNI.new_RobotRaconteurVersion__SWIG_3(major, minor), true);
  }

  public RobotRaconteurVersion(String v) {
    this(RobotRaconteurJavaJNI.new_RobotRaconteurVersion__SWIG_4(v), true);
  }

  public String toString() {
    return RobotRaconteurJavaJNI.RobotRaconteurVersion_toString(swigCPtr, this);
  }

  public void fromString(String v, ServiceDefinitionParseInfo parse_info) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_fromString__SWIG_0(swigCPtr, this, v, ServiceDefinitionParseInfo.getCPtr(parse_info), parse_info);
  }

  public void fromString(String v) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_fromString__SWIG_1(swigCPtr, this, v);
  }

  public void setMajor(long value) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_major_set(swigCPtr, this, value);
  }

  public long getMajor() {
    return RobotRaconteurJavaJNI.RobotRaconteurVersion_major_get(swigCPtr, this);
  }

  public void setMinor(long value) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_minor_set(swigCPtr, this, value);
  }

  public long getMinor() {
    return RobotRaconteurJavaJNI.RobotRaconteurVersion_minor_get(swigCPtr, this);
  }

  public void setPatch(long value) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_patch_set(swigCPtr, this, value);
  }

  public long getPatch() {
    return RobotRaconteurJavaJNI.RobotRaconteurVersion_patch_get(swigCPtr, this);
  }

  public void setTweak(long value) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_tweak_set(swigCPtr, this, value);
  }

  public long getTweak() {
    return RobotRaconteurJavaJNI.RobotRaconteurVersion_tweak_get(swigCPtr, this);
  }

  public void setParseInfo(ServiceDefinitionParseInfo value) {
    RobotRaconteurJavaJNI.RobotRaconteurVersion_ParseInfo_set(swigCPtr, this, ServiceDefinitionParseInfo.getCPtr(value), value);
  }

  public ServiceDefinitionParseInfo getParseInfo() {
    long cPtr = RobotRaconteurJavaJNI.RobotRaconteurVersion_ParseInfo_get(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceDefinitionParseInfo(cPtr, false);
  }

}
