//------------------------------------------------------------------------------
// <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 YoYInflationTermStructureHandle : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal YoYInflationTermStructureHandle(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(YoYInflationTermStructureHandle obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~YoYInflationTermStructureHandle() {
    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_YoYInflationTermStructureHandle(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public YoYInflationTermStructureHandle(YoYInflationTermStructure arg0) : this(NQuantLibcPINVOKE.new_YoYInflationTermStructureHandle__SWIG_0(YoYInflationTermStructure.getCPtr(arg0)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public YoYInflationTermStructureHandle() : this(NQuantLibcPINVOKE.new_YoYInflationTermStructureHandle__SWIG_1(), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

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

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

  public bool empty() {
    bool ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_empty(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

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

  public double yoyRate(Date d, Period instObsLag, bool forceLinearInterpolation, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_0(swigCPtr, Date.getCPtr(d), Period.getCPtr(instObsLag), forceLinearInterpolation, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double yoyRate(Date d, Period instObsLag, bool forceLinearInterpolation) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_1(swigCPtr, Date.getCPtr(d), Period.getCPtr(instObsLag), forceLinearInterpolation);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double yoyRate(Date d, Period instObsLag) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_2(swigCPtr, Date.getCPtr(d), Period.getCPtr(instObsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double yoyRate(Date d) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_3(swigCPtr, Date.getCPtr(d));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double yoyRate(double t, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_4(swigCPtr, t, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double yoyRate(double t) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_yoyRate__SWIG_5(swigCPtr, t);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Period observationLag() {
    Period ret = new Period(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_observationLag(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Frequency frequency() {
    Frequency ret = (Frequency)NQuantLibcPINVOKE.YoYInflationTermStructureHandle_frequency(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool indexIsInterpolated() {
    bool ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_indexIsInterpolated(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double baseRate() {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_baseRate(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public YieldTermStructureHandle nominalTermStructure() {
    YieldTermStructureHandle ret = new YieldTermStructureHandle(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_nominalTermStructure(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Date baseDate() {
    Date ret = new Date(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_baseDate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void setSeasonality(Seasonality seasonality) {
    NQuantLibcPINVOKE.YoYInflationTermStructureHandle_setSeasonality__SWIG_0(swigCPtr, Seasonality.getCPtr(seasonality));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public void setSeasonality() {
    NQuantLibcPINVOKE.YoYInflationTermStructureHandle_setSeasonality__SWIG_1(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

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

  public bool hasSeasonality() {
    bool ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_hasSeasonality(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public DayCounter dayCounter() {
    DayCounter ret = new DayCounter(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_dayCounter(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double timeFromReference(Date date) {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_timeFromReference(swigCPtr, Date.getCPtr(date));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Calendar calendar() {
    Calendar ret = new Calendar(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_calendar(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Date referenceDate() {
    Date ret = new Date(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_referenceDate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Date maxDate() {
    Date ret = new Date(NQuantLibcPINVOKE.YoYInflationTermStructureHandle_maxDate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double maxTime() {
    double ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_maxTime(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void enableExtrapolation() {
    NQuantLibcPINVOKE.YoYInflationTermStructureHandle_enableExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public void disableExtrapolation() {
    NQuantLibcPINVOKE.YoYInflationTermStructureHandle_disableExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool allowsExtrapolation() {
    bool ret = NQuantLibcPINVOKE.YoYInflationTermStructureHandle_allowsExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
