Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR Microsoft.Azure.Management.Monitor] [Hub Generated] Review request for Microsoft.Insights to add version stable/2018-03-01 #10254

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ public DynamicMetricCriteria()
/// <param name="timeAggregation">the criteria time aggregation
/// types.</param>
/// <param name="operatorProperty">The operator used to compare the
/// metric value against the threshold.</param>
/// metric value against the threshold. Possible values include:
/// 'GreaterThan', 'LessThan', 'GreaterOrLessThan'</param>
/// <param name="alertSensitivity">The extent of deviation required to
/// trigger an alert. This will affect how tight the threshold is to
/// the metric series pattern.</param>
/// the metric series pattern. Possible values include: 'Low',
/// 'Medium', 'High'</param>
/// <param name="failingPeriods">The minimum number of violations
/// required within the selected lookback time window required to raise
/// an alert.</param>
Expand All @@ -52,7 +54,7 @@ public DynamicMetricCriteria()
/// <param name="ignoreDataBefore">Use this option to set the date from
/// which to start learning the metric historical data and calculate
/// the dynamic thresholds (in ISO8601 format)</param>
public DynamicMetricCriteria(string name, string metricName, object timeAggregation, object operatorProperty, object alertSensitivity, DynamicThresholdFailingPeriods failingPeriods, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string metricNamespace = default(string), IList<MetricDimension> dimensions = default(IList<MetricDimension>), System.DateTime? ignoreDataBefore = default(System.DateTime?))
public DynamicMetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, string alertSensitivity, DynamicThresholdFailingPeriods failingPeriods, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string metricNamespace = default(string), IList<MetricDimension> dimensions = default(IList<MetricDimension>), System.DateTime? ignoreDataBefore = default(System.DateTime?))
: base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions)
{
OperatorProperty = operatorProperty;
Expand All @@ -69,18 +71,19 @@ public DynamicMetricCriteria()

/// <summary>
/// Gets or sets the operator used to compare the metric value against
/// the threshold.
/// the threshold. Possible values include: 'GreaterThan', 'LessThan',
/// 'GreaterOrLessThan'
/// </summary>
[JsonProperty(PropertyName = "operator")]
public object OperatorProperty { get; set; }
public string OperatorProperty { get; set; }

/// <summary>
/// Gets or sets the extent of deviation required to trigger an alert.
/// This will affect how tight the threshold is to the metric series
/// pattern.
/// pattern. Possible values include: 'Low', 'Medium', 'High'
/// </summary>
[JsonProperty(PropertyName = "alertSensitivity")]
public object AlertSensitivity { get; set; }
public string AlertSensitivity { get; set; }

/// <summary>
/// Gets or sets the minimum number of violations required within the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Monitor.Models
{

/// <summary>
/// Defines values for DynamicThresholdOperator.
/// </summary>
public static class DynamicThresholdOperator
{
public const string GreaterThan = "GreaterThan";
public const string LessThan = "LessThan";
public const string GreaterOrLessThan = "GreaterOrLessThan";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Monitor.Models
{

/// <summary>
/// Defines values for DynamicThresholdSensitivity.
/// </summary>
public static class DynamicThresholdSensitivity
{
public const string Low = "Low";
public const string Medium = "Medium";
public const string High = "High";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public MetricAlertAction()
/// </summary>
/// <param name="actionGroupId">the id of the action group to
/// use.</param>
/// <param name="webhookProperties">The properties of a webhook
/// <param name="webHookProperties">The properties of a webhook
/// object.</param>
public MetricAlertAction(string actionGroupId = default(string), IDictionary<string, string> webhookProperties = default(IDictionary<string, string>))
public MetricAlertAction(string actionGroupId = default(string), IDictionary<string, string> webHookProperties = default(IDictionary<string, string>))
{
ActionGroupId = actionGroupId;
WebhookProperties = webhookProperties;
WebHookProperties = webHookProperties;
CustomInit();
}

Expand All @@ -56,8 +56,8 @@ public MetricAlertAction()
/// <summary>
/// Gets or sets the properties of a webhook object.
/// </summary>
[JsonProperty(PropertyName = "webhookProperties")]
public IDictionary<string, string> WebhookProperties { get; set; }
[JsonProperty(PropertyName = "webHookProperties")]
public IDictionary<string, string> WebHookProperties { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ public MetricCriteria()
/// <param name="metricName">Name of the metric.</param>
/// <param name="timeAggregation">the criteria time aggregation
/// types.</param>
/// <param name="operatorProperty">the criteria operator.</param>
/// <param name="operatorProperty">the criteria operator. Possible
/// values include: 'Equals', 'NotEquals', 'GreaterThan',
/// 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'</param>
/// <param name="threshold">the criteria threshold value that activates
/// the alert.</param>
/// <param name="additionalProperties">Unmatched properties from the
/// message are deserialized this collection</param>
/// <param name="metricNamespace">Namespace of the metric.</param>
/// <param name="dimensions">List of dimension conditions.</param>
public MetricCriteria(string name, string metricName, object timeAggregation, object operatorProperty, double threshold, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string metricNamespace = default(string), IList<MetricDimension> dimensions = default(IList<MetricDimension>))
public MetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, double threshold, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string metricNamespace = default(string), IList<MetricDimension> dimensions = default(IList<MetricDimension>))
: base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions)
{
OperatorProperty = operatorProperty;
Expand All @@ -58,10 +60,12 @@ public MetricCriteria()
partial void CustomInit();

/// <summary>
/// Gets or sets the criteria operator.
/// Gets or sets the criteria operator. Possible values include:
/// 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual',
/// 'LessThan', 'LessThanOrEqual'
/// </summary>
[JsonProperty(PropertyName = "operator")]
public object OperatorProperty { get; set; }
public string OperatorProperty { get; set; }

/// <summary>
/// Gets or sets the criteria threshold value that activates the alert.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Monitor.Models
{

/// <summary>
/// Defines values for OperatorModel.
/// </summary>
public static class OperatorModel
{
public const string Equals = "Equals";
public const string NotEquals = "NotEquals";
public const string GreaterThan = "GreaterThan";
public const string GreaterThanOrEqual = "GreaterThanOrEqual";
public const string LessThan = "LessThan";
public const string LessThanOrEqual = "LessThanOrEqual";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Monitor.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Specifies the metric alert rule criteria for a web test resource.
/// </summary>
public partial class WebtestLocationAvailabilityCriteria
{
/// <summary>
/// Initializes a new instance of the
/// WebtestLocationAvailabilityCriteria class.
/// </summary>
public WebtestLocationAvailabilityCriteria()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the
/// WebtestLocationAvailabilityCriteria class.
/// </summary>
/// <param name="webTestId">The Application Insights web test
/// Id.</param>
/// <param name="componentId">The Application Insights resource
/// Id.</param>
/// <param name="failedLocationCount">The number of failed
/// locations.</param>
public WebtestLocationAvailabilityCriteria(string webTestId, string componentId, double failedLocationCount)
{
WebTestId = webTestId;
ComponentId = componentId;
FailedLocationCount = failedLocationCount;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the Application Insights web test Id.
/// </summary>
[JsonProperty(PropertyName = "webTestId")]
public string WebTestId { get; set; }

/// <summary>
/// Gets or sets the Application Insights resource Id.
/// </summary>
[JsonProperty(PropertyName = "componentId")]
public string ComponentId { get; set; }

/// <summary>
/// Gets or sets the number of failed locations.
/// </summary>
[JsonProperty(PropertyName = "failedLocationCount")]
public double FailedLocationCount { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (WebTestId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "WebTestId");
}
if (ComponentId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ComponentId");
}
}
}
}