public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 116685664:         // longShort
                    this.longShort_Renamed = (LongShort)newValue;
                    break;

                case -816738431:         // expiryDate
                    this.expiryDate_Renamed = (LocalDate)newValue;
                    break;

                case -816254304:         // expiryTime
                    this.expiryTime_Renamed = (LocalTime)newValue;
                    break;

                case -816069761:         // expiryZone
                    this.expiryZone_Renamed = (ZoneId)newValue;
                    break;

                case -1770633379:         // underlying
                    this.underlying_Renamed = (FxSingle)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(FxVanillaOption beanToCopy)
 {
     this.longShort_Renamed  = beanToCopy.LongShort;
     this.expiryDate_Renamed = beanToCopy.ExpiryDate;
     this.expiryTime_Renamed = beanToCopy.ExpiryTime;
     this.expiryZone_Renamed = beanToCopy.ExpiryZone;
     this.underlying_Renamed = beanToCopy.Underlying;
 }
 private FxVanillaOption(LongShort longShort, LocalDate expiryDate, LocalTime expiryTime, ZoneId expiryZone, FxSingle underlying)
 {
     JodaBeanUtils.notNull(longShort, "longShort");
     JodaBeanUtils.notNull(expiryDate, "expiryDate");
     JodaBeanUtils.notNull(expiryTime, "expiryTime");
     JodaBeanUtils.notNull(expiryZone, "expiryZone");
     JodaBeanUtils.notNull(underlying, "underlying");
     this.longShort  = longShort;
     this.expiryDate = expiryDate;
     this.expiryTime = expiryTime;
     this.expiryZone = expiryZone;
     this.underlying = underlying;
     validate();
 }
 /// <summary>
 /// Sets the underlying foreign exchange transaction.
 /// <para>
 /// At expiry, if the option is in the money, this foreign exchange will occur.
 /// </para>
 /// </summary>
 /// <param name="underlying">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder underlying(FxSingle underlying)
 {
     JodaBeanUtils.notNull(underlying, "underlying");
     this.underlying_Renamed = underlying;
     return(this);
 }
        // create an FX Forward trade
        private static Trade createTrade2()
        {
            FxSingle fx = FxSingle.of(CurrencyAmount.of(USD, 15000), FxRate.of(GBP, USD, 1.62), LocalDate.of(2014, 9, 14));

            return(FxSingleTrade.builder().product(fx).info(TradeInfo.builder().id(StandardId.of("example", "2")).addAttribute(AttributeType.DESCRIPTION, "USD 15,000/GBP @ 1.62 fwd").counterparty(StandardId.of("example", "BigBankB")).settlementDate(LocalDate.of(2014, 9, 15)).build()).build());
        }