| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.AnomalyDetector.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | public partial class LastDetectResponse |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// Initializes a new instance of the LastDetectResponse class. |
| | 20 | | /// </summary> |
| 0 | 21 | | public LastDetectResponse() |
| | 22 | | { |
| | 23 | | CustomInit(); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the LastDetectResponse class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name="period">Frequency extracted from the series, zero |
| | 30 | | /// means no recurrent pattern has been found.</param> |
| | 31 | | /// <param name="suggestedWindow">Suggested input series points needed |
| | 32 | | /// for detecting the latest point.</param> |
| | 33 | | /// <param name="expectedValue">Expected value of the latest |
| | 34 | | /// point.</param> |
| | 35 | | /// <param name="upperMargin">Upper margin of the latest point. |
| | 36 | | /// UpperMargin is used to calculate upperBoundary, which equals to |
| | 37 | | /// expectedValue + (100 - marginScale)*upperMargin. If the value of |
| | 38 | | /// latest point is between upperBoundary and lowerBoundary, it should |
| | 39 | | /// be treated as normal value. By adjusting marginScale value, anomaly |
| | 40 | | /// status of latest point can be changed.</param> |
| | 41 | | /// <param name="lowerMargin">Lower margin of the latest point. |
| | 42 | | /// LowerMargin is used to calculate lowerBoundary, which equals to |
| | 43 | | /// expectedValue - (100 - marginScale)*lowerMargin. </param> |
| | 44 | | /// <param name="isAnomaly">Anomaly status of the latest point, true |
| | 45 | | /// means the latest point is an anomaly either in negative direction |
| | 46 | | /// or positive direction.</param> |
| | 47 | | /// <param name="isNegativeAnomaly">Anomaly status in negative |
| | 48 | | /// direction of the latest point. True means the latest point is an |
| | 49 | | /// anomaly and its real value is smaller than the expected |
| | 50 | | /// one.</param> |
| | 51 | | /// <param name="isPositiveAnomaly">Anomaly status in positive |
| | 52 | | /// direction of the latest point. True means the latest point is an |
| | 53 | | /// anomaly and its real value is larger than the expected one.</param> |
| 0 | 54 | | public LastDetectResponse(int period, int suggestedWindow, double expectedValue, double upperMargin, double lowe |
| | 55 | | { |
| 0 | 56 | | Period = period; |
| 0 | 57 | | SuggestedWindow = suggestedWindow; |
| 0 | 58 | | ExpectedValue = expectedValue; |
| 0 | 59 | | UpperMargin = upperMargin; |
| 0 | 60 | | LowerMargin = lowerMargin; |
| 0 | 61 | | IsAnomaly = isAnomaly; |
| 0 | 62 | | IsNegativeAnomaly = isNegativeAnomaly; |
| 0 | 63 | | IsPositiveAnomaly = isPositiveAnomaly; |
| | 64 | | CustomInit(); |
| 0 | 65 | | } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// An initialization method that performs custom operations like setting defaults |
| | 69 | | /// </summary> |
| | 70 | | partial void CustomInit(); |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets or sets frequency extracted from the series, zero means no |
| | 74 | | /// recurrent pattern has been found. |
| | 75 | | /// </summary> |
| | 76 | | [JsonProperty(PropertyName = "period")] |
| 0 | 77 | | public int Period { get; set; } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Gets or sets suggested input series points needed for detecting the |
| | 81 | | /// latest point. |
| | 82 | | /// </summary> |
| | 83 | | [JsonProperty(PropertyName = "suggestedWindow")] |
| 0 | 84 | | public int SuggestedWindow { get; set; } |
| | 85 | |
|
| | 86 | | /// <summary> |
| | 87 | | /// Gets or sets expected value of the latest point. |
| | 88 | | /// </summary> |
| | 89 | | [JsonProperty(PropertyName = "expectedValue")] |
| 0 | 90 | | public double ExpectedValue { get; set; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets or sets upper margin of the latest point. UpperMargin is used |
| | 94 | | /// to calculate upperBoundary, which equals to expectedValue + (100 - |
| | 95 | | /// marginScale)*upperMargin. If the value of latest point is between |
| | 96 | | /// upperBoundary and lowerBoundary, it should be treated as normal |
| | 97 | | /// value. By adjusting marginScale value, anomaly status of latest |
| | 98 | | /// point can be changed. |
| | 99 | | /// </summary> |
| | 100 | | [JsonProperty(PropertyName = "upperMargin")] |
| 0 | 101 | | public double UpperMargin { get; set; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets or sets lower margin of the latest point. LowerMargin is used |
| | 105 | | /// to calculate lowerBoundary, which equals to expectedValue - (100 - |
| | 106 | | /// marginScale)*lowerMargin. |
| | 107 | | /// </summary> |
| | 108 | | [JsonProperty(PropertyName = "lowerMargin")] |
| 0 | 109 | | public double LowerMargin { get; set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// Gets or sets anomaly status of the latest point, true means the |
| | 113 | | /// latest point is an anomaly either in negative direction or positive |
| | 114 | | /// direction. |
| | 115 | | /// </summary> |
| | 116 | | [JsonProperty(PropertyName = "isAnomaly")] |
| 0 | 117 | | public bool IsAnomaly { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets anomaly status in negative direction of the latest |
| | 121 | | /// point. True means the latest point is an anomaly and its real value |
| | 122 | | /// is smaller than the expected one. |
| | 123 | | /// </summary> |
| | 124 | | [JsonProperty(PropertyName = "isNegativeAnomaly")] |
| 0 | 125 | | public bool IsNegativeAnomaly { get; set; } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// Gets or sets anomaly status in positive direction of the latest |
| | 129 | | /// point. True means the latest point is an anomaly and its real value |
| | 130 | | /// is larger than the expected one. |
| | 131 | | /// </summary> |
| | 132 | | [JsonProperty(PropertyName = "isPositiveAnomaly")] |
| 0 | 133 | | public bool IsPositiveAnomaly { get; set; } |
| | 134 | |
|
| | 135 | | /// <summary> |
| | 136 | | /// Validate the object. |
| | 137 | | /// </summary> |
| | 138 | | /// <exception cref="Rest.ValidationException"> |
| | 139 | | /// Thrown if validation fails |
| | 140 | | /// </exception> |
| | 141 | | public virtual void Validate() |
| | 142 | | { |
| | 143 | | //Nothing to validate |
| 0 | 144 | | } |
| | 145 | | } |
| | 146 | | } |