C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
YELTOptions.cs
Go to the documentation of this file.
1using System;
3
4namespace AnalyzeRe.Metrics
5{
8 public class YELTOptions : SimulationOptions, IEquatable<YELTOptions>
9 {
11 [Flags]
13 {
15 RecordType = 1,
16
19
22 }
23
25 public new static YELTOptions Default => new YELTOptions();
26
30 public string currency { get; set; }
31
33 public bool? apply_participation { get; set; }
34
36 public int? start_trial { get; set; }
37
39 public int? end_trial { get; set; }
40
43
44 #region Constructors
60 public YELTOptions(string currency = null, Perspective perspective = null,
61 string filter = null, bool? secondary_uncertainty = null,
63 int? start_trial = null, int? end_trial = null,
66 {
67 this.currency = currency;
68 this.apply_participation = apply_participation;
69 this.start_trial = start_trial;
70 this.end_trial = end_trial;
71 this.additional_columns = additional_columns;
72 }
73
83 public YELTOptions(SimulationOptions toCopy, string currency = null, bool? apply_participation = null,
84 int? start_trial = null, int? end_trial = null,
86 : base(toCopy)
87 {
88 this.currency = currency;
89 this.apply_participation = apply_participation;
90 this.start_trial = start_trial;
91 this.end_trial = end_trial;
92 this.additional_columns = additional_columns;
93 }
94
97 public YELTOptions(YELTOptions toCopy) : base((SimulationOptions)toCopy)
98 {
99 if (toCopy == null) return;
100 currency = toCopy.currency;
102 start_trial = toCopy.start_trial;
103 end_trial = toCopy.end_trial;
105 }
106 #endregion Constructors
107
108 #region Public Overrides
112 {
113 return base.GetParameters()
116 .AddQueryParameter(nameof(start_trial), start_trial?.ToString())
117 .AddQueryParameter(nameof(end_trial), end_trial?.ToString())
118 .AddQueryParameter(nameof(additional_columns), additional_columns?.ToString("G").Replace(" ", ""));
119 }
120
126 public bool Equals(YELTOptions other)
127 {
128 return base.Equals(other) &&
129 BothNullOrEqual(currency, other.currency) &&
130 BothNullOrEqual(apply_participation, other.apply_participation) &&
131 BothNullOrEqual(start_trial, other.start_trial) &&
132 BothNullOrEqual(end_trial, other.end_trial) &&
133 BothNullOrEqual(additional_columns, other.additional_columns);
134 }
135 #endregion Public Overrides
136 }
137}
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...
Optional parameters which can be specified for yelt download requests.
Definition YELTOptions.cs:9
bool Equals(YELTOptions other)
Indicates whether the current object is equal to another object of the same type.
override RequestParameters GetParameters()
Get the REST request parameters corresponding to this configuration.
YELTOptions(YELTOptions toCopy)
Construct a new set of YELTOptions from another.
int? end_trial
The end range of trials to download.
YELTOptions(SimulationOptions toCopy, string currency=null, bool? apply_participation=null, int? start_trial=null, int? end_trial=null, AdditionalColumns? additional_columns=null)
Construct a new set of YELTOptions from an existing set of SimulationOptions.
int? start_trial
The starting range of trials to download.
string currency
The currency to convert event losses to. If not specified, the losses will be returned in APITypes....
AdditionalColumns
Extra columns that may be selected for inclusion in the YELT file.
@ ReinstatementBrokerage
The Reinstatement Brokerage column.
@ ReinstatementPremium
The Reinstatement Premium column.
YELTOptions(string currency=null, Perspective perspective=null, string filter=null, bool? secondary_uncertainty=null, ReportingPeriod reporting_period=null, bool? apply_participation=null, int? start_trial=null, int? end_trial=null, AdditionalColumns? additional_columns=null)
Configure one or more optional metrics request parameters.
AdditionalColumns? additional_columns
Additional columns that should be included in the YELT file.
static new YELTOptions Default
The default yelt request options used when none are specified.
bool? apply_participation
Whether or not participation should be applied to results.
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....
RecordType
The type of occurrence.
Definition RecordType.cs:10