/// <summary> /// Initializes a new instance of the <see cref="GoalAccumulationStatusRequest" /> class. /// </summary> /// <param name="recommendationConfig">recommendationConfig.</param> /// <param name="compoundingRate">compoundingRate (default to 0.0F).</param> /// <param name="recommendType">recommendType (default to RecommendTypeEnum.Horizon).</param> /// <param name="createLog">createLog (default to false).</param> /// <param name="goalConfig">goalConfig.</param> /// <param name="n">n (default to 1000).</param> /// <param name="pRisk">pRisk (required).</param> /// <param name="removeOutliers">removeOutliers (default to true).</param> /// <param name="adjustForCompounding">adjustForCompounding (default to false).</param> /// <param name="goalId">goalId.</param> /// <param name="confTgt">confTgt (default to 0.9F).</param> /// <param name="tradingDaysPerYear">tradingDaysPerYear (default to 252).</param> /// <param name="thresh">thresh.</param> /// <param name="withdrawalTax">withdrawalTax (default to 0.0F).</param> /// <param name="clientId">clientId.</param> /// <param name="threshType">threshType (default to ThreshTypeEnum.Perc).</param> /// <param name="horizonFrequency">horizonFrequency (default to HorizonFrequencyEnum.Year).</param> /// <param name="horizon">horizon.</param> /// <param name="currInv">currInv.</param> /// <param name="depositConfig">depositConfig.</param> /// <param name="pRet">pRet (required).</param> public GoalAccumulationStatusRequest(RecommendationConfig recommendationConfig = default(RecommendationConfig), float?compoundingRate = 0.0F, RecommendTypeEnum?recommendType = RecommendTypeEnum.Horizon, bool?createLog = false, GoalConfig goalConfig = default(GoalConfig), int?n = 1000, List <float?> pRisk = default(List <float?>), bool?removeOutliers = true, bool?adjustForCompounding = false, Guid?goalId = default(Guid?), float?confTgt = 0.9F, int?tradingDaysPerYear = 252, decimal?thresh = default(decimal?), float?withdrawalTax = 0.0F, Guid?clientId = default(Guid?), ThreshTypeEnum?threshType = ThreshTypeEnum.Perc, HorizonFrequencyEnum?horizonFrequency = HorizonFrequencyEnum.Year, int?horizon = default(int?), decimal?currInv = default(decimal?), List <AccumulationGoalDepositConfig> depositConfig = default(List <AccumulationGoalDepositConfig>), List <float?> pRet = default(List <float?>)) { // to ensure "pRisk" is required (not null) if (pRisk == null) { throw new InvalidDataException("pRisk is a required property for GoalAccumulationStatusRequest and cannot be null"); } else { this.PRisk = pRisk; } // to ensure "pRet" is required (not null) if (pRet == null) { throw new InvalidDataException("pRet is a required property for GoalAccumulationStatusRequest and cannot be null"); } else { this.PRet = pRet; } this.RecommendationConfig = recommendationConfig; // use default value if no "compoundingRate" provided if (compoundingRate == null) { this.CompoundingRate = 0.0F; } else { this.CompoundingRate = compoundingRate; } // use default value if no "recommendType" provided if (recommendType == null) { this.RecommendType = RecommendTypeEnum.Horizon; } else { this.RecommendType = recommendType; } // use default value if no "createLog" provided if (createLog == null) { this.CreateLog = false; } else { this.CreateLog = createLog; } this.GoalConfig = goalConfig; // use default value if no "n" provided if (n == null) { this.N = 1000; } else { this.N = n; } // use default value if no "removeOutliers" provided if (removeOutliers == null) { this.RemoveOutliers = true; } else { this.RemoveOutliers = removeOutliers; } // use default value if no "adjustForCompounding" provided if (adjustForCompounding == null) { this.AdjustForCompounding = false; } else { this.AdjustForCompounding = adjustForCompounding; } this.GoalId = goalId; // use default value if no "confTgt" provided if (confTgt == null) { this.ConfTgt = 0.9F; } else { this.ConfTgt = confTgt; } // use default value if no "tradingDaysPerYear" provided if (tradingDaysPerYear == null) { this.TradingDaysPerYear = 252; } else { this.TradingDaysPerYear = tradingDaysPerYear; } this.Thresh = thresh; // use default value if no "withdrawalTax" provided if (withdrawalTax == null) { this.WithdrawalTax = 0.0F; } else { this.WithdrawalTax = withdrawalTax; } this.ClientId = clientId; // use default value if no "threshType" provided if (threshType == null) { this.ThreshType = ThreshTypeEnum.Perc; } else { this.ThreshType = threshType; } // use default value if no "horizonFrequency" provided if (horizonFrequency == null) { this.HorizonFrequency = HorizonFrequencyEnum.Year; } else { this.HorizonFrequency = horizonFrequency; } this.Horizon = horizon; this.CurrInv = currInv; this.DepositConfig = depositConfig; }
/// <summary> /// Initializes a new instance of the <see cref="GoalAccumulationAllocationRequest" /> class. /// </summary> /// <param name="recommendationConfig">recommendationConfig.</param> /// <param name="compoundingRate">compoundingRate (default to 0.0F).</param> /// <param name="riskScore">riskScore.</param> /// <param name="recommendType">recommendType (default to RecommendTypeEnum.Horizon).</param> /// <param name="createLog">createLog (default to false).</param> /// <param name="goalConfig">goalConfig.</param> /// <param name="n">n (default to 1000).</param> /// <param name="allocationMethod">allocationMethod (required).</param> /// <param name="allocationPriority">allocationPriority (required).</param> /// <param name="removeOutliers">removeOutliers (default to true).</param> /// <param name="adjustForCompounding">adjustForCompounding (default to false).</param> /// <param name="goalId">goalId.</param> /// <param name="confTgt">confTgt (default to 0.9F).</param> /// <param name="tradingDaysPerYear">tradingDaysPerYear (default to 252).</param> /// <param name="useProxyData">useProxyData (default to false).</param> /// <param name="thresh">thresh.</param> /// <param name="withdrawalTax">withdrawalTax (default to 0.0F).</param> /// <param name="clientId">clientId.</param> /// <param name="optConfig">optConfig.</param> /// <param name="marketDataSource">marketDataSource (default to MarketDataSourceEnum.Nucleus).</param> /// <param name="threshType">threshType (default to ThreshTypeEnum.Perc).</param> /// <param name="horizonFrequency">horizonFrequency (default to HorizonFrequencyEnum.Year).</param> /// <param name="horizon">horizon.</param> /// <param name="allocations">allocations.</param> /// <param name="currInv">currInv.</param> /// <param name="depositConfig">depositConfig.</param> public GoalAccumulationAllocationRequest(RecommendationConfig recommendationConfig = default(RecommendationConfig), float?compoundingRate = 0.0F, decimal?riskScore = default(decimal?), RecommendTypeEnum?recommendType = RecommendTypeEnum.Horizon, bool?createLog = false, GoalConfig goalConfig = default(GoalConfig), int?n = 1000, AllocationMethodEnum allocationMethod = default(AllocationMethodEnum), AllocationPriorityEnum allocationPriority = default(AllocationPriorityEnum), bool?removeOutliers = true, bool?adjustForCompounding = false, Guid?goalId = default(Guid?), float?confTgt = 0.9F, int?tradingDaysPerYear = 252, bool?useProxyData = false, decimal?thresh = default(decimal?), float?withdrawalTax = 0.0F, Guid?clientId = default(Guid?), OptConfig optConfig = default(OptConfig), MarketDataSourceEnum?marketDataSource = MarketDataSourceEnum.Nucleus, ThreshTypeEnum?threshType = ThreshTypeEnum.Perc, HorizonFrequencyEnum?horizonFrequency = HorizonFrequencyEnum.Year, int?horizon = default(int?), List <Guid?> allocations = default(List <Guid?>), decimal?currInv = default(decimal?), List <AccumulationGoalDepositConfig> depositConfig = default(List <AccumulationGoalDepositConfig>)) { // to ensure "allocationMethod" is required (not null) if (allocationMethod == null) { throw new InvalidDataException("allocationMethod is a required property for GoalAccumulationAllocationRequest and cannot be null"); } else { this.AllocationMethod = allocationMethod; } // to ensure "allocationPriority" is required (not null) if (allocationPriority == null) { throw new InvalidDataException("allocationPriority is a required property for GoalAccumulationAllocationRequest and cannot be null"); } else { this.AllocationPriority = allocationPriority; } this.RecommendationConfig = recommendationConfig; // use default value if no "compoundingRate" provided if (compoundingRate == null) { this.CompoundingRate = 0.0F; } else { this.CompoundingRate = compoundingRate; } this.RiskScore = riskScore; // use default value if no "recommendType" provided if (recommendType == null) { this.RecommendType = RecommendTypeEnum.Horizon; } else { this.RecommendType = recommendType; } // use default value if no "createLog" provided if (createLog == null) { this.CreateLog = false; } else { this.CreateLog = createLog; } this.GoalConfig = goalConfig; // use default value if no "n" provided if (n == null) { this.N = 1000; } else { this.N = n; } // use default value if no "removeOutliers" provided if (removeOutliers == null) { this.RemoveOutliers = true; } else { this.RemoveOutliers = removeOutliers; } // use default value if no "adjustForCompounding" provided if (adjustForCompounding == null) { this.AdjustForCompounding = false; } else { this.AdjustForCompounding = adjustForCompounding; } this.GoalId = goalId; // use default value if no "confTgt" provided if (confTgt == null) { this.ConfTgt = 0.9F; } else { this.ConfTgt = confTgt; } // use default value if no "tradingDaysPerYear" provided if (tradingDaysPerYear == null) { this.TradingDaysPerYear = 252; } else { this.TradingDaysPerYear = tradingDaysPerYear; } // use default value if no "useProxyData" provided if (useProxyData == null) { this.UseProxyData = false; } else { this.UseProxyData = useProxyData; } this.Thresh = thresh; // use default value if no "withdrawalTax" provided if (withdrawalTax == null) { this.WithdrawalTax = 0.0F; } else { this.WithdrawalTax = withdrawalTax; } this.ClientId = clientId; this.OptConfig = optConfig; // use default value if no "marketDataSource" provided if (marketDataSource == null) { this.MarketDataSource = MarketDataSourceEnum.Nucleus; } else { this.MarketDataSource = marketDataSource; } // use default value if no "threshType" provided if (threshType == null) { this.ThreshType = ThreshTypeEnum.Perc; } else { this.ThreshType = threshType; } // use default value if no "horizonFrequency" provided if (horizonFrequency == null) { this.HorizonFrequency = HorizonFrequencyEnum.Year; } else { this.HorizonFrequency = horizonFrequency; } this.Horizon = horizon; this.Allocations = allocations; this.CurrInv = currInv; this.DepositConfig = depositConfig; }