C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
MetricsOptions.cs
Go to the documentation of this file.
1using System;
4
5namespace AnalyzeRe.Metrics
6{
9 public class MetricsOptions : AggregationOptions, IEquatable<MetricsOptions>
10 {
12 public new static MetricsOptions Default => new MetricsOptions();
13
17 public string currency { get; set; }
18
20 public bool? apply_participation { get; set; }
21
22 #region Constructors
37 public MetricsOptions(string currency = null,
39 string filter = null, bool? secondary_uncertainty = null,
42 {
43 this.currency = currency;
44 this.apply_participation = apply_participation;
45 }
46
56 AggregationMethod? aggregation_method = null, string currency = null,
57 bool? apply_participation = null)
58 : base(toCopy, aggregation_method)
59 {
60 this.currency = currency;
61 this.apply_participation = apply_participation;
62 }
63
70 public MetricsOptions(AggregationOptions toCopy, string currency = null,
71 bool? apply_participation = null)
72 : base(toCopy)
73 {
74 this.currency = currency;
75 this.apply_participation = apply_participation;
76 }
77
80 public MetricsOptions(MetricsOptions toCopy) : base((AggregationOptions)toCopy)
81 {
82 if (toCopy == null) return;
83 currency = toCopy.currency;
85 }
86 #endregion Constructors
87
88 #region Public Overrides
92 {
93 return base.GetParameters()
96 }
97
103 public bool Equals(MetricsOptions other)
104 {
105 return base.Equals(other) &&
106 BothNullOrEqual(currency, other.currency) &&
107 BothNullOrEqual(apply_participation, other.apply_participation); ;
108 }
109 #endregion Public Overrides
110 }
111}
Optional parameters which can be specified for all aggregated simulation result requests.
AggregationMethod? aggregation_method
The aggregation method (AEP or OEP) used to compute this distribution. The default is AEP (Aggregate ...
Optional parameters which can be specified for all metrics requests.
string currency
The currency to convert metrics results to. If not specified, the metrics will be returned in APIType...
bool? apply_participation
Whether or not participation should be applied to results.
MetricsOptions(AggregationOptions toCopy, string currency=null, bool? apply_participation=null)
Construct a new set of MetricsOptions from an existing set of AggregationOptions.
MetricsOptions(MetricsOptions toCopy)
Construct a new set of MetricsOptions from another.
MetricsOptions(string currency=null, AggregationMethod? aggregation_method=null, Perspective perspective=null, string filter=null, bool? secondary_uncertainty=null, ReportingPeriod reporting_period=null, bool? apply_participation=null)
Configure one or more optional metrics request parameters.
MetricsOptions(SimulationOptions toCopy, AggregationMethod? aggregation_method=null, string currency=null, bool? apply_participation=null)
Construct a new set of MetricsOptions from an existing set of SimulationOptions.
override RequestParameters GetParameters()
Get the REST request parameters corresponding to this configuration.
bool Equals(MetricsOptions other)
Indicates whether the current object is equal to another object of the same type.
static new MetricsOptions Default
The default metrics request options used when none are specified.
A reporting period which dictates optional begin and end dates to constrain what event losses are inc...
Optional parameters which can be specified for all simulation result requests. Includes a variety of ...
ReportingPeriod reporting_period
A reporting period which dictates optional begin and end dates to constrain what event losses are inc...
Perspective perspective
The requested Perspective, which determines which factors are included in the loss distribution.
string filter
The name of the predefined filter used to determine which event losses are included in the resulting ...
bool? secondary_uncertainty
Whether or not to simulate using secondary uncertainty (if available). Set this to false to explicitl...
The loss perspective determines what factors to include when computing a distribution.
Helper class which makes it easier to build a set of request parameters.
RequestParameters AddQueryParameter(string name, string value)
Adds the specified name/value pair as a new request parameter with the type ParameterType....
AggregationMethod
Specifies the method of aggregating event occurrences in a trial year for computing different types o...