Esempio n. 1
0
 /// <summary>
 /// Create a patch model from the current <see cref="AnomalyAlertConfiguration"/>
 /// </summary>
 /// <returns>An <see cref="AnomalyAlertConfiguration"/> instance.</returns>
 internal AnomalyAlertingConfigurationPatch GetPatchModel()
 {
     return(new AnomalyAlertingConfigurationPatch()
     {
         CrossMetricsOperator = CrossMetricsOperator,
         Description = Description,
         Name = Name,
         HookIds = IdsOfHooksToAlert.Select(h => new Guid(h)).ToList(),
         MetricAlertingConfigurations = MetricAlertConfigurations
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Create a patch model from the current <see cref="AnomalyAlertConfiguration"/>
 /// </summary>
 /// <returns>An <see cref="AnomalyAlertConfiguration"/> instance.</returns>
 internal AnomalyAlertingConfigurationPatch GetPatchModel()
 {
     return(new AnomalyAlertingConfigurationPatch()
     {
         CrossMetricsOperator = CrossMetricsOperator.HasValue ? new AnomalyAlertingConfigurationPatchCrossMetricsOperator(CrossMetricsOperator.Value.ToString()) : default(AnomalyAlertingConfigurationPatchCrossMetricsOperator?),
         Description = Description,
         Name = Name,
         HookIds = IdsOfHooksToAlert.Select(h => new Guid(h)).ToList(),
         MetricAlertingConfigurations = MetricAlertConfigurations
     });
 }