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

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

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

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

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

  public void setName(String value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_Name_set(swigCPtr, this, value);
  }

  public String getName() {
    return RobotRaconteurJavaJNI.ServiceEntryDefinition_Name_get(swigCPtr, this);
  }

  public void setMembers(vectorptr_memberdefinition value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_Members_set(swigCPtr, this, vectorptr_memberdefinition.getCPtr(value), value);
  }

  public vectorptr_memberdefinition getMembers() {
    long cPtr = RobotRaconteurJavaJNI.ServiceEntryDefinition_Members_get(swigCPtr, this);
    return (cPtr == 0) ? null : new vectorptr_memberdefinition(cPtr, false);
  }

  public void setEntryType(DataTypes value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_EntryType_set(swigCPtr, this, value.swigValue());
  }

  public DataTypes getEntryType() {
    return DataTypes.swigToEnum(RobotRaconteurJavaJNI.ServiceEntryDefinition_EntryType_get(swigCPtr, this));
  }

  public void setImplements(vectorstring value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_Implements_set(swigCPtr, this, vectorstring.getCPtr(value), value);
  }

  public vectorstring getImplements() {
    long cPtr = RobotRaconteurJavaJNI.ServiceEntryDefinition_Implements_get(swigCPtr, this);
    return (cPtr == 0) ? null : new vectorstring(cPtr, false);
  }

  public void setOptions(vectorstring value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_Options_set(swigCPtr, this, vectorstring.getCPtr(value), value);
  }

  public vectorstring getOptions() {
    long cPtr = RobotRaconteurJavaJNI.ServiceEntryDefinition_Options_get(swigCPtr, this);
    return (cPtr == 0) ? null : new vectorstring(cPtr, false);
  }

  public void setConstants(vectorptr_constantdefinition value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_Constants_set(swigCPtr, this, vectorptr_constantdefinition.getCPtr(value), value);
  }

  public vectorptr_constantdefinition getConstants() {
    long cPtr = RobotRaconteurJavaJNI.ServiceEntryDefinition_Constants_get(swigCPtr, this);
    return (cPtr == 0) ? null : new vectorptr_constantdefinition(cPtr, false);
  }

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

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

  public void setDocString(String value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_DocString_set(swigCPtr, this, value);
  }

  public String getDocString() {
    return RobotRaconteurJavaJNI.ServiceEntryDefinition_DocString_get(swigCPtr, this);
  }

  public ServiceEntryDefinition(ServiceDefinition def) {
    this(RobotRaconteurJavaJNI.new_ServiceEntryDefinition(ServiceDefinition.getCPtr(def), def), true);
  }

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

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

  public void fromString(String s) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_fromString__SWIG_1(swigCPtr, this, s);
  }

  public ServiceDefinition getServiceDefinition() {
    long cPtr = RobotRaconteurJavaJNI.ServiceEntryDefinition_getServiceDefinition(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceDefinition(cPtr, true);
  }

  public void setServiceDefinition(ServiceDefinition value) {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_setServiceDefinition(swigCPtr, this, ServiceDefinition.getCPtr(value), value);
  }

  public void reset() {
    RobotRaconteurJavaJNI.ServiceEntryDefinition_reset(swigCPtr, this);
  }

}
