forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 256b3656ab831e726ea41ffea8e1a46b09f6340a
fix(metricAlert_API): remove templateType from webtest metric alert rules
- Loading branch information
SDK Automation
committed
Dec 8, 2019
1 parent
f08bb6d
commit c5b8422
Showing
1 changed file
with
89 additions
and
0 deletions.
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
...soft.Azure.Management.Monitor/src/Generated/Models/WebtestLocationAvailabilityCriteria.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} | ||
} | ||
} |