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

[AutoPR Microsoft.Azure.Management.Monitor] fix(metricAlert_API): add missing properties to web test metric alert #165

Closed
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
@@ -0,0 +1,89 @@
// <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 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 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");
}
}
}
}