diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/models.go b/services/preview/monitor/mgmt/2019-03-01/insights/models.go index 6c34fe948a9d..2eeef5a3eb10 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/models.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/models.go @@ -351,15 +351,15 @@ type ActivityLogAlertActionList struct { ActionGroups *[]ActivityLogAlertActionGroup `json:"actionGroups,omitempty"` } -// ActivityLogAlertAllOfCondition an Activity Log alert condition that is met when all its member conditions -// are met. +// ActivityLogAlertAllOfCondition an Activity Log alert condition that is met when all its member +// conditions are met. type ActivityLogAlertAllOfCondition struct { // AllOf - The list of activity log alert conditions. AllOf *[]ActivityLogAlertLeafCondition `json:"allOf,omitempty"` } -// ActivityLogAlertLeafCondition an Activity Log alert condition that is met by comparing an activity log field -// and value. +// ActivityLogAlertLeafCondition an Activity Log alert condition that is met by comparing an activity log +// field and value. type ActivityLogAlertLeafCondition struct { // Field - The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. Field *string `json:"field,omitempty"` @@ -907,7 +907,8 @@ type AutoscaleProfile struct { Recurrence *Recurrence `json:"recurrence,omitempty"` } -// AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a resource. +// AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a +// resource. type AutoscaleSetting struct { // Profiles - the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Profiles *[]AutoscaleProfile `json:"profiles,omitempty"` @@ -1031,8 +1032,8 @@ type AutoscaleSettingResourceCollection struct { NextLink *string `json:"nextLink,omitempty"` } -// AutoscaleSettingResourceCollectionIterator provides access to a complete listing of AutoscaleSettingResource -// values. +// AutoscaleSettingResourceCollectionIterator provides access to a complete listing of +// AutoscaleSettingResource values. type AutoscaleSettingResourceCollectionIterator struct { i int page AutoscaleSettingResourceCollectionPage @@ -1175,8 +1176,11 @@ func (page AutoscaleSettingResourceCollectionPage) Values() []AutoscaleSettingRe } // Creates a new instance of the AutoscaleSettingResourceCollectionPage type. -func NewAutoscaleSettingResourceCollectionPage(getNextPage func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)) AutoscaleSettingResourceCollectionPage { - return AutoscaleSettingResourceCollectionPage{fn: getNextPage} +func NewAutoscaleSettingResourceCollectionPage(cur AutoscaleSettingResourceCollection, getNextPage func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)) AutoscaleSettingResourceCollectionPage { + return AutoscaleSettingResourceCollectionPage{ + fn: getNextPage, + asrc: cur, + } } // AutoscaleSettingResourcePatch the autoscale setting object for patch operations. @@ -1623,6 +1627,8 @@ type DynamicMetricCriteria struct { TimeAggregation interface{} `json:"timeAggregation,omitempty"` // Dimensions - List of dimension conditions. Dimensions *[]MetricDimension `json:"dimensions,omitempty"` + // SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. + SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` // CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion' CriterionType CriterionType `json:"criterionType,omitempty"` } @@ -1658,6 +1664,9 @@ func (dmc DynamicMetricCriteria) MarshalJSON() ([]byte, error) { if dmc.Dimensions != nil { objectMap["dimensions"] = dmc.Dimensions } + if dmc.SkipMetricValidation != nil { + objectMap["skipMetricValidation"] = dmc.SkipMetricValidation + } if dmc.CriterionType != "" { objectMap["criterionType"] = dmc.CriterionType } @@ -1789,6 +1798,15 @@ func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error { } dmc.Dimensions = &dimensions } + case "skipMetricValidation": + if v != nil { + var skipMetricValidation bool + err = json.Unmarshal(*v, &skipMetricValidation) + if err != nil { + return err + } + dmc.SkipMetricValidation = &skipMetricValidation + } case "criterionType": if v != nil { var criterionType CriterionType @@ -1804,8 +1822,8 @@ func (dmc *DynamicMetricCriteria) UnmarshalJSON(body []byte) error { return nil } -// DynamicThresholdFailingPeriods the minimum number of violations required within the selected lookback time -// window required to raise an alert. +// DynamicThresholdFailingPeriods the minimum number of violations required within the selected lookback +// time window required to raise an alert. type DynamicThresholdFailingPeriods struct { // NumberOfEvaluationPeriods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. NumberOfEvaluationPeriods *float64 `json:"numberOfEvaluationPeriods,omitempty"` @@ -2090,8 +2108,11 @@ func (page EventDataCollectionPage) Values() []EventData { } // Creates a new instance of the EventDataCollectionPage type. -func NewEventDataCollectionPage(getNextPage func(context.Context, EventDataCollection) (EventDataCollection, error)) EventDataCollectionPage { - return EventDataCollectionPage{fn: getNextPage} +func NewEventDataCollectionPage(cur EventDataCollection, getNextPage func(context.Context, EventDataCollection) (EventDataCollection, error)) EventDataCollectionPage { + return EventDataCollectionPage{ + fn: getNextPage, + edc: cur, + } } // HTTPRequestInfo the Http request info. @@ -3062,8 +3083,8 @@ func (mac *MetricAlertCriteria) UnmarshalJSON(body []byte) error { return nil } -// MetricAlertMultipleResourceMultipleMetricCriteria specifies the metric alert criteria for multiple resource -// that has multiple metric criteria. +// MetricAlertMultipleResourceMultipleMetricCriteria specifies the metric alert criteria for multiple +// resource that has multiple metric criteria. type MetricAlertMultipleResourceMultipleMetricCriteria struct { // AllOf - the list of multiple metric criteria for this 'all of' operation. AllOf *[]BasicMultiMetricCriteria `json:"allOf,omitempty"` @@ -3506,8 +3527,8 @@ func (marp *MetricAlertResourcePatch) UnmarshalJSON(body []byte) error { return nil } -// MetricAlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single resource -// that has multiple metric criteria. +// MetricAlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single +// resource that has multiple metric criteria. type MetricAlertSingleResourceMultipleMetricCriteria struct { // AllOf - The list of metric criteria for this 'all of' operation. AllOf *[]MetricCriteria `json:"allOf,omitempty"` @@ -3647,8 +3668,8 @@ func (masp MetricAlertStatusProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MetricAvailability metric availability specifies the time grain (aggregation interval or frequency) and the -// retention period for that time grain. +// MetricAvailability metric availability specifies the time grain (aggregation interval or frequency) and +// the retention period for that time grain. type MetricAvailability struct { // TimeGrain - the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. TimeGrain *string `json:"timeGrain,omitempty"` @@ -3693,6 +3714,8 @@ type MetricCriteria struct { TimeAggregation interface{} `json:"timeAggregation,omitempty"` // Dimensions - List of dimension conditions. Dimensions *[]MetricDimension `json:"dimensions,omitempty"` + // SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. + SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` // CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion' CriterionType CriterionType `json:"criterionType,omitempty"` } @@ -3722,6 +3745,9 @@ func (mc MetricCriteria) MarshalJSON() ([]byte, error) { if mc.Dimensions != nil { objectMap["dimensions"] = mc.Dimensions } + if mc.SkipMetricValidation != nil { + objectMap["skipMetricValidation"] = mc.SkipMetricValidation + } if mc.CriterionType != "" { objectMap["criterionType"] = mc.CriterionType } @@ -3835,6 +3861,15 @@ func (mc *MetricCriteria) UnmarshalJSON(body []byte) error { } mc.Dimensions = &dimensions } + case "skipMetricValidation": + if v != nil { + var skipMetricValidation bool + err = json.Unmarshal(*v, &skipMetricValidation) + if err != nil { + return err + } + mc.SkipMetricValidation = &skipMetricValidation + } case "criterionType": if v != nil { var criterionType CriterionType @@ -3997,6 +4032,8 @@ type MultiMetricCriteria struct { TimeAggregation interface{} `json:"timeAggregation,omitempty"` // Dimensions - List of dimension conditions. Dimensions *[]MetricDimension `json:"dimensions,omitempty"` + // SkipMetricValidation - Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. + SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` // CriterionType - Possible values include: 'CriterionTypeMultiMetricCriteria', 'CriterionTypeStaticThresholdCriterion', 'CriterionTypeDynamicThresholdCriterion' CriterionType CriterionType `json:"criterionType,omitempty"` } @@ -4061,6 +4098,9 @@ func (mmc MultiMetricCriteria) MarshalJSON() ([]byte, error) { if mmc.Dimensions != nil { objectMap["dimensions"] = mmc.Dimensions } + if mmc.SkipMetricValidation != nil { + objectMap["skipMetricValidation"] = mmc.SkipMetricValidation + } if mmc.CriterionType != "" { objectMap["criterionType"] = mmc.CriterionType } @@ -4156,6 +4196,15 @@ func (mmc *MultiMetricCriteria) UnmarshalJSON(body []byte) error { } mmc.Dimensions = &dimensions } + case "skipMetricValidation": + if v != nil { + var skipMetricValidation bool + err = json.Unmarshal(*v, &skipMetricValidation) + if err != nil { + return err + } + mmc.SkipMetricValidation = &skipMetricValidation + } case "criterionType": if v != nil { var criterionType CriterionType @@ -4601,8 +4650,8 @@ func (rds RuleDataSource) AsBasicRuleDataSource() (BasicRuleDataSource, bool) { return &rds, true } -// RuleEmailAction specifies the action to send email when the rule condition is evaluated. The discriminator -// is always RuleEmailAction in this case. +// RuleEmailAction specifies the action to send email when the rule condition is evaluated. The +// discriminator is always RuleEmailAction in this case. type RuleEmailAction struct { // SendToServiceOwners - Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated. SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` @@ -4741,8 +4790,8 @@ func (rmeds RuleManagementEventDataSource) AsBasicRuleDataSource() (BasicRuleDat return &rmeds, true } -// RuleMetricDataSource a rule metric data source. The discriminator value is always RuleMetricDataSource in -// this case. +// RuleMetricDataSource a rule metric data source. The discriminator value is always RuleMetricDataSource +// in this case. type RuleMetricDataSource struct { // MetricName - the name of the metric that defines what the rule monitors. MetricName *string `json:"metricName,omitempty"` @@ -4884,8 +4933,8 @@ type Schedule struct { } // SenderAuthorization the authorization used by the user who has performed the operation that led to this -// event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the -// 'scope' +// event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and +// the 'scope' type SenderAuthorization struct { // Action - the permissible actions. For instance: microsoft.support/supporttickets/write Action *string `json:"action,omitempty"`