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

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

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

  public YoYOptionletVolatilitySurfaceHandle(YoYOptionletVolatilitySurface arg0) : this(NQuantLibcPINVOKE.new_YoYOptionletVolatilitySurfaceHandle__SWIG_0(YoYOptionletVolatilitySurface.getCPtr(arg0)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

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

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

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

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

  public Observable asObservable() {
    global::System.IntPtr cPtr = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_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 Period observationLag() {
    Period ret = new Period(NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_observationLag(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

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

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

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

  public double timeFromBase(Date date, Period obsLag) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_timeFromBase__SWIG_0(swigCPtr, Date.getCPtr(date), Period.getCPtr(obsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

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

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

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

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

  public double volatility(Date maturityDate, double strike, Period obsLag, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_0(swigCPtr, Date.getCPtr(maturityDate), strike, Period.getCPtr(obsLag), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double volatility(Date maturityDate, double strike, Period obsLag) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_1(swigCPtr, Date.getCPtr(maturityDate), strike, Period.getCPtr(obsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double volatility(Date maturityDate, double strike) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_2(swigCPtr, Date.getCPtr(maturityDate), strike);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double volatility(Period optionTenor, double strike, Period obsLag, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_3(swigCPtr, Period.getCPtr(optionTenor), strike, Period.getCPtr(obsLag), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double volatility(Period optionTenor, double strike, Period obsLag) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_4(swigCPtr, Period.getCPtr(optionTenor), strike, Period.getCPtr(obsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double volatility(Period optionTenor, double strike) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_5(swigCPtr, Period.getCPtr(optionTenor), strike);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Date exerciseDate, double strike, Period obsLag, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_0(swigCPtr, Date.getCPtr(exerciseDate), strike, Period.getCPtr(obsLag), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Date exerciseDate, double strike, Period obsLag) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_1(swigCPtr, Date.getCPtr(exerciseDate), strike, Period.getCPtr(obsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Date exerciseDate, double strike) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_2(swigCPtr, Date.getCPtr(exerciseDate), strike);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Period optionTenor, double strike, Period obsLag, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_3(swigCPtr, Period.getCPtr(optionTenor), strike, Period.getCPtr(obsLag), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Period optionTenor, double strike, Period obsLag) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_4(swigCPtr, Period.getCPtr(optionTenor), strike, Period.getCPtr(obsLag));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double totalVariance(Period optionTenor, double strike) {
    double ret = NQuantLibcPINVOKE.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_5(swigCPtr, Period.getCPtr(optionTenor), strike);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

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

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

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

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

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

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

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

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

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

}

}
