diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go index 76c223754796..3839028148d2 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go index ab43adfe1369..c543937e4053 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/activitylogs.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go index 9188a5e8f527..0c472e12686d 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go @@ -89,6 +89,9 @@ func (client ActivityLogsClient) List(ctx context.Context, filter string, select if err != nil { err = autorest.NewErrorWithError(err, "insights.ActivityLogsClient", "List", resp, "Failure responding to request") } + if result.edc.hasNextLink() && result.edc.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -127,7 +130,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-11-01-preview/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go index b82137bb33ff..f52b59ba121d 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/alertrules.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go index bcf0ffa0b7cd..4242145741e0 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go index d801640c589d..deac6f5e02c4 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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()) @@ -314,6 +311,9 @@ func (client AutoscaleSettingsClient) ListByResourceGroup(ctx context.Context, r if err != nil { err = autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "ListByResourceGroup", resp, "Failure responding to request") } + if result.asrc.hasNextLink() && result.asrc.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -349,7 +349,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()) @@ -424,6 +423,9 @@ func (client AutoscaleSettingsClient) ListBySubscription(ctx context.Context) (r if err != nil { err = autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "ListBySubscription", resp, "Failure responding to request") } + if result.asrc.hasNextLink() && result.asrc.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -458,7 +460,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 +575,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-11-01-preview/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go index efe6c33b6b16..5963a2b91d55 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go index 5c9ed250454f..45e26165ef5d 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/enums.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/enums.go new file mode 100644 index 000000000000..85dcb930ac7f --- /dev/null +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/enums.go @@ -0,0 +1,639 @@ +package insights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AggregationType enumerates the values for aggregation type. +type AggregationType string + +const ( + // Average ... + Average AggregationType = "Average" + // Count ... + Count AggregationType = "Count" + // Maximum ... + Maximum AggregationType = "Maximum" + // Minimum ... + Minimum AggregationType = "Minimum" + // None ... + None AggregationType = "None" + // Total ... + Total AggregationType = "Total" +) + +// PossibleAggregationTypeValues returns an array of possible values for the AggregationType const type. +func PossibleAggregationTypeValues() []AggregationType { + return []AggregationType{Average, Count, Maximum, Minimum, None, Total} +} + +// AlertSeverity enumerates the values for alert severity. +type AlertSeverity string + +const ( + // Four ... + Four AlertSeverity = "4" + // One ... + One AlertSeverity = "1" + // Three ... + Three AlertSeverity = "3" + // Two ... + Two AlertSeverity = "2" + // Zero ... + Zero AlertSeverity = "0" +) + +// PossibleAlertSeverityValues returns an array of possible values for the AlertSeverity const type. +func PossibleAlertSeverityValues() []AlertSeverity { + return []AlertSeverity{Four, One, Three, Two, Zero} +} + +// CategoryType enumerates the values for category type. +type CategoryType string + +const ( + // Logs ... + Logs CategoryType = "Logs" + // Metrics ... + Metrics CategoryType = "Metrics" +) + +// PossibleCategoryTypeValues returns an array of possible values for the CategoryType const type. +func PossibleCategoryTypeValues() []CategoryType { + return []CategoryType{Logs, Metrics} +} + +// ComparisonOperationType enumerates the values for comparison operation type. +type ComparisonOperationType string + +const ( + // Equals ... + Equals ComparisonOperationType = "Equals" + // GreaterThan ... + GreaterThan ComparisonOperationType = "GreaterThan" + // GreaterThanOrEqual ... + GreaterThanOrEqual ComparisonOperationType = "GreaterThanOrEqual" + // LessThan ... + LessThan ComparisonOperationType = "LessThan" + // LessThanOrEqual ... + LessThanOrEqual ComparisonOperationType = "LessThanOrEqual" + // NotEquals ... + NotEquals ComparisonOperationType = "NotEquals" +) + +// PossibleComparisonOperationTypeValues returns an array of possible values for the ComparisonOperationType const type. +func PossibleComparisonOperationTypeValues() []ComparisonOperationType { + return []ComparisonOperationType{Equals, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, NotEquals} +} + +// ConditionalOperator enumerates the values for conditional operator. +type ConditionalOperator string + +const ( + // ConditionalOperatorEqual ... + ConditionalOperatorEqual ConditionalOperator = "Equal" + // ConditionalOperatorGreaterThan ... + ConditionalOperatorGreaterThan ConditionalOperator = "GreaterThan" + // ConditionalOperatorLessThan ... + ConditionalOperatorLessThan ConditionalOperator = "LessThan" +) + +// PossibleConditionalOperatorValues returns an array of possible values for the ConditionalOperator const type. +func PossibleConditionalOperatorValues() []ConditionalOperator { + return []ConditionalOperator{ConditionalOperatorEqual, ConditionalOperatorGreaterThan, ConditionalOperatorLessThan} +} + +// ConditionOperator enumerates the values for condition operator. +type ConditionOperator string + +const ( + // ConditionOperatorGreaterThan ... + ConditionOperatorGreaterThan ConditionOperator = "GreaterThan" + // ConditionOperatorGreaterThanOrEqual ... + ConditionOperatorGreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual" + // ConditionOperatorLessThan ... + ConditionOperatorLessThan ConditionOperator = "LessThan" + // ConditionOperatorLessThanOrEqual ... + ConditionOperatorLessThanOrEqual ConditionOperator = "LessThanOrEqual" +) + +// PossibleConditionOperatorValues returns an array of possible values for the ConditionOperator const type. +func PossibleConditionOperatorValues() []ConditionOperator { + return []ConditionOperator{ConditionOperatorGreaterThan, ConditionOperatorGreaterThanOrEqual, ConditionOperatorLessThan, ConditionOperatorLessThanOrEqual} +} + +// CriterionType enumerates the values for criterion type. +type CriterionType string + +const ( + // CriterionTypeDynamicThresholdCriterion ... + CriterionTypeDynamicThresholdCriterion CriterionType = "DynamicThresholdCriterion" + // CriterionTypeMultiMetricCriteria ... + CriterionTypeMultiMetricCriteria CriterionType = "MultiMetricCriteria" + // CriterionTypeStaticThresholdCriterion ... + CriterionTypeStaticThresholdCriterion CriterionType = "StaticThresholdCriterion" +) + +// PossibleCriterionTypeValues returns an array of possible values for the CriterionType const type. +func PossibleCriterionTypeValues() []CriterionType { + return []CriterionType{CriterionTypeDynamicThresholdCriterion, CriterionTypeMultiMetricCriteria, CriterionTypeStaticThresholdCriterion} +} + +// DataStatus enumerates the values for data status. +type DataStatus string + +const ( + // NotPresent ... + NotPresent DataStatus = "notPresent" + // Present ... + Present DataStatus = "present" +) + +// PossibleDataStatusValues returns an array of possible values for the DataStatus const type. +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 ( + // 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 + +const ( + // False ... + False Enabled = "false" + // True ... + True Enabled = "true" +) + +// PossibleEnabledValues returns an array of possible values for the Enabled const type. +func PossibleEnabledValues() []Enabled { + return []Enabled{False, True} +} + +// EventLevel enumerates the values for event level. +type EventLevel string + +const ( + // EventLevelCritical ... + EventLevelCritical EventLevel = "Critical" + // EventLevelError ... + EventLevelError EventLevel = "Error" + // EventLevelInformational ... + EventLevelInformational EventLevel = "Informational" + // EventLevelVerbose ... + EventLevelVerbose EventLevel = "Verbose" + // EventLevelWarning ... + EventLevelWarning EventLevel = "Warning" +) + +// PossibleEventLevelValues returns an array of possible values for the EventLevel const type. +func PossibleEventLevelValues() []EventLevel { + return []EventLevel{EventLevelCritical, EventLevelError, EventLevelInformational, EventLevelVerbose, EventLevelWarning} +} + +// MetricStatisticType enumerates the values for metric statistic type. +type MetricStatisticType string + +const ( + // MetricStatisticTypeAverage ... + MetricStatisticTypeAverage MetricStatisticType = "Average" + // MetricStatisticTypeMax ... + MetricStatisticTypeMax MetricStatisticType = "Max" + // MetricStatisticTypeMin ... + MetricStatisticTypeMin MetricStatisticType = "Min" + // MetricStatisticTypeSum ... + MetricStatisticTypeSum MetricStatisticType = "Sum" +) + +// PossibleMetricStatisticTypeValues returns an array of possible values for the MetricStatisticType const type. +func PossibleMetricStatisticTypeValues() []MetricStatisticType { + return []MetricStatisticType{MetricStatisticTypeAverage, MetricStatisticTypeMax, MetricStatisticTypeMin, MetricStatisticTypeSum} +} + +// MetricTriggerType enumerates the values for metric trigger type. +type MetricTriggerType string + +const ( + // MetricTriggerTypeConsecutive ... + MetricTriggerTypeConsecutive MetricTriggerType = "Consecutive" + // MetricTriggerTypeTotal ... + MetricTriggerTypeTotal MetricTriggerType = "Total" +) + +// PossibleMetricTriggerTypeValues returns an array of possible values for the MetricTriggerType const type. +func PossibleMetricTriggerTypeValues() []MetricTriggerType { + return []MetricTriggerType{MetricTriggerTypeConsecutive, MetricTriggerTypeTotal} +} + +// OdataType enumerates the values for odata type. +type OdataType string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource ... + OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource ... + OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" + // OdataTypeRuleDataSource ... + OdataTypeRuleDataSource OdataType = "RuleDataSource" +) + +// PossibleOdataTypeValues returns an array of possible values for the OdataType const type. +func PossibleOdataTypeValues() []OdataType { + return []OdataType{OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource, OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource, OdataTypeRuleDataSource} +} + +// OdataTypeBasicAction enumerates the values for odata type basic action. +type OdataTypeBasicAction string + +const ( + // OdataTypeAction ... + OdataTypeAction OdataTypeBasicAction = "Action" + // OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction ... + OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction OdataTypeBasicAction = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" + // OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction ... + OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction OdataTypeBasicAction = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" +) + +// PossibleOdataTypeBasicActionValues returns an array of possible values for the OdataTypeBasicAction const type. +func PossibleOdataTypeBasicActionValues() []OdataTypeBasicAction { + return []OdataTypeBasicAction{OdataTypeAction, OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction, OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction} +} + +// OdataTypeBasicMetricAlertCriteria enumerates the values for odata type basic metric alert criteria. +type OdataTypeBasicMetricAlertCriteria string + +const ( + // OdataTypeMetricAlertCriteria ... + OdataTypeMetricAlertCriteria OdataTypeBasicMetricAlertCriteria = "MetricAlertCriteria" + // OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria ... + 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, OdataTypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria} +} + +// OdataTypeBasicRuleAction enumerates the values for odata type basic rule action. +type OdataTypeBasicRuleAction string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction ... + OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction ... + OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" + // OdataTypeRuleAction ... + OdataTypeRuleAction OdataTypeBasicRuleAction = "RuleAction" +) + +// PossibleOdataTypeBasicRuleActionValues returns an array of possible values for the OdataTypeBasicRuleAction const type. +func PossibleOdataTypeBasicRuleActionValues() []OdataTypeBasicRuleAction { + return []OdataTypeBasicRuleAction{OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction, OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction, OdataTypeRuleAction} +} + +// OdataTypeBasicRuleCondition enumerates the values for odata type basic rule condition. +type OdataTypeBasicRuleCondition string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition ... + OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" + // OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition ... + OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" + // OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition ... + OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" + // OdataTypeRuleCondition ... + OdataTypeRuleCondition OdataTypeBasicRuleCondition = "RuleCondition" +) + +// PossibleOdataTypeBasicRuleConditionValues returns an array of possible values for the OdataTypeBasicRuleCondition const type. +func PossibleOdataTypeBasicRuleConditionValues() []OdataTypeBasicRuleCondition { + return []OdataTypeBasicRuleCondition{OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition, OdataTypeRuleCondition} +} + +// OnboardingStatus enumerates the values for onboarding status. +type OnboardingStatus string + +const ( + // NotOnboarded ... + NotOnboarded OnboardingStatus = "notOnboarded" + // Onboarded ... + Onboarded OnboardingStatus = "onboarded" + // Unknown ... + Unknown OnboardingStatus = "unknown" +) + +// PossibleOnboardingStatusValues returns an array of possible values for the OnboardingStatus const type. +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 + +const ( + // Canceled ... + Canceled ProvisioningState = "Canceled" + // Deploying ... + Deploying ProvisioningState = "Deploying" + // Failed ... + Failed ProvisioningState = "Failed" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Canceled, Deploying, Failed, Succeeded} +} + +// QueryType enumerates the values for query type. +type QueryType string + +const ( + // ResultCount ... + ResultCount QueryType = "ResultCount" +) + +// PossibleQueryTypeValues returns an array of possible values for the QueryType const type. +func PossibleQueryTypeValues() []QueryType { + return []QueryType{ResultCount} +} + +// ReceiverStatus enumerates the values for receiver status. +type ReceiverStatus string + +const ( + // ReceiverStatusDisabled ... + ReceiverStatusDisabled ReceiverStatus = "Disabled" + // ReceiverStatusEnabled ... + ReceiverStatusEnabled ReceiverStatus = "Enabled" + // ReceiverStatusNotSpecified ... + ReceiverStatusNotSpecified ReceiverStatus = "NotSpecified" +) + +// PossibleReceiverStatusValues returns an array of possible values for the ReceiverStatus const type. +func PossibleReceiverStatusValues() []ReceiverStatus { + return []ReceiverStatus{ReceiverStatusDisabled, ReceiverStatusEnabled, ReceiverStatusNotSpecified} +} + +// RecurrenceFrequency enumerates the values for recurrence frequency. +type RecurrenceFrequency string + +const ( + // RecurrenceFrequencyDay ... + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + // RecurrenceFrequencyHour ... + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + // RecurrenceFrequencyMinute ... + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + // RecurrenceFrequencyMonth ... + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + // RecurrenceFrequencyNone ... + RecurrenceFrequencyNone RecurrenceFrequency = "None" + // RecurrenceFrequencySecond ... + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + // RecurrenceFrequencyWeek ... + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + // RecurrenceFrequencyYear ... + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +// PossibleRecurrenceFrequencyValues returns an array of possible values for the RecurrenceFrequency const type. +func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { + return []RecurrenceFrequency{RecurrenceFrequencyDay, RecurrenceFrequencyHour, RecurrenceFrequencyMinute, RecurrenceFrequencyMonth, RecurrenceFrequencyNone, RecurrenceFrequencySecond, RecurrenceFrequencyWeek, RecurrenceFrequencyYear} +} + +// ResultType enumerates the values for result type. +type ResultType string + +const ( + // Data ... + Data ResultType = "Data" + // Metadata ... + Metadata ResultType = "Metadata" +) + +// PossibleResultTypeValues returns an array of possible values for the ResultType const type. +func PossibleResultTypeValues() []ResultType { + return []ResultType{Data, Metadata} +} + +// ScaleDirection enumerates the values for scale direction. +type ScaleDirection string + +const ( + // ScaleDirectionDecrease ... + ScaleDirectionDecrease ScaleDirection = "Decrease" + // ScaleDirectionIncrease ... + ScaleDirectionIncrease ScaleDirection = "Increase" + // ScaleDirectionNone ... + ScaleDirectionNone ScaleDirection = "None" +) + +// PossibleScaleDirectionValues returns an array of possible values for the ScaleDirection const type. +func PossibleScaleDirectionValues() []ScaleDirection { + return []ScaleDirection{ScaleDirectionDecrease, ScaleDirectionIncrease, ScaleDirectionNone} +} + +// ScaleRuleMetricDimensionOperationType enumerates the values for scale rule metric dimension operation type. +type ScaleRuleMetricDimensionOperationType string + +const ( + // ScaleRuleMetricDimensionOperationTypeEquals ... + ScaleRuleMetricDimensionOperationTypeEquals ScaleRuleMetricDimensionOperationType = "Equals" + // ScaleRuleMetricDimensionOperationTypeNotEquals ... + ScaleRuleMetricDimensionOperationTypeNotEquals ScaleRuleMetricDimensionOperationType = "NotEquals" +) + +// PossibleScaleRuleMetricDimensionOperationTypeValues returns an array of possible values for the ScaleRuleMetricDimensionOperationType const type. +func PossibleScaleRuleMetricDimensionOperationTypeValues() []ScaleRuleMetricDimensionOperationType { + return []ScaleRuleMetricDimensionOperationType{ScaleRuleMetricDimensionOperationTypeEquals, ScaleRuleMetricDimensionOperationTypeNotEquals} +} + +// ScaleType enumerates the values for scale type. +type ScaleType string + +const ( + // ChangeCount ... + ChangeCount ScaleType = "ChangeCount" + // ExactCount ... + ExactCount ScaleType = "ExactCount" + // PercentChangeCount ... + PercentChangeCount ScaleType = "PercentChangeCount" +) + +// PossibleScaleTypeValues returns an array of possible values for the ScaleType const type. +func PossibleScaleTypeValues() []ScaleType { + return []ScaleType{ChangeCount, ExactCount, PercentChangeCount} +} + +// Sensitivity enumerates the values for sensitivity. +type Sensitivity string + +const ( + // 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{SensitivityHigh, SensitivityLow, SensitivityMedium} +} + +// TimeAggregationOperator enumerates the values for time aggregation operator. +type TimeAggregationOperator string + +const ( + // TimeAggregationOperatorAverage ... + TimeAggregationOperatorAverage TimeAggregationOperator = "Average" + // TimeAggregationOperatorLast ... + TimeAggregationOperatorLast TimeAggregationOperator = "Last" + // TimeAggregationOperatorMaximum ... + TimeAggregationOperatorMaximum TimeAggregationOperator = "Maximum" + // TimeAggregationOperatorMinimum ... + TimeAggregationOperatorMinimum TimeAggregationOperator = "Minimum" + // TimeAggregationOperatorTotal ... + TimeAggregationOperatorTotal TimeAggregationOperator = "Total" +) + +// PossibleTimeAggregationOperatorValues returns an array of possible values for the TimeAggregationOperator const type. +func PossibleTimeAggregationOperatorValues() []TimeAggregationOperator { + return []TimeAggregationOperator{TimeAggregationOperatorAverage, TimeAggregationOperatorLast, TimeAggregationOperatorMaximum, TimeAggregationOperatorMinimum, TimeAggregationOperatorTotal} +} + +// TimeAggregationType enumerates the values for time aggregation type. +type TimeAggregationType string + +const ( + // TimeAggregationTypeAverage ... + TimeAggregationTypeAverage TimeAggregationType = "Average" + // TimeAggregationTypeCount ... + TimeAggregationTypeCount TimeAggregationType = "Count" + // TimeAggregationTypeLast ... + TimeAggregationTypeLast TimeAggregationType = "Last" + // TimeAggregationTypeMaximum ... + TimeAggregationTypeMaximum TimeAggregationType = "Maximum" + // TimeAggregationTypeMinimum ... + TimeAggregationTypeMinimum TimeAggregationType = "Minimum" + // TimeAggregationTypeTotal ... + TimeAggregationTypeTotal TimeAggregationType = "Total" +) + +// PossibleTimeAggregationTypeValues returns an array of possible values for the TimeAggregationType const type. +func PossibleTimeAggregationTypeValues() []TimeAggregationType { + return []TimeAggregationType{TimeAggregationTypeAverage, TimeAggregationTypeCount, TimeAggregationTypeLast, TimeAggregationTypeMaximum, TimeAggregationTypeMinimum, TimeAggregationTypeTotal} +} + +// Unit enumerates the values for unit. +type Unit string + +const ( + // UnitBitsPerSecond ... + UnitBitsPerSecond Unit = "BitsPerSecond" + // UnitBytes ... + UnitBytes Unit = "Bytes" + // UnitByteSeconds ... + UnitByteSeconds Unit = "ByteSeconds" + // UnitBytesPerSecond ... + UnitBytesPerSecond Unit = "BytesPerSecond" + // UnitCores ... + UnitCores Unit = "Cores" + // UnitCount ... + UnitCount Unit = "Count" + // UnitCountPerSecond ... + UnitCountPerSecond Unit = "CountPerSecond" + // UnitMilliCores ... + UnitMilliCores Unit = "MilliCores" + // UnitMilliSeconds ... + UnitMilliSeconds Unit = "MilliSeconds" + // UnitNanoCores ... + UnitNanoCores Unit = "NanoCores" + // UnitPercent ... + UnitPercent Unit = "Percent" + // UnitSeconds ... + UnitSeconds Unit = "Seconds" + // UnitUnspecified ... + UnitUnspecified Unit = "Unspecified" +) + +// PossibleUnitValues returns an array of possible values for the Unit const type. +func PossibleUnitValues() []Unit { + return []Unit{UnitBitsPerSecond, UnitBytes, UnitByteSeconds, UnitBytesPerSecond, UnitCores, UnitCount, UnitCountPerSecond, UnitMilliCores, UnitMilliSeconds, UnitNanoCores, UnitPercent, UnitSeconds, UnitUnspecified} +} diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go index 68a745146789..4e9d430e4c56 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go index 6f46c7d9f68c..578de17870e2 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metricalerts.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go index 16398347e8a5..765121f34c9c 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go index 2673f9d7fc94..24eb4387f0f8 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metricbaseline.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go index 7195cd1b2746..e3bfa14051ef 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go index 2e4a80739536..aa005b92d7de 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go index 887572a511f4..8b1f006fc2ef 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/metrics.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go index df0dfb564b89..35e6b09c2106 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/models.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go index 309633fdb9a7..af9206616c67 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go @@ -30,553 +30,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-11-01-preview/insights" -// AggregationType enumerates the values for aggregation type. -type AggregationType string - -const ( - // Average ... - Average AggregationType = "Average" - // Count ... - Count AggregationType = "Count" - // Maximum ... - Maximum AggregationType = "Maximum" - // Minimum ... - Minimum AggregationType = "Minimum" - // None ... - None AggregationType = "None" - // Total ... - Total AggregationType = "Total" -) - -// PossibleAggregationTypeValues returns an array of possible values for the AggregationType const type. -func PossibleAggregationTypeValues() []AggregationType { - return []AggregationType{Average, Count, Maximum, Minimum, None, Total} -} - -// AlertSeverity enumerates the values for alert severity. -type AlertSeverity string - -const ( - // Four ... - Four AlertSeverity = "4" - // One ... - One AlertSeverity = "1" - // Three ... - Three AlertSeverity = "3" - // Two ... - Two AlertSeverity = "2" - // Zero ... - Zero AlertSeverity = "0" -) - -// PossibleAlertSeverityValues returns an array of possible values for the AlertSeverity const type. -func PossibleAlertSeverityValues() []AlertSeverity { - return []AlertSeverity{Four, One, Three, Two, Zero} -} - -// CategoryType enumerates the values for category type. -type CategoryType string - -const ( - // Logs ... - Logs CategoryType = "Logs" - // Metrics ... - Metrics CategoryType = "Metrics" -) - -// PossibleCategoryTypeValues returns an array of possible values for the CategoryType const type. -func PossibleCategoryTypeValues() []CategoryType { - return []CategoryType{Logs, Metrics} -} - -// ComparisonOperationType enumerates the values for comparison operation type. -type ComparisonOperationType string - -const ( - // Equals ... - Equals ComparisonOperationType = "Equals" - // GreaterThan ... - GreaterThan ComparisonOperationType = "GreaterThan" - // GreaterThanOrEqual ... - GreaterThanOrEqual ComparisonOperationType = "GreaterThanOrEqual" - // LessThan ... - LessThan ComparisonOperationType = "LessThan" - // LessThanOrEqual ... - LessThanOrEqual ComparisonOperationType = "LessThanOrEqual" - // NotEquals ... - NotEquals ComparisonOperationType = "NotEquals" -) - -// PossibleComparisonOperationTypeValues returns an array of possible values for the ComparisonOperationType const type. -func PossibleComparisonOperationTypeValues() []ComparisonOperationType { - return []ComparisonOperationType{Equals, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, NotEquals} -} - -// ConditionalOperator enumerates the values for conditional operator. -type ConditionalOperator string - -const ( - // ConditionalOperatorEqual ... - ConditionalOperatorEqual ConditionalOperator = "Equal" - // ConditionalOperatorGreaterThan ... - ConditionalOperatorGreaterThan ConditionalOperator = "GreaterThan" - // ConditionalOperatorLessThan ... - ConditionalOperatorLessThan ConditionalOperator = "LessThan" -) - -// PossibleConditionalOperatorValues returns an array of possible values for the ConditionalOperator const type. -func PossibleConditionalOperatorValues() []ConditionalOperator { - return []ConditionalOperator{ConditionalOperatorEqual, ConditionalOperatorGreaterThan, ConditionalOperatorLessThan} -} - -// ConditionOperator enumerates the values for condition operator. -type ConditionOperator string - -const ( - // ConditionOperatorGreaterThan ... - ConditionOperatorGreaterThan ConditionOperator = "GreaterThan" - // ConditionOperatorGreaterThanOrEqual ... - ConditionOperatorGreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual" - // ConditionOperatorLessThan ... - ConditionOperatorLessThan ConditionOperator = "LessThan" - // ConditionOperatorLessThanOrEqual ... - ConditionOperatorLessThanOrEqual ConditionOperator = "LessThanOrEqual" -) - -// PossibleConditionOperatorValues returns an array of possible values for the ConditionOperator const type. -func PossibleConditionOperatorValues() []ConditionOperator { - return []ConditionOperator{ConditionOperatorGreaterThan, ConditionOperatorGreaterThanOrEqual, ConditionOperatorLessThan, ConditionOperatorLessThanOrEqual} -} - -// CriterionType enumerates the values for criterion type. -type CriterionType string - -const ( - // CriterionTypeDynamicThresholdCriterion ... - CriterionTypeDynamicThresholdCriterion CriterionType = "DynamicThresholdCriterion" - // CriterionTypeMultiMetricCriteria ... - CriterionTypeMultiMetricCriteria CriterionType = "MultiMetricCriteria" - // CriterionTypeStaticThresholdCriterion ... - CriterionTypeStaticThresholdCriterion CriterionType = "StaticThresholdCriterion" -) - -// PossibleCriterionTypeValues returns an array of possible values for the CriterionType const type. -func PossibleCriterionTypeValues() []CriterionType { - return []CriterionType{CriterionTypeDynamicThresholdCriterion, CriterionTypeMultiMetricCriteria, CriterionTypeStaticThresholdCriterion} -} - -// DataStatus enumerates the values for data status. -type DataStatus string - -const ( - // NotPresent ... - NotPresent DataStatus = "notPresent" - // Present ... - Present DataStatus = "present" -) - -// PossibleDataStatusValues returns an array of possible values for the DataStatus const type. -func PossibleDataStatusValues() []DataStatus { - return []DataStatus{NotPresent, Present} -} - -// Enabled enumerates the values for enabled. -type Enabled string - -const ( - // False ... - False Enabled = "false" - // True ... - True Enabled = "true" -) - -// PossibleEnabledValues returns an array of possible values for the Enabled const type. -func PossibleEnabledValues() []Enabled { - return []Enabled{False, True} -} - -// EventLevel enumerates the values for event level. -type EventLevel string - -const ( - // EventLevelCritical ... - EventLevelCritical EventLevel = "Critical" - // EventLevelError ... - EventLevelError EventLevel = "Error" - // EventLevelInformational ... - EventLevelInformational EventLevel = "Informational" - // EventLevelVerbose ... - EventLevelVerbose EventLevel = "Verbose" - // EventLevelWarning ... - EventLevelWarning EventLevel = "Warning" -) - -// PossibleEventLevelValues returns an array of possible values for the EventLevel const type. -func PossibleEventLevelValues() []EventLevel { - return []EventLevel{EventLevelCritical, EventLevelError, EventLevelInformational, EventLevelVerbose, EventLevelWarning} -} - -// MetricStatisticType enumerates the values for metric statistic type. -type MetricStatisticType string - -const ( - // MetricStatisticTypeAverage ... - MetricStatisticTypeAverage MetricStatisticType = "Average" - // MetricStatisticTypeMax ... - MetricStatisticTypeMax MetricStatisticType = "Max" - // MetricStatisticTypeMin ... - MetricStatisticTypeMin MetricStatisticType = "Min" - // MetricStatisticTypeSum ... - MetricStatisticTypeSum MetricStatisticType = "Sum" -) - -// PossibleMetricStatisticTypeValues returns an array of possible values for the MetricStatisticType const type. -func PossibleMetricStatisticTypeValues() []MetricStatisticType { - return []MetricStatisticType{MetricStatisticTypeAverage, MetricStatisticTypeMax, MetricStatisticTypeMin, MetricStatisticTypeSum} -} - -// MetricTriggerType enumerates the values for metric trigger type. -type MetricTriggerType string - -const ( - // MetricTriggerTypeConsecutive ... - MetricTriggerTypeConsecutive MetricTriggerType = "Consecutive" - // MetricTriggerTypeTotal ... - MetricTriggerTypeTotal MetricTriggerType = "Total" -) - -// PossibleMetricTriggerTypeValues returns an array of possible values for the MetricTriggerType const type. -func PossibleMetricTriggerTypeValues() []MetricTriggerType { - return []MetricTriggerType{MetricTriggerTypeConsecutive, MetricTriggerTypeTotal} -} - -// OdataType enumerates the values for odata type. -type OdataType string - -const ( - // OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource ... - OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" - // OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource ... - OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" - // OdataTypeRuleDataSource ... - OdataTypeRuleDataSource OdataType = "RuleDataSource" -) - -// PossibleOdataTypeValues returns an array of possible values for the OdataType const type. -func PossibleOdataTypeValues() []OdataType { - return []OdataType{OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource, OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource, OdataTypeRuleDataSource} -} - -// OdataTypeBasicAction enumerates the values for odata type basic action. -type OdataTypeBasicAction string - -const ( - // OdataTypeAction ... - OdataTypeAction OdataTypeBasicAction = "Action" - // OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction ... - OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction OdataTypeBasicAction = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" - // OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction ... - OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction OdataTypeBasicAction = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" -) - -// PossibleOdataTypeBasicActionValues returns an array of possible values for the OdataTypeBasicAction const type. -func PossibleOdataTypeBasicActionValues() []OdataTypeBasicAction { - return []OdataTypeBasicAction{OdataTypeAction, OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesAlertingAction, OdataTypeMicrosoftWindowsAzureManagementMonitoringAlertsModelsMicrosoftAppInsightsNexusDataContractsResourcesScheduledQueryRulesLogToMetricAction} -} - -// OdataTypeBasicMetricAlertCriteria enumerates the values for odata type basic metric alert criteria. -type OdataTypeBasicMetricAlertCriteria string - -const ( - // OdataTypeMetricAlertCriteria ... - OdataTypeMetricAlertCriteria OdataTypeBasicMetricAlertCriteria = "MetricAlertCriteria" - // OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria ... - OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria OdataTypeBasicMetricAlertCriteria = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - // OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria ... - OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria OdataTypeBasicMetricAlertCriteria = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" -) - -// PossibleOdataTypeBasicMetricAlertCriteriaValues returns an array of possible values for the OdataTypeBasicMetricAlertCriteria const type. -func PossibleOdataTypeBasicMetricAlertCriteriaValues() []OdataTypeBasicMetricAlertCriteria { - return []OdataTypeBasicMetricAlertCriteria{OdataTypeMetricAlertCriteria, OdataTypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, OdataTypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria} -} - -// OdataTypeBasicRuleAction enumerates the values for odata type basic rule action. -type OdataTypeBasicRuleAction string - -const ( - // OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction ... - OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" - // OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction ... - OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" - // OdataTypeRuleAction ... - OdataTypeRuleAction OdataTypeBasicRuleAction = "RuleAction" -) - -// PossibleOdataTypeBasicRuleActionValues returns an array of possible values for the OdataTypeBasicRuleAction const type. -func PossibleOdataTypeBasicRuleActionValues() []OdataTypeBasicRuleAction { - return []OdataTypeBasicRuleAction{OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction, OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction, OdataTypeRuleAction} -} - -// OdataTypeBasicRuleCondition enumerates the values for odata type basic rule condition. -type OdataTypeBasicRuleCondition string - -const ( - // OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition ... - OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" - // OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition ... - OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" - // OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition ... - OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" - // OdataTypeRuleCondition ... - OdataTypeRuleCondition OdataTypeBasicRuleCondition = "RuleCondition" -) - -// PossibleOdataTypeBasicRuleConditionValues returns an array of possible values for the OdataTypeBasicRuleCondition const type. -func PossibleOdataTypeBasicRuleConditionValues() []OdataTypeBasicRuleCondition { - return []OdataTypeBasicRuleCondition{OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition, OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition, OdataTypeRuleCondition} -} - -// OnboardingStatus enumerates the values for onboarding status. -type OnboardingStatus string - -const ( - // NotOnboarded ... - NotOnboarded OnboardingStatus = "notOnboarded" - // Onboarded ... - Onboarded OnboardingStatus = "onboarded" - // Unknown ... - Unknown OnboardingStatus = "unknown" -) - -// PossibleOnboardingStatusValues returns an array of possible values for the OnboardingStatus const type. -func PossibleOnboardingStatusValues() []OnboardingStatus { - return []OnboardingStatus{NotOnboarded, Onboarded, Unknown} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Canceled ... - Canceled ProvisioningState = "Canceled" - // Deploying ... - Deploying ProvisioningState = "Deploying" - // Failed ... - Failed ProvisioningState = "Failed" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Canceled, Deploying, Failed, Succeeded} -} - -// QueryType enumerates the values for query type. -type QueryType string - -const ( - // ResultCount ... - ResultCount QueryType = "ResultCount" -) - -// PossibleQueryTypeValues returns an array of possible values for the QueryType const type. -func PossibleQueryTypeValues() []QueryType { - return []QueryType{ResultCount} -} - -// ReceiverStatus enumerates the values for receiver status. -type ReceiverStatus string - -const ( - // ReceiverStatusDisabled ... - ReceiverStatusDisabled ReceiverStatus = "Disabled" - // ReceiverStatusEnabled ... - ReceiverStatusEnabled ReceiverStatus = "Enabled" - // ReceiverStatusNotSpecified ... - ReceiverStatusNotSpecified ReceiverStatus = "NotSpecified" -) - -// PossibleReceiverStatusValues returns an array of possible values for the ReceiverStatus const type. -func PossibleReceiverStatusValues() []ReceiverStatus { - return []ReceiverStatus{ReceiverStatusDisabled, ReceiverStatusEnabled, ReceiverStatusNotSpecified} -} - -// RecurrenceFrequency enumerates the values for recurrence frequency. -type RecurrenceFrequency string - -const ( - // RecurrenceFrequencyDay ... - RecurrenceFrequencyDay RecurrenceFrequency = "Day" - // RecurrenceFrequencyHour ... - RecurrenceFrequencyHour RecurrenceFrequency = "Hour" - // RecurrenceFrequencyMinute ... - RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" - // RecurrenceFrequencyMonth ... - RecurrenceFrequencyMonth RecurrenceFrequency = "Month" - // RecurrenceFrequencyNone ... - RecurrenceFrequencyNone RecurrenceFrequency = "None" - // RecurrenceFrequencySecond ... - RecurrenceFrequencySecond RecurrenceFrequency = "Second" - // RecurrenceFrequencyWeek ... - RecurrenceFrequencyWeek RecurrenceFrequency = "Week" - // RecurrenceFrequencyYear ... - RecurrenceFrequencyYear RecurrenceFrequency = "Year" -) - -// PossibleRecurrenceFrequencyValues returns an array of possible values for the RecurrenceFrequency const type. -func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { - return []RecurrenceFrequency{RecurrenceFrequencyDay, RecurrenceFrequencyHour, RecurrenceFrequencyMinute, RecurrenceFrequencyMonth, RecurrenceFrequencyNone, RecurrenceFrequencySecond, RecurrenceFrequencyWeek, RecurrenceFrequencyYear} -} - -// ResultType enumerates the values for result type. -type ResultType string - -const ( - // Data ... - Data ResultType = "Data" - // Metadata ... - Metadata ResultType = "Metadata" -) - -// PossibleResultTypeValues returns an array of possible values for the ResultType const type. -func PossibleResultTypeValues() []ResultType { - return []ResultType{Data, Metadata} -} - -// ScaleDirection enumerates the values for scale direction. -type ScaleDirection string - -const ( - // ScaleDirectionDecrease ... - ScaleDirectionDecrease ScaleDirection = "Decrease" - // ScaleDirectionIncrease ... - ScaleDirectionIncrease ScaleDirection = "Increase" - // ScaleDirectionNone ... - ScaleDirectionNone ScaleDirection = "None" -) - -// PossibleScaleDirectionValues returns an array of possible values for the ScaleDirection const type. -func PossibleScaleDirectionValues() []ScaleDirection { - return []ScaleDirection{ScaleDirectionDecrease, ScaleDirectionIncrease, ScaleDirectionNone} -} - -// ScaleType enumerates the values for scale type. -type ScaleType string - -const ( - // ChangeCount ... - ChangeCount ScaleType = "ChangeCount" - // ExactCount ... - ExactCount ScaleType = "ExactCount" - // PercentChangeCount ... - PercentChangeCount ScaleType = "PercentChangeCount" -) - -// PossibleScaleTypeValues returns an array of possible values for the ScaleType const type. -func PossibleScaleTypeValues() []ScaleType { - return []ScaleType{ChangeCount, ExactCount, PercentChangeCount} -} - -// Sensitivity enumerates the values for sensitivity. -type Sensitivity string - -const ( - // High ... - High Sensitivity = "High" - // Low ... - Low Sensitivity = "Low" - // Medium ... - Medium Sensitivity = "Medium" -) - -// PossibleSensitivityValues returns an array of possible values for the Sensitivity const type. -func PossibleSensitivityValues() []Sensitivity { - return []Sensitivity{High, Low, Medium} -} - -// TimeAggregationOperator enumerates the values for time aggregation operator. -type TimeAggregationOperator string - -const ( - // TimeAggregationOperatorAverage ... - TimeAggregationOperatorAverage TimeAggregationOperator = "Average" - // TimeAggregationOperatorLast ... - TimeAggregationOperatorLast TimeAggregationOperator = "Last" - // TimeAggregationOperatorMaximum ... - TimeAggregationOperatorMaximum TimeAggregationOperator = "Maximum" - // TimeAggregationOperatorMinimum ... - TimeAggregationOperatorMinimum TimeAggregationOperator = "Minimum" - // TimeAggregationOperatorTotal ... - TimeAggregationOperatorTotal TimeAggregationOperator = "Total" -) - -// PossibleTimeAggregationOperatorValues returns an array of possible values for the TimeAggregationOperator const type. -func PossibleTimeAggregationOperatorValues() []TimeAggregationOperator { - return []TimeAggregationOperator{TimeAggregationOperatorAverage, TimeAggregationOperatorLast, TimeAggregationOperatorMaximum, TimeAggregationOperatorMinimum, TimeAggregationOperatorTotal} -} - -// TimeAggregationType enumerates the values for time aggregation type. -type TimeAggregationType string - -const ( - // TimeAggregationTypeAverage ... - TimeAggregationTypeAverage TimeAggregationType = "Average" - // TimeAggregationTypeCount ... - TimeAggregationTypeCount TimeAggregationType = "Count" - // TimeAggregationTypeLast ... - TimeAggregationTypeLast TimeAggregationType = "Last" - // TimeAggregationTypeMaximum ... - TimeAggregationTypeMaximum TimeAggregationType = "Maximum" - // TimeAggregationTypeMinimum ... - TimeAggregationTypeMinimum TimeAggregationType = "Minimum" - // TimeAggregationTypeTotal ... - TimeAggregationTypeTotal TimeAggregationType = "Total" -) - -// PossibleTimeAggregationTypeValues returns an array of possible values for the TimeAggregationType const type. -func PossibleTimeAggregationTypeValues() []TimeAggregationType { - return []TimeAggregationType{TimeAggregationTypeAverage, TimeAggregationTypeCount, TimeAggregationTypeLast, TimeAggregationTypeMaximum, TimeAggregationTypeMinimum, TimeAggregationTypeTotal} -} - -// Unit enumerates the values for unit. -type Unit string - -const ( - // UnitBitsPerSecond ... - UnitBitsPerSecond Unit = "BitsPerSecond" - // UnitBytes ... - UnitBytes Unit = "Bytes" - // UnitByteSeconds ... - UnitByteSeconds Unit = "ByteSeconds" - // UnitBytesPerSecond ... - UnitBytesPerSecond Unit = "BytesPerSecond" - // UnitCores ... - UnitCores Unit = "Cores" - // UnitCount ... - UnitCount Unit = "Count" - // UnitCountPerSecond ... - UnitCountPerSecond Unit = "CountPerSecond" - // UnitMilliCores ... - UnitMilliCores Unit = "MilliCores" - // UnitMilliSeconds ... - UnitMilliSeconds Unit = "MilliSeconds" - // UnitNanoCores ... - UnitNanoCores Unit = "NanoCores" - // UnitPercent ... - UnitPercent Unit = "Percent" - // UnitSeconds ... - UnitSeconds Unit = "Seconds" - // UnitUnspecified ... - UnitUnspecified Unit = "Unspecified" -) - -// PossibleUnitValues returns an array of possible values for the Unit const type. -func PossibleUnitValues() []Unit { - return []Unit{UnitBitsPerSecond, UnitBytes, UnitByteSeconds, UnitBytesPerSecond, UnitCores, UnitCount, UnitCountPerSecond, UnitMilliCores, UnitMilliSeconds, UnitNanoCores, UnitPercent, UnitSeconds, UnitUnspecified} -} - // BasicAction action descriptor. type BasicAction interface { AsAlertingAction() (*AlertingAction, bool) @@ -898,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"` @@ -1155,6 +608,25 @@ type AlertRule struct { LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` } +// MarshalJSON is the custom marshaler for AlertRule. +func (ar AlertRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ar.Name != nil { + objectMap["name"] = ar.Name + } + if ar.Description != nil { + objectMap["description"] = ar.Description + } + if ar.IsEnabled != nil { + objectMap["isEnabled"] = ar.IsEnabled + } + objectMap["condition"] = ar.Condition + if ar.Actions != nil { + objectMap["actions"] = ar.Actions + } + return json.Marshal(objectMap) +} + // UnmarshalJSON is the custom unmarshaler for AlertRule struct. func (ar *AlertRule) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -1431,8 +903,7 @@ 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"` @@ -1556,8 +1027,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 @@ -1625,10 +1096,15 @@ func (asrc AutoscaleSettingResourceCollection) IsEmpty() bool { return asrc.Value == nil || len(*asrc.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (asrc AutoscaleSettingResourceCollection) hasNextLink() bool { + return asrc.NextLink != nil && len(*asrc.NextLink) != 0 +} + // autoscaleSettingResourceCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { - if asrc.NextLink == nil || len(to.String(asrc.NextLink)) < 1 { + if !asrc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1656,11 +1132,16 @@ func (page *AutoscaleSettingResourceCollectionPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.asrc) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.asrc) + if err != nil { + return err + } + page.asrc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.asrc = next return nil } @@ -1779,7 +1260,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"` @@ -2108,10 +1589,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) @@ -2136,10 +1617,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 { @@ -2203,7 +1684,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 @@ -2212,7 +1693,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 @@ -2309,8 +1790,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"` @@ -2338,6 +1819,18 @@ type EmailReceiver struct { Status ReceiverStatus `json:"status,omitempty"` } +// MarshalJSON is the custom marshaler for EmailReceiver. +func (er EmailReceiver) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if er.Name != nil { + objectMap["name"] = er.Name + } + if er.EmailAddress != nil { + objectMap["emailAddress"] = er.EmailAddress + } + return json.Marshal(objectMap) +} + // EnableRequest describes a receiver that should be resubscribed. type EnableRequest struct { // ReceiverName - The name of the receiver to resubscribe. @@ -2503,10 +1996,15 @@ func (edc EventDataCollection) IsEmpty() bool { return edc.Value == nil || len(*edc.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (edc EventDataCollection) hasNextLink() bool { + return edc.NextLink != nil && len(*edc.NextLink) != 0 +} + // eventDataCollectionPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (edc EventDataCollection) eventDataCollectionPreparer(ctx context.Context) (*http.Request, error) { - if edc.NextLink == nil || len(to.String(edc.NextLink)) < 1 { + if !edc.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2534,11 +2032,16 @@ func (page *EventDataCollectionPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.edc) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.edc) + if err != nil { + return err + } + page.edc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.edc = next return nil } @@ -2947,6 +2450,25 @@ type LogSearchRule struct { Action BasicAction `json:"action,omitempty"` } +// MarshalJSON is the custom marshaler for LogSearchRule. +func (lsr LogSearchRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lsr.Description != nil { + objectMap["description"] = lsr.Description + } + if lsr.Enabled != "" { + objectMap["enabled"] = lsr.Enabled + } + if lsr.Source != nil { + objectMap["source"] = lsr.Source + } + if lsr.Schedule != nil { + objectMap["schedule"] = lsr.Schedule + } + objectMap["action"] = lsr.Action + return json.Marshal(objectMap) +} + // UnmarshalJSON is the custom unmarshaler for LogSearchRule struct. func (lsr *LogSearchRule) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -3387,6 +2909,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) } @@ -3395,7 +2918,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"` } @@ -3411,6 +2934,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) @@ -3458,6 +2985,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 @@ -3509,14 +3041,14 @@ 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"` // 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"` } @@ -3541,6 +3073,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 @@ -3620,7 +3157,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"` @@ -3628,6 +3165,43 @@ type MetricAlertProperties struct { LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` } +// MarshalJSON is the custom marshaler for MetricAlertProperties. +func (mapVar MetricAlertProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mapVar.Description != nil { + objectMap["description"] = mapVar.Description + } + if mapVar.Severity != nil { + objectMap["severity"] = mapVar.Severity + } + if mapVar.Enabled != nil { + objectMap["enabled"] = mapVar.Enabled + } + if mapVar.Scopes != nil { + objectMap["scopes"] = mapVar.Scopes + } + if mapVar.EvaluationFrequency != nil { + objectMap["evaluationFrequency"] = mapVar.EvaluationFrequency + } + if mapVar.WindowSize != nil { + objectMap["windowSize"] = mapVar.WindowSize + } + if mapVar.TargetResourceType != nil { + objectMap["targetResourceType"] = mapVar.TargetResourceType + } + if mapVar.TargetResourceRegion != nil { + objectMap["targetResourceRegion"] = mapVar.TargetResourceRegion + } + objectMap["criteria"] = mapVar.Criteria + if mapVar.AutoMitigate != nil { + objectMap["autoMitigate"] = mapVar.AutoMitigate + } + if mapVar.Actions != nil { + objectMap["actions"] = mapVar.Actions + } + return json.Marshal(objectMap) +} + // UnmarshalJSON is the custom unmarshaler for MetricAlertProperties struct. func (mapVar *MetricAlertProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage @@ -3911,14 +3485,14 @@ 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"` // 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"` } @@ -3943,6 +3517,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 @@ -4047,8 +3626,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"` @@ -4058,8 +3637,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 @@ -4082,7 +3661,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 { @@ -4143,7 +3722,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 @@ -4313,6 +3892,8 @@ type MetricSettings struct { type MetricTrigger struct { // MetricName - the name of the metric that defines what the rule monitors. MetricName *string `json:"metricName,omitempty"` + // MetricNamespace - the namespace of the metric that defines what the rule monitors. + MetricNamespace *string `json:"metricNamespace,omitempty"` // MetricResourceURI - the resource identifier of the resource the rule monitors. MetricResourceURI *string `json:"metricResourceUri,omitempty"` // TimeGrain - the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. @@ -4327,6 +3908,8 @@ type MetricTrigger struct { Operator ComparisonOperationType `json:"operator,omitempty"` // Threshold - the threshold of the metric that triggers the scale action. Threshold *float64 `json:"threshold,omitempty"` + // Dimensions - List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. + Dimensions *[]ScaleRuleMetricDimension `json:"dimensions,omitempty"` } // MetricValue represents a metric value. @@ -4970,8 +4553,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"` @@ -5110,8 +4693,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"` @@ -5234,6 +4817,16 @@ type ScaleRule struct { ScaleAction *ScaleAction `json:"scaleAction,omitempty"` } +// ScaleRuleMetricDimension specifies an auto scale rule metric dimension. +type ScaleRuleMetricDimension struct { + // DimensionName - Name of the dimension. + DimensionName *string `json:"DimensionName,omitempty"` + // Operator - the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Possible values include: 'ScaleRuleMetricDimensionOperationTypeEquals', 'ScaleRuleMetricDimensionOperationTypeNotEquals' + Operator ScaleRuleMetricDimensionOperationType `json:"Operator,omitempty"` + // Values - list of dimension values. For example: ["App1","App2"]. + Values *[]string `json:"Values,omitempty"` +} + // Schedule defines how often to run the search and the time interval. type Schedule struct { // FrequencyInMinutes - frequency (in minutes) at which rule condition should be evaluated. @@ -5243,8 +4836,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"` @@ -5266,6 +4859,21 @@ type SmsReceiver struct { Status ReceiverStatus `json:"status,omitempty"` } +// MarshalJSON is the custom marshaler for SmsReceiver. +func (sr SmsReceiver) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sr.Name != nil { + objectMap["name"] = sr.Name + } + if sr.CountryCode != nil { + objectMap["countryCode"] = sr.CountryCode + } + if sr.PhoneNumber != nil { + objectMap["phoneNumber"] = sr.PhoneNumber + } + return json.Marshal(objectMap) +} + // Source specifies the log search query. type Source struct { // Query - Log search query. Required for action type - AlertingAction @@ -5571,6 +5179,130 @@ type WebhookReceiver struct { 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 +} + // WorkspaceInfo information about a Log Analytics Workspace. type WorkspaceInfo struct { // ID - Azure Resource Manager identifier of the Log Analytics Workspace. diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go index 71df71aff3f2..52fa11ee0e69 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go index 1791a6252ccb..50efb2ad2853 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go index 6ddebcb2ba81..b3c8c744eb20 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go @@ -93,6 +93,9 @@ func (client TenantActivityLogsClient) List(ctx context.Context, filter string, if err != nil { err = autorest.NewErrorWithError(err, "insights.TenantActivityLogsClient", "List", resp, "Failure responding to request") } + if result.edc.hasNextLink() && result.edc.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -129,7 +132,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-11-01-preview/insights/version.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/version.go index 9d48f92045d2..86a81f83c635 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/version.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/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-11-01-preview" + return "Azure-SDK-For-Go/" + Version() + " insights/2018-11-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go index 7f4c2fcf35b4..29c8eadc1ca5 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go @@ -107,7 +107,6 @@ func (client VMInsightsClient) GetOnboardingStatusSender(req *http.Request) (*ht func (client VMInsightsClient) GetOnboardingStatusResponder(resp *http.Response) (result VMInsightsOnboardingStatus, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing())