diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go b/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go index 76c223754796..3839028148d2 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go @@ -123,7 +123,6 @@ func (client ActionGroupsClient) CreateOrUpdateSender(req *http.Request) (*http. func (client ActionGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ActionGroupResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client ActionGroupsClient) DeleteSender(req *http.Request) (*http.Response func (client ActionGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -284,7 +282,6 @@ func (client ActionGroupsClient) EnableReceiverSender(req *http.Request) (*http. func (client ActionGroupsClient) EnableReceiverResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusConflict), autorest.ByClosing()) result.Response = resp @@ -359,7 +356,6 @@ func (client ActionGroupsClient) GetSender(req *http.Request) (*http.Response, e func (client ActionGroupsClient) GetResponder(resp *http.Response) (result ActionGroupResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -433,7 +429,6 @@ func (client ActionGroupsClient) ListByResourceGroupSender(req *http.Request) (* func (client ActionGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ActionGroupList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -504,7 +499,6 @@ func (client ActionGroupsClient) ListBySubscriptionIDSender(req *http.Request) ( func (client ActionGroupsClient) ListBySubscriptionIDResponder(resp *http.Response) (result ActionGroupList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -583,7 +577,6 @@ func (client ActionGroupsClient) UpdateSender(req *http.Request) (*http.Response func (client ActionGroupsClient) UpdateResponder(resp *http.Response) (result ActionGroupResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go index ab43adfe1369..c543937e4053 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go @@ -125,7 +125,6 @@ func (client ActivityLogAlertsClient) CreateOrUpdateSender(req *http.Request) (* func (client ActivityLogAlertsClient) CreateOrUpdateResponder(resp *http.Response) (result ActivityLogAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,7 +200,6 @@ func (client ActivityLogAlertsClient) DeleteSender(req *http.Request) (*http.Res func (client ActivityLogAlertsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -276,7 +274,6 @@ func (client ActivityLogAlertsClient) GetSender(req *http.Request) (*http.Respon func (client ActivityLogAlertsClient) GetResponder(resp *http.Response) (result ActivityLogAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -350,7 +347,6 @@ func (client ActivityLogAlertsClient) ListByResourceGroupSender(req *http.Reques func (client ActivityLogAlertsClient) ListByResourceGroupResponder(resp *http.Response) (result ActivityLogAlertList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -421,7 +417,6 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDSender(req *http.Reque func (client ActivityLogAlertsClient) ListBySubscriptionIDResponder(resp *http.Response) (result ActivityLogAlertList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -500,7 +495,6 @@ func (client ActivityLogAlertsClient) UpdateSender(req *http.Request) (*http.Res func (client ActivityLogAlertsClient) UpdateResponder(resp *http.Response) (result ActivityLogAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go index 9188a5e8f527..91721f591709 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go @@ -127,7 +127,6 @@ func (client ActivityLogsClient) ListSender(req *http.Request) (*http.Response, func (client ActivityLogsClient) ListResponder(resp *http.Response) (result EventDataCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go index b82137bb33ff..f52b59ba121d 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go @@ -112,7 +112,6 @@ func (client AlertRuleIncidentsClient) GetSender(req *http.Request) (*http.Respo func (client AlertRuleIncidentsClient) GetResponder(resp *http.Response) (result Incident, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -188,7 +187,6 @@ func (client AlertRuleIncidentsClient) ListByAlertRuleSender(req *http.Request) func (client AlertRuleIncidentsClient) ListByAlertRuleResponder(resp *http.Response) (result IncidentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go b/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go index bcf0ffa0b7cd..4242145741e0 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go @@ -42,7 +42,7 @@ func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) Alert return AlertRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an alert rule. +// CreateOrUpdate creates or updates a classic metric alert rule. // Parameters: // resourceGroupName - the name of the resource group. // ruleName - the name of the rule. @@ -123,7 +123,6 @@ func (client AlertRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Re func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (result AlertRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -131,7 +130,7 @@ func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// Delete deletes an alert rule +// Delete deletes a classic metric alert rule // Parameters: // resourceGroupName - the name of the resource group. // ruleName - the name of the rule. @@ -199,14 +198,13 @@ func (client AlertRulesClient) DeleteSender(req *http.Request) (*http.Response, func (client AlertRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// Get gets an alert rule +// Get gets a classic metric alert rule // Parameters: // resourceGroupName - the name of the resource group. // ruleName - the name of the rule. @@ -274,7 +272,6 @@ func (client AlertRulesClient) GetSender(req *http.Request) (*http.Response, err func (client AlertRulesClient) GetResponder(resp *http.Response) (result AlertRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -282,7 +279,7 @@ func (client AlertRulesClient) GetResponder(resp *http.Response) (result AlertRu return } -// ListByResourceGroup list the alert rules within a resource group. +// ListByResourceGroup list the classic metric alert rules within a resource group. // Parameters: // resourceGroupName - the name of the resource group. func (client AlertRulesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AlertRuleResourceCollection, err error) { @@ -348,7 +345,6 @@ func (client AlertRulesClient) ListByResourceGroupSender(req *http.Request) (*ht func (client AlertRulesClient) ListByResourceGroupResponder(resp *http.Response) (result AlertRuleResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -356,7 +352,7 @@ func (client AlertRulesClient) ListByResourceGroupResponder(resp *http.Response) return } -// ListBySubscription list the alert rules within a subscription. +// ListBySubscription list the classic metric alert rules within a subscription. func (client AlertRulesClient) ListBySubscription(ctx context.Context) (result AlertRuleResourceCollection, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.ListBySubscription") @@ -419,7 +415,6 @@ func (client AlertRulesClient) ListBySubscriptionSender(req *http.Request) (*htt func (client AlertRulesClient) ListBySubscriptionResponder(resp *http.Response) (result AlertRuleResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -427,7 +422,7 @@ func (client AlertRulesClient) ListBySubscriptionResponder(resp *http.Response) return } -// Update updates an existing AlertRuleResource. To update other fields use the CreateOrUpdate method. +// Update updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. // Parameters: // resourceGroupName - the name of the resource group. // ruleName - the name of the rule. @@ -498,7 +493,6 @@ func (client AlertRulesClient) UpdateSender(req *http.Request) (*http.Response, func (client AlertRulesClient) UpdateResponder(resp *http.Response) (result AlertRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go index d801640c589d..c836b4c6709a 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go @@ -123,7 +123,6 @@ func (client AutoscaleSettingsClient) CreateOrUpdateSender(req *http.Request) (* func (client AutoscaleSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result AutoscaleSettingResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client AutoscaleSettingsClient) DeleteSender(req *http.Request) (*http.Res func (client AutoscaleSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -274,7 +272,6 @@ func (client AutoscaleSettingsClient) GetSender(req *http.Request) (*http.Respon func (client AutoscaleSettingsClient) GetResponder(resp *http.Response) (result AutoscaleSettingResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -349,7 +346,6 @@ func (client AutoscaleSettingsClient) ListByResourceGroupSender(req *http.Reques func (client AutoscaleSettingsClient) ListByResourceGroupResponder(resp *http.Response) (result AutoscaleSettingResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -458,7 +454,6 @@ func (client AutoscaleSettingsClient) ListBySubscriptionSender(req *http.Request func (client AutoscaleSettingsClient) ListBySubscriptionResponder(resp *http.Response) (result AutoscaleSettingResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -574,7 +569,6 @@ func (client AutoscaleSettingsClient) UpdateSender(req *http.Request) (*http.Res func (client AutoscaleSettingsClient) UpdateResponder(resp *http.Response) (result AutoscaleSettingResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go index efe6c33b6b16..5963a2b91d55 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go @@ -112,7 +112,6 @@ func (client DiagnosticSettingsClient) CreateOrUpdateSender(req *http.Request) ( func (client DiagnosticSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result DiagnosticSettingsResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -187,7 +186,6 @@ func (client DiagnosticSettingsClient) DeleteSender(req *http.Request) (*http.Re func (client DiagnosticSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -261,7 +259,6 @@ func (client DiagnosticSettingsClient) GetSender(req *http.Request) (*http.Respo func (client DiagnosticSettingsClient) GetResponder(resp *http.Response) (result DiagnosticSettingsResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -334,7 +331,6 @@ func (client DiagnosticSettingsClient) ListSender(req *http.Request) (*http.Resp func (client DiagnosticSettingsClient) ListResponder(resp *http.Response) (result DiagnosticSettingsResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go index 5c9ed250454f..45e26165ef5d 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go @@ -109,7 +109,6 @@ func (client DiagnosticSettingsCategoryClient) GetSender(req *http.Request) (*ht func (client DiagnosticSettingsCategoryClient) GetResponder(resp *http.Response) (result DiagnosticSettingsCategoryResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -182,7 +181,6 @@ func (client DiagnosticSettingsCategoryClient) ListSender(req *http.Request) (*h func (client DiagnosticSettingsCategoryClient) ListResponder(resp *http.Response) (result DiagnosticSettingsCategoryResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go b/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go index 68a745146789..4e9d430e4c56 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go @@ -101,7 +101,6 @@ func (client EventCategoriesClient) ListSender(req *http.Request) (*http.Respons func (client EventCategoriesClient) ListResponder(resp *http.Response) (result EventCategoryCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go index 6f46c7d9f68c..578de17870e2 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go @@ -125,7 +125,6 @@ func (client LogProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.R func (client LogProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result LogProfileResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -199,7 +198,6 @@ func (client LogProfilesClient) DeleteSender(req *http.Request) (*http.Response, func (client LogProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp @@ -272,7 +270,6 @@ func (client LogProfilesClient) GetSender(req *http.Request) (*http.Response, er func (client LogProfilesClient) GetResponder(resp *http.Response) (result LogProfileResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -343,7 +340,6 @@ func (client LogProfilesClient) ListSender(req *http.Request) (*http.Response, e func (client LogProfilesClient) ListResponder(resp *http.Response) (result LogProfileCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -420,7 +416,6 @@ func (client LogProfilesClient) UpdateSender(req *http.Request) (*http.Response, func (client LogProfilesClient) UpdateResponder(resp *http.Response) (result LogProfileResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go index 16398347e8a5..765121f34c9c 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go @@ -126,7 +126,6 @@ func (client MetricAlertsClient) CreateOrUpdateSender(req *http.Request) (*http. func (client MetricAlertsClient) CreateOrUpdateResponder(resp *http.Response) (result MetricAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -202,7 +201,6 @@ func (client MetricAlertsClient) DeleteSender(req *http.Request) (*http.Response func (client MetricAlertsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -277,7 +275,6 @@ func (client MetricAlertsClient) GetSender(req *http.Request) (*http.Response, e func (client MetricAlertsClient) GetResponder(resp *http.Response) (result MetricAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -351,7 +348,6 @@ func (client MetricAlertsClient) ListByResourceGroupSender(req *http.Request) (* func (client MetricAlertsClient) ListByResourceGroupResponder(resp *http.Response) (result MetricAlertResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -422,7 +418,6 @@ func (client MetricAlertsClient) ListBySubscriptionSender(req *http.Request) (*h func (client MetricAlertsClient) ListBySubscriptionResponder(resp *http.Response) (result MetricAlertResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -501,7 +496,6 @@ func (client MetricAlertsClient) UpdateSender(req *http.Request) (*http.Response func (client MetricAlertsClient) UpdateResponder(resp *http.Response) (result MetricAlertResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go index 2673f9d7fc94..24eb4387f0f8 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go @@ -110,7 +110,6 @@ func (client MetricAlertsStatusClient) ListSender(req *http.Request) (*http.Resp func (client MetricAlertsStatusClient) ListResponder(resp *http.Response) (result MetricAlertStatusCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -188,7 +187,6 @@ func (client MetricAlertsStatusClient) ListByNameSender(req *http.Request) (*htt func (client MetricAlertsStatusClient) ListByNameResponder(resp *http.Response) (result MetricAlertStatusCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go index 7195cd1b2746..e3bfa14051ef 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go @@ -120,7 +120,6 @@ func (client MetricBaselineClient) CalculateBaselineSender(req *http.Request) (* func (client MetricBaselineClient) CalculateBaselineResponder(resp *http.Response) (result CalculateBaselineResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -219,7 +218,6 @@ func (client MetricBaselineClient) GetSender(req *http.Request) (*http.Response, func (client MetricBaselineClient) GetResponder(resp *http.Response) (result BaselineResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go index 2e4a80739536..aa005b92d7de 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go @@ -111,7 +111,6 @@ func (client MetricDefinitionsClient) ListSender(req *http.Request) (*http.Respo func (client MetricDefinitionsClient) ListResponder(resp *http.Response) (result MetricDefinitionCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go index 887572a511f4..8b1f006fc2ef 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go @@ -111,7 +111,6 @@ func (client MetricNamespacesClient) ListSender(req *http.Request) (*http.Respon func (client MetricNamespacesClient) ListResponder(resp *http.Response) (result MetricNamespaceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go b/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go index df0dfb564b89..35e6b09c2106 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go @@ -154,7 +154,6 @@ func (client MetricsClient) ListSender(req *http.Request) (*http.Response, error func (client MetricsClient) ListResponder(resp *http.Response) (result Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) 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 6ecfff4ffe67..94189a981cb1 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/models.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/models.go @@ -165,6 +165,40 @@ func PossibleCriterionTypeValues() []CriterionType { return []CriterionType{CriterionTypeDynamicThresholdCriterion, CriterionTypeMultiMetricCriteria, CriterionTypeStaticThresholdCriterion} } +// 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 ( + // High ... + High DynamicThresholdSensitivity = "High" + // Low ... + Low DynamicThresholdSensitivity = "Low" + // Medium ... + Medium DynamicThresholdSensitivity = "Medium" +) + +// PossibleDynamicThresholdSensitivityValues returns an array of possible values for the DynamicThresholdSensitivity const type. +func PossibleDynamicThresholdSensitivityValues() []DynamicThresholdSensitivity { + return []DynamicThresholdSensitivity{High, Low, Medium} +} + // Enabled enumerates the values for enabled. type Enabled string @@ -279,11 +313,13 @@ const ( OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria OdataTypeBasicMetricAlertCriteria = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" // OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria ... OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria OdataTypeBasicMetricAlertCriteria = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + // OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria ... + OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria OdataTypeBasicMetricAlertCriteria = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" ) // PossibleOdataTypeBasicMetricAlertCriteriaValues returns an array of possible values for the OdataTypeBasicMetricAlertCriteria const type. func PossibleOdataTypeBasicMetricAlertCriteriaValues() []OdataTypeBasicMetricAlertCriteria { - return []OdataTypeBasicMetricAlertCriteria{OdataTypeMetricAlertCriteria, OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria} + return []OdataTypeBasicMetricAlertCriteria{OdataTypeMetricAlertCriteria, OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria, OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria} } // OdataTypeBasicRuleAction enumerates the values for odata type basic rule action. @@ -322,6 +358,29 @@ func PossibleOdataTypeBasicRuleConditionValues() []OdataTypeBasicRuleCondition { return []OdataTypeBasicRuleCondition{OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition, OdataTypeRuleCondition} } +// 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 @@ -451,17 +510,17 @@ func PossibleScaleTypeValues() []ScaleType { type Sensitivity string const ( - // High ... - High Sensitivity = "High" - // Low ... - Low Sensitivity = "Low" - // Medium ... - Medium Sensitivity = "Medium" + // SensitivityHigh ... + SensitivityHigh Sensitivity = "High" + // SensitivityLow ... + SensitivityLow Sensitivity = "Low" + // SensitivityMedium ... + SensitivityMedium Sensitivity = "Medium" ) // PossibleSensitivityValues returns an array of possible values for the Sensitivity const type. func PossibleSensitivityValues() []Sensitivity { - return []Sensitivity{High, Low, Medium} + return []Sensitivity{SensitivityHigh, SensitivityLow, SensitivityMedium} } // TimeAggregationOperator enumerates the values for time aggregation operator. @@ -1747,7 +1806,7 @@ type AzureFunctionReceiver struct { // Baseline the baseline values for a single sensitivity value. type Baseline struct { - // Sensitivity - the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High' + // Sensitivity - the sensitivity of the baseline. Possible values include: 'SensitivityLow', 'SensitivityMedium', 'SensitivityHigh' Sensitivity Sensitivity `json:"sensitivity,omitempty"` // LowThresholds - The low thresholds of the baseline. LowThresholds *[]float64 `json:"lowThresholds,omitempty"` @@ -2070,10 +2129,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: 'Low', 'Medium', 'High' + 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) @@ -2098,10 +2157,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 { @@ -2165,7 +2224,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 @@ -2174,7 +2233,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 @@ -3341,6 +3400,7 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { // BasicMetricAlertCriteria the rule criteria that defines the conditions of the alert rule. type BasicMetricAlertCriteria interface { AsMetricAlertSingleResourceMultipleMetricCriteria() (*MetricAlertSingleResourceMultipleMetricCriteria, bool) + AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) AsMetricAlertMultipleResourceMultipleMetricCriteria() (*MetricAlertMultipleResourceMultipleMetricCriteria, bool) AsMetricAlertCriteria() (*MetricAlertCriteria, bool) } @@ -3349,7 +3409,7 @@ type BasicMetricAlertCriteria interface { type MetricAlertCriteria struct { // AdditionalProperties - Unmatched properties from the message are deserialized this collection AdditionalProperties map[string]interface{} `json:""` - // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' + // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' OdataType OdataTypeBasicMetricAlertCriteria `json:"odata.type,omitempty"` } @@ -3365,6 +3425,10 @@ func unmarshalBasicMetricAlertCriteria(body []byte) (BasicMetricAlertCriteria, e var masrmmc MetricAlertSingleResourceMultipleMetricCriteria err := json.Unmarshal(body, &masrmmc) return masrmmc, err + case string(OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria): + var wlac WebtestLocationAvailabilityCriteria + err := json.Unmarshal(body, &wlac) + return wlac, err case string(OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria): var mamrmmc MetricAlertMultipleResourceMultipleMetricCriteria err := json.Unmarshal(body, &mamrmmc) @@ -3412,6 +3476,11 @@ func (mac MetricAlertCriteria) AsMetricAlertSingleResourceMultipleMetricCriteria return nil, false } +// AsWebtestLocationAvailabilityCriteria is the BasicMetricAlertCriteria implementation for MetricAlertCriteria. +func (mac MetricAlertCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) { + return nil, false +} + // AsMetricAlertMultipleResourceMultipleMetricCriteria is the BasicMetricAlertCriteria implementation for MetricAlertCriteria. func (mac MetricAlertCriteria) AsMetricAlertMultipleResourceMultipleMetricCriteria() (*MetricAlertMultipleResourceMultipleMetricCriteria, bool) { return nil, false @@ -3470,7 +3539,7 @@ type MetricAlertMultipleResourceMultipleMetricCriteria struct { AllOf *[]BasicMultiMetricCriteria `json:"allOf,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection AdditionalProperties map[string]interface{} `json:""` - // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' + // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' OdataType OdataTypeBasicMetricAlertCriteria `json:"odata.type,omitempty"` } @@ -3495,6 +3564,11 @@ func (mamrmmc MetricAlertMultipleResourceMultipleMetricCriteria) AsMetricAlertSi return nil, false } +// AsWebtestLocationAvailabilityCriteria is the BasicMetricAlertCriteria implementation for MetricAlertMultipleResourceMultipleMetricCriteria. +func (mamrmmc MetricAlertMultipleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) { + return nil, false +} + // AsMetricAlertMultipleResourceMultipleMetricCriteria is the BasicMetricAlertCriteria implementation for MetricAlertMultipleResourceMultipleMetricCriteria. func (mamrmmc MetricAlertMultipleResourceMultipleMetricCriteria) AsMetricAlertMultipleResourceMultipleMetricCriteria() (*MetricAlertMultipleResourceMultipleMetricCriteria, bool) { return &mamrmmc, true @@ -3574,7 +3648,7 @@ type MetricAlertProperties struct { TargetResourceRegion *string `json:"targetResourceRegion,omitempty"` // Criteria - defines the specific alert criteria information. Criteria BasicMetricAlertCriteria `json:"criteria,omitempty"` - // AutoMitigate - the flag that indicates whether the alert should be auto resolved or not. + // AutoMitigate - the flag that indicates whether the alert should be auto resolved or not. The default is true. AutoMitigate *bool `json:"autoMitigate,omitempty"` // Actions - the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. Actions *[]MetricAlertAction `json:"actions,omitempty"` @@ -3872,7 +3946,7 @@ type MetricAlertSingleResourceMultipleMetricCriteria struct { AllOf *[]MetricCriteria `json:"allOf,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection AdditionalProperties map[string]interface{} `json:""` - // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' + // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' OdataType OdataTypeBasicMetricAlertCriteria `json:"odata.type,omitempty"` } @@ -3897,6 +3971,11 @@ func (masrmmc MetricAlertSingleResourceMultipleMetricCriteria) AsMetricAlertSing return &masrmmc, true } +// AsWebtestLocationAvailabilityCriteria is the BasicMetricAlertCriteria implementation for MetricAlertSingleResourceMultipleMetricCriteria. +func (masrmmc MetricAlertSingleResourceMultipleMetricCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) { + return nil, false +} + // AsMetricAlertMultipleResourceMultipleMetricCriteria is the BasicMetricAlertCriteria implementation for MetricAlertSingleResourceMultipleMetricCriteria. func (masrmmc MetricAlertSingleResourceMultipleMetricCriteria) AsMetricAlertMultipleResourceMultipleMetricCriteria() (*MetricAlertMultipleResourceMultipleMetricCriteria, bool) { return nil, false @@ -4012,8 +4091,8 @@ type MetricAvailability 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 @@ -4036,7 +4115,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 { @@ -4097,7 +4176,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 @@ -5423,3 +5502,127 @@ type WebhookReceiver struct { // ServiceURI - The URI where webhooks should be sent. ServiceURI *string `json:"serviceUri,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"` + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // OdataType - Possible values include: 'OdataTypeMetricAlertCriteria', 'OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria', 'OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria', 'OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria' + OdataType OdataTypeBasicMetricAlertCriteria `json:"odata.type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) MarshalJSON() ([]byte, error) { + wlac.OdataType = OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria + objectMap := make(map[string]interface{}) + if wlac.WebTestID != nil { + objectMap["webTestId"] = wlac.WebTestID + } + if wlac.ComponentID != nil { + objectMap["componentId"] = wlac.ComponentID + } + if wlac.FailedLocationCount != nil { + objectMap["failedLocationCount"] = wlac.FailedLocationCount + } + if wlac.OdataType != "" { + objectMap["odata.type"] = wlac.OdataType + } + for k, v := range wlac.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// AsMetricAlertSingleResourceMultipleMetricCriteria is the BasicMetricAlertCriteria implementation for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) AsMetricAlertSingleResourceMultipleMetricCriteria() (*MetricAlertSingleResourceMultipleMetricCriteria, bool) { + return nil, false +} + +// AsWebtestLocationAvailabilityCriteria is the BasicMetricAlertCriteria implementation for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) AsWebtestLocationAvailabilityCriteria() (*WebtestLocationAvailabilityCriteria, bool) { + return &wlac, true +} + +// AsMetricAlertMultipleResourceMultipleMetricCriteria is the BasicMetricAlertCriteria implementation for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) AsMetricAlertMultipleResourceMultipleMetricCriteria() (*MetricAlertMultipleResourceMultipleMetricCriteria, bool) { + return nil, false +} + +// AsMetricAlertCriteria is the BasicMetricAlertCriteria implementation for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) AsMetricAlertCriteria() (*MetricAlertCriteria, bool) { + return nil, false +} + +// AsBasicMetricAlertCriteria is the BasicMetricAlertCriteria implementation for WebtestLocationAvailabilityCriteria. +func (wlac WebtestLocationAvailabilityCriteria) AsBasicMetricAlertCriteria() (BasicMetricAlertCriteria, bool) { + return &wlac, true +} + +// UnmarshalJSON is the custom unmarshaler for WebtestLocationAvailabilityCriteria struct. +func (wlac *WebtestLocationAvailabilityCriteria) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "webTestId": + if v != nil { + var webTestID string + err = json.Unmarshal(*v, &webTestID) + if err != nil { + return err + } + wlac.WebTestID = &webTestID + } + case "componentId": + if v != nil { + var componentID string + err = json.Unmarshal(*v, &componentID) + if err != nil { + return err + } + wlac.ComponentID = &componentID + } + case "failedLocationCount": + if v != nil { + var failedLocationCount float64 + err = json.Unmarshal(*v, &failedLocationCount) + if err != nil { + return err + } + wlac.FailedLocationCount = &failedLocationCount + } + default: + if v != nil { + var additionalProperties interface{} + err = json.Unmarshal(*v, &additionalProperties) + if err != nil { + return err + } + if wlac.AdditionalProperties == nil { + wlac.AdditionalProperties = make(map[string]interface{}) + } + wlac.AdditionalProperties[k] = additionalProperties + } + case "odata.type": + if v != nil { + var odataType OdataTypeBasicMetricAlertCriteria + err = json.Unmarshal(*v, &odataType) + if err != nil { + return err + } + wlac.OdataType = odataType + } + } + } + + return nil +} diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/operations.go b/services/preview/monitor/mgmt/2018-09-01/insights/operations.go index 71df71aff3f2..52fa11ee0e69 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/operations.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/operations.go @@ -100,7 +100,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go index 1791a6252ccb..50efb2ad2853 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go @@ -128,7 +128,6 @@ func (client ScheduledQueryRulesClient) CreateOrUpdateSender(req *http.Request) func (client ScheduledQueryRulesClient) CreateOrUpdateResponder(resp *http.Response) (result LogSearchRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -204,7 +203,6 @@ func (client ScheduledQueryRulesClient) DeleteSender(req *http.Request) (*http.R func (client ScheduledQueryRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -279,7 +277,6 @@ func (client ScheduledQueryRulesClient) GetSender(req *http.Request) (*http.Resp func (client ScheduledQueryRulesClient) GetResponder(resp *http.Response) (result LogSearchRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -358,7 +355,6 @@ func (client ScheduledQueryRulesClient) ListByResourceGroupSender(req *http.Requ func (client ScheduledQueryRulesClient) ListByResourceGroupResponder(resp *http.Response) (result LogSearchRuleResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -435,7 +431,6 @@ func (client ScheduledQueryRulesClient) ListBySubscriptionSender(req *http.Reque func (client ScheduledQueryRulesClient) ListBySubscriptionResponder(resp *http.Response) (result LogSearchRuleResourceCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -514,7 +509,6 @@ func (client ScheduledQueryRulesClient) UpdateSender(req *http.Request) (*http.R func (client ScheduledQueryRulesClient) UpdateResponder(resp *http.Response) (result LogSearchRuleResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go index 6ddebcb2ba81..98d0dca8a254 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go @@ -129,7 +129,6 @@ func (client TenantActivityLogsClient) ListSender(req *http.Request) (*http.Resp func (client TenantActivityLogsClient) ListResponder(resp *http.Response) (result EventDataCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/version.go b/services/preview/monitor/mgmt/2018-09-01/insights/version.go index ea5805619609..849b05f91ec9 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/version.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " insights/2018-09-01" + return "Azure-SDK-For-Go/" + Version() + " insights/2018-09-01" } // Version returns the semantic version (see http://semver.org) of the client.