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

package com.nanotec.nanolib;

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

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

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

  protected static long swigRelease(CanBaudRate 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")
  protected void finalize() {
    delete();
  }

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

  public String getBAUD_RATE_1000K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_1000K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_800K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_800K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_500K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_500K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_250K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_250K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_125K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_125K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_100K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_100K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_50K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_50K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_20K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_20K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_10K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_10K_get(swigCPtr, this);
  }

  public String getBAUD_RATE_5K() {
    return NanolibJNI.CanBaudRate_BAUD_RATE_5K_get(swigCPtr, this);
  }

  public CanBaudRate() {
    this(NanolibJNI.new_CanBaudRate(), true);
  }

}
