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

public class UpfrontCdsHelper extends DefaultProbabilityHelper {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected UpfrontCdsHelper(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.UpfrontCdsHelper_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

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

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        QuantLibJNI.delete_UpfrontCdsHelper(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter, boolean rebatesAccrual, CreditDefaultSwap.PricingModel model) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_0(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter, rebatesAccrual, model.swigValue()), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter, boolean rebatesAccrual) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_1(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter, rebatesAccrual), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_2(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_3(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_4(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_5(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_6(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays), true);
  }

  public UpfrontCdsHelper(QuoteHandle upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_7(QuoteHandle.getCPtr(upfront), upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter, boolean rebatesAccrual, CreditDefaultSwap.PricingModel model) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_8(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter, rebatesAccrual, model.swigValue()), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter, boolean rebatesAccrual) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_9(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter, rebatesAccrual), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate, DayCounter lastPeriodDayCounter) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_10(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate, DayCounter.getCPtr(lastPeriodDayCounter), lastPeriodDayCounter), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime, Date startDate) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_11(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime, Date.getCPtr(startDate), startDate), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual, boolean paysAtDefaultTime) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_12(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual, paysAtDefaultTime), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays, boolean settlesAccrual) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_13(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays, settlesAccrual), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve, long upfrontSettlementDays) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_14(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve, upfrontSettlementDays), true);
  }

  public UpfrontCdsHelper(double upfront, double spread, Period tenor, int settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention convention, DateGeneration.Rule rule, DayCounter dayCounter, double recoveryRate, YieldTermStructureHandle discountCurve) {
    this(QuantLibJNI.new_UpfrontCdsHelper__SWIG_15(upfront, spread, Period.getCPtr(tenor), tenor, settlementDays, Calendar.getCPtr(calendar), calendar, frequency.swigValue(), convention.swigValue(), rule.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, recoveryRate, YieldTermStructureHandle.getCPtr(discountCurve), discountCurve), true);
  }

}
