//------------------------------------------------------------------------------
// <auto-generated />
//
// 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.
//------------------------------------------------------------------------------

namespace QuantLib {

public class MakeOIS : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal MakeOIS(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MakeOIS obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~MakeOIS() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          NQuantLibcPINVOKE.delete_MakeOIS(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public MakeOIS(Period swapTenor, OvernightIndex overnightIndex, double fixedRate, Period fwdStart) : this(NQuantLibcPINVOKE.new_MakeOIS__SWIG_0(Period.getCPtr(swapTenor), OvernightIndex.getCPtr(overnightIndex), fixedRate, Period.getCPtr(fwdStart)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public MakeOIS(Period swapTenor, OvernightIndex overnightIndex, double fixedRate) : this(NQuantLibcPINVOKE.new_MakeOIS__SWIG_1(Period.getCPtr(swapTenor), OvernightIndex.getCPtr(overnightIndex), fixedRate), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public MakeOIS(Period swapTenor, OvernightIndex overnightIndex) : this(NQuantLibcPINVOKE.new_MakeOIS__SWIG_2(Period.getCPtr(swapTenor), OvernightIndex.getCPtr(overnightIndex)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public OvernightIndexedSwap makeOIS() {
    global::System.IntPtr cPtr = NQuantLibcPINVOKE.MakeOIS_makeOIS(swigCPtr);
    OvernightIndexedSwap ret = (cPtr == global::System.IntPtr.Zero) ? null : new OvernightIndexedSwap(cPtr, true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS receiveFixed(bool flag) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_receiveFixed__SWIG_0(swigCPtr, flag), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS receiveFixed() {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_receiveFixed__SWIG_1(swigCPtr), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withType(OvernightIndexedSwap.Type type) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withType(swigCPtr, (int)type), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withNominal(double n) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withNominal(swigCPtr, n), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withSettlementDays(uint settlementDays) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withSettlementDays(swigCPtr, settlementDays), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withEffectiveDate(Date arg0) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withEffectiveDate(swigCPtr, Date.getCPtr(arg0)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withTerminationDate(Date arg0) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withTerminationDate(swigCPtr, Date.getCPtr(arg0)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withRule(DateGeneration.Rule r) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withRule(swigCPtr, (int)r), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withPaymentFrequency(Frequency f) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withPaymentFrequency(swigCPtr, (int)f), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withPaymentAdjustment(BusinessDayConvention convention) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withPaymentAdjustment(swigCPtr, (int)convention), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withPaymentLag(uint lag) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withPaymentLag(swigCPtr, lag), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withPaymentCalendar(Calendar cal) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withPaymentCalendar(swigCPtr, Calendar.getCPtr(cal)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withEndOfMonth(bool flag) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withEndOfMonth__SWIG_0(swigCPtr, flag), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withEndOfMonth() {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withEndOfMonth__SWIG_1(swigCPtr), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withFixedLegDayCount(DayCounter dc) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withFixedLegDayCount(swigCPtr, DayCounter.getCPtr(dc)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withOvernightLegSpread(double sp) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withOvernightLegSpread(swigCPtr, sp), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withDiscountingTermStructure(YieldTermStructureHandle discountingTermStructure) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withDiscountingTermStructure(swigCPtr, YieldTermStructureHandle.getCPtr(discountingTermStructure)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withTelescopicValueDates(bool telescopicValueDates) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withTelescopicValueDates(swigCPtr, telescopicValueDates), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MakeOIS withPricingEngine(PricingEngine engine) {
    MakeOIS ret = new MakeOIS(NQuantLibcPINVOKE.MakeOIS_withPricingEngine(swigCPtr, PricingEngine.getCPtr(engine)), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
