diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/models.go b/services/preview/monitor/mgmt/2019-06-01/insights/models.go index 072db4706acf..ecbe2cdfaeb0 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/models.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/models.go @@ -197,6 +197,40 @@ func PossibleDataStatusValues() []DataStatus { return []DataStatus{NotPresent, Present} } +// DynamicThresholdOperator enumerates the values for dynamic threshold operator. +type DynamicThresholdOperator string + +const ( + // DynamicThresholdOperatorGreaterOrLessThan ... + DynamicThresholdOperatorGreaterOrLessThan DynamicThresholdOperator = "GreaterOrLessThan" + // DynamicThresholdOperatorGreaterThan ... + DynamicThresholdOperatorGreaterThan DynamicThresholdOperator = "GreaterThan" + // DynamicThresholdOperatorLessThan ... + DynamicThresholdOperatorLessThan DynamicThresholdOperator = "LessThan" +) + +// PossibleDynamicThresholdOperatorValues returns an array of possible values for the DynamicThresholdOperator const type. +func PossibleDynamicThresholdOperatorValues() []DynamicThresholdOperator { + return []DynamicThresholdOperator{DynamicThresholdOperatorGreaterOrLessThan, DynamicThresholdOperatorGreaterThan, DynamicThresholdOperatorLessThan} +} + +// DynamicThresholdSensitivity enumerates the values for dynamic threshold sensitivity. +type DynamicThresholdSensitivity string + +const ( + // DynamicThresholdSensitivityHigh ... + DynamicThresholdSensitivityHigh DynamicThresholdSensitivity = "High" + // DynamicThresholdSensitivityLow ... + DynamicThresholdSensitivityLow DynamicThresholdSensitivity = "Low" + // DynamicThresholdSensitivityMedium ... + DynamicThresholdSensitivityMedium DynamicThresholdSensitivity = "Medium" +) + +// PossibleDynamicThresholdSensitivityValues returns an array of possible values for the DynamicThresholdSensitivity const type. +func PossibleDynamicThresholdSensitivityValues() []DynamicThresholdSensitivity { + return []DynamicThresholdSensitivity{DynamicThresholdSensitivityHigh, DynamicThresholdSensitivityLow, DynamicThresholdSensitivityMedium} +} + // Enabled enumerates the values for enabled. type Enabled string @@ -371,6 +405,29 @@ func PossibleOnboardingStatusValues() []OnboardingStatus { return []OnboardingStatus{NotOnboarded, Onboarded, Unknown} } +// Operator enumerates the values for operator. +type Operator string + +const ( + // OperatorEquals ... + OperatorEquals Operator = "Equals" + // OperatorGreaterThan ... + OperatorGreaterThan Operator = "GreaterThan" + // OperatorGreaterThanOrEqual ... + OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" + // OperatorLessThan ... + OperatorLessThan Operator = "LessThan" + // OperatorLessThanOrEqual ... + OperatorLessThanOrEqual Operator = "LessThanOrEqual" + // OperatorNotEquals ... + OperatorNotEquals Operator = "NotEquals" +) + +// PossibleOperatorValues returns an array of possible values for the Operator const type. +func PossibleOperatorValues() []Operator { + return []Operator{OperatorEquals, OperatorGreaterThan, OperatorGreaterThanOrEqual, OperatorLessThan, OperatorLessThanOrEqual, OperatorNotEquals} +} + // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string @@ -2139,10 +2196,10 @@ type Dimension struct { // DynamicMetricCriteria criterion for dynamic threshold. type DynamicMetricCriteria struct { - // Operator - The operator used to compare the metric value against the threshold. - Operator interface{} `json:"operator,omitempty"` - // AlertSensitivity - The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. - AlertSensitivity interface{} `json:"alertSensitivity,omitempty"` + // Operator - The operator used to compare the metric value against the threshold. Possible values include: 'DynamicThresholdOperatorGreaterThan', 'DynamicThresholdOperatorLessThan', 'DynamicThresholdOperatorGreaterOrLessThan' + Operator DynamicThresholdOperator `json:"operator,omitempty"` + // AlertSensitivity - The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Possible values include: 'DynamicThresholdSensitivityLow', 'DynamicThresholdSensitivityMedium', 'DynamicThresholdSensitivityHigh' + AlertSensitivity DynamicThresholdSensitivity `json:"alertSensitivity,omitempty"` // FailingPeriods - The minimum number of violations required within the selected lookback time window required to raise an alert. FailingPeriods *DynamicThresholdFailingPeriods `json:"failingPeriods,omitempty"` // 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) @@ -2167,10 +2224,10 @@ type DynamicMetricCriteria struct { func (dmc DynamicMetricCriteria) MarshalJSON() ([]byte, error) { dmc.CriterionType = CriterionTypeDynamicThresholdCriterion objectMap := make(map[string]interface{}) - if dmc.Operator != nil { + if dmc.Operator != "" { objectMap["operator"] = dmc.Operator } - if dmc.AlertSensitivity != nil { + if dmc.AlertSensitivity != "" { objectMap["alertSensitivity"] = dmc.AlertSensitivity } if dmc.FailingPeriods != nil { @@ -2234,7 +2291,7 @@ func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error { switch k { case "operator": if v != nil { - var operator interface{} + var operator DynamicThresholdOperator err = json.Unmarshal(*v, &operator) if err != nil { return err @@ -2243,7 +2300,7 @@ func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error { } case "alertSensitivity": if v != nil { - var alertSensitivity interface{} + var alertSensitivity DynamicThresholdSensitivity err = json.Unmarshal(*v, &alertSensitivity) if err != nil { return err @@ -4112,8 +4169,8 @@ type MetricBaselinesResponse struct { // MetricCriteria criterion to filter metrics. type MetricCriteria struct { - // Operator - the criteria operator. - Operator interface{} `json:"operator,omitempty"` + // Operator - the criteria operator. Possible values include: 'OperatorEquals', 'OperatorNotEquals', 'OperatorGreaterThan', 'OperatorGreaterThanOrEqual', 'OperatorLessThan', 'OperatorLessThanOrEqual' + Operator Operator `json:"operator,omitempty"` // Threshold - the criteria threshold value that activates the alert. Threshold *float64 `json:"threshold,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection @@ -4136,7 +4193,7 @@ type MetricCriteria struct { func (mc MetricCriteria) MarshalJSON() ([]byte, error) { mc.CriterionType = CriterionTypeStaticThresholdCriterion objectMap := make(map[string]interface{}) - if mc.Operator != nil { + if mc.Operator != "" { objectMap["operator"] = mc.Operator } if mc.Threshold != nil { @@ -4197,7 +4254,7 @@ func (mc *MetricCriteria) UnmarshalJSON(body []byte) error { switch k { case "operator": if v != nil { - var operator interface{} + var operator Operator err = json.Unmarshal(*v, &operator) if err != nil { return err @@ -5748,6 +5805,16 @@ type WebhookReceiver struct { TenantID *string `json:"tenantId,omitempty"` } +// WebtestLocationAvailabilityCriteria specifies the metric alert rule criteria for a web test resource. +type WebtestLocationAvailabilityCriteria struct { + // WebTestID - The Application Insights web test Id. + WebTestID *string `json:"webTestId,omitempty"` + // ComponentID - The Application Insights resource Id. + ComponentID *string `json:"componentId,omitempty"` + // FailedLocationCount - The number of failed locations. + FailedLocationCount *float64 `json:"failedLocationCount,omitempty"` +} + // WorkspaceInfo information about a Log Analytics Workspace. type WorkspaceInfo struct { // ID - Azure Resource Manager identifier of the Log Analytics Workspace.