/* ----------------------------------------------------------------------------
 * 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 org.quantlib;

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

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

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

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

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

  public MarkovFunctionalSettings() {
    this(QuantLibJNI.new_MarkovFunctionalSettings__SWIG_0(), true);
  }

  public MarkovFunctionalSettings(long yGridPoints, double yStdDevs, long gaussHermitePoints, double digitalGap, double marketRateAccuracy, double lowerRateBound, double upperRateBound, int adjustments, DoubleVector smileMoneyCheckpoints) {
    this(QuantLibJNI.new_MarkovFunctionalSettings__SWIG_1(yGridPoints, yStdDevs, gaussHermitePoints, digitalGap, marketRateAccuracy, lowerRateBound, upperRateBound, adjustments, DoubleVector.getCPtr(smileMoneyCheckpoints), smileMoneyCheckpoints), true);
  }

  public MarkovFunctionalSettings(long yGridPoints, double yStdDevs, long gaussHermitePoints, double digitalGap, double marketRateAccuracy, double lowerRateBound, double upperRateBound, int adjustments) {
    this(QuantLibJNI.new_MarkovFunctionalSettings__SWIG_2(yGridPoints, yStdDevs, gaussHermitePoints, digitalGap, marketRateAccuracy, lowerRateBound, upperRateBound, adjustments), true);
  }

  public void validate() {
    QuantLibJNI.MarkovFunctionalSettings_validate(swigCPtr, this);
  }

  public final static class Adjustments {
    public final static MarkovFunctionalSettings.Adjustments AdjustNone = new MarkovFunctionalSettings.Adjustments("AdjustNone", QuantLibJNI.MarkovFunctionalSettings_AdjustNone_get());
    public final static MarkovFunctionalSettings.Adjustments AdjustDigitals = new MarkovFunctionalSettings.Adjustments("AdjustDigitals", QuantLibJNI.MarkovFunctionalSettings_AdjustDigitals_get());
    public final static MarkovFunctionalSettings.Adjustments AdjustYts = new MarkovFunctionalSettings.Adjustments("AdjustYts", QuantLibJNI.MarkovFunctionalSettings_AdjustYts_get());
    public final static MarkovFunctionalSettings.Adjustments ExtrapolatePayoffFlat = new MarkovFunctionalSettings.Adjustments("ExtrapolatePayoffFlat", QuantLibJNI.MarkovFunctionalSettings_ExtrapolatePayoffFlat_get());
    public final static MarkovFunctionalSettings.Adjustments NoPayoffExtrapolation = new MarkovFunctionalSettings.Adjustments("NoPayoffExtrapolation", QuantLibJNI.MarkovFunctionalSettings_NoPayoffExtrapolation_get());
    public final static MarkovFunctionalSettings.Adjustments KahaleSmile = new MarkovFunctionalSettings.Adjustments("KahaleSmile", QuantLibJNI.MarkovFunctionalSettings_KahaleSmile_get());
    public final static MarkovFunctionalSettings.Adjustments SmileExponentialExtrapolation = new MarkovFunctionalSettings.Adjustments("SmileExponentialExtrapolation", QuantLibJNI.MarkovFunctionalSettings_SmileExponentialExtrapolation_get());
    public final static MarkovFunctionalSettings.Adjustments KahaleInterpolation = new MarkovFunctionalSettings.Adjustments("KahaleInterpolation", QuantLibJNI.MarkovFunctionalSettings_KahaleInterpolation_get());
    public final static MarkovFunctionalSettings.Adjustments SmileDeleteArbitragePoints = new MarkovFunctionalSettings.Adjustments("SmileDeleteArbitragePoints", QuantLibJNI.MarkovFunctionalSettings_SmileDeleteArbitragePoints_get());
    public final static MarkovFunctionalSettings.Adjustments SabrSmile = new MarkovFunctionalSettings.Adjustments("SabrSmile", QuantLibJNI.MarkovFunctionalSettings_SabrSmile_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static Adjustments swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + Adjustments.class + " with value " + swigValue);
    }

    private Adjustments(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private Adjustments(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private Adjustments(String swigName, Adjustments swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static Adjustments[] swigValues = { AdjustNone, AdjustDigitals, AdjustYts, ExtrapolatePayoffFlat, NoPayoffExtrapolation, KahaleSmile, SmileExponentialExtrapolation, KahaleInterpolation, SmileDeleteArbitragePoints, SabrSmile };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
