/* ----------------------------------------------------------------------------
 * 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 OISRateHelper extends RateHelper {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

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

  protected static long getCPtr(OISRateHelper 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_OISRateHelper(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar, Period forwardStart, double overnightSpread, Pillar.Choice pillar, Date customPillarDate) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_0(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, Period.getCPtr(forwardStart), forwardStart, overnightSpread, pillar.swigValue(), Date.getCPtr(customPillarDate), customPillarDate), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar, Period forwardStart, double overnightSpread, Pillar.Choice pillar) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_1(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, Period.getCPtr(forwardStart), forwardStart, overnightSpread, pillar.swigValue()), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar, Period forwardStart, double overnightSpread) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_2(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, Period.getCPtr(forwardStart), forwardStart, overnightSpread), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar, Period forwardStart) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_3(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, Period.getCPtr(forwardStart), forwardStart), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_4(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_5(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue(), paymentFrequency.swigValue()), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag, BusinessDayConvention paymentConvention) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_6(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag, paymentConvention.swigValue()), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates, long paymentLag) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_7(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates, paymentLag), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve, boolean telescopicValueDates) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_8(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve, telescopicValueDates), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index, YieldTermStructureHandle discountingCurve) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_9(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index, YieldTermStructureHandle.getCPtr(discountingCurve), discountingCurve), true);
  }

  public OISRateHelper(long settlementDays, Period tenor, QuoteHandle rate, OvernightIndex index) {
    this(QuantLibJNI.new_OISRateHelper__SWIG_10(settlementDays, Period.getCPtr(tenor), tenor, QuoteHandle.getCPtr(rate), rate, OvernightIndex.getCPtr(index), index), true);
  }

  public OvernightIndexedSwap swap() {
    long cPtr = QuantLibJNI.OISRateHelper_swap(swigCPtr, this);
    return (cPtr == 0) ? null : new OvernightIndexedSwap(cPtr, true);
  }

}
