/// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(BlackFxOptionSmileVolatilities beanToCopy)
 {
     this.name_Renamed              = beanToCopy.Name;
     this.currencyPair_Renamed      = beanToCopy.CurrencyPair;
     this.valuationDateTime_Renamed = beanToCopy.ValuationDateTime;
     this.smile_Renamed             = beanToCopy.Smile;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 3373707:         // name
                    this.name_Renamed = (FxOptionVolatilitiesName)newValue;
                    break;

                case 1005147787:         // currencyPair
                    this.currencyPair_Renamed = (CurrencyPair)newValue;
                    break;

                case -949589828:         // valuationDateTime
                    this.valuationDateTime_Renamed = (ZonedDateTime)newValue;
                    break;

                case 109556488:         // smile
                    this.smile_Renamed = (SmileDeltaTermStructure)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 private BlackFxOptionSmileVolatilities(FxOptionVolatilitiesName name, CurrencyPair currencyPair, ZonedDateTime valuationDateTime, SmileDeltaTermStructure smile)
 {
     JodaBeanUtils.notNull(name, "name");
     JodaBeanUtils.notNull(currencyPair, "currencyPair");
     JodaBeanUtils.notNull(valuationDateTime, "valuationDateTime");
     JodaBeanUtils.notNull(smile, "smile");
     this.name              = name;
     this.currencyPair      = currencyPair;
     this.valuationDateTime = valuationDateTime;
     this.smile             = smile;
 }
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains an instance based on a smile.
 /// </summary>
 /// <param name="name">  the name of the volatilities </param>
 /// <param name="currencyPair">  the currency pair </param>
 /// <param name="valuationTime">  the valuation date-time </param>
 /// <param name="smile">  the term structure of smile </param>
 /// <returns> the provider </returns>
 public static BlackFxOptionSmileVolatilities of(FxOptionVolatilitiesName name, CurrencyPair currencyPair, ZonedDateTime valuationTime, SmileDeltaTermStructure smile)
 {
     return(new BlackFxOptionSmileVolatilities(name, currencyPair, valuationTime, smile));
 }
 /// <summary>
 /// Sets the volatility model.
 /// <para>
 /// This represents expiry dependent smile which consists of ATM, risk reversal
 /// and strangle as used in FX market.
 /// </para>
 /// </summary>
 /// <param name="smile">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder smile(SmileDeltaTermStructure smile)
 {
     JodaBeanUtils.notNull(smile, "smile");
     this.smile_Renamed = smile;
     return(this);
 }