コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AggregationRequest" /> class.
        /// </summary>
        /// <param name="recipeId">recipeId.</param>
        /// <param name="inlineRecipe">inlineRecipe.</param>
        /// <param name="asAt">The asAt date to use.</param>
        /// <param name="effectiveAt">The market data time, i.e. the time to run the aggregation request effective of. (required).</param>
        /// <param name="metrics">The set of specifications for items to calculate or retrieve during the aggregation and present in the results.  This is logically equivalent to the set of operations in a Sql select statement  select [operation1(field1), operation2(field2), ... ] from results (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="limit">limit the results to a particular number of values..</param>
        /// <param name="sort">A (possibly empty/null) set of specifications for how to order the results..</param>
        public AggregationRequest(ResourceId recipeId = default(ResourceId), ConfigurationRecipe inlineRecipe = default(ConfigurationRecipe), DateTimeOffset?asAt = default(DateTimeOffset?), DateTimeOffset?effectiveAt = default(DateTimeOffset?), List <AggregateSpec> metrics = default(List <AggregateSpec>), List <string> groupBy = default(List <string>), List <PropertyFilter> filters = default(List <PropertyFilter>), int?limit = default(int?), List <OrderBySpec> sort = default(List <OrderBySpec>))
        {
            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for AggregationRequest and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }

            // to ensure "metrics" is required (not null)
            if (metrics == null)
            {
                throw new InvalidDataException("metrics is a required property for AggregationRequest and cannot be null");
            }
            else
            {
                this.Metrics = metrics;
            }

            this.RecipeId     = recipeId;
            this.InlineRecipe = inlineRecipe;
            this.AsAt         = asAt;
            this.GroupBy      = groupBy;
            this.Filters      = filters;
            this.Limit        = limit;
            this.Sort         = sort;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpsertRecipeRequest" /> class.
        /// </summary>
        /// <param name="code">User given string name (code) to identify the recipe or snippet for storage in and retrieval from the data store.  Sensibly it would be expected to match the same code given inside the configuration recipe, if that is the element being stored,  though this is not enforced. In the case of a snippet for rules or options, again a sensible naming convention such as options_...  or marketrules_... is advocated to aid in ease of understanding when included elsewhere though not enforced. (required).</param>
        /// <param name="configurationRecipe">configurationRecipe (required).</param>
        /// <param name="configurationRecipeSnippet">configurationRecipeSnippet (required).</param>
        public UpsertRecipeRequest(string code = default(string), ConfigurationRecipe configurationRecipe = default(ConfigurationRecipe), ConfigurationRecipeSnippet configurationRecipeSnippet = default(ConfigurationRecipeSnippet))
        {
            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for UpsertRecipeRequest and cannot be null");
            }
            else
            {
                this.Code = code;
            }

            // to ensure "configurationRecipe" is required (not null)
            if (configurationRecipe == null)
            {
                throw new InvalidDataException("configurationRecipe is a required property for UpsertRecipeRequest and cannot be null");
            }
            else
            {
                this.ConfigurationRecipe = configurationRecipe;
            }

            // to ensure "configurationRecipeSnippet" is required (not null)
            if (configurationRecipeSnippet == null)
            {
                throw new InvalidDataException("configurationRecipeSnippet is a required property for UpsertRecipeRequest and cannot be null");
            }
            else
            {
                this.ConfigurationRecipeSnippet = configurationRecipeSnippet;
            }
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetRecipeResponse" /> class.
 /// </summary>
 /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param>
 /// <param name="value">value.</param>
 /// <param name="links">links.</param>
 public GetRecipeResponse(string href = default(string), ConfigurationRecipe value = default(ConfigurationRecipe), List <Link> links = default(List <Link>))
 {
     this.Href  = href;
     this.Links = links;
     this.Href  = href;
     this.Value = value;
     this.Links = links;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UpsertRecipeRequest" /> class.
 /// </summary>
 /// <param name="configurationRecipe">configurationRecipe.</param>
 /// <param name="configurationRecipeSnippet">configurationRecipeSnippet.</param>
 public UpsertRecipeRequest(ConfigurationRecipe configurationRecipe = default(ConfigurationRecipe), ConfigurationRecipeSnippet configurationRecipeSnippet = default(ConfigurationRecipeSnippet))
 {
     this.ConfigurationRecipe        = configurationRecipe;
     this.ConfigurationRecipeSnippet = configurationRecipeSnippet;
 }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigurationRecipeSnippet" /> class.
        /// </summary>
        /// <param name="scope">The scope used when updating or inserting the Configuration Recipe snippet (required).</param>
        /// <param name="code">User given string name (code) to identify the recipe. (required).</param>
        /// <param name="aggregationOptions">aggregationOptions.</param>
        /// <param name="modelRules">The set of model rules that are available. There may be multiple rules for Vendors, but only one per model-instrument pair.  Which of these preference sets is used depends upon the model choice selection if specified, or failing that the global default model specification  in the options..</param>
        /// <param name="pricingOptions">pricingOptions.</param>
        /// <param name="marketRules">The set of rules that define how to resolve particular use cases. These can be relatively general or specific in nature.  Nominally any number are possible and will be processed in order where applicable. However, there is evidently a potential  for increased computational cost where many rules must be applied to resolve data. Ensuring that portfolios are structured in  such a way as to reduce the number of rules required is therefore sensible..</param>
        /// <param name="marketOptions">marketOptions.</param>
        /// <param name="recipe">recipe.</param>
        public ConfigurationRecipeSnippet(string scope = default(string), string code = default(string), AggregationOptions aggregationOptions = default(AggregationOptions), List <VendorModelRule> modelRules = default(List <VendorModelRule>), PricingOptions pricingOptions = default(PricingOptions), List <MarketDataKeyRule> marketRules = default(List <MarketDataKeyRule>), MarketOptions marketOptions = default(MarketOptions), ConfigurationRecipe recipe = default(ConfigurationRecipe))
        {
            // to ensure "scope" is required (not null)
            if (scope == null)
            {
                throw new InvalidDataException("scope is a required property for ConfigurationRecipeSnippet and cannot be null");
            }
            else
            {
                this.Scope = scope;
            }

            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for ConfigurationRecipeSnippet and cannot be null");
            }
            else
            {
                this.Code = code;
            }

            this.ModelRules         = modelRules;
            this.MarketRules        = marketRules;
            this.AggregationOptions = aggregationOptions;
            this.ModelRules         = modelRules;
            this.PricingOptions     = pricingOptions;
            this.MarketRules        = marketRules;
            this.MarketOptions      = marketOptions;
            this.Recipe             = recipe;
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateRecipeRequest" /> class.
        /// </summary>
        /// <param name="recipeCreationMarketDataScopes">The scopes in which the recipe creation would look for quotes/data. (required).</param>
        /// <param name="recipeId">recipeId.</param>
        /// <param name="inlineRecipe">inlineRecipe.</param>
        /// <param name="asAt">The asAt date to use.</param>
        /// <param name="effectiveAt">The market data time, i.e. the recipe generated will look for rules with this effectiveAt. (required).</param>
        public CreateRecipeRequest(List <string> recipeCreationMarketDataScopes = default(List <string>), ResourceId recipeId = default(ResourceId), ConfigurationRecipe inlineRecipe = default(ConfigurationRecipe), DateTimeOffset?asAt = default(DateTimeOffset?), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel))
        {
            // to ensure "recipeCreationMarketDataScopes" is required (not null)
            if (recipeCreationMarketDataScopes == null)
            {
                throw new InvalidDataException("recipeCreationMarketDataScopes is a required property for CreateRecipeRequest and cannot be null");
            }
            else
            {
                this.RecipeCreationMarketDataScopes = recipeCreationMarketDataScopes;
            }

            this.AsAt = asAt;
            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for CreateRecipeRequest and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }

            this.RecipeId     = recipeId;
            this.InlineRecipe = inlineRecipe;
            this.AsAt         = asAt;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigurationRecipeSnippet" /> class.
 /// </summary>
 /// <param name="aggregationOptions">aggregationOptions.</param>
 /// <param name="modelRules">The set of model rules that are available. There may be multiple rules for Vendors, but only one per model-instrument pair.  Which of these preference sets is used depends upon the model choice selection if specified, or failing that the global default model specification  in the options..</param>
 /// <param name="pricingOptions">pricingOptions.</param>
 /// <param name="marketRules">The set of rules that define how to resolve particular use cases. These can be relatively general or specific in nature.  Nominally any number are possible and will be processed in order where applicable. However, there is evidently a potential  for increased computational cost where many rules must be applied to resolve data. Ensuring that portfolios are structured in  such a way as to reduce the number of rules required is therefore sensible..</param>
 /// <param name="marketOptions">marketOptions.</param>
 /// <param name="recipe">recipe.</param>
 public ConfigurationRecipeSnippet(AggregationOptions aggregationOptions = default(AggregationOptions), List <VendorModelRule> modelRules = default(List <VendorModelRule>), PricingOptions pricingOptions = default(PricingOptions), List <MarketDataKeyRule> marketRules = default(List <MarketDataKeyRule>), MarketOptions marketOptions = default(MarketOptions), ConfigurationRecipe recipe = default(ConfigurationRecipe))
 {
     this.AggregationOptions = aggregationOptions;
     this.ModelRules         = modelRules;
     this.PricingOptions     = pricingOptions;
     this.MarketRules        = marketRules;
     this.MarketOptions      = marketOptions;
     this.Recipe             = recipe;
 }