/// <summary>
 /// Initializes a new instance of the <see cref="InlineValuationRequest" /> class.
 /// </summary>
 /// <param name="recipeId">recipeId.</param>
 /// <param name="asAt">The asAt date to use.</param>
 /// <param name="metrics">The set of specifications to calculate or retrieve during the valuation and present in the results. For example:  AggregateSpec(&#39;Holding/default/PV&#39;,&#39;Sum&#39;) for returning the PV (present value) of holdings  AggregateSpec(&#39;Holding/default/Units&#39;,&#39;Sum&#39;) for returning the units of holidays  AggregateSpec(&#39;Instrument/default/LusidInstrumentId&#39;,&#39;Value&#39;) for returning the Lusid Instrument identifier (required).</param>
 /// <param name="groupBy">The set of items by which to perform grouping. This primarily matters when one or more of the metric operators is a mapping  that reduces set size, e.g. sum or proportion. The group-by statement determines the set of keys by which to break the results out..</param>
 /// <param name="filters">A set of filters to use to reduce the data found in a request. Equivalent to the &#39;where ...&#39; part of a Sql select statement.  For example, filter a set of values within a given range or matching a particular value..</param>
 /// <param name="sort">A (possibly empty/null) set of specifications for how to order the results..</param>
 /// <param name="reportCurrency">Three letter ISO currency string indicating what currency to report in for ReportCurrency denominated queries.  If not present, then the currency of the relevant portfolio will be used in its place..</param>
 /// <param name="equipWithSubtotals">Flag directing the Valuation call to populate the results with subtotals of aggregates..</param>
 /// <param name="valuationSchedule">valuationSchedule.</param>
 /// <param name="instruments">The set of instruments, weighted by the quantities held that are required.  It is identified by an identifier tag that can be used to identify it externally.  For a single, unique trade or transaction this can be thought of as equivalent to the transaction identifier, or  a composite of the sub-holding keys for a regular sub-holding. When there are multiple transactions sharing the same underlying instrument  such as purchase of shares on multiple dates where tax implications are different this would not be the case. (required).</param>
 public InlineValuationRequest(ResourceId recipeId = default(ResourceId), DateTimeOffset?asAt = default(DateTimeOffset?), List <AggregateSpec> metrics = default(List <AggregateSpec>), List <string> groupBy = default(List <string>), List <PropertyFilter> filters = default(List <PropertyFilter>), List <OrderBySpec> sort = default(List <OrderBySpec>), string reportCurrency = default(string), bool equipWithSubtotals = default(bool), ValuationSchedule valuationSchedule = default(ValuationSchedule), List <WeightedInstrument> instruments = default(List <WeightedInstrument>))
 {
     // to ensure "metrics" is required (not null)
     this.Metrics = metrics ?? throw new ArgumentNullException("metrics is a required property for InlineValuationRequest and cannot be null");
     // to ensure "instruments" is required (not null)
     this.Instruments        = instruments ?? throw new ArgumentNullException("instruments is a required property for InlineValuationRequest and cannot be null");
     this.RecipeId           = recipeId;
     this.AsAt               = asAt;
     this.GroupBy            = groupBy;
     this.Filters            = filters;
     this.Sort               = sort;
     this.ReportCurrency     = reportCurrency;
     this.EquipWithSubtotals = equipWithSubtotals;
     this.ValuationSchedule  = valuationSchedule;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ValuationRequest" /> class.
        /// </summary>
        /// <param name="recipeId">recipeId.</param>
        /// <param name="asAt">The asAt date to use.</param>
        /// <param name="metrics">The set of specifications to calculate or retrieve during the valuation and present in the results. For example:  AggregateSpec(&#39;Holding/default/PV&#39;,&#39;Sum&#39;) for returning the PV (present value) of holdings  AggregateSpec(&#39;Holding/default/Units&#39;,&#39;Sum&#39;) for returning the units of holidays  AggregateSpec(&#39;Instrument/default/LusidInstrumentId&#39;,&#39;Value&#39;) for returning the Lusid Instrument identifier (required).</param>
        /// <param name="groupBy">The set of items by which to perform grouping. This primarily matters when one or more of the metric operators is a mapping  that reduces set size, e.g. sum or proportion. The group-by statement determines the set of keys by which to break the results out..</param>
        /// <param name="filters">A set of filters to use to reduce the data found in a request. Equivalent to the &#39;where ...&#39; part of a Sql select statement.  For example, filter a set of values within a given range or matching a particular value..</param>
        /// <param name="sort">A (possibly empty/null) set of specifications for how to order the results..</param>
        /// <param name="reportCurrency">Three letter ISO currency string indicating what currency to report in for ReportCurrency denominated queries.  If not present, then the currency of the relevant portfolio will be used in its place..</param>
        /// <param name="portfolioEntityIds">The set of portfolio or portfolio group identifier(s) that is to be valued..</param>
        /// <param name="valuationSchedule">valuationSchedule.</param>
        public ValuationRequest(ResourceId recipeId = default(ResourceId), DateTimeOffset?asAt = default(DateTimeOffset?), List <AggregateSpec> metrics = default(List <AggregateSpec>), List <string> groupBy = default(List <string>), List <PropertyFilter> filters = default(List <PropertyFilter>), List <OrderBySpec> sort = default(List <OrderBySpec>), string reportCurrency = default(string), List <PortfolioEntityId> portfolioEntityIds = default(List <PortfolioEntityId>), ValuationSchedule valuationSchedule = default(ValuationSchedule))
        {
            this.AsAt = asAt;
            // to ensure "metrics" is required (not null)
            if (metrics == null)
            {
                throw new InvalidDataException("metrics is a required property for ValuationRequest and cannot be null");
            }
            else
            {
                this.Metrics = metrics;
            }

            this.GroupBy            = groupBy;
            this.Filters            = filters;
            this.Sort               = sort;
            this.ReportCurrency     = reportCurrency;
            this.PortfolioEntityIds = portfolioEntityIds;
            this.RecipeId           = recipeId;
            this.AsAt               = asAt;
            this.GroupBy            = groupBy;
            this.Filters            = filters;
            this.Sort               = sort;
            this.ReportCurrency     = reportCurrency;
            this.PortfolioEntityIds = portfolioEntityIds;
            this.ValuationSchedule  = valuationSchedule;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuationRequest" /> class.
 /// </summary>
 /// <param name="recipeId">recipeId (required).</param>
 /// <param name="asAt">The asAt date to use.</param>
 /// <param name="metrics">The set of specifications to calculate or retrieve during the valuation and present in the results. For example:  AggregateSpec(&#39;Holding/default/PV&#39;,&#39;Sum&#39;) for returning the PV (present value) of holdings  AggregateSpec(&#39;Holding/default/Units&#39;,&#39;Sum&#39;) for returning the units of holidays  AggregateSpec(&#39;Instrument/default/LusidInstrumentId&#39;,&#39;Value&#39;) for returning the Lusid Instrument identifier (required).</param>
 /// <param name="groupBy">The set of items by which to perform grouping. This primarily matters when one or more of the metric operators is a mapping  that reduces set size, e.g. sum or proportion. The group-by statement determines the set of keys by which to break the results out..</param>
 /// <param name="filters">A set of filters to use to reduce the data found in a request. Equivalent to the &#39;where ...&#39; part of a Sql select statement.  For example, filter a set of values within a given range or matching a particular value..</param>
 /// <param name="sort">A (possibly empty/null) set of specifications for how to order the results..</param>
 /// <param name="reportCurrency">Three letter ISO currency string indicating what currency to report in for ReportCurrency denominated queries.  If not present, then the currency of the relevant portfolio will be used in its place..</param>
 /// <param name="equipWithSubtotals">Flag directing the Valuation call to populate the results with subtotals of aggregates..</param>
 /// <param name="portfolioEntityIds">The set of portfolio or portfolio group identifier(s) that is to be valued. (required).</param>
 /// <param name="valuationSchedule">valuationSchedule (required).</param>
 public ValuationRequest(ResourceId recipeId = default(ResourceId), DateTimeOffset?asAt = default(DateTimeOffset?), List <AggregateSpec> metrics = default(List <AggregateSpec>), List <string> groupBy = default(List <string>), List <PropertyFilter> filters = default(List <PropertyFilter>), List <OrderBySpec> sort = default(List <OrderBySpec>), string reportCurrency = default(string), bool equipWithSubtotals = default(bool), List <PortfolioEntityId> portfolioEntityIds = default(List <PortfolioEntityId>), ValuationSchedule valuationSchedule = default(ValuationSchedule))
 {
     // to ensure "recipeId" is required (not null)
     this.RecipeId = recipeId ?? throw new ArgumentNullException("recipeId is a required property for ValuationRequest and cannot be null");
     // to ensure "metrics" is required (not null)
     this.Metrics = metrics ?? throw new ArgumentNullException("metrics is a required property for ValuationRequest and cannot be null");
     // to ensure "portfolioEntityIds" is required (not null)
     this.PortfolioEntityIds = portfolioEntityIds ?? throw new ArgumentNullException("portfolioEntityIds is a required property for ValuationRequest and cannot be null");
     // to ensure "valuationSchedule" is required (not null)
     this.ValuationSchedule = valuationSchedule ?? throw new ArgumentNullException("valuationSchedule is a required property for ValuationRequest and cannot be null");
     this.AsAt               = asAt;
     this.GroupBy            = groupBy;
     this.Filters            = filters;
     this.Sort               = sort;
     this.ReportCurrency     = reportCurrency;
     this.EquipWithSubtotals = equipWithSubtotals;
 }