/// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(SwapLegAmount beanToCopy)
 {
     this.amount_Renamed     = beanToCopy.Amount;
     this.payReceive_Renamed = beanToCopy.PayReceive;
     this.type_Renamed       = beanToCopy.Type;
     this.currency_Renamed   = beanToCopy.Currency;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case -1413853096:         // amount
                    this.amount_Renamed = (CurrencyAmount)newValue;
                    break;

                case -885469925:         // payReceive
                    this.payReceive_Renamed = (PayReceive)newValue;
                    break;

                case 3575610:         // type
                    this.type_Renamed = (SwapLegType)newValue;
                    break;

                case 575402001:         // currency
                    this.currency_Renamed = (Currency)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 private SwapLegAmount(CurrencyAmount amount, PayReceive payReceive, SwapLegType type, Currency currency)
 {
     JodaBeanUtils.notNull(amount, "amount");
     JodaBeanUtils.notNull(payReceive, "payReceive");
     JodaBeanUtils.notNull(type, "type");
     JodaBeanUtils.notNull(currency, "currency");
     this.amount     = amount;
     this.payReceive = payReceive;
     this.type       = type;
     this.currency   = currency;
 }
 /// <summary>
 /// Sets the type of the leg, such as Fixed or Ibor. </summary>
 /// <param name="type">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder type(SwapLegType type)
 {
     JodaBeanUtils.notNull(type, "type");
     this.type_Renamed = type;
     return(this);
 }