From afd72aee2df1c2044233b5309a288337274d8238 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 6 Nov 2020 07:13:31 +0000 Subject: [PATCH] Generated from bbcd96bb3e421e5f653ac95f86c7f22e958ef30c --- .../mgmt/2018-09-01/insights/models.go | 99 ++++++++++++++----- 1 file changed, 74 insertions(+), 25 deletions(-) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/models.go b/services/preview/monitor/mgmt/2018-09-01/insights/models.go index 0c6bf9a1f411..720e9c04f947 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/models.go +++ b/services/preview/monitor/mgmt/2018-09-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"` @@ -903,7 +903,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"` @@ -1027,8 +1028,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 @@ -1171,8 +1172,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. @@ -1603,6 +1607,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"` } @@ -1638,6 +1644,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 } @@ -1769,6 +1778,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 @@ -1784,8 +1802,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"` @@ -2057,8 +2075,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. @@ -3027,8 +3048,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"` @@ -3471,8 +3492,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"` @@ -3612,8 +3633,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"` @@ -3639,6 +3660,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"` } @@ -3668,6 +3691,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 } @@ -3781,6 +3807,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 @@ -3935,6 +3970,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"` } @@ -3999,6 +4036,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 } @@ -4094,6 +4134,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 @@ -4523,8 +4572,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"` @@ -4663,8 +4712,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"` @@ -4806,8 +4855,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"`