UNPKG

@azure/arm-monitor

Version:
13,240 lines 441 kB
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var coreClient = require('@azure/core-client');
var tslib = require('tslib');
var coreLro = require('@azure/core-lro');

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
(function (KnownScaleRuleMetricDimensionOperationType) {
    KnownScaleRuleMetricDimensionOperationType["Equals"] = "Equals";
    KnownScaleRuleMetricDimensionOperationType["NotEquals"] = "NotEquals";
})(exports.KnownScaleRuleMetricDimensionOperationType || (exports.KnownScaleRuleMetricDimensionOperationType = {}));
(function (KnownMetricClass) {
    KnownMetricClass["Availability"] = "Availability";
    KnownMetricClass["Transactions"] = "Transactions";
    KnownMetricClass["Errors"] = "Errors";
    KnownMetricClass["Latency"] = "Latency";
    KnownMetricClass["Saturation"] = "Saturation";
})(exports.KnownMetricClass || (exports.KnownMetricClass = {}));
(function (KnownMetricUnit) {
    KnownMetricUnit["Count"] = "Count";
    KnownMetricUnit["Bytes"] = "Bytes";
    KnownMetricUnit["Seconds"] = "Seconds";
    KnownMetricUnit["CountPerSecond"] = "CountPerSecond";
    KnownMetricUnit["BytesPerSecond"] = "BytesPerSecond";
    KnownMetricUnit["Percent"] = "Percent";
    KnownMetricUnit["MilliSeconds"] = "MilliSeconds";
    KnownMetricUnit["ByteSeconds"] = "ByteSeconds";
    KnownMetricUnit["Unspecified"] = "Unspecified";
    KnownMetricUnit["Cores"] = "Cores";
    KnownMetricUnit["MilliCores"] = "MilliCores";
    KnownMetricUnit["NanoCores"] = "NanoCores";
    KnownMetricUnit["BitsPerSecond"] = "BitsPerSecond";
})(exports.KnownMetricUnit || (exports.KnownMetricUnit = {}));
(function (KnownBaselineSensitivity) {
    KnownBaselineSensitivity["Low"] = "Low";
    KnownBaselineSensitivity["Medium"] = "Medium";
    KnownBaselineSensitivity["High"] = "High";
})(exports.KnownBaselineSensitivity || (exports.KnownBaselineSensitivity = {}));
(function (KnownOdatatype) {
    KnownOdatatype["MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria"] = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria";
    KnownOdatatype["MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria"] = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria";
    KnownOdatatype["MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria"] = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria";
})(exports.KnownOdatatype || (exports.KnownOdatatype = {}));
(function (KnownEnabled) {
    KnownEnabled["True"] = "true";
    KnownEnabled["False"] = "false";
})(exports.KnownEnabled || (exports.KnownEnabled = {}));
(function (KnownProvisioningState) {
    KnownProvisioningState["Succeeded"] = "Succeeded";
    KnownProvisioningState["Deploying"] = "Deploying";
    KnownProvisioningState["Canceled"] = "Canceled";
    KnownProvisioningState["Failed"] = "Failed";
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
(function (KnownQueryType) {
    KnownQueryType["ResultCount"] = "ResultCount";
})(exports.KnownQueryType || (exports.KnownQueryType = {}));
(function (KnownNamespaceClassification) {
    KnownNamespaceClassification["Platform"] = "Platform";
    KnownNamespaceClassification["Custom"] = "Custom";
    KnownNamespaceClassification["Qos"] = "Qos";
})(exports.KnownNamespaceClassification || (exports.KnownNamespaceClassification = {}));
(function (KnownOnboardingStatus) {
    KnownOnboardingStatus["Onboarded"] = "onboarded";
    KnownOnboardingStatus["NotOnboarded"] = "notOnboarded";
    KnownOnboardingStatus["Unknown"] = "unknown";
})(exports.KnownOnboardingStatus || (exports.KnownOnboardingStatus = {}));
(function (KnownDataStatus) {
    KnownDataStatus["Present"] = "present";
    KnownDataStatus["NotPresent"] = "notPresent";
})(exports.KnownDataStatus || (exports.KnownDataStatus = {}));
(function (KnownKnownPublicNetworkAccessOptions) {
    KnownKnownPublicNetworkAccessOptions["Enabled"] = "Enabled";
    KnownKnownPublicNetworkAccessOptions["Disabled"] = "Disabled";
})(exports.KnownKnownPublicNetworkAccessOptions || (exports.KnownKnownPublicNetworkAccessOptions = {}));
(function (KnownKnownDataCollectionEndpointProvisioningState) {
    KnownKnownDataCollectionEndpointProvisioningState["Creating"] = "Creating";
    KnownKnownDataCollectionEndpointProvisioningState["Updating"] = "Updating";
    KnownKnownDataCollectionEndpointProvisioningState["Deleting"] = "Deleting";
    KnownKnownDataCollectionEndpointProvisioningState["Succeeded"] = "Succeeded";
    KnownKnownDataCollectionEndpointProvisioningState["Failed"] = "Failed";
})(exports.KnownKnownDataCollectionEndpointProvisioningState || (exports.KnownKnownDataCollectionEndpointProvisioningState = {}));
(function (KnownKnownDataCollectionEndpointResourceKind) {
    KnownKnownDataCollectionEndpointResourceKind["Linux"] = "Linux";
    KnownKnownDataCollectionEndpointResourceKind["Windows"] = "Windows";
})(exports.KnownKnownDataCollectionEndpointResourceKind || (exports.KnownKnownDataCollectionEndpointResourceKind = {}));
(function (KnownCreatedByType) {
    KnownCreatedByType["User"] = "User";
    KnownCreatedByType["Application"] = "Application";
    KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
    KnownCreatedByType["Key"] = "Key";
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
(function (KnownKnownDataCollectionRuleAssociationProvisioningState) {
    KnownKnownDataCollectionRuleAssociationProvisioningState["Creating"] = "Creating";
    KnownKnownDataCollectionRuleAssociationProvisioningState["Updating"] = "Updating";
    KnownKnownDataCollectionRuleAssociationProvisioningState["Deleting"] = "Deleting";
    KnownKnownDataCollectionRuleAssociationProvisioningState["Succeeded"] = "Succeeded";
    KnownKnownDataCollectionRuleAssociationProvisioningState["Failed"] = "Failed";
})(exports.KnownKnownDataCollectionRuleAssociationProvisioningState || (exports.KnownKnownDataCollectionRuleAssociationProvisioningState = {}));
(function (KnownKnownPerfCounterDataSourceStreams) {
    KnownKnownPerfCounterDataSourceStreams["MicrosoftPerf"] = "Microsoft-Perf";
    KnownKnownPerfCounterDataSourceStreams["MicrosoftInsightsMetrics"] = "Microsoft-InsightsMetrics";
})(exports.KnownKnownPerfCounterDataSourceStreams || (exports.KnownKnownPerfCounterDataSourceStreams = {}));
(function (KnownKnownWindowsEventLogDataSourceStreams) {
    KnownKnownWindowsEventLogDataSourceStreams["MicrosoftWindowsEvent"] = "Microsoft-WindowsEvent";
    KnownKnownWindowsEventLogDataSourceStreams["MicrosoftEvent"] = "Microsoft-Event";
})(exports.KnownKnownWindowsEventLogDataSourceStreams || (exports.KnownKnownWindowsEventLogDataSourceStreams = {}));
(function (KnownKnownSyslogDataSourceStreams) {
    KnownKnownSyslogDataSourceStreams["MicrosoftSyslog"] = "Microsoft-Syslog";
})(exports.KnownKnownSyslogDataSourceStreams || (exports.KnownKnownSyslogDataSourceStreams = {}));
(function (KnownKnownSyslogDataSourceFacilityNames) {
    KnownKnownSyslogDataSourceFacilityNames["Auth"] = "auth";
    KnownKnownSyslogDataSourceFacilityNames["Authpriv"] = "authpriv";
    KnownKnownSyslogDataSourceFacilityNames["Cron"] = "cron";
    KnownKnownSyslogDataSourceFacilityNames["Daemon"] = "daemon";
    KnownKnownSyslogDataSourceFacilityNames["Kern"] = "kern";
    KnownKnownSyslogDataSourceFacilityNames["Lpr"] = "lpr";
    KnownKnownSyslogDataSourceFacilityNames["Mail"] = "mail";
    KnownKnownSyslogDataSourceFacilityNames["Mark"] = "mark";
    KnownKnownSyslogDataSourceFacilityNames["News"] = "news";
    KnownKnownSyslogDataSourceFacilityNames["Syslog"] = "syslog";
    KnownKnownSyslogDataSourceFacilityNames["User"] = "user";
    KnownKnownSyslogDataSourceFacilityNames["Uucp"] = "uucp";
    KnownKnownSyslogDataSourceFacilityNames["Local0"] = "local0";
    KnownKnownSyslogDataSourceFacilityNames["Local1"] = "local1";
    KnownKnownSyslogDataSourceFacilityNames["Local2"] = "local2";
    KnownKnownSyslogDataSourceFacilityNames["Local3"] = "local3";
    KnownKnownSyslogDataSourceFacilityNames["Local4"] = "local4";
    KnownKnownSyslogDataSourceFacilityNames["Local5"] = "local5";
    KnownKnownSyslogDataSourceFacilityNames["Local6"] = "local6";
    KnownKnownSyslogDataSourceFacilityNames["Local7"] = "local7";
    KnownKnownSyslogDataSourceFacilityNames["Asterisk"] = "*";
})(exports.KnownKnownSyslogDataSourceFacilityNames || (exports.KnownKnownSyslogDataSourceFacilityNames = {}));
(function (KnownKnownSyslogDataSourceLogLevels) {
    KnownKnownSyslogDataSourceLogLevels["Debug"] = "Debug";
    KnownKnownSyslogDataSourceLogLevels["Info"] = "Info";
    KnownKnownSyslogDataSourceLogLevels["Notice"] = "Notice";
    KnownKnownSyslogDataSourceLogLevels["Warning"] = "Warning";
    KnownKnownSyslogDataSourceLogLevels["Error"] = "Error";
    KnownKnownSyslogDataSourceLogLevels["Critical"] = "Critical";
    KnownKnownSyslogDataSourceLogLevels["Alert"] = "Alert";
    KnownKnownSyslogDataSourceLogLevels["Emergency"] = "Emergency";
    KnownKnownSyslogDataSourceLogLevels["Asterisk"] = "*";
})(exports.KnownKnownSyslogDataSourceLogLevels || (exports.KnownKnownSyslogDataSourceLogLevels = {}));
(function (KnownKnownExtensionDataSourceStreams) {
    KnownKnownExtensionDataSourceStreams["MicrosoftEvent"] = "Microsoft-Event";
    KnownKnownExtensionDataSourceStreams["MicrosoftInsightsMetrics"] = "Microsoft-InsightsMetrics";
    KnownKnownExtensionDataSourceStreams["MicrosoftPerf"] = "Microsoft-Perf";
    KnownKnownExtensionDataSourceStreams["MicrosoftSyslog"] = "Microsoft-Syslog";
    KnownKnownExtensionDataSourceStreams["MicrosoftWindowsEvent"] = "Microsoft-WindowsEvent";
})(exports.KnownKnownExtensionDataSourceStreams || (exports.KnownKnownExtensionDataSourceStreams = {}));
(function (KnownKnownDataFlowStreams) {
    KnownKnownDataFlowStreams["MicrosoftEvent"] = "Microsoft-Event";
    KnownKnownDataFlowStreams["MicrosoftInsightsMetrics"] = "Microsoft-InsightsMetrics";
    KnownKnownDataFlowStreams["MicrosoftPerf"] = "Microsoft-Perf";
    KnownKnownDataFlowStreams["MicrosoftSyslog"] = "Microsoft-Syslog";
    KnownKnownDataFlowStreams["MicrosoftWindowsEvent"] = "Microsoft-WindowsEvent";
})(exports.KnownKnownDataFlowStreams || (exports.KnownKnownDataFlowStreams = {}));
(function (KnownKnownDataCollectionRuleProvisioningState) {
    KnownKnownDataCollectionRuleProvisioningState["Creating"] = "Creating";
    KnownKnownDataCollectionRuleProvisioningState["Updating"] = "Updating";
    KnownKnownDataCollectionRuleProvisioningState["Deleting"] = "Deleting";
    KnownKnownDataCollectionRuleProvisioningState["Succeeded"] = "Succeeded";
    KnownKnownDataCollectionRuleProvisioningState["Failed"] = "Failed";
})(exports.KnownKnownDataCollectionRuleProvisioningState || (exports.KnownKnownDataCollectionRuleProvisioningState = {}));
(function (KnownKnownDataCollectionRuleResourceKind) {
    KnownKnownDataCollectionRuleResourceKind["Linux"] = "Linux";
    KnownKnownDataCollectionRuleResourceKind["Windows"] = "Windows";
})(exports.KnownKnownDataCollectionRuleResourceKind || (exports.KnownKnownDataCollectionRuleResourceKind = {}));
(function (KnownOperator) {
    KnownOperator["Equals"] = "Equals";
    KnownOperator["GreaterThan"] = "GreaterThan";
    KnownOperator["GreaterThanOrEqual"] = "GreaterThanOrEqual";
    KnownOperator["LessThan"] = "LessThan";
    KnownOperator["LessThanOrEqual"] = "LessThanOrEqual";
    KnownOperator["Include"] = "Include";
})(exports.KnownOperator || (exports.KnownOperator = {}));
(function (KnownCriterionType) {
    KnownCriterionType["StaticThresholdCriterion"] = "StaticThresholdCriterion";
    KnownCriterionType["DynamicThresholdCriterion"] = "DynamicThresholdCriterion";
})(exports.KnownCriterionType || (exports.KnownCriterionType = {}));
(function (KnownAggregationTypeEnum) {
    KnownAggregationTypeEnum["Average"] = "Average";
    KnownAggregationTypeEnum["Count"] = "Count";
    KnownAggregationTypeEnum["Minimum"] = "Minimum";
    KnownAggregationTypeEnum["Maximum"] = "Maximum";
    KnownAggregationTypeEnum["Total"] = "Total";
})(exports.KnownAggregationTypeEnum || (exports.KnownAggregationTypeEnum = {}));
(function (KnownDynamicThresholdOperator) {
    KnownDynamicThresholdOperator["GreaterThan"] = "GreaterThan";
    KnownDynamicThresholdOperator["LessThan"] = "LessThan";
    KnownDynamicThresholdOperator["GreaterOrLessThan"] = "GreaterOrLessThan";
})(exports.KnownDynamicThresholdOperator || (exports.KnownDynamicThresholdOperator = {}));
(function (KnownDynamicThresholdSensitivity) {
    KnownDynamicThresholdSensitivity["Low"] = "Low";
    KnownDynamicThresholdSensitivity["Medium"] = "Medium";
    KnownDynamicThresholdSensitivity["High"] = "High";
})(exports.KnownDynamicThresholdSensitivity || (exports.KnownDynamicThresholdSensitivity = {}));
(function (KnownConditionalOperator) {
    KnownConditionalOperator["GreaterThanOrEqual"] = "GreaterThanOrEqual";
    KnownConditionalOperator["LessThanOrEqual"] = "LessThanOrEqual";
    KnownConditionalOperator["GreaterThan"] = "GreaterThan";
    KnownConditionalOperator["LessThan"] = "LessThan";
    KnownConditionalOperator["Equal"] = "Equal";
})(exports.KnownConditionalOperator || (exports.KnownConditionalOperator = {}));
(function (KnownMetricTriggerType) {
    KnownMetricTriggerType["Consecutive"] = "Consecutive";
    KnownMetricTriggerType["Total"] = "Total";
})(exports.KnownMetricTriggerType || (exports.KnownMetricTriggerType = {}));
(function (KnownAlertSeverity) {
    KnownAlertSeverity["Zero"] = "0";
    KnownAlertSeverity["One"] = "1";
    KnownAlertSeverity["Two"] = "2";
    KnownAlertSeverity["Three"] = "3";
    KnownAlertSeverity["Four"] = "4";
})(exports.KnownAlertSeverity || (exports.KnownAlertSeverity = {}));

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
const AutoscaleSettingResourceCollection = {
    type: {
        name: "Composite",
        className: "AutoscaleSettingResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutoscaleSettingResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AutoscaleProfile = {
    type: {
        name: "Composite",
        className: "AutoscaleProfile",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            capacity: {
                serializedName: "capacity",
                type: {
                    name: "Composite",
                    className: "ScaleCapacity"
                }
            },
            rules: {
                serializedName: "rules",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ScaleRule"
                        }
                    }
                }
            },
            fixedDate: {
                serializedName: "fixedDate",
                type: {
                    name: "Composite",
                    className: "TimeWindow"
                }
            },
            recurrence: {
                serializedName: "recurrence",
                type: {
                    name: "Composite",
                    className: "Recurrence"
                }
            }
        }
    }
};
const ScaleCapacity = {
    type: {
        name: "Composite",
        className: "ScaleCapacity",
        modelProperties: {
            minimum: {
                serializedName: "minimum",
                required: true,
                type: {
                    name: "String"
                }
            },
            maximum: {
                serializedName: "maximum",
                required: true,
                type: {
                    name: "String"
                }
            },
            default: {
                serializedName: "default",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ScaleRule = {
    type: {
        name: "Composite",
        className: "ScaleRule",
        modelProperties: {
            metricTrigger: {
                serializedName: "metricTrigger",
                type: {
                    name: "Composite",
                    className: "MetricTrigger"
                }
            },
            scaleAction: {
                serializedName: "scaleAction",
                type: {
                    name: "Composite",
                    className: "ScaleAction"
                }
            }
        }
    }
};
const MetricTrigger = {
    type: {
        name: "Composite",
        className: "MetricTrigger",
        modelProperties: {
            metricName: {
                serializedName: "metricName",
                required: true,
                type: {
                    name: "String"
                }
            },
            metricNamespace: {
                serializedName: "metricNamespace",
                type: {
                    name: "String"
                }
            },
            metricResourceUri: {
                serializedName: "metricResourceUri",
                required: true,
                type: {
                    name: "String"
                }
            },
            metricResourceLocation: {
                serializedName: "metricResourceLocation",
                type: {
                    name: "String"
                }
            },
            timeGrain: {
                serializedName: "timeGrain",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            },
            statistic: {
                serializedName: "statistic",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: ["Average", "Min", "Max", "Sum", "Count"]
                }
            },
            timeWindow: {
                serializedName: "timeWindow",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            },
            timeAggregation: {
                serializedName: "timeAggregation",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "Average",
                        "Minimum",
                        "Maximum",
                        "Total",
                        "Count",
                        "Last"
                    ]
                }
            },
            operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "Equals",
                        "NotEquals",
                        "GreaterThan",
                        "GreaterThanOrEqual",
                        "LessThan",
                        "LessThanOrEqual"
                    ]
                }
            },
            threshold: {
                serializedName: "threshold",
                required: true,
                type: {
                    name: "Number"
                }
            },
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ScaleRuleMetricDimension"
                        }
                    }
                }
            },
            dividePerInstance: {
                serializedName: "dividePerInstance",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const ScaleRuleMetricDimension = {
    type: {
        name: "Composite",
        className: "ScaleRuleMetricDimension",
        modelProperties: {
            dimensionName: {
                serializedName: "DimensionName",
                required: true,
                type: {
                    name: "String"
                }
            },
            operator: {
                serializedName: "Operator",
                required: true,
                type: {
                    name: "String"
                }
            },
            values: {
                serializedName: "Values",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }
        }
    }
};
const ScaleAction = {
    type: {
        name: "Composite",
        className: "ScaleAction",
        modelProperties: {
            direction: {
                serializedName: "direction",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: ["None", "Increase", "Decrease"]
                }
            },
            type: {
                serializedName: "type",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "ChangeCount",
                        "PercentChangeCount",
                        "ExactCount",
                        "ServiceAllowedNextValue"
                    ]
                }
            },
            value: {
                defaultValue: "1",
                serializedName: "value",
                type: {
                    name: "String"
                }
            },
            cooldown: {
                serializedName: "cooldown",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            }
        }
    }
};
const TimeWindow = {
    type: {
        name: "Composite",
        className: "TimeWindow",
        modelProperties: {
            timeZone: {
                serializedName: "timeZone",
                type: {
                    name: "String"
                }
            },
            start: {
                serializedName: "start",
                required: true,
                type: {
                    name: "DateTime"
                }
            },
            end: {
                serializedName: "end",
                required: true,
                type: {
                    name: "DateTime"
                }
            }
        }
    }
};
const Recurrence = {
    type: {
        name: "Composite",
        className: "Recurrence",
        modelProperties: {
            frequency: {
                serializedName: "frequency",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "None",
                        "Second",
                        "Minute",
                        "Hour",
                        "Day",
                        "Week",
                        "Month",
                        "Year"
                    ]
                }
            },
            schedule: {
                serializedName: "schedule",
                type: {
                    name: "Composite",
                    className: "RecurrentSchedule"
                }
            }
        }
    }
};
const RecurrentSchedule = {
    type: {
        name: "Composite",
        className: "RecurrentSchedule",
        modelProperties: {
            timeZone: {
                serializedName: "timeZone",
                required: true,
                type: {
                    name: "String"
                }
            },
            days: {
                serializedName: "days",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            hours: {
                serializedName: "hours",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Number"
                        }
                    }
                }
            },
            minutes: {
                serializedName: "minutes",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Number"
                        }
                    }
                }
            }
        }
    }
};
const AutoscaleNotification = {
    type: {
        name: "Composite",
        className: "AutoscaleNotification",
        modelProperties: {
            operation: {
                defaultValue: "Scale",
                isConstant: true,
                serializedName: "operation",
                type: {
                    name: "String"
                }
            },
            email: {
                serializedName: "email",
                type: {
                    name: "Composite",
                    className: "EmailNotification"
                }
            },
            webhooks: {
                serializedName: "webhooks",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "WebhookNotification"
                        }
                    }
                }
            }
        }
    }
};
const EmailNotification = {
    type: {
        name: "Composite",
        className: "EmailNotification",
        modelProperties: {
            sendToSubscriptionAdministrator: {
                defaultValue: false,
                serializedName: "sendToSubscriptionAdministrator",
                type: {
                    name: "Boolean"
                }
            },
            sendToSubscriptionCoAdministrators: {
                defaultValue: false,
                serializedName: "sendToSubscriptionCoAdministrators",
                type: {
                    name: "Boolean"
                }
            },
            customEmails: {
                serializedName: "customEmails",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }
        }
    }
};
const WebhookNotification = {
    type: {
        name: "Composite",
        className: "WebhookNotification",
        modelProperties: {
            serviceUri: {
                serializedName: "serviceUri",
                type: {
                    name: "String"
                }
            },
            properties: {
                serializedName: "properties",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const Resource = {
    type: {
        name: "Composite",
        className: "Resource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const ErrorResponse = {
    type: {
        name: "Composite",
        className: "ErrorResponse",
        modelProperties: {
            code: {
                serializedName: "code",
                type: {
                    name: "String"
                }
            },
            message: {
                serializedName: "message",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AutoscaleSettingResourcePatch = {
    type: {
        name: "Composite",
        className: "AutoscaleSettingResourcePatch",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            profiles: {
                constraints: {
                    MaxItems: 20
                },
                serializedName: "properties.profiles",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutoscaleProfile"
                        }
                    }
                }
            },
            notifications: {
                serializedName: "properties.notifications",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutoscaleNotification"
                        }
                    }
                }
            },
            enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            },
            name: {
                serializedName: "properties.name",
                type: {
                    name: "String"
                }
            },
            targetResourceUri: {
                serializedName: "properties.targetResourceUri",
                type: {
                    name: "String"
                }
            },
            targetResourceLocation: {
                serializedName: "properties.targetResourceLocation",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const OperationListResult = {
    type: {
        name: "Composite",
        className: "OperationListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "Operation"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const Operation = {
    type: {
        name: "Composite",
        className: "Operation",
        modelProperties: {
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            },
            display: {
                serializedName: "display",
                type: {
                    name: "Composite",
                    className: "OperationDisplay"
                }
            }
        }
    }
};
const OperationDisplay = {
    type: {
        name: "Composite",
        className: "OperationDisplay",
        modelProperties: {
            provider: {
                serializedName: "provider",
                type: {
                    name: "String"
                }
            },
            resource: {
                serializedName: "resource",
                type: {
                    name: "String"
                }
            },
            operation: {
                serializedName: "operation",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const Incident = {
    type: {
        name: "Composite",
        className: "Incident",
        modelProperties: {
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            ruleName: {
                serializedName: "ruleName",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            isActive: {
                serializedName: "isActive",
                readOnly: true,
                type: {
                    name: "Boolean"
                }
            },
            activatedTime: {
                serializedName: "activatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            },
            resolvedTime: {
                serializedName: "resolvedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            }
        }
    }
};
const IncidentListResult = {
    type: {
        name: "Composite",
        className: "IncidentListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "Incident"
                        }
                    }
                }
            }
        }
    }
};
const RuleCondition = {
    type: {
        name: "Composite",
        className: "RuleCondition",
        uberParent: "RuleCondition",
        polymorphicDiscriminator: {
            serializedName: "odata\\.type",
            clientName: "odataType"
        },
        modelProperties: {
            odataType: {
                serializedName: "odata\\.type",
                required: true,
                type: {
                    name: "String"
                }
            },
            dataSource: {
                serializedName: "dataSource",
                type: {
                    name: "Composite",
                    className: "RuleDataSource"
                }
            }
        }
    }
};
const RuleDataSource = {
    type: {
        name: "Composite",
        className: "RuleDataSource",
        uberParent: "RuleDataSource",
        polymorphicDiscriminator: {
            serializedName: "odata\\.type",
            clientName: "odataType"
        },
        modelProperties: {
            odataType: {
                serializedName: "odata\\.type",
                required: true,
                type: {
                    name: "String"
                }
            },
            resourceUri: {
                serializedName: "resourceUri",
                type: {
                    name: "String"
                }
            },
            legacyResourceId: {
                serializedName: "legacyResourceId",
                type: {
                    name: "String"
                }
            },
            resourceLocation: {
                serializedName: "resourceLocation",
                type: {
                    name: "String"
                }
            },
            metricNamespace: {
                serializedName: "metricNamespace",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const RuleAction = {
    type: {
        name: "Composite",
        className: "RuleAction",
        uberParent: "RuleAction",
        polymorphicDiscriminator: {
            serializedName: "odata\\.type",
            clientName: "odataType"
        },
        modelProperties: {
            odataType: {
                serializedName: "odata\\.type",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AlertRuleResourcePatch = {
    type: {
        name: "Composite",
        className: "AlertRuleResourcePatch",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            name: {
                serializedName: "properties.name",
                type: {
                    name: "String"
                }
            },
            description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            },
            provisioningState: {
                serializedName: "properties.provisioningState",
                type: {
                    name: "String"
                }
            },
            isEnabled: {
                serializedName: "properties.isEnabled",
                type: {
                    name: "Boolean"
                }
            },
            condition: {
                serializedName: "properties.condition",
                type: {
                    name: "Composite",
                    className: "RuleCondition"
                }
            },
            action: {
                serializedName: "properties.action",
                type: {
                    name: "Composite",
                    className: "RuleAction"
                }
            },
            actions: {
                serializedName: "properties.actions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "RuleAction"
                        }
                    }
                }
            },
            lastUpdatedTime: {
                serializedName: "properties.lastUpdatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            }
        }
    }
};
const AlertRuleResourceCollection = {
    type: {
        name: "Composite",
        className: "AlertRuleResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AlertRuleResource"
                        }
                    }
                }
            }
        }
    }
};
const RetentionPolicy = {
    type: {
        name: "Composite",
        className: "RetentionPolicy",
        modelProperties: {
            enabled: {
                serializedName: "enabled",
                required: true,
                type: {
                    name: "Boolean"
                }
            },
            days: {
                constraints: {
                    InclusiveMinimum: 0
                },
                serializedName: "days",
                required: true,
                type: {
                    name: "Number"
                }
            }
        }
    }
};
const LogProfileResourcePatch = {
    type: {
        name: "Composite",
        className: "LogProfileResourcePatch",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            storageAccountId: {
                serializedName: "properties.storageAccountId",
                type: {
                    name: "String"
                }
            },
            serviceBusRuleId: {
                serializedName: "properties.serviceBusRuleId",
                type: {
                    name: "String"
                }
            },
            locations: {
                serializedName: "properties.locations",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            categories: {
                serializedName: "properties.categories",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            retentionPolicy: {
                serializedName: "properties.retentionPolicy",
                type: {
                    name: "Composite",
                    className: "RetentionPolicy"
                }
            }
        }
    }
};
const LogProfileCollection = {
    type: {
        name: "Composite",
        className: "LogProfileCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogProfileResource"
                        }
                    }
                }
            }
        }
    }
};
const MetricSettings = {
    type: {
        name: "Composite",
        className: "MetricSettings",
        modelProperties: {
            timeGrain: {
                serializedName: "timeGrain",
                type: {
                    name: "TimeSpan"
                }
            },
            category: {
                serializedName: "category",
                type: {
                    name: "String"
                }
            },
            enabled: {
                serializedName: "enabled",
                required: true,
                type: {
                    name: "Boolean"
                }
            },
            retentionPolicy: {
                serializedName: "retentionPolicy",
                type: {
                    name: "Composite",
                    className: "RetentionPolicy"
                }
            }
        }
    }
};
const LogSettings = {
    type: {
        name: "Composite",
        className: "LogSettings",
        modelProperties: {
            category: {
                serializedName: "category",
                type: {
                    name: "String"
                }
            },
            enabled: {
                serializedName: "enabled",
                required: true,
                type: {
                    name: "Boolean"
                }
            },
            retentionPolicy: {
                serializedName: "retentionPolicy",
                type: {
                    name: "Composite",
                    className: "RetentionPolicy"
                }
            }
        }
    }
};
const ProxyOnlyResource = {
    type: {
        name: "Composite",
        className: "ProxyOnlyResource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DiagnosticSettingsResourceCollection = {
    type: {
        name: "Composite",
        className: "DiagnosticSettingsResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DiagnosticSettingsResource"
                        }
                    }
                }
            }
        }
    }
};
const DiagnosticSettingsCategoryResourceCollection = {
    type: {
        name: "Composite",
        className: "DiagnosticSettingsCategoryResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DiagnosticSettingsCategoryResource"
                        }
                    }
                }
            }
        }
    }
};
const EmailReceiver = {
    type: {
        name: "Composite",
        className: "EmailReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            emailAddress: {
                serializedName: "emailAddress",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            },
            status: {
                serializedName: "status",
                readOnly: true,
                type: {
                    name: "Enum",
                    allowedValues: ["NotSpecified", "Enabled", "Disabled"]
                }
            }
        }
    }
};
const SmsReceiver = {
    type: {
        name: "Composite",
        className: "SmsReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            countryCode: {
                serializedName: "countryCode",
                required: true,
                type: {
                    name: "String"
                }
            },
            phoneNumber: {
                serializedName: "phoneNumber",
                required: true,
                type: {
                    name: "String"
                }
            },
            status: {
                serializedName: "status",
                readOnly: true,
                type: {
                    name: "Enum",
                    allowedValues: ["NotSpecified", "Enabled", "Disabled"]
                }
            }
        }
    }
};
const WebhookReceiver = {
    type: {
        name: "Composite",
        className: "WebhookReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            serviceUri: {
                serializedName: "serviceUri",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            },
            useAadAuth: {
                defaultValue: false,
                serializedName: "useAadAuth",
                type: {
                    name: "Boolean"
                }
            },
            objectId: {
                serializedName: "objectId",
                type: {
                    name: "String"
                }
            },
            identifierUri: {
                serializedName: "identifierUri",
                type: {
                    name: "String"
                }
            },
            tenantId: {
                serializedName: "tenantId",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ItsmReceiver = {
    type: {
        name: "Composite",
        className: "ItsmReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            workspaceId: {
                serializedName: "workspaceId",
                required: true,
                type: {
                    name: "String"
                }
            },
            connectionId: {
                serializedName: "connectionId",
                required: true,
                type: {
                    name: "String"
                }
            },
            ticketConfiguration: {
                serializedName: "ticketConfiguration",
                required: true,
                type: {
                    name: "String"
                }
            },
            region: {
                serializedName: "region",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AzureAppPushReceiver = {
    type: {
        name: "Composite",
        className: "AzureAppPushReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            emailAddress: {
                serializedName: "emailAddress",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AutomationRunbookReceiver = {
    type: {
        name: "Composite",
        className: "AutomationRunbookReceiver",
        modelProperties: {
            automationAccountId: {
                serializedName: "automationAccountId",
                required: true,
                type: {
                    name: "String"
                }
            },
            runbookName: {
                serializedName: "runbookName",
                required: true,
                type: {
                    name: "String"
                }
            },
            webhookResourceId: {
                serializedName: "webhookResourceId",
                required: true,
                type: {
                    name: "String"
                }
            },
            isGlobalRunbook: {
                serializedName: "isGlobalRunbook",
                required: true,
                type: {
                    name: "Boolean"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            },
            serviceUri: {
                serializedName: "serviceUri",
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const VoiceReceiver = {
    type: {
        name: "Composite",
        className: "VoiceReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            countryCode: {
                serializedName: "countryCode",
                required: true,
                type: {
                    name: "String"
                }
            },
            phoneNumber: {
                serializedName: "phoneNumber",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const LogicAppReceiver = {
    type: {
        name: "Composite",
        className: "LogicAppReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            resourceId: {
                serializedName: "resourceId",
                required: true,
                type: {
                    name: "String"
                }
            },
            callbackUrl: {
                serializedName: "callbackUrl",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const AzureFunctionReceiver = {
    type: {
        name: "Composite",
        className: "AzureFunctionReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            functionAppResourceId: {
                serializedName: "functionAppResourceId",
                required: true,
                type: {
                    name: "String"
                }
            },
            functionName: {
                serializedName: "functionName",
                required: true,
                type: {
                    name: "String"
                }
            },
            httpTriggerUrl: {
                serializedName: "httpTriggerUrl",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const ArmRoleReceiver = {
    type: {
        name: "Composite",
        className: "ArmRoleReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            roleId: {
                serializedName: "roleId",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const EventHubReceiver = {
    type: {
        name: "Composite",
        className: "EventHubReceiver",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            eventHubNameSpace: {
                serializedName: "eventHubNameSpace",
                required: true,
                type: {
                    name: "String"
                }
            },
            eventHubName: {
                serializedName: "eventHubName",
                required: true,
                type: {
                    name: "String"
                }
            },
            useCommonAlertSchema: {
                defaultValue: false,
                serializedName: "useCommonAlertSchema",
                type: {
                    name: "Boolean"
                }
            },
            tenantId: {
                serializedName: "tenantId",
                type: {
                    name: "String"
                }
            },
            subscriptionId: {
                serializedName: "subscriptionId",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AzureResource = {
    type: {
        name: "Composite",
        className: "AzureResource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            kind: {
                serializedName: "kind",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            identity: {
                serializedName: "identity",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const ActionGroupPatchBody = {
    type: {
        name: "Composite",
        className: "ActionGroupPatchBody",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const NotificationRequestBody = {
    type: {
        name: "Composite",
        className: "NotificationRequestBody",
        modelProperties: {
            alertType: {
                constraints: {
                    MaxLength: 30
                },
                serializedName: "alertType",
                required: true,
                type: {
                    name: "String"
                }
            },
            emailReceivers: {
                serializedName: "emailReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "EmailReceiver"
                        }
                    }
                }
            },
            smsReceivers: {
                serializedName: "smsReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "SmsReceiver"
                        }
                    }
                }
            },
            webhookReceivers: {
                serializedName: "webhookReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "WebhookReceiver"
                        }
                    }
                }
            },
            itsmReceivers: {
                serializedName: "itsmReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ItsmReceiver"
                        }
                    }
                }
            },
            azureAppPushReceivers: {
                serializedName: "azureAppPushReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AzureAppPushReceiver"
                        }
                    }
                }
            },
            automationRunbookReceivers: {
                serializedName: "automationRunbookReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutomationRunbookReceiver"
                        }
                    }
                }
            },
            voiceReceivers: {
                serializedName: "voiceReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "VoiceReceiver"
                        }
                    }
                }
            },
            logicAppReceivers: {
                serializedName: "logicAppReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogicAppReceiver"
                        }
                    }
                }
            },
            azureFunctionReceivers: {
                serializedName: "azureFunctionReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AzureFunctionReceiver"
                        }
                    }
                }
            },
            armRoleReceivers: {
                serializedName: "armRoleReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ArmRoleReceiver"
                        }
                    }
                }
            },
            eventHubReceivers: {
                serializedName: "eventHubReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "EventHubReceiver"
                        }
                    }
                }
            }
        }
    }
};
const TestNotificationResponse = {
    type: {
        name: "Composite",
        className: "TestNotificationResponse",
        modelProperties: {
            notificationId: {
                serializedName: "notificationId",
                required: true,
                type: {
                    name: "String"
                }
            },
            correlationId: {
                serializedName: "correlationId",
                required: true,
                type: {
                    name: "String"
                }
            },
            createdTime: {
                serializedName: "createdTime",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const TestNotificationDetailsResponse = {
    type: {
        name: "Composite",
        className: "TestNotificationDetailsResponse",
        modelProperties: {
            context: {
                serializedName: "Context",
                type: {
                    name: "Composite",
                    className: "Context"
                }
            },
            state: {
                serializedName: "State",
                required: true,
                type: {
                    name: "String"
                }
            },
            completedTime: {
                serializedName: "CompletedTime",
                type: {
                    name: "String"
                }
            },
            createdTime: {
                serializedName: "CreatedTime",
                type: {
                    name: "String"
                }
            },
            actionDetails: {
                serializedName: "ActionDetails",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ActionDetail"
                        }
                    }
                }
            }
        }
    }
};
const Context = {
    type: {
        name: "Composite",
        className: "Context",
        modelProperties: {
            notificationSource: {
                serializedName: "NotificationSource",
                type: {
                    name: "String"
                }
            },
            contextType: {
                serializedName: "ContextType",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ActionDetail = {
    type: {
        name: "Composite",
        className: "ActionDetail",
        modelProperties: {
            mechanismType: {
                serializedName: "MechanismType",
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "Name",
                type: {
                    name: "String"
                }
            },
            status: {
                serializedName: "Status",
                type: {
                    name: "String"
                }
            },
            subState: {
                serializedName: "SubState",
                type: {
                    name: "String"
                }
            },
            sendTime: {
                serializedName: "SendTime",
                type: {
                    name: "String"
                }
            },
            detail: {
                serializedName: "Detail",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ActionGroupList = {
    type: {
        name: "Composite",
        className: "ActionGroupList",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ActionGroupResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const EnableRequest = {
    type: {
        name: "Composite",
        className: "EnableRequest",
        modelProperties: {
            receiverName: {
                serializedName: "receiverName",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const EventDataCollection = {
    type: {
        name: "Composite",
        className: "EventDataCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "EventData"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const EventData = {
    type: {
        name: "Composite",
        className: "EventData",
        modelProperties: {
            authorization: {
                serializedName: "authorization",
                type: {
                    name: "Composite",
                    className: "SenderAuthorization"
                }
            },
            claims: {
                serializedName: "claims",
                readOnly: true,
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            caller: {
                serializedName: "caller",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            description: {
                serializedName: "description",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            eventDataId: {
                serializedName: "eventDataId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            correlationId: {
                serializedName: "correlationId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            eventName: {
                serializedName: "eventName",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            category: {
                serializedName: "category",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            httpRequest: {
                serializedName: "httpRequest",
                type: {
                    name: "Composite",
                    className: "HttpRequestInfo"
                }
            },
            level: {
                serializedName: "level",
                readOnly: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "Critical",
                        "Error",
                        "Warning",
                        "Informational",
                        "Verbose"
                    ]
                }
            },
            resourceGroupName: {
                serializedName: "resourceGroupName",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            resourceProviderName: {
                serializedName: "resourceProviderName",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            resourceId: {
                serializedName: "resourceId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            resourceType: {
                serializedName: "resourceType",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            operationId: {
                serializedName: "operationId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            operationName: {
                serializedName: "operationName",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            properties: {
                serializedName: "properties",
                readOnly: true,
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            status: {
                serializedName: "status",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            subStatus: {
                serializedName: "subStatus",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            eventTimestamp: {
                serializedName: "eventTimestamp",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            },
            submissionTimestamp: {
                serializedName: "submissionTimestamp",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            },
            subscriptionId: {
                serializedName: "subscriptionId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            tenantId: {
                serializedName: "tenantId",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const SenderAuthorization = {
    type: {
        name: "Composite",
        className: "SenderAuthorization",
        modelProperties: {
            action: {
                serializedName: "action",
                type: {
                    name: "String"
                }
            },
            role: {
                serializedName: "role",
                type: {
                    name: "String"
                }
            },
            scope: {
                serializedName: "scope",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const LocalizableString = {
    type: {
        name: "Composite",
        className: "LocalizableString",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "String"
                }
            },
            localizedValue: {
                serializedName: "localizedValue",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const HttpRequestInfo = {
    type: {
        name: "Composite",
        className: "HttpRequestInfo",
        modelProperties: {
            clientRequestId: {
                serializedName: "clientRequestId",
                type: {
                    name: "String"
                }
            },
            clientIpAddress: {
                serializedName: "clientIpAddress",
                type: {
                    name: "String"
                }
            },
            method: {
                serializedName: "method",
                type: {
                    name: "String"
                }
            },
            uri: {
                serializedName: "uri",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const EventCategoryCollection = {
    type: {
        name: "Composite",
        className: "EventCategoryCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LocalizableString"
                        }
                    }
                }
            }
        }
    }
};
const MetricDefinitionCollection = {
    type: {
        name: "Composite",
        className: "MetricDefinitionCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricDefinition"
                        }
                    }
                }
            }
        }
    }
};
const MetricDefinition = {
    type: {
        name: "Composite",
        className: "MetricDefinition",
        modelProperties: {
            isDimensionRequired: {
                serializedName: "isDimensionRequired",
                type: {
                    name: "Boolean"
                }
            },
            resourceId: {
                serializedName: "resourceId",
                type: {
                    name: "String"
                }
            },
            namespace: {
                serializedName: "namespace",
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            displayDescription: {
                serializedName: "displayDescription",
                type: {
                    name: "String"
                }
            },
            category: {
                serializedName: "category",
                type: {
                    name: "String"
                }
            },
            metricClass: {
                serializedName: "metricClass",
                type: {
                    name: "String"
                }
            },
            unit: {
                serializedName: "unit",
                type: {
                    name: "String"
                }
            },
            primaryAggregationType: {
                serializedName: "primaryAggregationType",
                type: {
                    name: "Enum",
                    allowedValues: [
                        "None",
                        "Average",
                        "Count",
                        "Minimum",
                        "Maximum",
                        "Total"
                    ]
                }
            },
            supportedAggregationTypes: {
                serializedName: "supportedAggregationTypes",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Enum",
                            allowedValues: [
                                "None",
                                "Average",
                                "Count",
                                "Minimum",
                                "Maximum",
                                "Total"
                            ]
                        }
                    }
                }
            },
            metricAvailabilities: {
                serializedName: "metricAvailabilities",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricAvailability"
                        }
                    }
                }
            },
            id: {
                serializedName: "id",
                type: {
                    name: "String"
                }
            },
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LocalizableString"
                        }
                    }
                }
            }
        }
    }
};
const MetricAvailability = {
    type: {
        name: "Composite",
        className: "MetricAvailability",
        modelProperties: {
            timeGrain: {
                serializedName: "timeGrain",
                type: {
                    name: "TimeSpan"
                }
            },
            retention: {
                serializedName: "retention",
                type: {
                    name: "TimeSpan"
                }
            }
        }
    }
};
const Response = {
    type: {
        name: "Composite",
        className: "Response",
        modelProperties: {
            cost: {
                constraints: {
                    InclusiveMinimum: 0
                },
                serializedName: "cost",
                type: {
                    name: "Number"
                }
            },
            timespan: {
                serializedName: "timespan",
                required: true,
                type: {
                    name: "String"
                }
            },
            interval: {
                serializedName: "interval",
                type: {
                    name: "TimeSpan"
                }
            },
            namespace: {
                serializedName: "namespace",
                type: {
                    name: "String"
                }
            },
            resourceregion: {
                serializedName: "resourceregion",
                type: {
                    name: "String"
                }
            },
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "Metric"
                        }
                    }
                }
            }
        }
    }
};
const Metric = {
    type: {
        name: "Composite",
        className: "Metric",
        modelProperties: {
            id: {
                serializedName: "id",
                required: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                required: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            displayDescription: {
                serializedName: "displayDescription",
                type: {
                    name: "String"
                }
            },
            errorCode: {
                serializedName: "errorCode",
                type: {
                    name: "String"
                }
            },
            errorMessage: {
                serializedName: "errorMessage",
                type: {
                    name: "String"
                }
            },
            unit: {
                serializedName: "unit",
                required: true,
                type: {
                    name: "String"
                }
            },
            timeseries: {
                serializedName: "timeseries",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "TimeSeriesElement"
                        }
                    }
                }
            }
        }
    }
};
const TimeSeriesElement = {
    type: {
        name: "Composite",
        className: "TimeSeriesElement",
        modelProperties: {
            metadatavalues: {
                serializedName: "metadatavalues",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetadataValue"
                        }
                    }
                }
            },
            data: {
                serializedName: "data",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricValue"
                        }
                    }
                }
            }
        }
    }
};
const MetadataValue = {
    type: {
        name: "Composite",
        className: "MetadataValue",
        modelProperties: {
            name: {
                serializedName: "name",
                type: {
                    name: "Composite",
                    className: "LocalizableString"
                }
            },
            value: {
                serializedName: "value",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const MetricValue = {
    type: {
        name: "Composite",
        className: "MetricValue",
        modelProperties: {
            timeStamp: {
                serializedName: "timeStamp",
                required: true,
                type: {
                    name: "DateTime"
                }
            },
            average: {
                serializedName: "average",
                type: {
                    name: "Number"
                }
            },
            minimum: {
                serializedName: "minimum",
                type: {
                    name: "Number"
                }
            },
            maximum: {
                serializedName: "maximum",
                type: {
                    name: "Number"
                }
            },
            total: {
                serializedName: "total",
                type: {
                    name: "Number"
                }
            },
            count: {
                serializedName: "count",
                type: {
                    name: "Number"
                }
            }
        }
    }
};
const MetricBaselinesResponse = {
    type: {
        name: "Composite",
        className: "MetricBaselinesResponse",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "SingleMetricBaseline"
                        }
                    }
                }
            }
        }
    }
};
const SingleMetricBaseline = {
    type: {
        name: "Composite",
        className: "SingleMetricBaseline",
        modelProperties: {
            id: {
                serializedName: "id",
                required: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                required: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            timespan: {
                serializedName: "properties.timespan",
                required: true,
                type: {
                    name: "String"
                }
            },
            interval: {
                serializedName: "properties.interval",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            },
            namespace: {
                serializedName: "properties.namespace",
                type: {
                    name: "String"
                }
            },
            baselines: {
                serializedName: "properties.baselines",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "TimeSeriesBaseline"
                        }
                    }
                }
            }
        }
    }
};
const TimeSeriesBaseline = {
    type: {
        name: "Composite",
        className: "TimeSeriesBaseline",
        modelProperties: {
            aggregation: {
                serializedName: "aggregation",
                required: true,
                type: {
                    name: "String"
                }
            },
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricSingleDimension"
                        }
                    }
                }
            },
            timestamps: {
                serializedName: "timestamps",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "DateTime"
                        }
                    }
                }
            },
            data: {
                serializedName: "data",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "SingleBaseline"
                        }
                    }
                }
            },
            metadataValues: {
                serializedName: "metadataValues",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "BaselineMetadata"
                        }
                    }
                }
            }
        }
    }
};
const MetricSingleDimension = {
    type: {
        name: "Composite",
        className: "MetricSingleDimension",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const SingleBaseline = {
    type: {
        name: "Composite",
        className: "SingleBaseline",
        modelProperties: {
            sensitivity: {
                serializedName: "sensitivity",
                required: true,
                type: {
                    name: "String"
                }
            },
            lowThresholds: {
                serializedName: "lowThresholds",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Number"
                        }
                    }
                }
            },
            highThresholds: {
                serializedName: "highThresholds",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Number"
                        }
                    }
                }
            }
        }
    }
};
const BaselineMetadata = {
    type: {
        name: "Composite",
        className: "BaselineMetadata",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const MetricAlertResourceCollection = {
    type: {
        name: "Composite",
        className: "MetricAlertResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricAlertResource"
                        }
                    }
                }
            }
        }
    }
};
const MetricAlertCriteria = {
    serializedName: "MetricAlertCriteria",
    type: {
        name: "Composite",
        className: "MetricAlertCriteria",
        uberParent: "MetricAlertCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: {
            serializedName: "odata\\.type",
            clientName: "odataType"
        },
        modelProperties: {
            odataType: {
                serializedName: "odata\\.type",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const MetricAlertAction = {
    type: {
        name: "Composite",
        className: "MetricAlertAction",
        modelProperties: {
            actionGroupId: {
                serializedName: "actionGroupId",
                type: {
                    name: "String"
                }
            },
            webHookProperties: {
                serializedName: "webHookProperties",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const MetricAlertResourcePatch = {
    type: {
        name: "Composite",
        className: "MetricAlertResourcePatch",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            },
            severity: {
                serializedName: "properties.severity",
                type: {
                    name: "Number"
                }
            },
            enabled: {
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            },
            scopes: {
                serializedName: "properties.scopes",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            evaluationFrequency: {
                serializedName: "properties.evaluationFrequency",
                type: {
                    name: "TimeSpan"
                }
            },
            windowSize: {
                serializedName: "properties.windowSize",
                type: {
                    name: "TimeSpan"
                }
            },
            targetResourceType: {
                serializedName: "properties.targetResourceType",
                type: {
                    name: "String"
                }
            },
            targetResourceRegion: {
                serializedName: "properties.targetResourceRegion",
                type: {
                    name: "String"
                }
            },
            criteria: {
                serializedName: "properties.criteria",
                type: {
                    name: "Composite",
                    className: "MetricAlertCriteria"
                }
            },
            autoMitigate: {
                serializedName: "properties.autoMitigate",
                type: {
                    name: "Boolean"
                }
            },
            actions: {
                serializedName: "properties.actions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricAlertAction"
                        }
                    }
                }
            },
            lastUpdatedTime: {
                serializedName: "properties.lastUpdatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            },
            isMigrated: {
                serializedName: "properties.isMigrated",
                readOnly: true,
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const MetricAlertStatusCollection = {
    type: {
        name: "Composite",
        className: "MetricAlertStatusCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricAlertStatus"
                        }
                    }
                }
            }
        }
    }
};
const MetricAlertStatus = {
    type: {
        name: "Composite",
        className: "MetricAlertStatus",
        modelProperties: {
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            },
            id: {
                serializedName: "id",
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                type: {
                    name: "String"
                }
            },
            properties: {
                serializedName: "properties",
                type: {
                    name: "Composite",
                    className: "MetricAlertStatusProperties"
                }
            }
        }
    }
};
const MetricAlertStatusProperties = {
    type: {
        name: "Composite",
        className: "MetricAlertStatusProperties",
        modelProperties: {
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            status: {
                serializedName: "status",
                type: {
                    name: "String"
                }
            },
            timestamp: {
                serializedName: "timestamp",
                type: {
                    name: "DateTime"
                }
            }
        }
    }
};
const Source = {
    type: {
        name: "Composite",
        className: "Source",
        modelProperties: {
            query: {
                serializedName: "query",
                type: {
                    name: "String"
                }
            },
            authorizedResources: {
                serializedName: "authorizedResources",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            dataSourceId: {
                serializedName: "dataSourceId",
                required: true,
                type: {
                    name: "String"
                }
            },
            queryType: {
                serializedName: "queryType",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const Schedule = {
    type: {
        name: "Composite",
        className: "Schedule",
        modelProperties: {
            frequencyInMinutes: {
                serializedName: "frequencyInMinutes",
                required: true,
                type: {
                    name: "Number"
                }
            },
            timeWindowInMinutes: {
                serializedName: "timeWindowInMinutes",
                required: true,
                type: {
                    name: "Number"
                }
            }
        }
    }
};
const Action = {
    type: {
        name: "Composite",
        className: "Action",
        uberParent: "Action",
        polymorphicDiscriminator: {
            serializedName: "odata\\.type",
            clientName: "odataType"
        },
        modelProperties: {
            odataType: {
                serializedName: "odata\\.type",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ResourceAutoGenerated = {
    type: {
        name: "Composite",
        className: "ResourceAutoGenerated",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            kind: {
                serializedName: "kind",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            etag: {
                serializedName: "etag",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ErrorContract = {
    type: {
        name: "Composite",
        className: "ErrorContract",
        modelProperties: {
            error: {
                serializedName: "error",
                type: {
                    name: "Composite",
                    className: "ErrorResponse"
                }
            }
        }
    }
};
const LogSearchRuleResourcePatch = {
    type: {
        name: "Composite",
        className: "LogSearchRuleResourcePatch",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            enabled: {
                serializedName: "properties.enabled",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const LogSearchRuleResourceCollection = {
    type: {
        name: "Composite",
        className: "LogSearchRuleResourceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogSearchRuleResource"
                        }
                    }
                }
            }
        }
    }
};
const MetricNamespaceCollection = {
    type: {
        name: "Composite",
        className: "MetricNamespaceCollection",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricNamespace"
                        }
                    }
                }
            }
        }
    }
};
const MetricNamespace = {
    type: {
        name: "Composite",
        className: "MetricNamespace",
        modelProperties: {
            id: {
                serializedName: "id",
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            },
            classification: {
                serializedName: "classification",
                type: {
                    name: "String"
                }
            },
            properties: {
                serializedName: "properties",
                type: {
                    name: "Composite",
                    className: "MetricNamespaceName"
                }
            }
        }
    }
};
const MetricNamespaceName = {
    type: {
        name: "Composite",
        className: "MetricNamespaceName",
        modelProperties: {
            metricNamespaceName: {
                serializedName: "metricNamespaceName",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataContainer = {
    type: {
        name: "Composite",
        className: "DataContainer",
        modelProperties: {
            workspace: {
                serializedName: "workspace",
                type: {
                    name: "Composite",
                    className: "WorkspaceInfo"
                }
            }
        }
    }
};
const WorkspaceInfo = {
    type: {
        name: "Composite",
        className: "WorkspaceInfo",
        modelProperties: {
            id: {
                serializedName: "id",
                required: true,
                type: {
                    name: "String"
                }
            },
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            customerId: {
                serializedName: "properties.customerId",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ProxyResource = {
    type: {
        name: "Composite",
        className: "ProxyResource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ResponseWithError = {
    type: {
        name: "Composite",
        className: "ResponseWithError",
        modelProperties: {
            error: {
                serializedName: "error",
                type: {
                    name: "Composite",
                    className: "ErrorModel"
                }
            }
        }
    }
};
const ErrorModel = {
    type: {
        name: "Composite",
        className: "ErrorModel",
        modelProperties: {
            code: {
                serializedName: "code",
                required: true,
                type: {
                    name: "String"
                }
            },
            message: {
                serializedName: "message",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AzureMonitorPrivateLinkScopeListResult = {
    type: {
        name: "Composite",
        className: "AzureMonitorPrivateLinkScopeListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AzureMonitorPrivateLinkScope"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const PrivateEndpointProperty = {
    type: {
        name: "Composite",
        className: "PrivateEndpointProperty",
        modelProperties: {
            id: {
                serializedName: "id",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const PrivateLinkServiceConnectionStateProperty = {
    type: {
        name: "Composite",
        className: "PrivateLinkServiceConnectionStateProperty",
        modelProperties: {
            status: {
                serializedName: "status",
                required: true,
                type: {
                    name: "String"
                }
            },
            description: {
                serializedName: "description",
                required: true,
                type: {
                    name: "String"
                }
            },
            actionsRequired: {
                serializedName: "actionsRequired",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const PrivateLinkScopesResource = {
    type: {
        name: "Composite",
        className: "PrivateLinkScopesResource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const TagsResource = {
    type: {
        name: "Composite",
        className: "TagsResource",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const OperationStatus = {
    type: {
        name: "Composite",
        className: "OperationStatus",
        modelProperties: {
            id: {
                serializedName: "id",
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            },
            startTime: {
                serializedName: "startTime",
                nullable: true,
                type: {
                    name: "DateTime"
                }
            },
            endTime: {
                serializedName: "endTime",
                nullable: true,
                type: {
                    name: "DateTime"
                }
            },
            status: {
                serializedName: "status",
                type: {
                    name: "String"
                }
            },
            error: {
                serializedName: "error",
                type: {
                    name: "Composite",
                    className: "ErrorResponseCommon"
                }
            }
        }
    }
};
const ErrorAdditionalInfo = {
    type: {
        name: "Composite",
        className: "ErrorAdditionalInfo",
        modelProperties: {
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            info: {
                serializedName: "info",
                readOnly: true,
                type: {
                    name: "Dictionary",
                    value: { type: { name: "any" } }
                }
            }
        }
    }
};
const PrivateLinkResourceListResult = {
    type: {
        name: "Composite",
        className: "PrivateLinkResourceListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "PrivateLinkResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const PrivateEndpointConnectionListResult = {
    type: {
        name: "Composite",
        className: "PrivateEndpointConnectionListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "PrivateEndpointConnection"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ScopedResourceListResult = {
    type: {
        name: "Composite",
        className: "ScopedResourceListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ScopedResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ActivityLogAlertAllOfCondition = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertAllOfCondition",
        modelProperties: {
            allOf: {
                serializedName: "allOf",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ActivityLogAlertLeafCondition"
                        }
                    }
                }
            }
        }
    }
};
const ActivityLogAlertLeafCondition = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertLeafCondition",
        modelProperties: {
            field: {
                serializedName: "field",
                required: true,
                type: {
                    name: "String"
                }
            },
            equals: {
                serializedName: "equals",
                required: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ActivityLogAlertActionList = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertActionList",
        modelProperties: {
            actionGroups: {
                serializedName: "actionGroups",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ActivityLogAlertActionGroup"
                        }
                    }
                }
            }
        }
    }
};
const ActivityLogAlertActionGroup = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertActionGroup",
        modelProperties: {
            actionGroupId: {
                serializedName: "actionGroupId",
                required: true,
                type: {
                    name: "String"
                }
            },
            webhookProperties: {
                serializedName: "webhookProperties",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const ActivityLogAlertPatchBody = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertPatchBody",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const ActivityLogAlertList = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertList",
        modelProperties: {
            value: {
                serializedName: "value",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ActivityLogAlertResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionEndpointResourceListResult = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointResourceListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataCollectionEndpointResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionEndpointResource = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointResource",
        modelProperties: {
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            kind: {
                serializedName: "kind",
                type: {
                    name: "String"
                }
            },
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            etag: {
                serializedName: "etag",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            systemData: {
                serializedName: "systemData",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointResourceSystemData"
                }
            },
            description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            },
            immutableId: {
                serializedName: "properties.immutableId",
                type: {
                    name: "String"
                }
            },
            configurationAccess: {
                serializedName: "properties.configurationAccess",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointConfigurationAccess"
                }
            },
            logsIngestion: {
                serializedName: "properties.logsIngestion",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointLogsIngestion"
                }
            },
            networkAcls: {
                serializedName: "properties.networkAcls",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointNetworkAcls"
                }
            },
            provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionEndpoint = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpoint",
        modelProperties: {
            description: {
                serializedName: "description",
                type: {
                    name: "String"
                }
            },
            immutableId: {
                serializedName: "immutableId",
                type: {
                    name: "String"
                }
            },
            configurationAccess: {
                serializedName: "configurationAccess",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointConfigurationAccess"
                }
            },
            logsIngestion: {
                serializedName: "logsIngestion",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointLogsIngestion"
                }
            },
            networkAcls: {
                serializedName: "networkAcls",
                type: {
                    name: "Composite",
                    className: "DataCollectionEndpointNetworkAcls"
                }
            },
            provisioningState: {
                serializedName: "provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ConfigurationAccessEndpointSpec = {
    type: {
        name: "Composite",
        className: "ConfigurationAccessEndpointSpec",
        modelProperties: {
            endpoint: {
                serializedName: "endpoint",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const LogsIngestionEndpointSpec = {
    type: {
        name: "Composite",
        className: "LogsIngestionEndpointSpec",
        modelProperties: {
            endpoint: {
                serializedName: "endpoint",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const NetworkRuleSet = {
    type: {
        name: "Composite",
        className: "NetworkRuleSet",
        modelProperties: {
            publicNetworkAccess: {
                serializedName: "publicNetworkAccess",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const SystemData = {
    type: {
        name: "Composite",
        className: "SystemData",
        modelProperties: {
            createdBy: {
                serializedName: "createdBy",
                type: {
                    name: "String"
                }
            },
            createdByType: {
                serializedName: "createdByType",
                type: {
                    name: "String"
                }
            },
            createdAt: {
                serializedName: "createdAt",
                type: {
                    name: "DateTime"
                }
            },
            lastModifiedBy: {
                serializedName: "lastModifiedBy",
                type: {
                    name: "String"
                }
            },
            lastModifiedByType: {
                serializedName: "lastModifiedByType",
                type: {
                    name: "String"
                }
            },
            lastModifiedAt: {
                serializedName: "lastModifiedAt",
                type: {
                    name: "DateTime"
                }
            }
        }
    }
};
const ErrorResponseCommonV2 = {
    type: {
        name: "Composite",
        className: "ErrorResponseCommonV2",
        modelProperties: {
            error: {
                serializedName: "error",
                type: {
                    name: "Composite",
                    className: "ErrorDetail"
                }
            }
        }
    }
};
const ErrorDetail = {
    type: {
        name: "Composite",
        className: "ErrorDetail",
        modelProperties: {
            code: {
                serializedName: "code",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            message: {
                serializedName: "message",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            target: {
                serializedName: "target",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            details: {
                serializedName: "details",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ErrorDetail"
                        }
                    }
                }
            },
            additionalInfo: {
                serializedName: "additionalInfo",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ErrorAdditionalInfo"
                        }
                    }
                }
            }
        }
    }
};
const ResourceForUpdate = {
    type: {
        name: "Composite",
        className: "ResourceForUpdate",
        modelProperties: {
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            }
        }
    }
};
const DataCollectionRuleAssociationProxyOnlyResourceListResult = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleAssociationProxyOnlyResourceListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataCollectionRuleAssociationProxyOnlyResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionRuleAssociationProxyOnlyResource = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleAssociationProxyOnlyResource",
        modelProperties: {
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            etag: {
                serializedName: "etag",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            systemData: {
                serializedName: "systemData",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleAssociationProxyOnlyResourceSystemData"
                }
            },
            description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            },
            dataCollectionRuleId: {
                serializedName: "properties.dataCollectionRuleId",
                type: {
                    name: "String"
                }
            },
            dataCollectionEndpointId: {
                serializedName: "properties.dataCollectionEndpointId",
                type: {
                    name: "String"
                }
            },
            provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionRuleAssociation = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleAssociation",
        modelProperties: {
            description: {
                serializedName: "description",
                type: {
                    name: "String"
                }
            },
            dataCollectionRuleId: {
                serializedName: "dataCollectionRuleId",
                type: {
                    name: "String"
                }
            },
            dataCollectionEndpointId: {
                serializedName: "dataCollectionEndpointId",
                type: {
                    name: "String"
                }
            },
            provisioningState: {
                serializedName: "provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionRuleResourceListResult = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleResourceListResult",
        modelProperties: {
            value: {
                serializedName: "value",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataCollectionRuleResource"
                        }
                    }
                }
            },
            nextLink: {
                serializedName: "nextLink",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionRuleResource = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleResource",
        modelProperties: {
            location: {
                serializedName: "location",
                required: true,
                type: {
                    name: "String"
                }
            },
            tags: {
                serializedName: "tags",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            },
            kind: {
                serializedName: "kind",
                type: {
                    name: "String"
                }
            },
            id: {
                serializedName: "id",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            type: {
                serializedName: "type",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            etag: {
                serializedName: "etag",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            systemData: {
                serializedName: "systemData",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleResourceSystemData"
                }
            },
            description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            },
            immutableId: {
                serializedName: "properties.immutableId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            dataSources: {
                serializedName: "properties.dataSources",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleDataSources"
                }
            },
            destinations: {
                serializedName: "properties.destinations",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleDestinations"
                }
            },
            dataFlows: {
                serializedName: "properties.dataFlows",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataFlow"
                        }
                    }
                }
            },
            provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataCollectionRule = {
    type: {
        name: "Composite",
        className: "DataCollectionRule",
        modelProperties: {
            description: {
                serializedName: "description",
                type: {
                    name: "String"
                }
            },
            immutableId: {
                serializedName: "immutableId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            dataSources: {
                serializedName: "dataSources",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleDataSources"
                }
            },
            destinations: {
                serializedName: "destinations",
                type: {
                    name: "Composite",
                    className: "DataCollectionRuleDestinations"
                }
            },
            dataFlows: {
                serializedName: "dataFlows",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataFlow"
                        }
                    }
                }
            },
            provisioningState: {
                serializedName: "provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataSourcesSpec = {
    type: {
        name: "Composite",
        className: "DataSourcesSpec",
        modelProperties: {
            performanceCounters: {
                serializedName: "performanceCounters",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "PerfCounterDataSource"
                        }
                    }
                }
            },
            windowsEventLogs: {
                serializedName: "windowsEventLogs",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "WindowsEventLogDataSource"
                        }
                    }
                }
            },
            syslog: {
                serializedName: "syslog",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "SyslogDataSource"
                        }
                    }
                }
            },
            extensions: {
                serializedName: "extensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ExtensionDataSource"
                        }
                    }
                }
            }
        }
    }
};
const PerfCounterDataSource = {
    type: {
        name: "Composite",
        className: "PerfCounterDataSource",
        modelProperties: {
            streams: {
                serializedName: "streams",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            samplingFrequencyInSeconds: {
                serializedName: "samplingFrequencyInSeconds",
                type: {
                    name: "Number"
                }
            },
            counterSpecifiers: {
                serializedName: "counterSpecifiers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const WindowsEventLogDataSource = {
    type: {
        name: "Composite",
        className: "WindowsEventLogDataSource",
        modelProperties: {
            streams: {
                serializedName: "streams",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            xPathQueries: {
                serializedName: "xPathQueries",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const SyslogDataSource = {
    type: {
        name: "Composite",
        className: "SyslogDataSource",
        modelProperties: {
            streams: {
                serializedName: "streams",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            facilityNames: {
                serializedName: "facilityNames",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            logLevels: {
                serializedName: "logLevels",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ExtensionDataSource = {
    type: {
        name: "Composite",
        className: "ExtensionDataSource",
        modelProperties: {
            streams: {
                serializedName: "streams",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            extensionName: {
                serializedName: "extensionName",
                required: true,
                type: {
                    name: "String"
                }
            },
            extensionSettings: {
                serializedName: "extensionSettings",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "any" } }
                }
            },
            inputDataSources: {
                serializedName: "inputDataSources",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DestinationsSpec = {
    type: {
        name: "Composite",
        className: "DestinationsSpec",
        modelProperties: {
            logAnalytics: {
                serializedName: "logAnalytics",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogAnalyticsDestination"
                        }
                    }
                }
            },
            azureMonitorMetrics: {
                serializedName: "azureMonitorMetrics",
                type: {
                    name: "Composite",
                    className: "DestinationsSpecAzureMonitorMetrics"
                }
            }
        }
    }
};
const LogAnalyticsDestination = {
    type: {
        name: "Composite",
        className: "LogAnalyticsDestination",
        modelProperties: {
            workspaceResourceId: {
                serializedName: "workspaceResourceId",
                type: {
                    name: "String"
                }
            },
            workspaceId: {
                serializedName: "workspaceId",
                readOnly: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AzureMonitorMetricsDestination = {
    type: {
        name: "Composite",
        className: "AzureMonitorMetricsDestination",
        modelProperties: {
            name: {
                serializedName: "name",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const DataFlow = {
    type: {
        name: "Composite",
        className: "DataFlow",
        modelProperties: {
            streams: {
                serializedName: "streams",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            destinations: {
                serializedName: "destinations",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }
        }
    }
};
const RuleManagementEventClaimsDataSource = {
    type: {
        name: "Composite",
        className: "RuleManagementEventClaimsDataSource",
        modelProperties: {
            emailAddress: {
                serializedName: "emailAddress",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const ManagementEventAggregationCondition = {
    type: {
        name: "Composite",
        className: "ManagementEventAggregationCondition",
        modelProperties: {
            operator: {
                serializedName: "operator",
                type: {
                    name: "Enum",
                    allowedValues: [
                        "GreaterThan",
                        "GreaterThanOrEqual",
                        "LessThan",
                        "LessThanOrEqual"
                    ]
                }
            },
            threshold: {
                serializedName: "threshold",
                type: {
                    name: "Number"
                }
            },
            windowSize: {
                serializedName: "windowSize",
                type: {
                    name: "TimeSpan"
                }
            }
        }
    }
};
const MultiMetricCriteria = {
    serializedName: "MultiMetricCriteria",
    type: {
        name: "Composite",
        className: "MultiMetricCriteria",
        uberParent: "MultiMetricCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: {
            serializedName: "criterionType",
            clientName: "criterionType"
        },
        modelProperties: {
            criterionType: {
                serializedName: "criterionType",
                required: true,
                type: {
                    name: "String"
                }
            },
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            metricName: {
                serializedName: "metricName",
                required: true,
                type: {
                    name: "String"
                }
            },
            metricNamespace: {
                serializedName: "metricNamespace",
                type: {
                    name: "String"
                }
            },
            timeAggregation: {
                serializedName: "timeAggregation",
                required: true,
                type: {
                    name: "String"
                }
            },
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricDimension"
                        }
                    }
                }
            },
            skipMetricValidation: {
                serializedName: "skipMetricValidation",
                type: {
                    name: "Boolean"
                }
            }
        }
    }
};
const MetricDimension = {
    type: {
        name: "Composite",
        className: "MetricDimension",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "String"
                }
            },
            values: {
                serializedName: "values",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }
        }
    }
};
const DynamicThresholdFailingPeriods = {
    type: {
        name: "Composite",
        className: "DynamicThresholdFailingPeriods",
        modelProperties: {
            numberOfEvaluationPeriods: {
                serializedName: "numberOfEvaluationPeriods",
                required: true,
                type: {
                    name: "Number"
                }
            },
            minFailingPeriodsToAlert: {
                serializedName: "minFailingPeriodsToAlert",
                required: true,
                type: {
                    name: "Number"
                }
            }
        }
    }
};
const TriggerCondition = {
    type: {
        name: "Composite",
        className: "TriggerCondition",
        modelProperties: {
            thresholdOperator: {
                defaultValue: "GreaterThanOrEqual",
                serializedName: "thresholdOperator",
                required: true,
                type: {
                    name: "String"
                }
            },
            threshold: {
                serializedName: "threshold",
                required: true,
                type: {
                    name: "Number"
                }
            },
            metricTrigger: {
                serializedName: "metricTrigger",
                type: {
                    name: "Composite",
                    className: "LogMetricTrigger"
                }
            }
        }
    }
};
const LogMetricTrigger = {
    type: {
        name: "Composite",
        className: "LogMetricTrigger",
        modelProperties: {
            thresholdOperator: {
                defaultValue: "GreaterThanOrEqual",
                serializedName: "thresholdOperator",
                type: {
                    name: "String"
                }
            },
            threshold: {
                serializedName: "threshold",
                type: {
                    name: "Number"
                }
            },
            metricTriggerType: {
                defaultValue: "Consecutive",
                serializedName: "metricTriggerType",
                type: {
                    name: "String"
                }
            },
            metricColumn: {
                serializedName: "metricColumn",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const AzNsActionGroup = {
    type: {
        name: "Composite",
        className: "AzNsActionGroup",
        modelProperties: {
            actionGroup: {
                serializedName: "actionGroup",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            },
            emailSubject: {
                serializedName: "emailSubject",
                type: {
                    name: "String"
                }
            },
            customWebhookPayload: {
                serializedName: "customWebhookPayload",
                type: {
                    name: "String"
                }
            }
        }
    }
};
const Dimension = {
    type: {
        name: "Composite",
        className: "Dimension",
        modelProperties: {
            name: {
                serializedName: "name",
                required: true,
                type: {
                    name: "String"
                }
            },
            operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "String"
                }
            },
            values: {
                serializedName: "values",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }
        }
    }
};
const Criteria = {
    type: {
        name: "Composite",
        className: "Criteria",
        modelProperties: {
            metricName: {
                serializedName: "metricName",
                required: true,
                type: {
                    name: "String"
                }
            },
            dimensions: {
                serializedName: "dimensions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "Dimension"
                        }
                    }
                }
            }
        }
    }
};
const AutoscaleSettingResource = {
    type: {
        name: "Composite",
        className: "AutoscaleSettingResource",
        modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { profiles: {
                constraints: {
                    MaxItems: 20
                },
                serializedName: "properties.profiles",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutoscaleProfile"
                        }
                    }
                }
            }, notifications: {
                serializedName: "properties.notifications",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutoscaleNotification"
                        }
                    }
                }
            }, enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            }, namePropertiesName: {
                serializedName: "properties.name",
                type: {
                    name: "String"
                }
            }, targetResourceUri: {
                serializedName: "properties.targetResourceUri",
                type: {
                    name: "String"
                }
            }, targetResourceLocation: {
                serializedName: "properties.targetResourceLocation",
                type: {
                    name: "String"
                }
            } })
    }
};
const AlertRuleResource = {
    type: {
        name: "Composite",
        className: "AlertRuleResource",
        modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { namePropertiesName: {
                serializedName: "properties.name",
                required: true,
                type: {
                    name: "String"
                }
            }, description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            }, provisioningState: {
                serializedName: "properties.provisioningState",
                type: {
                    name: "String"
                }
            }, isEnabled: {
                serializedName: "properties.isEnabled",
                required: true,
                type: {
                    name: "Boolean"
                }
            }, condition: {
                serializedName: "properties.condition",
                type: {
                    name: "Composite",
                    className: "RuleCondition"
                }
            }, action: {
                serializedName: "properties.action",
                type: {
                    name: "Composite",
                    className: "RuleAction"
                }
            }, actions: {
                serializedName: "properties.actions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "RuleAction"
                        }
                    }
                }
            }, lastUpdatedTime: {
                serializedName: "properties.lastUpdatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            } })
    }
};
const LogProfileResource = {
    type: {
        name: "Composite",
        className: "LogProfileResource",
        modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { storageAccountId: {
                serializedName: "properties.storageAccountId",
                type: {
                    name: "String"
                }
            }, serviceBusRuleId: {
                serializedName: "properties.serviceBusRuleId",
                type: {
                    name: "String"
                }
            }, locations: {
                serializedName: "properties.locations",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }, categories: {
                serializedName: "properties.categories",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }, retentionPolicy: {
                serializedName: "properties.retentionPolicy",
                type: {
                    name: "Composite",
                    className: "RetentionPolicy"
                }
            } })
    }
};
const MetricAlertResource = {
    type: {
        name: "Composite",
        className: "MetricAlertResource",
        modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            }, severity: {
                serializedName: "properties.severity",
                required: true,
                type: {
                    name: "Number"
                }
            }, enabled: {
                serializedName: "properties.enabled",
                required: true,
                type: {
                    name: "Boolean"
                }
            }, scopes: {
                serializedName: "properties.scopes",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }, evaluationFrequency: {
                serializedName: "properties.evaluationFrequency",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            }, windowSize: {
                serializedName: "properties.windowSize",
                required: true,
                type: {
                    name: "TimeSpan"
                }
            }, targetResourceType: {
                serializedName: "properties.targetResourceType",
                type: {
                    name: "String"
                }
            }, targetResourceRegion: {
                serializedName: "properties.targetResourceRegion",
                type: {
                    name: "String"
                }
            }, criteria: {
                serializedName: "properties.criteria",
                type: {
                    name: "Composite",
                    className: "MetricAlertCriteria"
                }
            }, autoMitigate: {
                serializedName: "properties.autoMitigate",
                type: {
                    name: "Boolean"
                }
            }, actions: {
                serializedName: "properties.actions",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricAlertAction"
                        }
                    }
                }
            }, lastUpdatedTime: {
                serializedName: "properties.lastUpdatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            }, isMigrated: {
                serializedName: "properties.isMigrated",
                readOnly: true,
                type: {
                    name: "Boolean"
                }
            } })
    }
};
const ActivityLogAlertResource = {
    type: {
        name: "Composite",
        className: "ActivityLogAlertResource",
        modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { scopes: {
                serializedName: "properties.scopes",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            }, enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            }, condition: {
                serializedName: "properties.condition",
                type: {
                    name: "Composite",
                    className: "ActivityLogAlertAllOfCondition"
                }
            }, actions: {
                serializedName: "properties.actions",
                type: {
                    name: "Composite",
                    className: "ActivityLogAlertActionList"
                }
            }, description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            } })
    }
};
const ErrorResponseCommon = {
    type: {
        name: "Composite",
        className: "ErrorResponseCommon",
        modelProperties: Object.assign(Object.assign({}, ErrorResponse.type.modelProperties), { details: {
                serializedName: "details",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ErrorResponseCommon"
                        }
                    }
                }
            }, additionalInfo: {
                serializedName: "additionalInfo",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ErrorAdditionalInfo"
                        }
                    }
                }
            } })
    }
};
const ThresholdRuleCondition = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
    type: {
        name: "Composite",
        className: "ThresholdRuleCondition",
        uberParent: "RuleCondition",
        polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleCondition.type.modelProperties), { operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "Enum",
                    allowedValues: [
                        "GreaterThan",
                        "GreaterThanOrEqual",
                        "LessThan",
                        "LessThanOrEqual"
                    ]
                }
            }, threshold: {
                serializedName: "threshold",
                required: true,
                type: {
                    name: "Number"
                }
            }, windowSize: {
                serializedName: "windowSize",
                type: {
                    name: "TimeSpan"
                }
            }, timeAggregation: {
                serializedName: "timeAggregation",
                type: {
                    name: "Enum",
                    allowedValues: ["Average", "Minimum", "Maximum", "Total", "Last"]
                }
            } })
    }
};
const LocationThresholdRuleCondition = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition",
    type: {
        name: "Composite",
        className: "LocationThresholdRuleCondition",
        uberParent: "RuleCondition",
        polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleCondition.type.modelProperties), { windowSize: {
                serializedName: "windowSize",
                type: {
                    name: "TimeSpan"
                }
            }, failedLocationCount: {
                constraints: {
                    InclusiveMinimum: 0
                },
                serializedName: "failedLocationCount",
                required: true,
                type: {
                    name: "Number"
                }
            } })
    }
};
const ManagementEventRuleCondition = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition",
    type: {
        name: "Composite",
        className: "ManagementEventRuleCondition",
        uberParent: "RuleCondition",
        polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleCondition.type.modelProperties), { aggregation: {
                serializedName: "aggregation",
                type: {
                    name: "Composite",
                    className: "ManagementEventAggregationCondition"
                }
            } })
    }
};
const RuleMetricDataSource = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
    type: {
        name: "Composite",
        className: "RuleMetricDataSource",
        uberParent: "RuleDataSource",
        polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleDataSource.type.modelProperties), { metricName: {
                serializedName: "metricName",
                type: {
                    name: "String"
                }
            } })
    }
};
const RuleManagementEventDataSource = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
    type: {
        name: "Composite",
        className: "RuleManagementEventDataSource",
        uberParent: "RuleDataSource",
        polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleDataSource.type.modelProperties), { eventName: {
                serializedName: "eventName",
                type: {
                    name: "String"
                }
            }, eventSource: {
                serializedName: "eventSource",
                type: {
                    name: "String"
                }
            }, level: {
                serializedName: "level",
                type: {
                    name: "String"
                }
            }, operationName: {
                serializedName: "operationName",
                type: {
                    name: "String"
                }
            }, resourceGroupName: {
                serializedName: "resourceGroupName",
                type: {
                    name: "String"
                }
            }, resourceProviderName: {
                serializedName: "resourceProviderName",
                type: {
                    name: "String"
                }
            }, status: {
                serializedName: "status",
                type: {
                    name: "String"
                }
            }, subStatus: {
                serializedName: "subStatus",
                type: {
                    name: "String"
                }
            }, claims: {
                serializedName: "claims",
                type: {
                    name: "Composite",
                    className: "RuleManagementEventClaimsDataSource"
                }
            } })
    }
};
const RuleEmailAction = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
    type: {
        name: "Composite",
        className: "RuleEmailAction",
        uberParent: "RuleAction",
        polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleAction.type.modelProperties), { sendToServiceOwners: {
                serializedName: "sendToServiceOwners",
                type: {
                    name: "Boolean"
                }
            }, customEmails: {
                serializedName: "customEmails",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            } })
    }
};
const RuleWebhookAction = {
    serializedName: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction",
    type: {
        name: "Composite",
        className: "RuleWebhookAction",
        uberParent: "RuleAction",
        polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, RuleAction.type.modelProperties), { serviceUri: {
                serializedName: "serviceUri",
                type: {
                    name: "String"
                }
            }, properties: {
                serializedName: "properties",
                type: {
                    name: "Dictionary",
                    value: { type: { name: "String" } }
                }
            } })
    }
};
const DiagnosticSettingsResource = {
    type: {
        name: "Composite",
        className: "DiagnosticSettingsResource",
        modelProperties: Object.assign(Object.assign({}, ProxyOnlyResource.type.modelProperties), { storageAccountId: {
                serializedName: "properties.storageAccountId",
                type: {
                    name: "String"
                }
            }, serviceBusRuleId: {
                serializedName: "properties.serviceBusRuleId",
                type: {
                    name: "String"
                }
            }, eventHubAuthorizationRuleId: {
                serializedName: "properties.eventHubAuthorizationRuleId",
                type: {
                    name: "String"
                }
            }, eventHubName: {
                serializedName: "properties.eventHubName",
                type: {
                    name: "String"
                }
            }, metrics: {
                serializedName: "properties.metrics",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricSettings"
                        }
                    }
                }
            }, logs: {
                serializedName: "properties.logs",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogSettings"
                        }
                    }
                }
            }, workspaceId: {
                serializedName: "properties.workspaceId",
                type: {
                    name: "String"
                }
            }, logAnalyticsDestinationType: {
                serializedName: "properties.logAnalyticsDestinationType",
                type: {
                    name: "String"
                }
            } })
    }
};
const DiagnosticSettingsCategoryResource = {
    type: {
        name: "Composite",
        className: "DiagnosticSettingsCategoryResource",
        modelProperties: Object.assign(Object.assign({}, ProxyOnlyResource.type.modelProperties), { categoryType: {
                serializedName: "properties.categoryType",
                type: {
                    name: "Enum",
                    allowedValues: ["Metrics", "Logs"]
                }
            } })
    }
};
const ActionGroupResource = {
    type: {
        name: "Composite",
        className: "ActionGroupResource",
        modelProperties: Object.assign(Object.assign({}, AzureResource.type.modelProperties), { groupShortName: {
                constraints: {
                    MaxLength: 12
                },
                serializedName: "properties.groupShortName",
                type: {
                    name: "String"
                }
            }, enabled: {
                defaultValue: true,
                serializedName: "properties.enabled",
                type: {
                    name: "Boolean"
                }
            }, emailReceivers: {
                serializedName: "properties.emailReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "EmailReceiver"
                        }
                    }
                }
            }, smsReceivers: {
                serializedName: "properties.smsReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "SmsReceiver"
                        }
                    }
                }
            }, webhookReceivers: {
                serializedName: "properties.webhookReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "WebhookReceiver"
                        }
                    }
                }
            }, itsmReceivers: {
                serializedName: "properties.itsmReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ItsmReceiver"
                        }
                    }
                }
            }, azureAppPushReceivers: {
                serializedName: "properties.azureAppPushReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AzureAppPushReceiver"
                        }
                    }
                }
            }, automationRunbookReceivers: {
                serializedName: "properties.automationRunbookReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AutomationRunbookReceiver"
                        }
                    }
                }
            }, voiceReceivers: {
                serializedName: "properties.voiceReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "VoiceReceiver"
                        }
                    }
                }
            }, logicAppReceivers: {
                serializedName: "properties.logicAppReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "LogicAppReceiver"
                        }
                    }
                }
            }, azureFunctionReceivers: {
                serializedName: "properties.azureFunctionReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "AzureFunctionReceiver"
                        }
                    }
                }
            }, armRoleReceivers: {
                serializedName: "properties.armRoleReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "ArmRoleReceiver"
                        }
                    }
                }
            }, eventHubReceivers: {
                serializedName: "properties.eventHubReceivers",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "EventHubReceiver"
                        }
                    }
                }
            } })
    }
};
const MetricAlertSingleResourceMultipleMetricCriteria = {
    serializedName: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
    type: {
        name: "Composite",
        className: "MetricAlertSingleResourceMultipleMetricCriteria",
        uberParent: "MetricAlertCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, MetricAlertCriteria.type.modelProperties), { allOf: {
                serializedName: "allOf",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MetricCriteria"
                        }
                    }
                }
            } })
    }
};
const WebtestLocationAvailabilityCriteria = {
    serializedName: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria",
    type: {
        name: "Composite",
        className: "WebtestLocationAvailabilityCriteria",
        uberParent: "MetricAlertCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, MetricAlertCriteria.type.modelProperties), { webTestId: {
                serializedName: "webTestId",
                required: true,
                type: {
                    name: "String"
                }
            }, componentId: {
                serializedName: "componentId",
                required: true,
                type: {
                    name: "String"
                }
            }, failedLocationCount: {
                serializedName: "failedLocationCount",
                required: true,
                type: {
                    name: "Number"
                }
            } })
    }
};
const MetricAlertMultipleResourceMultipleMetricCriteria = {
    serializedName: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
    type: {
        name: "Composite",
        className: "MetricAlertMultipleResourceMultipleMetricCriteria",
        uberParent: "MetricAlertCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, MetricAlertCriteria.type.modelProperties), { allOf: {
                serializedName: "allOf",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "MultiMetricCriteria"
                        }
                    }
                }
            } })
    }
};
const AlertingAction = {
    serializedName: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
    type: {
        name: "Composite",
        className: "AlertingAction",
        uberParent: "Action",
        polymorphicDiscriminator: Action.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, Action.type.modelProperties), { severity: {
                serializedName: "severity",
                required: true,
                type: {
                    name: "String"
                }
            }, aznsAction: {
                serializedName: "aznsAction",
                type: {
                    name: "Composite",
                    className: "AzNsActionGroup"
                }
            }, throttlingInMin: {
                serializedName: "throttlingInMin",
                type: {
                    name: "Number"
                }
            }, trigger: {
                serializedName: "trigger",
                type: {
                    name: "Composite",
                    className: "TriggerCondition"
                }
            } })
    }
};
const LogToMetricAction = {
    serializedName: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction",
    type: {
        name: "Composite",
        className: "LogToMetricAction",
        uberParent: "Action",
        polymorphicDiscriminator: Action.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, Action.type.modelProperties), { criteria: {
                serializedName: "criteria",
                required: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "Criteria"
                        }
                    }
                }
            } })
    }
};
const LogSearchRuleResource = {
    type: {
        name: "Composite",
        className: "LogSearchRuleResource",
        modelProperties: Object.assign(Object.assign({}, ResourceAutoGenerated.type.modelProperties), { createdWithApiVersion: {
                serializedName: "properties.createdWithApiVersion",
                readOnly: true,
                type: {
                    name: "String"
                }
            }, isLegacyLogAnalyticsRule: {
                serializedName: "properties.isLegacyLogAnalyticsRule",
                readOnly: true,
                type: {
                    name: "Boolean"
                }
            }, description: {
                serializedName: "properties.description",
                type: {
                    name: "String"
                }
            }, displayName: {
                serializedName: "properties.displayName",
                type: {
                    name: "String"
                }
            }, autoMitigate: {
                defaultValue: false,
                serializedName: "properties.autoMitigate",
                type: {
                    name: "Boolean"
                }
            }, enabled: {
                serializedName: "properties.enabled",
                type: {
                    name: "String"
                }
            }, lastUpdatedTime: {
                serializedName: "properties.lastUpdatedTime",
                readOnly: true,
                type: {
                    name: "DateTime"
                }
            }, provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }, source: {
                serializedName: "properties.source",
                type: {
                    name: "Composite",
                    className: "Source"
                }
            }, schedule: {
                serializedName: "properties.schedule",
                type: {
                    name: "Composite",
                    className: "Schedule"
                }
            }, action: {
                serializedName: "properties.action",
                type: {
                    name: "Composite",
                    className: "Action"
                }
            } })
    }
};
const VMInsightsOnboardingStatus = {
    type: {
        name: "Composite",
        className: "VMInsightsOnboardingStatus",
        modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { resourceId: {
                serializedName: "properties.resourceId",
                type: {
                    name: "String"
                }
            }, onboardingStatus: {
                serializedName: "properties.onboardingStatus",
                type: {
                    name: "String"
                }
            }, dataStatus: {
                serializedName: "properties.dataStatus",
                type: {
                    name: "String"
                }
            }, data: {
                serializedName: "properties.data",
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "DataContainer"
                        }
                    }
                }
            } })
    }
};
const PrivateEndpointConnection = {
    type: {
        name: "Composite",
        className: "PrivateEndpointConnection",
        modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { privateEndpoint: {
                serializedName: "properties.privateEndpoint",
                type: {
                    name: "Composite",
                    className: "PrivateEndpointProperty"
                }
            }, privateLinkServiceConnectionState: {
                serializedName: "properties.privateLinkServiceConnectionState",
                type: {
                    name: "Composite",
                    className: "PrivateLinkServiceConnectionStateProperty"
                }
            }, provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            } })
    }
};
const PrivateLinkResource = {
    type: {
        name: "Composite",
        className: "PrivateLinkResource",
        modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { groupId: {
                serializedName: "properties.groupId",
                readOnly: true,
                type: {
                    name: "String"
                }
            }, requiredMembers: {
                serializedName: "properties.requiredMembers",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "String"
                        }
                    }
                }
            } })
    }
};
const ScopedResource = {
    type: {
        name: "Composite",
        className: "ScopedResource",
        modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { linkedResourceId: {
                serializedName: "properties.linkedResourceId",
                type: {
                    name: "String"
                }
            }, provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            } })
    }
};
const AzureMonitorPrivateLinkScope = {
    type: {
        name: "Composite",
        className: "AzureMonitorPrivateLinkScope",
        modelProperties: Object.assign(Object.assign({}, PrivateLinkScopesResource.type.modelProperties), { provisioningState: {
                serializedName: "properties.provisioningState",
                readOnly: true,
                type: {
                    name: "String"
                }
            }, privateEndpointConnections: {
                serializedName: "properties.privateEndpointConnections",
                readOnly: true,
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "PrivateEndpointConnection"
                        }
                    }
                }
            } })
    }
};
const DataCollectionEndpointResourceProperties = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointResourceProperties",
        modelProperties: Object.assign({}, DataCollectionEndpoint.type.modelProperties)
    }
};
const DataCollectionEndpointConfigurationAccess = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointConfigurationAccess",
        modelProperties: Object.assign({}, ConfigurationAccessEndpointSpec.type.modelProperties)
    }
};
const DataCollectionEndpointLogsIngestion = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointLogsIngestion",
        modelProperties: Object.assign({}, LogsIngestionEndpointSpec.type.modelProperties)
    }
};
const DataCollectionEndpointNetworkAcls = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointNetworkAcls",
        modelProperties: Object.assign({}, NetworkRuleSet.type.modelProperties)
    }
};
const DataCollectionEndpointResourceSystemData = {
    type: {
        name: "Composite",
        className: "DataCollectionEndpointResourceSystemData",
        modelProperties: Object.assign({}, SystemData.type.modelProperties)
    }
};
const DataCollectionRuleAssociationProxyOnlyResourceSystemData = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleAssociationProxyOnlyResourceSystemData",
        modelProperties: Object.assign({}, SystemData.type.modelProperties)
    }
};
const DataCollectionRuleResourceSystemData = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleResourceSystemData",
        modelProperties: Object.assign({}, SystemData.type.modelProperties)
    }
};
const DataCollectionRuleAssociationProxyOnlyResourceProperties = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleAssociationProxyOnlyResourceProperties",
        modelProperties: Object.assign({}, DataCollectionRuleAssociation.type.modelProperties)
    }
};
const DataCollectionRuleResourceProperties = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleResourceProperties",
        modelProperties: Object.assign({}, DataCollectionRule.type.modelProperties)
    }
};
const DataCollectionRuleDataSources = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleDataSources",
        modelProperties: Object.assign({}, DataSourcesSpec.type.modelProperties)
    }
};
const DataCollectionRuleDestinations = {
    type: {
        name: "Composite",
        className: "DataCollectionRuleDestinations",
        modelProperties: Object.assign({}, DestinationsSpec.type.modelProperties)
    }
};
const DestinationsSpecAzureMonitorMetrics = {
    type: {
        name: "Composite",
        className: "DestinationsSpecAzureMonitorMetrics",
        modelProperties: Object.assign({}, AzureMonitorMetricsDestination.type.modelProperties)
    }
};
const MetricCriteria = {
    serializedName: "StaticThresholdCriterion",
    type: {
        name: "Composite",
        className: "MetricCriteria",
        uberParent: "MultiMetricCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, MultiMetricCriteria.type.modelProperties), { operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "String"
                }
            }, threshold: {
                serializedName: "threshold",
                required: true,
                type: {
                    name: "Number"
                }
            } })
    }
};
const DynamicMetricCriteria = {
    serializedName: "DynamicThresholdCriterion",
    type: {
        name: "Composite",
        className: "DynamicMetricCriteria",
        uberParent: "MultiMetricCriteria",
        additionalProperties: { type: { name: "Object" } },
        polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator,
        modelProperties: Object.assign(Object.assign({}, MultiMetricCriteria.type.modelProperties), { operator: {
                serializedName: "operator",
                required: true,
                type: {
                    name: "String"
                }
            }, alertSensitivity: {
                serializedName: "alertSensitivity",
                required: true,
                type: {
                    name: "String"
                }
            }, failingPeriods: {
                serializedName: "failingPeriods",
                type: {
                    name: "Composite",
                    className: "DynamicThresholdFailingPeriods"
                }
            }, ignoreDataBefore: {
                serializedName: "ignoreDataBefore",
                type: {
                    name: "DateTime"
                }
            } })
    }
};
let discriminators = {
    RuleCondition: RuleCondition,
    RuleDataSource: RuleDataSource,
    RuleAction: RuleAction,
    MetricAlertCriteria: MetricAlertCriteria,
    Action: Action,
    MultiMetricCriteria: MultiMetricCriteria,
    "RuleCondition.Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition": ThresholdRuleCondition,
    "RuleCondition.Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition": LocationThresholdRuleCondition,
    "RuleCondition.Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition": ManagementEventRuleCondition,
    "RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource": RuleMetricDataSource,
    "RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource": RuleManagementEventDataSource,
    "RuleAction.Microsoft.Azure.Management.Insights.Models.RuleEmailAction": RuleEmailAction,
    "RuleAction.Microsoft.Azure.Management.Insights.Models.RuleWebhookAction": RuleWebhookAction,
    "MetricAlertCriteria.Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria": MetricAlertSingleResourceMultipleMetricCriteria,
    "MetricAlertCriteria.Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria": WebtestLocationAvailabilityCriteria,
    "MetricAlertCriteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria": MetricAlertMultipleResourceMultipleMetricCriteria,
    "Action.Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction": AlertingAction,
    "Action.Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction": LogToMetricAction,
    "MultiMetricCriteria.StaticThresholdCriterion": MetricCriteria,
    "MultiMetricCriteria.DynamicThresholdCriterion": DynamicMetricCriteria
};

var Mappers = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AutoscaleSettingResourceCollection: AutoscaleSettingResourceCollection,
    AutoscaleProfile: AutoscaleProfile,
    ScaleCapacity: ScaleCapacity,
    ScaleRule: ScaleRule,
    MetricTrigger: MetricTrigger,
    ScaleRuleMetricDimension: ScaleRuleMetricDimension,
    ScaleAction: ScaleAction,
    TimeWindow: TimeWindow,
    Recurrence: Recurrence,
    RecurrentSchedule: RecurrentSchedule,
    AutoscaleNotification: AutoscaleNotification,
    EmailNotification: EmailNotification,
    WebhookNotification: WebhookNotification,
    Resource: Resource,
    ErrorResponse: ErrorResponse,
    AutoscaleSettingResourcePatch: AutoscaleSettingResourcePatch,
    OperationListResult: OperationListResult,
    Operation: Operation,
    OperationDisplay: OperationDisplay,
    Incident: Incident,
    IncidentListResult: IncidentListResult,
    RuleCondition: RuleCondition,
    RuleDataSource: RuleDataSource,
    RuleAction: RuleAction,
    AlertRuleResourcePatch: AlertRuleResourcePatch,
    AlertRuleResourceCollection: AlertRuleResourceCollection,
    RetentionPolicy: RetentionPolicy,
    LogProfileResourcePatch: LogProfileResourcePatch,
    LogProfileCollection: LogProfileCollection,
    MetricSettings: MetricSettings,
    LogSettings: LogSettings,
    ProxyOnlyResource: ProxyOnlyResource,
    DiagnosticSettingsResourceCollection: DiagnosticSettingsResourceCollection,
    DiagnosticSettingsCategoryResourceCollection: DiagnosticSettingsCategoryResourceCollection,
    EmailReceiver: EmailReceiver,
    SmsReceiver: SmsReceiver,
    WebhookReceiver: WebhookReceiver,
    ItsmReceiver: ItsmReceiver,
    AzureAppPushReceiver: AzureAppPushReceiver,
    AutomationRunbookReceiver: AutomationRunbookReceiver,
    VoiceReceiver: VoiceReceiver,
    LogicAppReceiver: LogicAppReceiver,
    AzureFunctionReceiver: AzureFunctionReceiver,
    ArmRoleReceiver: ArmRoleReceiver,
    EventHubReceiver: EventHubReceiver,
    AzureResource: AzureResource,
    ActionGroupPatchBody: ActionGroupPatchBody,
    NotificationRequestBody: NotificationRequestBody,
    TestNotificationResponse: TestNotificationResponse,
    TestNotificationDetailsResponse: TestNotificationDetailsResponse,
    Context: Context,
    ActionDetail: ActionDetail,
    ActionGroupList: ActionGroupList,
    EnableRequest: EnableRequest,
    EventDataCollection: EventDataCollection,
    EventData: EventData,
    SenderAuthorization: SenderAuthorization,
    LocalizableString: LocalizableString,
    HttpRequestInfo: HttpRequestInfo,
    EventCategoryCollection: EventCategoryCollection,
    MetricDefinitionCollection: MetricDefinitionCollection,
    MetricDefinition: MetricDefinition,
    MetricAvailability: MetricAvailability,
    Response: Response,
    Metric: Metric,
    TimeSeriesElement: TimeSeriesElement,
    MetadataValue: MetadataValue,
    MetricValue: MetricValue,
    MetricBaselinesResponse: MetricBaselinesResponse,
    SingleMetricBaseline: SingleMetricBaseline,
    TimeSeriesBaseline: TimeSeriesBaseline,
    MetricSingleDimension: MetricSingleDimension,
    SingleBaseline: SingleBaseline,
    BaselineMetadata: BaselineMetadata,
    MetricAlertResourceCollection: MetricAlertResourceCollection,
    MetricAlertCriteria: MetricAlertCriteria,
    MetricAlertAction: MetricAlertAction,
    MetricAlertResourcePatch: MetricAlertResourcePatch,
    MetricAlertStatusCollection: MetricAlertStatusCollection,
    MetricAlertStatus: MetricAlertStatus,
    MetricAlertStatusProperties: MetricAlertStatusProperties,
    Source: Source,
    Schedule: Schedule,
    Action: Action,
    ResourceAutoGenerated: ResourceAutoGenerated,
    ErrorContract: ErrorContract,
    LogSearchRuleResourcePatch: LogSearchRuleResourcePatch,
    LogSearchRuleResourceCollection: LogSearchRuleResourceCollection,
    MetricNamespaceCollection: MetricNamespaceCollection,
    MetricNamespace: MetricNamespace,
    MetricNamespaceName: MetricNamespaceName,
    DataContainer: DataContainer,
    WorkspaceInfo: WorkspaceInfo,
    ProxyResource: ProxyResource,
    ResponseWithError: ResponseWithError,
    ErrorModel: ErrorModel,
    AzureMonitorPrivateLinkScopeListResult: AzureMonitorPrivateLinkScopeListResult,
    PrivateEndpointProperty: PrivateEndpointProperty,
    PrivateLinkServiceConnectionStateProperty: PrivateLinkServiceConnectionStateProperty,
    PrivateLinkScopesResource: PrivateLinkScopesResource,
    TagsResource: TagsResource,
    OperationStatus: OperationStatus,
    ErrorAdditionalInfo: ErrorAdditionalInfo,
    PrivateLinkResourceListResult: PrivateLinkResourceListResult,
    PrivateEndpointConnectionListResult: PrivateEndpointConnectionListResult,
    ScopedResourceListResult: ScopedResourceListResult,
    ActivityLogAlertAllOfCondition: ActivityLogAlertAllOfCondition,
    ActivityLogAlertLeafCondition: ActivityLogAlertLeafCondition,
    ActivityLogAlertActionList: ActivityLogAlertActionList,
    ActivityLogAlertActionGroup: ActivityLogAlertActionGroup,
    ActivityLogAlertPatchBody: ActivityLogAlertPatchBody,
    ActivityLogAlertList: ActivityLogAlertList,
    DataCollectionEndpointResourceListResult: DataCollectionEndpointResourceListResult,
    DataCollectionEndpointResource: DataCollectionEndpointResource,
    DataCollectionEndpoint: DataCollectionEndpoint,
    ConfigurationAccessEndpointSpec: ConfigurationAccessEndpointSpec,
    LogsIngestionEndpointSpec: LogsIngestionEndpointSpec,
    NetworkRuleSet: NetworkRuleSet,
    SystemData: SystemData,
    ErrorResponseCommonV2: ErrorResponseCommonV2,
    ErrorDetail: ErrorDetail,
    ResourceForUpdate: ResourceForUpdate,
    DataCollectionRuleAssociationProxyOnlyResourceListResult: DataCollectionRuleAssociationProxyOnlyResourceListResult,
    DataCollectionRuleAssociationProxyOnlyResource: DataCollectionRuleAssociationProxyOnlyResource,
    DataCollectionRuleAssociation: DataCollectionRuleAssociation,
    DataCollectionRuleResourceListResult: DataCollectionRuleResourceListResult,
    DataCollectionRuleResource: DataCollectionRuleResource,
    DataCollectionRule: DataCollectionRule,
    DataSourcesSpec: DataSourcesSpec,
    PerfCounterDataSource: PerfCounterDataSource,
    WindowsEventLogDataSource: WindowsEventLogDataSource,
    SyslogDataSource: SyslogDataSource,
    ExtensionDataSource: ExtensionDataSource,
    DestinationsSpec: DestinationsSpec,
    LogAnalyticsDestination: LogAnalyticsDestination,
    AzureMonitorMetricsDestination: AzureMonitorMetricsDestination,
    DataFlow: DataFlow,
    RuleManagementEventClaimsDataSource: RuleManagementEventClaimsDataSource,
    ManagementEventAggregationCondition: ManagementEventAggregationCondition,
    MultiMetricCriteria: MultiMetricCriteria,
    MetricDimension: MetricDimension,
    DynamicThresholdFailingPeriods: DynamicThresholdFailingPeriods,
    TriggerCondition: TriggerCondition,
    LogMetricTrigger: LogMetricTrigger,
    AzNsActionGroup: AzNsActionGroup,
    Dimension: Dimension,
    Criteria: Criteria,
    AutoscaleSettingResource: AutoscaleSettingResource,
    AlertRuleResource: AlertRuleResource,
    LogProfileResource: LogProfileResource,
    MetricAlertResource: MetricAlertResource,
    ActivityLogAlertResource: ActivityLogAlertResource,
    ErrorResponseCommon: ErrorResponseCommon,
    ThresholdRuleCondition: ThresholdRuleCondition,
    LocationThresholdRuleCondition: LocationThresholdRuleCondition,
    ManagementEventRuleCondition: ManagementEventRuleCondition,
    RuleMetricDataSource: RuleMetricDataSource,
    RuleManagementEventDataSource: RuleManagementEventDataSource,
    RuleEmailAction: RuleEmailAction,
    RuleWebhookAction: RuleWebhookAction,
    DiagnosticSettingsResource: DiagnosticSettingsResource,
    DiagnosticSettingsCategoryResource: DiagnosticSettingsCategoryResource,
    ActionGroupResource: ActionGroupResource,
    MetricAlertSingleResourceMultipleMetricCriteria: MetricAlertSingleResourceMultipleMetricCriteria,
    WebtestLocationAvailabilityCriteria: WebtestLocationAvailabilityCriteria,
    MetricAlertMultipleResourceMultipleMetricCriteria: MetricAlertMultipleResourceMultipleMetricCriteria,
    AlertingAction: AlertingAction,
    LogToMetricAction: LogToMetricAction,
    LogSearchRuleResource: LogSearchRuleResource,
    VMInsightsOnboardingStatus: VMInsightsOnboardingStatus,
    PrivateEndpointConnection: PrivateEndpointConnection,
    PrivateLinkResource: PrivateLinkResource,
    ScopedResource: ScopedResource,
    AzureMonitorPrivateLinkScope: AzureMonitorPrivateLinkScope,
    DataCollectionEndpointResourceProperties: DataCollectionEndpointResourceProperties,
    DataCollectionEndpointConfigurationAccess: DataCollectionEndpointConfigurationAccess,
    DataCollectionEndpointLogsIngestion: DataCollectionEndpointLogsIngestion,
    DataCollectionEndpointNetworkAcls: DataCollectionEndpointNetworkAcls,
    DataCollectionEndpointResourceSystemData: DataCollectionEndpointResourceSystemData,
    DataCollectionRuleAssociationProxyOnlyResourceSystemData: DataCollectionRuleAssociationProxyOnlyResourceSystemData,
    DataCollectionRuleResourceSystemData: DataCollectionRuleResourceSystemData,
    DataCollectionRuleAssociationProxyOnlyResourceProperties: DataCollectionRuleAssociationProxyOnlyResourceProperties,
    DataCollectionRuleResourceProperties: DataCollectionRuleResourceProperties,
    DataCollectionRuleDataSources: DataCollectionRuleDataSources,
    DataCollectionRuleDestinations: DataCollectionRuleDestinations,
    DestinationsSpecAzureMonitorMetrics: DestinationsSpecAzureMonitorMetrics,
    MetricCriteria: MetricCriteria,
    DynamicMetricCriteria: DynamicMetricCriteria,
    discriminators: discriminators
});

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
const accept = {
    parameterPath: "accept",
    mapper: {
        defaultValue: "application/json",
        isConstant: true,
        serializedName: "Accept",
        type: {
            name: "String"
        }
    }
};
const $host = {
    parameterPath: "$host",
    mapper: {
        serializedName: "$host",
        required: true,
        type: {
            name: "String"
        }
    },
    skipEncoding: true
};
const resourceGroupName = {
    parameterPath: "resourceGroupName",
    mapper: {
        constraints: {
            MaxLength: 90,
            MinLength: 1
        },
        serializedName: "resourceGroupName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const apiVersion = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2015-04-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const subscriptionId = {
    parameterPath: "subscriptionId",
    mapper: {
        constraints: {
            MinLength: 1
        },
        serializedName: "subscriptionId",
        required: true,
        type: {
            name: "String"
        }
    }
};
const contentType = {
    parameterPath: ["options", "contentType"],
    mapper: {
        defaultValue: "application/json",
        isConstant: true,
        serializedName: "Content-Type",
        type: {
            name: "String"
        }
    }
};
const parameters = {
    parameterPath: "parameters",
    mapper: AutoscaleSettingResource
};
const autoscaleSettingName = {
    parameterPath: "autoscaleSettingName",
    mapper: {
        serializedName: "autoscaleSettingName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const autoscaleSettingResource = {
    parameterPath: "autoscaleSettingResource",
    mapper: AutoscaleSettingResourcePatch
};
const nextLink = {
    parameterPath: "nextLink",
    mapper: {
        serializedName: "nextLink",
        required: true,
        type: {
            name: "String"
        }
    },
    skipEncoding: true
};
const ruleName = {
    parameterPath: "ruleName",
    mapper: {
        serializedName: "ruleName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const incidentName = {
    parameterPath: "incidentName",
    mapper: {
        serializedName: "incidentName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const apiVersion1 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2016-03-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const parameters1 = {
    parameterPath: "parameters",
    mapper: AlertRuleResource
};
const alertRulesResource = {
    parameterPath: "alertRulesResource",
    mapper: AlertRuleResourcePatch
};
const logProfileName = {
    parameterPath: "logProfileName",
    mapper: {
        serializedName: "logProfileName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const parameters2 = {
    parameterPath: "parameters",
    mapper: LogProfileResource
};
const logProfilesResource = {
    parameterPath: "logProfilesResource",
    mapper: LogProfileResourcePatch
};
const resourceUri = {
    parameterPath: "resourceUri",
    mapper: {
        serializedName: "resourceUri",
        required: true,
        type: {
            name: "String"
        }
    },
    skipEncoding: true
};
const apiVersion2 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2017-05-01-preview",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const name = {
    parameterPath: "name",
    mapper: {
        serializedName: "name",
        required: true,
        type: {
            name: "String"
        }
    }
};
const parameters3 = {
    parameterPath: "parameters",
    mapper: DiagnosticSettingsResource
};
const actionGroup = {
    parameterPath: "actionGroup",
    mapper: ActionGroupResource
};
const actionGroupName = {
    parameterPath: "actionGroupName",
    mapper: {
        serializedName: "actionGroupName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const apiVersion3 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2021-09-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const actionGroupPatch = {
    parameterPath: "actionGroupPatch",
    mapper: ActionGroupPatchBody
};
const notificationRequest = {
    parameterPath: "notificationRequest",
    mapper: NotificationRequestBody
};
const notificationId = {
    parameterPath: "notificationId",
    mapper: {
        serializedName: "notificationId",
        required: true,
        type: {
            name: "String"
        }
    }
};
const enableRequest = {
    parameterPath: "enableRequest",
    mapper: EnableRequest
};
const filter = {
    parameterPath: "filter",
    mapper: {
        serializedName: "$filter",
        required: true,
        type: {
            name: "String"
        }
    }
};
const select = {
    parameterPath: ["options", "select"],
    mapper: {
        serializedName: "$select",
        type: {
            name: "String"
        }
    }
};
const filter1 = {
    parameterPath: ["options", "filter"],
    mapper: {
        serializedName: "$filter",
        type: {
            name: "String"
        }
    }
};
const apiVersion4 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2018-01-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const metricnamespace = {
    parameterPath: ["options", "metricnamespace"],
    mapper: {
        serializedName: "metricnamespace",
        type: {
            name: "String"
        }
    }
};
const timespan = {
    parameterPath: ["options", "timespan"],
    mapper: {
        serializedName: "timespan",
        type: {
            name: "String"
        }
    }
};
const interval = {
    parameterPath: ["options", "interval"],
    mapper: {
        serializedName: "interval",
        type: {
            name: "TimeSpan"
        }
    }
};
const metricnames = {
    parameterPath: ["options", "metricnames"],
    mapper: {
        serializedName: "metricnames",
        type: {
            name: "String"
        }
    }
};
const aggregation = {
    parameterPath: ["options", "aggregation"],
    mapper: {
        serializedName: "aggregation",
        type: {
            name: "String"
        }
    }
};
const top = {
    parameterPath: ["options", "top"],
    mapper: {
        serializedName: "top",
        type: {
            name: "Number"
        }
    }
};
const orderby = {
    parameterPath: ["options", "orderby"],
    mapper: {
        serializedName: "orderby",
        type: {
            name: "String"
        }
    }
};
const resultType = {
    parameterPath: ["options", "resultType"],
    mapper: {
        serializedName: "resultType",
        type: {
            name: "Enum",
            allowedValues: ["Data", "Metadata"]
        }
    }
};
const sensitivities = {
    parameterPath: ["options", "sensitivities"],
    mapper: {
        serializedName: "sensitivities",
        type: {
            name: "String"
        }
    }
};
const apiVersion5 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2019-03-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const apiVersion6 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2018-03-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const parameters4 = {
    parameterPath: "parameters",
    mapper: MetricAlertResource
};
const parameters5 = {
    parameterPath: "parameters",
    mapper: MetricAlertResourcePatch
};
const statusName = {
    parameterPath: "statusName",
    mapper: {
        serializedName: "statusName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const parameters6 = {
    parameterPath: "parameters",
    mapper: LogSearchRuleResource
};
const apiVersion7 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2018-04-16",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const parameters7 = {
    parameterPath: "parameters",
    mapper: LogSearchRuleResourcePatch
};
const apiVersion8 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2017-12-01-preview",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const startTime = {
    parameterPath: ["options", "startTime"],
    mapper: {
        serializedName: "startTime",
        type: {
            name: "String"
        }
    }
};
const apiVersion9 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2018-11-27-preview",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const apiVersion10 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2019-10-17-preview",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const scopeName = {
    parameterPath: "scopeName",
    mapper: {
        serializedName: "scopeName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const azureMonitorPrivateLinkScopePayload = {
    parameterPath: "azureMonitorPrivateLinkScopePayload",
    mapper: AzureMonitorPrivateLinkScope
};
const privateLinkScopeTags = {
    parameterPath: "privateLinkScopeTags",
    mapper: TagsResource
};
const asyncOperationId = {
    parameterPath: "asyncOperationId",
    mapper: {
        serializedName: "asyncOperationId",
        required: true,
        type: {
            name: "String"
        }
    }
};
const groupName = {
    parameterPath: "groupName",
    mapper: {
        serializedName: "groupName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const privateEndpointConnectionName = {
    parameterPath: "privateEndpointConnectionName",
    mapper: {
        serializedName: "privateEndpointConnectionName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const parameters8 = {
    parameterPath: "parameters",
    mapper: PrivateEndpointConnection
};
const parameters9 = {
    parameterPath: "parameters",
    mapper: ScopedResource
};
const activityLogAlert = {
    parameterPath: "activityLogAlert",
    mapper: ActivityLogAlertResource
};
const activityLogAlertName = {
    parameterPath: "activityLogAlertName",
    mapper: {
        serializedName: "activityLogAlertName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const apiVersion11 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2017-04-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const activityLogAlertPatch = {
    parameterPath: "activityLogAlertPatch",
    mapper: ActivityLogAlertPatchBody
};
const apiVersion12 = {
    parameterPath: "apiVersion",
    mapper: {
        defaultValue: "2021-04-01",
        isConstant: true,
        serializedName: "api-version",
        type: {
            name: "String"
        }
    }
};
const dataCollectionEndpointName = {
    parameterPath: "dataCollectionEndpointName",
    mapper: {
        serializedName: "dataCollectionEndpointName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const body = {
    parameterPath: ["options", "body"],
    mapper: DataCollectionEndpointResource
};
const body1 = {
    parameterPath: ["options", "body"],
    mapper: ResourceForUpdate
};
const resourceUri1 = {
    parameterPath: "resourceUri",
    mapper: {
        constraints: {
            MinLength: 1
        },
        serializedName: "resourceUri",
        required: true,
        type: {
            name: "String"
        }
    },
    skipEncoding: true
};
const dataCollectionRuleName = {
    parameterPath: "dataCollectionRuleName",
    mapper: {
        serializedName: "dataCollectionRuleName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const associationName = {
    parameterPath: "associationName",
    mapper: {
        serializedName: "associationName",
        required: true,
        type: {
            name: "String"
        }
    }
};
const body2 = {
    parameterPath: ["options", "body"],
    mapper: DataCollectionRuleAssociationProxyOnlyResource
};
const body3 = {
    parameterPath: ["options", "body"],
    mapper: DataCollectionRuleResource
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing AutoscaleSettings operations. */
class AutoscaleSettingsImpl {
    /**
     * Initialize a new instance of the class AutoscaleSettings class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists the autoscale settings for a resource group
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists the autoscale settings for a subscription
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Lists the autoscale settings for a resource group
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
    }
    /**
     * Creates or updates an autoscale setting.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param autoscaleSettingName The autoscale setting name.
     * @param parameters Parameters supplied to the operation.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, autoscaleSettingName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, autoscaleSettingName, parameters, options }, createOrUpdateOperationSpec);
    }
    /**
     * Deletes and autoscale setting
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param autoscaleSettingName The autoscale setting name.
     * @param options The options parameters.
     */
    delete(resourceGroupName, autoscaleSettingName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, autoscaleSettingName, options }, deleteOperationSpec);
    }
    /**
     * Gets an autoscale setting
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param autoscaleSettingName The autoscale setting name.
     * @param options The options parameters.
     */
    get(resourceGroupName, autoscaleSettingName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, autoscaleSettingName, options }, getOperationSpec);
    }
    /**
     * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param autoscaleSettingName The autoscale setting name.
     * @param autoscaleSettingResource Parameters supplied to the operation.
     * @param options The options parameters.
     */
    update(resourceGroupName, autoscaleSettingName, autoscaleSettingResource, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            autoscaleSettingName,
            autoscaleSettingResource,
            options
        }, updateOperationSpec);
    }
    /**
     * Lists the autoscale settings for a subscription
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
    }
    /**
     * ListByResourceGroupNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
     * @param options The options parameters.
     */
    _listByResourceGroupNext(resourceGroupName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
    }
    /**
     * ListBySubscriptionNext
     * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
     * @param options The options parameters.
     */
    _listBySubscriptionNext(nextLink, options) {
        return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByResourceGroupOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer
};
const createOrUpdateOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResource
        },
        201: {
            bodyMapper: AutoscaleSettingResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: parameters,
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        autoscaleSettingName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer
};
const deleteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        autoscaleSettingName
    ],
    headerParameters: [accept],
    serializer
};
const getOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        autoscaleSettingName
    ],
    headerParameters: [accept],
    serializer
};
const updateOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: autoscaleSettingResource,
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        autoscaleSettingName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer
};
const listBySubscriptionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer
};
const listByResourceGroupNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer
};
const listBySubscriptionNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AutoscaleSettingResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [
        $host,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing Operations operations. */
class OperationsImpl {
    /**
     * Initialize a new instance of the class Operations class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists all of the available operations from Microsoft.Insights provider.
     * @param options The options parameters.
     */
    list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec);
    }
}
// Operation Specifications
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
    path: "/providers/Microsoft.Insights/operations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: OperationListResult
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [$host],
    headerParameters: [accept],
    serializer: serializer$1
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing AlertRuleIncidents operations. */
class AlertRuleIncidentsImpl {
    /**
     * Initialize a new instance of the class AlertRuleIncidents class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets a list of incidents associated to an alert rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    listByAlertRule(resourceGroupName, ruleName, options) {
        const iter = this.listByAlertRulePagingAll(resourceGroupName, ruleName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByAlertRulePagingPage(resourceGroupName, ruleName, options);
            }
        };
    }
    listByAlertRulePagingPage(resourceGroupName, ruleName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByAlertRulePagingPage_1() {
            let result = yield tslib.__await(this._listByAlertRule(resourceGroupName, ruleName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByAlertRulePagingAll(resourceGroupName, ruleName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByAlertRulePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByAlertRulePagingPage(resourceGroupName, ruleName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets an incident associated to an alert rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param incidentName The name of the incident to retrieve.
     * @param options The options parameters.
     */
    get(resourceGroupName, ruleName, incidentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, incidentName, options }, getOperationSpec$1);
    }
    /**
     * Gets a list of incidents associated to an alert rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    _listByAlertRule(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, listByAlertRuleOperationSpec);
    }
}
// Operation Specifications
const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Incident
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName,
        incidentName
    ],
    headerParameters: [accept],
    serializer: serializer$2
};
const listByAlertRuleOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: IncidentListResult
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$2
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing AlertRules operations. */
class AlertRulesImpl {
    /**
     * Initialize a new instance of the class AlertRules class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * List the classic metric alert rules within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * List the classic metric alert rules within a subscription.
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Creates or updates a classic metric alert rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param parameters The parameters of the rule to create or update.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, ruleName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, parameters, options }, createOrUpdateOperationSpec$1);
    }
    /**
     * Deletes a classic metric alert rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    delete(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, deleteOperationSpec$1);
    }
    /**
     * Gets a classic metric alert rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    get(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, getOperationSpec$2);
    }
    /**
     * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate
     * method.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param alertRulesResource Parameters supplied to the operation.
     * @param options The options parameters.
     */
    update(resourceGroupName, ruleName, alertRulesResource, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, alertRulesResource, options }, updateOperationSpec$1);
    }
    /**
     * List the classic metric alert rules within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
    }
    /**
     * List the classic metric alert rules within a subscription.
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$1);
    }
}
// Operation Specifications
const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOrUpdateOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: AlertRuleResource
        },
        201: {
            bodyMapper: AlertRuleResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: parameters1,
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$3
};
const deleteOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$3
};
const getOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AlertRuleResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$3
};
const updateOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: AlertRuleResource
        },
        201: {
            bodyMapper: AlertRuleResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: alertRulesResource,
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$3
};
const listByResourceGroupOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AlertRuleResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$3
};
const listBySubscriptionOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AlertRuleResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$3
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing LogProfiles operations. */
class LogProfilesImpl {
    /**
     * Initialize a new instance of the class LogProfiles class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * List the log profiles.
     * @param options The options parameters.
     */
    list(options) {
        const iter = this.listPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(options);
            }
        };
    }
    listPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Deletes the log profile.
     * @param logProfileName The name of the log profile.
     * @param options The options parameters.
     */
    delete(logProfileName, options) {
        return this.client.sendOperationRequest({ logProfileName, options }, deleteOperationSpec$2);
    }
    /**
     * Gets the log profile.
     * @param logProfileName The name of the log profile.
     * @param options The options parameters.
     */
    get(logProfileName, options) {
        return this.client.sendOperationRequest({ logProfileName, options }, getOperationSpec$3);
    }
    /**
     * Create or update a log profile in Azure Monitoring REST API.
     * @param logProfileName The name of the log profile.
     * @param parameters Parameters supplied to the operation.
     * @param options The options parameters.
     */
    createOrUpdate(logProfileName, parameters, options) {
        return this.client.sendOperationRequest({ logProfileName, parameters, options }, createOrUpdateOperationSpec$2);
    }
    /**
     * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.
     * @param logProfileName The name of the log profile.
     * @param logProfilesResource Parameters supplied to the operation.
     * @param options The options parameters.
     */
    update(logProfileName, logProfilesResource, options) {
        return this.client.sendOperationRequest({ logProfileName, logProfilesResource, options }, updateOperationSpec$2);
    }
    /**
     * List the log profiles.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec$1);
    }
}
// Operation Specifications
const serializer$4 = coreClient.createSerializer(Mappers, /* isXml */ false);
const deleteOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}",
    httpMethod: "DELETE",
    responses: { 200: {} },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        subscriptionId,
        logProfileName
    ],
    serializer: serializer$4
};
const getOperationSpec$3 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: LogProfileResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        subscriptionId,
        logProfileName
    ],
    headerParameters: [accept],
    serializer: serializer$4
};
const createOrUpdateOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: LogProfileResource
        }
    },
    requestBody: parameters2,
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        subscriptionId,
        logProfileName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$4
};
const updateOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: LogProfileResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: logProfilesResource,
    queryParameters: [apiVersion1],
    urlParameters: [
        $host,
        subscriptionId,
        logProfileName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$4
};
const listOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: LogProfileCollection
        }
    },
    queryParameters: [apiVersion1],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$4
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing DiagnosticSettings operations. */
class DiagnosticSettingsImpl {
    /**
     * Initialize a new instance of the class DiagnosticSettings class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the active diagnostic settings for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param name The name of the diagnostic setting.
     * @param options The options parameters.
     */
    get(resourceUri, name, options) {
        return this.client.sendOperationRequest({ resourceUri, name, options }, getOperationSpec$4);
    }
    /**
     * Creates or updates diagnostic settings for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param name The name of the diagnostic setting.
     * @param parameters Parameters supplied to the operation.
     * @param options The options parameters.
     */
    createOrUpdate(resourceUri, name, parameters, options) {
        return this.client.sendOperationRequest({ resourceUri, name, parameters, options }, createOrUpdateOperationSpec$3);
    }
    /**
     * Deletes existing diagnostic settings for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param name The name of the diagnostic setting.
     * @param options The options parameters.
     */
    delete(resourceUri, name, options) {
        return this.client.sendOperationRequest({ resourceUri, name, options }, deleteOperationSpec$3);
    }
    /**
     * Gets the active diagnostic settings list for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$2);
    }
}
// Operation Specifications
const serializer$5 = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$4 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DiagnosticSettingsResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri, name],
    headerParameters: [accept],
    serializer: serializer$5
};
const createOrUpdateOperationSpec$3 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: DiagnosticSettingsResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: parameters3,
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri, name],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$5
};
const deleteOperationSpec$3 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri, name],
    headerParameters: [accept],
    serializer: serializer$5
};
const listOperationSpec$2 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DiagnosticSettingsResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$5
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing DiagnosticSettingsCategory operations. */
class DiagnosticSettingsCategoryImpl {
    /**
     * Initialize a new instance of the class DiagnosticSettingsCategory class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the diagnostic settings category for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param name The name of the diagnostic setting.
     * @param options The options parameters.
     */
    get(resourceUri, name, options) {
        return this.client.sendOperationRequest({ resourceUri, name, options }, getOperationSpec$5);
    }
    /**
     * Lists the diagnostic settings categories for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$3);
    }
}
// Operation Specifications
const serializer$6 = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$5 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DiagnosticSettingsCategoryResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri, name],
    headerParameters: [accept],
    serializer: serializer$6
};
const listOperationSpec$3 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DiagnosticSettingsCategoryResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion2],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$6
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
class LroImpl {
    constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
        this.sendOperationFn = sendOperationFn;
        this.args = args;
        this.spec = spec;
        this.requestPath = requestPath;
        this.requestMethod = requestMethod;
    }
    sendInitialRequest() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            return this.sendOperationFn(this.args, this.spec);
        });
    }
    sendPollRequest(path) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
            return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
        });
    }
}

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing ActionGroups operations. */
class ActionGroupsImpl {
    /**
     * Initialize a new instance of the class ActionGroups class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Get a list of all action groups in a subscription.
     * @param options The options parameters.
     */
    listBySubscriptionId(options) {
        const iter = this.listBySubscriptionIdPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionIdPagingPage(options);
            }
        };
    }
    listBySubscriptionIdPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscriptionId(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listBySubscriptionIdPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionIdPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Get a list of all action groups in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Create a new action group or update an existing one.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param actionGroupName The name of the action group.
     * @param actionGroup The action group to create or use for the update.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, actionGroupName, actionGroup, options) {
        return this.client.sendOperationRequest({ resourceGroupName, actionGroupName, actionGroup, options }, createOrUpdateOperationSpec$4);
    }
    /**
     * Get an action group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param actionGroupName The name of the action group.
     * @param options The options parameters.
     */
    get(resourceGroupName, actionGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, actionGroupName, options }, getOperationSpec$6);
    }
    /**
     * Delete an action group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param actionGroupName The name of the action group.
     * @param options The options parameters.
     */
    delete(resourceGroupName, actionGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, actionGroupName, options }, deleteOperationSpec$4);
    }
    /**
     * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param actionGroupName The name of the action group.
     * @param actionGroupPatch Parameters supplied to the operation.
     * @param options The options parameters.
     */
    update(resourceGroupName, actionGroupName, actionGroupPatch, options) {
        return this.client.sendOperationRequest({ resourceGroupName, actionGroupName, actionGroupPatch, options }, updateOperationSpec$3);
    }
    /**
     * Send test notifications to a set of provided receivers
     * @param notificationRequest The notification request body which includes the contact details
     * @param options The options parameters.
     */
    beginPostTestNotifications(notificationRequest, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, { notificationRequest, options }, postTestNotificationsOperationSpec);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
                lroResourceLocationConfig: "location"
            });
        });
    }
    /**
     * Send test notifications to a set of provided receivers
     * @param notificationRequest The notification request body which includes the contact details
     * @param options The options parameters.
     */
    beginPostTestNotificationsAndWait(notificationRequest, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginPostTestNotifications(notificationRequest, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Get the test notifications by the notification id
     * @param notificationId The notification id
     * @param options The options parameters.
     */
    getTestNotifications(notificationId, options) {
        return this.client.sendOperationRequest({ notificationId, options }, getTestNotificationsOperationSpec);
    }
    /**
     * Get a list of all action groups in a subscription.
     * @param options The options parameters.
     */
    _listBySubscriptionId(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionIdOperationSpec);
    }
    /**
     * Get a list of all action groups in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$2);
    }
    /**
     * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.
     * This operation is only supported for Email or SMS receivers.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param actionGroupName The name of the action group.
     * @param enableRequest The receiver to re-enable.
     * @param options The options parameters.
     */
    enableReceiver(resourceGroupName, actionGroupName, enableRequest, options) {
        return this.client.sendOperationRequest({ resourceGroupName, actionGroupName, enableRequest, options }, enableReceiverOperationSpec);
    }
}
// Operation Specifications
const serializer$7 = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOrUpdateOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: ActionGroupResource
        },
        201: {
            bodyMapper: ActionGroupResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: actionGroup,
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        actionGroupName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$7
};
const getOperationSpec$6 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActionGroupResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        actionGroupName
    ],
    headerParameters: [accept],
    serializer: serializer$7
};
const deleteOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        actionGroupName
    ],
    headerParameters: [accept],
    serializer: serializer$7
};
const updateOperationSpec$3 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: ActionGroupResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: actionGroupPatch,
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        actionGroupName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$7
};
const postTestNotificationsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: TestNotificationResponse
        },
        201: {
            bodyMapper: TestNotificationResponse
        },
        202: {
            bodyMapper: TestNotificationResponse
        },
        204: {
            bodyMapper: TestNotificationResponse
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: notificationRequest,
    queryParameters: [apiVersion3],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$7
};
const getTestNotificationsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: TestNotificationDetailsResponse
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        subscriptionId,
        notificationId
    ],
    headerParameters: [accept],
    serializer: serializer$7
};
const listBySubscriptionIdOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActionGroupList
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion3],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$7
};
const listByResourceGroupOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActionGroupList
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$7
};
const enableReceiverOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe",
    httpMethod: "POST",
    responses: {
        200: {},
        409: {
            isError: true
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: enableRequest,
    queryParameters: [apiVersion3],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        actionGroupName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$7
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing ActivityLogs operations. */
class ActivityLogsImpl {
    /**
     * Initialize a new instance of the class ActivityLogs class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Provides the list of records from the activity logs.
     * @param filter Reduces the set of data collected.<br>This argument is required and it also requires
     *               at least the start date/time.<br>The **$filter** argument is very restricted and allows only the
     *               following patterns.<br>- *List events for a resource group*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               resourceGroupName eq 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri
     *               eq 'resourceURI'.<br>- *List events for a subscription in a time range*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.<br>- *List
     *               events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and
     *               eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
     *               'resourceProviderName'.<br>- *List events for a correlation Id*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               correlationId eq 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
     * @param options The options parameters.
     */
    list(filter, options) {
        const iter = this.listPagingAll(filter, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(filter, options);
            }
        };
    }
    listPagingPage(filter, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(filter, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listNext(filter, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listPagingAll(filter, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(filter, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Provides the list of records from the activity logs.
     * @param filter Reduces the set of data collected.<br>This argument is required and it also requires
     *               at least the start date/time.<br>The **$filter** argument is very restricted and allows only the
     *               following patterns.<br>- *List events for a resource group*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               resourceGroupName eq 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri
     *               eq 'resourceURI'.<br>- *List events for a subscription in a time range*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.<br>- *List
     *               events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and
     *               eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
     *               'resourceProviderName'.<br>- *List events for a correlation Id*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               correlationId eq 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
     * @param options The options parameters.
     */
    _list(filter, options) {
        return this.client.sendOperationRequest({ filter, options }, listOperationSpec$4);
    }
    /**
     * ListNext
     * @param filter Reduces the set of data collected.<br>This argument is required and it also requires
     *               at least the start date/time.<br>The **$filter** argument is very restricted and allows only the
     *               following patterns.<br>- *List events for a resource group*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               resourceGroupName eq 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri
     *               eq 'resourceURI'.<br>- *List events for a subscription in a time range*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.<br>- *List
     *               events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and
     *               eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
     *               'resourceProviderName'.<br>- *List events for a correlation Id*: $filter=eventTimestamp ge
     *               '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and
     *               correlationId eq 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
     * @param nextLink The nextLink from the previous successful call to the List method.
     * @param options The options parameters.
     */
    _listNext(filter, nextLink, options) {
        return this.client.sendOperationRequest({ filter, nextLink, options }, listNextOperationSpec);
    }
}
// Operation Specifications
const serializer$8 = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: EventDataCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        apiVersion,
        filter,
        select
    ],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$8
};
const listNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: EventDataCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        apiVersion,
        filter,
        select
    ],
    urlParameters: [
        $host,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$8
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing EventCategories operations. */
class EventCategoriesImpl {
    /**
     * Initialize a new instance of the class EventCategories class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Get the list of available event categories supported in the Activity Logs Service.<br>The current
     * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.
     * @param options The options parameters.
     */
    list(options) {
        const iter = this.listPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(options);
            }
        };
    }
    listPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Get the list of available event categories supported in the Activity Logs Service.<br>The current
     * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec$5);
    }
}
// Operation Specifications
const serializer$9 = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$5 = {
    path: "/providers/Microsoft.Insights/eventcategories",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: EventCategoryCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion],
    urlParameters: [$host],
    headerParameters: [accept],
    serializer: serializer$9
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing TenantActivityLogs operations. */
class TenantActivityLogsImpl {
    /**
     * Initialize a new instance of the class TenantActivityLogs class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the
     * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).<br>One
     * thing to point out here is that this API does *not* retrieve the logs at the individual subscription
     * of the tenant but only surfaces the logs that were generated at the tenant level.
     * @param options The options parameters.
     */
    list(options) {
        const iter = this.listPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(options);
            }
        };
    }
    listPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listNext(continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the
     * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).<br>One
     * thing to point out here is that this API does *not* retrieve the logs at the individual subscription
     * of the tenant but only surfaces the logs that were generated at the tenant level.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec$6);
    }
    /**
     * ListNext
     * @param nextLink The nextLink from the previous successful call to the List method.
     * @param options The options parameters.
     */
    _listNext(nextLink, options) {
        return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
    }
}
// Operation Specifications
const serializer$a = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$6 = {
    path: "/providers/Microsoft.Insights/eventtypes/management/values",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: EventDataCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        apiVersion,
        select,
        filter1
    ],
    urlParameters: [$host],
    headerParameters: [accept],
    serializer: serializer$a
};
const listNextOperationSpec$1 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: EventDataCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        apiVersion,
        select,
        filter1
    ],
    urlParameters: [$host, nextLink],
    headerParameters: [accept],
    serializer: serializer$a
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing MetricDefinitions operations. */
class MetricDefinitionsImpl {
    /**
     * Initialize a new instance of the class MetricDefinitions class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists the metric definitions for the resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        const iter = this.listPagingAll(resourceUri, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(resourceUri, options);
            }
        };
    }
    listPagingPage(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(resourceUri, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listPagingAll(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(resourceUri, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists the metric definitions for the resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    _list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$7);
    }
}
// Operation Specifications
const serializer$b = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$7 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/metricDefinitions",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricDefinitionCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion4, metricnamespace],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$b
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing Metrics operations. */
class MetricsImpl {
    /**
     * Initialize a new instance of the class Metrics class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * **Lists the metric values for a resource**.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$8);
    }
}
// Operation Specifications
const serializer$c = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$8 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/metrics",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Response
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        filter1,
        apiVersion4,
        metricnamespace,
        timespan,
        interval,
        metricnames,
        aggregation,
        top,
        orderby,
        resultType
    ],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$c
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing Baselines operations. */
class BaselinesImpl {
    /**
     * Initialize a new instance of the class Baselines class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * **Lists the metric baseline values for a resource**.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        const iter = this.listPagingAll(resourceUri, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(resourceUri, options);
            }
        };
    }
    listPagingPage(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(resourceUri, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listPagingAll(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(resourceUri, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * **Lists the metric baseline values for a resource**.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    _list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$9);
    }
}
// Operation Specifications
const serializer$d = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$9 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/metricBaselines",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricBaselinesResponse
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [
        filter1,
        metricnamespace,
        timespan,
        interval,
        metricnames,
        aggregation,
        resultType,
        sensitivities,
        apiVersion5
    ],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$d
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing MetricAlerts operations. */
class MetricAlertsImpl {
    /**
     * Initialize a new instance of the class MetricAlerts class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Retrieve alert rule definitions in a subscription.
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Retrieve alert rule definitions in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Retrieve alert rule definitions in a subscription.
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$2);
    }
    /**
     * Retrieve alert rule definitions in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$3);
    }
    /**
     * Retrieve an alert rule definition.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    get(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, getOperationSpec$7);
    }
    /**
     * Create or update an metric alert definition.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param parameters The parameters of the rule to create or update.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, ruleName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, parameters, options }, createOrUpdateOperationSpec$5);
    }
    /**
     * Update an metric alert definition.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param parameters The parameters of the rule to update.
     * @param options The options parameters.
     */
    update(resourceGroupName, ruleName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, parameters, options }, updateOperationSpec$4);
    }
    /**
     * Delete an alert rule definition.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    delete(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, deleteOperationSpec$5);
    }
}
// Operation Specifications
const serializer$e = coreClient.createSerializer(Mappers, /* isXml */ false);
const listBySubscriptionOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricAlertResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$e
};
const listByResourceGroupOperationSpec$3 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricAlertResourceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$e
};
const getOperationSpec$7 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$e
};
const createOrUpdateOperationSpec$5 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: MetricAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: parameters4,
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$e
};
const updateOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: MetricAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: parameters5,
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$e
};
const deleteOperationSpec$5 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$e
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing MetricAlertsStatus operations. */
class MetricAlertsStatusImpl {
    /**
     * Initialize a new instance of the class MetricAlertsStatus class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Retrieve an alert rule status.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    list(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, listOperationSpec$a);
    }
    /**
     * Retrieve an alert rule status.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param statusName The name of the status.
     * @param options The options parameters.
     */
    listByName(resourceGroupName, ruleName, statusName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, statusName, options }, listByNameOperationSpec);
    }
}
// Operation Specifications
const serializer$f = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$a = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricAlertStatusCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$f
};
const listByNameOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricAlertStatusCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion6],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName,
        statusName
    ],
    headerParameters: [accept],
    serializer: serializer$f
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing ScheduledQueryRules operations. */
class ScheduledQueryRulesImpl {
    /**
     * Initialize a new instance of the class ScheduledQueryRules class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * List the Log Search rules within a subscription group.
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * List the Log Search rules within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Creates or updates an log search rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param parameters The parameters of the rule to create or update.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, ruleName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, parameters, options }, createOrUpdateOperationSpec$6);
    }
    /**
     * Gets an Log Search rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    get(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, getOperationSpec$8);
    }
    /**
     * Update log search Rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param parameters The parameters of the rule to update.
     * @param options The options parameters.
     */
    update(resourceGroupName, ruleName, parameters, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, parameters, options }, updateOperationSpec$5);
    }
    /**
     * Deletes a Log Search rule
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param ruleName The name of the rule.
     * @param options The options parameters.
     */
    delete(resourceGroupName, ruleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, deleteOperationSpec$6);
    }
    /**
     * List the Log Search rules within a subscription group.
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$3);
    }
    /**
     * List the Log Search rules within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$4);
    }
}
// Operation Specifications
const serializer$g = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOrUpdateOperationSpec$6 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: LogSearchRuleResource
        },
        201: {
            bodyMapper: LogSearchRuleResource
        },
        default: {
            bodyMapper: ErrorContract
        }
    },
    requestBody: parameters6,
    queryParameters: [apiVersion7],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$g
};
const getOperationSpec$8 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: LogSearchRuleResource
        },
        default: {
            bodyMapper: ErrorContract
        }
    },
    queryParameters: [apiVersion7],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$g
};
const updateOperationSpec$5 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: LogSearchRuleResource
        },
        default: {
            bodyMapper: ErrorContract
        }
    },
    requestBody: parameters7,
    queryParameters: [apiVersion7],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$g
};
const deleteOperationSpec$6 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorContract
        }
    },
    queryParameters: [apiVersion7],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        ruleName
    ],
    headerParameters: [accept],
    serializer: serializer$g
};
const listBySubscriptionOperationSpec$3 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: LogSearchRuleResourceCollection
        },
        default: {
            bodyMapper: ErrorContract
        }
    },
    queryParameters: [filter1, apiVersion7],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$g
};
const listByResourceGroupOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: LogSearchRuleResourceCollection
        },
        default: {
            bodyMapper: ErrorContract
        }
    },
    queryParameters: [filter1, apiVersion7],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$g
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing MetricNamespaces operations. */
class MetricNamespacesImpl {
    /**
     * Initialize a new instance of the class MetricNamespaces class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists the metric namespaces for the resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    list(resourceUri, options) {
        const iter = this.listPagingAll(resourceUri, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(resourceUri, options);
            }
        };
    }
    listPagingPage(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(resourceUri, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listPagingAll(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(resourceUri, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists the metric namespaces for the resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    _list(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec$b);
    }
}
// Operation Specifications
const serializer$h = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$b = {
    path: "/{resourceUri}/providers/microsoft.insights/metricNamespaces",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: MetricNamespaceCollection
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion8, startTime],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$h
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing VMInsights operations. */
class VMInsightsImpl {
    /**
     * Initialize a new instance of the class VMInsights class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Retrieves the VM Insights onboarding status for the specified resource or resource scope.
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or scope,
     *                    whose status to retrieve.
     * @param options The options parameters.
     */
    getOnboardingStatus(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, getOnboardingStatusOperationSpec);
    }
}
// Operation Specifications
const serializer$i = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOnboardingStatusOperationSpec = {
    path: "/{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: VMInsightsOnboardingStatus
        },
        default: {
            bodyMapper: ResponseWithError
        }
    },
    queryParameters: [apiVersion9],
    urlParameters: [$host, resourceUri],
    headerParameters: [accept],
    serializer: serializer$i
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing PrivateLinkScopes operations. */
class PrivateLinkScopesImpl {
    /**
     * Initialize a new instance of the class PrivateLinkScopes class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets a list of all Azure Monitor PrivateLinkScopes within a subscription.
     * @param options The options parameters.
     */
    list(options) {
        const iter = this.listPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listPagingPage(options);
            }
        };
    }
    listPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result = yield tslib.__await(this._list(options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listNext(continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets a list of Azure Monitor PrivateLinkScopes within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Gets a list of all Azure Monitor PrivateLinkScopes within a subscription.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec$c);
    }
    /**
     * Gets a list of Azure Monitor PrivateLinkScopes within a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$5);
    }
    /**
     * Deletes a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    beginDelete(resourceGroupName, scopeName, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, { resourceGroupName, scopeName, options }, deleteOperationSpec$7);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
        });
    }
    /**
     * Deletes a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    beginDeleteAndWait(resourceGroupName, scopeName, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDelete(resourceGroupName, scopeName, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Returns a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    get(resourceGroupName, scopeName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, options }, getOperationSpec$9);
    }
    /**
     * Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value
     * for InstrumentationKey nor AppId in the Put operation.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param azureMonitorPrivateLinkScopePayload Properties that need to be specified to create or update
     *                                            a Azure Monitor PrivateLinkScope.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, scopeName, azureMonitorPrivateLinkScopePayload, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            scopeName,
            azureMonitorPrivateLinkScopePayload,
            options
        }, createOrUpdateOperationSpec$7);
    }
    /**
     * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance.
     * @param options The options parameters.
     */
    updateTags(resourceGroupName, scopeName, privateLinkScopeTags, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, privateLinkScopeTags, options }, updateTagsOperationSpec);
    }
    /**
     * ListNext
     * @param nextLink The nextLink from the previous successful call to the List method.
     * @param options The options parameters.
     */
    _listNext(nextLink, options) {
        return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
    }
    /**
     * ListByResourceGroupNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
     * @param options The options parameters.
     */
    _listByResourceGroupNext(resourceGroupName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
    }
}
// Operation Specifications
const serializer$j = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec$c = {
    path: "/subscriptions/{subscriptionId}/providers/microsoft.insights/privateLinkScopes",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScopeListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$j
};
const listByResourceGroupOperationSpec$5 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScopeListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$j
};
const deleteOperationSpec$7 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}",
    httpMethod: "DELETE",
    responses: { 200: {}, 201: {}, 202: {}, 204: {} },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    serializer: serializer$j
};
const getOperationSpec$9 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScope
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$j
};
const createOrUpdateOperationSpec$7 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScope
        },
        201: {
            bodyMapper: AzureMonitorPrivateLinkScope
        }
    },
    requestBody: azureMonitorPrivateLinkScopePayload,
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$j
};
const updateTagsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScope
        }
    },
    requestBody: privateLinkScopeTags,
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$j
};
const listNextOperationSpec$2 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScopeListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$j
};
const listByResourceGroupNextOperationSpec$1 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: AzureMonitorPrivateLinkScopeListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$j
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/** Class containing PrivateLinkScopeOperationStatus operations. */
class PrivateLinkScopeOperationStatusImpl {
    /**
     * Initialize a new instance of the class PrivateLinkScopeOperationStatus class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Get the status of an azure asynchronous operation associated with a private link scope operation.
     * @param asyncOperationId The operation Id.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    get(asyncOperationId, resourceGroupName, options) {
        return this.client.sendOperationRequest({ asyncOperationId, resourceGroupName, options }, getOperationSpec$a);
    }
}
// Operation Specifications
const serializer$k = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$a = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopeOperationStatuses/{asyncOperationId}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: OperationStatus
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        asyncOperationId
    ],
    headerParameters: [accept],
    serializer: serializer$k
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing PrivateLinkResources operations. */
class PrivateLinkResourcesImpl {
    /**
     * Initialize a new instance of the class PrivateLinkResources class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        const iter = this.listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options);
            }
        };
    }
    listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingPage_1() {
            let result = yield tslib.__await(this._listByPrivateLinkScope(resourceGroupName, scopeName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByPrivateLinkScopeNext(resourceGroupName, scopeName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    _listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, options }, listByPrivateLinkScopeOperationSpec);
    }
    /**
     * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param groupName The name of the private link resource.
     * @param options The options parameters.
     */
    get(resourceGroupName, scopeName, groupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, groupName, options }, getOperationSpec$b);
    }
    /**
     * ListByPrivateLinkScopeNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method.
     * @param options The options parameters.
     */
    _listByPrivateLinkScopeNext(resourceGroupName, scopeName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, nextLink, options }, listByPrivateLinkScopeNextOperationSpec);
    }
}
// Operation Specifications
const serializer$l = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByPrivateLinkScopeOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateLinkResourceListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$l
};
const getOperationSpec$b = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateLinkResource
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName,
        groupName
    ],
    headerParameters: [accept],
    serializer: serializer$l
};
const listByPrivateLinkScopeNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateLinkResourceListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$l
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing PrivateEndpointConnections operations. */
class PrivateEndpointConnectionsImpl {
    /**
     * Initialize a new instance of the class PrivateEndpointConnections class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets all private endpoint connections on a private link scope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        const iter = this.listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options);
            }
        };
    }
    listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingPage_1() {
            let result = yield tslib.__await(this._listByPrivateLinkScope(resourceGroupName, scopeName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByPrivateLinkScopeNext(resourceGroupName, scopeName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets a private endpoint connection.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateEndpointConnectionName The name of the private endpoint connection.
     * @param options The options parameters.
     */
    get(resourceGroupName, scopeName, privateEndpointConnectionName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, privateEndpointConnectionName, options }, getOperationSpec$c);
    }
    /**
     * Approve or reject a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateEndpointConnectionName The name of the private endpoint connection.
     * @param parameters A private endpoint connection
     * @param options The options parameters.
     */
    beginCreateOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, {
                resourceGroupName,
                scopeName,
                privateEndpointConnectionName,
                parameters,
                options
            }, createOrUpdateOperationSpec$8);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
        });
    }
    /**
     * Approve or reject a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateEndpointConnectionName The name of the private endpoint connection.
     * @param parameters A private endpoint connection
     * @param options The options parameters.
     */
    beginCreateOrUpdateAndWait(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Deletes a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateEndpointConnectionName The name of the private endpoint connection.
     * @param options The options parameters.
     */
    beginDelete(resourceGroupName, scopeName, privateEndpointConnectionName, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, { resourceGroupName, scopeName, privateEndpointConnectionName, options }, deleteOperationSpec$8);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
        });
    }
    /**
     * Deletes a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param privateEndpointConnectionName The name of the private endpoint connection.
     * @param options The options parameters.
     */
    beginDeleteAndWait(resourceGroupName, scopeName, privateEndpointConnectionName, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDelete(resourceGroupName, scopeName, privateEndpointConnectionName, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Gets all private endpoint connections on a private link scope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    _listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, options }, listByPrivateLinkScopeOperationSpec$1);
    }
    /**
     * ListByPrivateLinkScopeNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method.
     * @param options The options parameters.
     */
    _listByPrivateLinkScopeNext(resourceGroupName, scopeName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, nextLink, options }, listByPrivateLinkScopeNextOperationSpec$1);
    }
}
// Operation Specifications
const serializer$m = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$c = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateEndpointConnection
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName,
        privateEndpointConnectionName
    ],
    headerParameters: [accept],
    serializer: serializer$m
};
const createOrUpdateOperationSpec$8 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: PrivateEndpointConnection
        },
        201: {
            bodyMapper: PrivateEndpointConnection
        },
        202: {
            bodyMapper: PrivateEndpointConnection
        },
        204: {
            bodyMapper: PrivateEndpointConnection
        }
    },
    requestBody: parameters8,
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName,
        privateEndpointConnectionName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$m
};
const deleteOperationSpec$8 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "DELETE",
    responses: { 200: {}, 201: {}, 202: {}, 204: {} },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName,
        privateEndpointConnectionName
    ],
    serializer: serializer$m
};
const listByPrivateLinkScopeOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateEndpointConnectionListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$m
};
const listByPrivateLinkScopeNextOperationSpec$1 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: PrivateEndpointConnectionListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$m
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing PrivateLinkScopedResources operations. */
class PrivateLinkScopedResourcesImpl {
    /**
     * Initialize a new instance of the class PrivateLinkScopedResources class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets all private endpoint connections on a private link scope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        const iter = this.listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options);
            }
        };
    }
    listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingPage_1() {
            let result = yield tslib.__await(this._listByPrivateLinkScope(resourceGroupName, scopeName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByPrivateLinkScopeNext(resourceGroupName, scopeName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByPrivateLinkScopePagingAll(resourceGroupName, scopeName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByPrivateLinkScopePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByPrivateLinkScopePagingPage(resourceGroupName, scopeName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Gets a scoped resource in a private link scope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param name The name of the scoped resource object.
     * @param options The options parameters.
     */
    get(resourceGroupName, scopeName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, name, options }, getOperationSpec$d);
    }
    /**
     * Approve or reject a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param name The name of the scoped resource object.
     * @param parameters A private link scoped resource
     * @param options The options parameters.
     */
    beginCreateOrUpdate(resourceGroupName, scopeName, name, parameters, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, { resourceGroupName, scopeName, name, parameters, options }, createOrUpdateOperationSpec$9);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
        });
    }
    /**
     * Approve or reject a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param name The name of the scoped resource object.
     * @param parameters A private link scoped resource
     * @param options The options parameters.
     */
    beginCreateOrUpdateAndWait(resourceGroupName, scopeName, name, parameters, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateOrUpdate(resourceGroupName, scopeName, name, parameters, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Deletes a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param name The name of the scoped resource object.
     * @param options The options parameters.
     */
    beginDelete(resourceGroupName, scopeName, name, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
                var _a;
                let currentRawResponse = undefined;
                const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
                const callback = (rawResponse, flatResponse) => {
                    currentRawResponse = rawResponse;
                    providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
                };
                const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
                const flatResponse = yield directSendOperation(updatedArgs, spec);
                return {
                    flatResponse,
                    rawResponse: {
                        statusCode: currentRawResponse.status,
                        body: currentRawResponse.parsedBody,
                        headers: currentRawResponse.headers.toJSON()
                    }
                };
            });
            const lro = new LroImpl(sendOperation, { resourceGroupName, scopeName, name, options }, deleteOperationSpec$9);
            return new coreLro.LroEngine(lro, {
                resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
        });
    }
    /**
     * Deletes a private endpoint connection with a given name.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param name The name of the scoped resource object.
     * @param options The options parameters.
     */
    beginDeleteAndWait(resourceGroupName, scopeName, name, options) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDelete(resourceGroupName, scopeName, name, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Gets all private endpoint connections on a private link scope.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param options The options parameters.
     */
    _listByPrivateLinkScope(resourceGroupName, scopeName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, options }, listByPrivateLinkScopeOperationSpec$2);
    }
    /**
     * ListByPrivateLinkScopeNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param scopeName The name of the Azure Monitor PrivateLinkScope resource.
     * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method.
     * @param options The options parameters.
     */
    _listByPrivateLinkScopeNext(resourceGroupName, scopeName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, scopeName, nextLink, options }, listByPrivateLinkScopeNextOperationSpec$2);
    }
}
// Operation Specifications
const serializer$n = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec$d = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ScopedResource
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        name,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$n
};
const createOrUpdateOperationSpec$9 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: ScopedResource
        },
        201: {
            bodyMapper: ScopedResource
        },
        202: {
            bodyMapper: ScopedResource
        },
        204: {
            bodyMapper: ScopedResource
        }
    },
    requestBody: parameters9,
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        name,
        scopeName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$n
};
const deleteOperationSpec$9 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}",
    httpMethod: "DELETE",
    responses: { 200: {}, 201: {}, 202: {}, 204: {} },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        name,
        scopeName
    ],
    serializer: serializer$n
};
const listByPrivateLinkScopeOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ScopedResourceListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$n
};
const listByPrivateLinkScopeNextOperationSpec$2 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ScopedResourceListResult
        }
    },
    queryParameters: [apiVersion10],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink,
        scopeName
    ],
    headerParameters: [accept],
    serializer: serializer$n
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing ActivityLogAlerts operations. */
class ActivityLogAlertsImpl {
    /**
     * Initialize a new instance of the class ActivityLogAlerts class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Get a list of all activity log alerts in a subscription.
     * @param options The options parameters.
     */
    listBySubscriptionId(options) {
        const iter = this.listBySubscriptionIdPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionIdPagingPage(options);
            }
        };
    }
    listBySubscriptionIdPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscriptionId(options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listBySubscriptionIdPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionIdPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Get a list of all activity log alerts in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Create a new activity log alert or update an existing one.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param activityLogAlertName The name of the activity log alert.
     * @param activityLogAlert The activity log alert to create or use for the update.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, activityLogAlertName, activityLogAlert, options) {
        return this.client.sendOperationRequest({ resourceGroupName, activityLogAlertName, activityLogAlert, options }, createOrUpdateOperationSpec$a);
    }
    /**
     * Get an activity log alert.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param activityLogAlertName The name of the activity log alert.
     * @param options The options parameters.
     */
    get(resourceGroupName, activityLogAlertName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, activityLogAlertName, options }, getOperationSpec$e);
    }
    /**
     * Delete an activity log alert.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param activityLogAlertName The name of the activity log alert.
     * @param options The options parameters.
     */
    delete(resourceGroupName, activityLogAlertName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, activityLogAlertName, options }, deleteOperationSpec$a);
    }
    /**
     * Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate
     * method.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param activityLogAlertName The name of the activity log alert.
     * @param activityLogAlertPatch Parameters supplied to the operation.
     * @param options The options parameters.
     */
    update(resourceGroupName, activityLogAlertName, activityLogAlertPatch, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            activityLogAlertName,
            activityLogAlertPatch,
            options
        }, updateOperationSpec$6);
    }
    /**
     * Get a list of all activity log alerts in a subscription.
     * @param options The options parameters.
     */
    _listBySubscriptionId(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionIdOperationSpec$1);
    }
    /**
     * Get a list of all activity log alerts in a resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$6);
    }
}
// Operation Specifications
const serializer$o = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOrUpdateOperationSpec$a = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: ActivityLogAlertResource
        },
        201: {
            bodyMapper: ActivityLogAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: activityLogAlert,
    queryParameters: [apiVersion11],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        activityLogAlertName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$o
};
const getOperationSpec$e = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActivityLogAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion11],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        activityLogAlertName
    ],
    headerParameters: [accept],
    serializer: serializer$o
};
const deleteOperationSpec$a = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion11],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        activityLogAlertName
    ],
    headerParameters: [accept],
    serializer: serializer$o
};
const updateOperationSpec$6 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: ActivityLogAlertResource
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    requestBody: activityLogAlertPatch,
    queryParameters: [apiVersion11],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        activityLogAlertName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$o
};
const listBySubscriptionIdOperationSpec$1 = {
    path: "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActivityLogAlertList
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion11],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$o
};
const listByResourceGroupOperationSpec$6 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: ActivityLogAlertList
        },
        default: {
            bodyMapper: ErrorResponse
        }
    },
    queryParameters: [apiVersion11],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$o
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing DataCollectionEndpoints operations. */
class DataCollectionEndpointsImpl {
    /**
     * Initialize a new instance of the class DataCollectionEndpoints class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists all data collection endpoints in the specified resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists all data collection endpoints in the specified subscription
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Lists all data collection endpoints in the specified resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$7);
    }
    /**
     * Lists all data collection endpoints in the specified subscription
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$4);
    }
    /**
     * Returns the specified data collection endpoint.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case
     *                                   insensitive.
     * @param options The options parameters.
     */
    get(resourceGroupName, dataCollectionEndpointName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionEndpointName, options }, getOperationSpec$f);
    }
    /**
     * Creates or updates a data collection endpoint.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case
     *                                   insensitive.
     * @param options The options parameters.
     */
    create(resourceGroupName, dataCollectionEndpointName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionEndpointName, options }, createOperationSpec);
    }
    /**
     * Updates part of a data collection endpoint.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case
     *                                   insensitive.
     * @param options The options parameters.
     */
    update(resourceGroupName, dataCollectionEndpointName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionEndpointName, options }, updateOperationSpec$7);
    }
    /**
     * Deletes a data collection endpoint.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case
     *                                   insensitive.
     * @param options The options parameters.
     */
    delete(resourceGroupName, dataCollectionEndpointName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionEndpointName, options }, deleteOperationSpec$b);
    }
    /**
     * ListByResourceGroupNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
     * @param options The options parameters.
     */
    _listByResourceGroupNext(resourceGroupName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$2);
    }
    /**
     * ListBySubscriptionNext
     * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
     * @param options The options parameters.
     */
    _listBySubscriptionNext(nextLink, options) {
        return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec$1);
    }
}
// Operation Specifications
const serializer$p = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByResourceGroupOperationSpec$7 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$p
};
const listBySubscriptionOperationSpec$4 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$p
};
const getOperationSpec$f = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionEndpointName
    ],
    headerParameters: [accept],
    serializer: serializer$p
};
const createOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResource
        },
        201: {
            bodyMapper: DataCollectionEndpointResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    requestBody: body,
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionEndpointName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$p
};
const updateOperationSpec$7 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    requestBody: body1,
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionEndpointName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$p
};
const deleteOperationSpec$b = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionEndpointName
    ],
    headerParameters: [accept],
    serializer: serializer$p
};
const listByResourceGroupNextOperationSpec$2 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$p
};
const listBySubscriptionNextOperationSpec$1 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionEndpointResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$p
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing DataCollectionRuleAssociations operations. */
class DataCollectionRuleAssociationsImpl {
    /**
     * Initialize a new instance of the class DataCollectionRuleAssociations class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists associations for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    listByResource(resourceUri, options) {
        const iter = this.listByResourcePagingAll(resourceUri, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourcePagingPage(resourceUri, options);
            }
        };
    }
    listByResourcePagingPage(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourcePagingPage_1() {
            let result = yield tslib.__await(this._listByResource(resourceUri, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByResourceNext(resourceUri, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByResourcePagingAll(resourceUri, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourcePagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourcePagingPage(resourceUri, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists associations for the specified data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    listByRule(resourceGroupName, dataCollectionRuleName, options) {
        const iter = this.listByRulePagingAll(resourceGroupName, dataCollectionRuleName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByRulePagingPage(resourceGroupName, dataCollectionRuleName, options);
            }
        };
    }
    listByRulePagingPage(resourceGroupName, dataCollectionRuleName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByRulePagingPage_1() {
            let result = yield tslib.__await(this._listByRule(resourceGroupName, dataCollectionRuleName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByRuleNext(resourceGroupName, dataCollectionRuleName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByRulePagingAll(resourceGroupName, dataCollectionRuleName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByRulePagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByRulePagingPage(resourceGroupName, dataCollectionRuleName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Lists associations for the specified resource.
     * @param resourceUri The identifier of the resource.
     * @param options The options parameters.
     */
    _listByResource(resourceUri, options) {
        return this.client.sendOperationRequest({ resourceUri, options }, listByResourceOperationSpec);
    }
    /**
     * Lists associations for the specified data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByRule(resourceGroupName, dataCollectionRuleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, options }, listByRuleOperationSpec);
    }
    /**
     * Returns the specified association.
     * @param resourceUri The identifier of the resource.
     * @param associationName The name of the association. The name is case insensitive.
     * @param options The options parameters.
     */
    get(resourceUri, associationName, options) {
        return this.client.sendOperationRequest({ resourceUri, associationName, options }, getOperationSpec$g);
    }
    /**
     * Creates or updates an association.
     * @param resourceUri The identifier of the resource.
     * @param associationName The name of the association. The name is case insensitive.
     * @param options The options parameters.
     */
    create(resourceUri, associationName, options) {
        return this.client.sendOperationRequest({ resourceUri, associationName, options }, createOperationSpec$1);
    }
    /**
     * Deletes an association.
     * @param resourceUri The identifier of the resource.
     * @param associationName The name of the association. The name is case insensitive.
     * @param options The options parameters.
     */
    delete(resourceUri, associationName, options) {
        return this.client.sendOperationRequest({ resourceUri, associationName, options }, deleteOperationSpec$c);
    }
    /**
     * ListByResourceNext
     * @param resourceUri The identifier of the resource.
     * @param nextLink The nextLink from the previous successful call to the ListByResource method.
     * @param options The options parameters.
     */
    _listByResourceNext(resourceUri, nextLink, options) {
        return this.client.sendOperationRequest({ resourceUri, nextLink, options }, listByResourceNextOperationSpec);
    }
    /**
     * ListByRuleNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param nextLink The nextLink from the previous successful call to the ListByRule method.
     * @param options The options parameters.
     */
    _listByRuleNext(resourceGroupName, dataCollectionRuleName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, nextLink, options }, listByRuleNextOperationSpec);
    }
}
// Operation Specifications
const serializer$q = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByResourceOperationSpec = {
    path: "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [$host, resourceUri1],
    headerParameters: [accept],
    serializer: serializer$q
};
const listByRuleOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionRuleName
    ],
    headerParameters: [accept],
    serializer: serializer$q
};
const getOperationSpec$g = {
    path: "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceUri1,
        associationName
    ],
    headerParameters: [accept],
    serializer: serializer$q
};
const createOperationSpec$1 = {
    path: "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResource
        },
        201: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    requestBody: body2,
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceUri1,
        associationName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$q
};
const deleteOperationSpec$c = {
    path: "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceUri1,
        associationName
    ],
    headerParameters: [accept],
    serializer: serializer$q
};
const listByResourceNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        nextLink,
        resourceUri1
    ],
    headerParameters: [accept],
    serializer: serializer$q
};
const listByRuleNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleAssociationProxyOnlyResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink,
        dataCollectionRuleName
    ],
    headerParameters: [accept],
    serializer: serializer$q
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
/// <reference lib="esnext.asynciterable" />
/** Class containing DataCollectionRules operations. */
class DataCollectionRulesImpl {
    /**
     * Initialize a new instance of the class DataCollectionRules class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Lists all data collection rules in the specified resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    listByResourceGroup(resourceGroupName, options) {
        const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listByResourceGroupPagingPage(resourceGroupName, options);
            }
        };
    }
    listByResourceGroupPagingPage(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
            let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listByResourceGroupPagingAll(resourceGroupName, options) {
        return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
            var e_1, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Lists all data collection rules in the specified subscription.
     * @param options The options parameters.
     */
    listBySubscription(options) {
        const iter = this.listBySubscriptionPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: () => {
                return this.listBySubscriptionPagingPage(options);
            }
        };
    }
    listBySubscriptionPagingPage(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
            let result = yield tslib.__await(this._listBySubscription(options));
            yield yield tslib.__await(result.value || []);
            let continuationToken = result.nextLink;
            while (continuationToken) {
                result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
                continuationToken = result.nextLink;
                yield yield tslib.__await(result.value || []);
            }
        });
    }
    listBySubscriptionPagingAll(options) {
        return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
            var e_2, _a;
            try {
                for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
                    const page = _c.value;
                    yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Lists all data collection rules in the specified resource group.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param options The options parameters.
     */
    _listByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$8);
    }
    /**
     * Lists all data collection rules in the specified subscription.
     * @param options The options parameters.
     */
    _listBySubscription(options) {
        return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$5);
    }
    /**
     * Returns the specified data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    get(resourceGroupName, dataCollectionRuleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, options }, getOperationSpec$h);
    }
    /**
     * Creates or updates a data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    create(resourceGroupName, dataCollectionRuleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, options }, createOperationSpec$2);
    }
    /**
     * Updates part of a data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    update(resourceGroupName, dataCollectionRuleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, options }, updateOperationSpec$8);
    }
    /**
     * Deletes a data collection rule.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.
     * @param options The options parameters.
     */
    delete(resourceGroupName, dataCollectionRuleName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, dataCollectionRuleName, options }, deleteOperationSpec$d);
    }
    /**
     * ListByResourceGroupNext
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
     * @param options The options parameters.
     */
    _listByResourceGroupNext(resourceGroupName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$3);
    }
    /**
     * ListBySubscriptionNext
     * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
     * @param options The options parameters.
     */
    _listBySubscriptionNext(nextLink, options) {
        return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec$2);
    }
}
// Operation Specifications
const serializer$r = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByResourceGroupOperationSpec$8 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId
    ],
    headerParameters: [accept],
    serializer: serializer$r
};
const listBySubscriptionOperationSpec$5 = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [$host, subscriptionId],
    headerParameters: [accept],
    serializer: serializer$r
};
const getOperationSpec$h = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionRuleName
    ],
    headerParameters: [accept],
    serializer: serializer$r
};
const createOperationSpec$2 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResource
        },
        201: {
            bodyMapper: DataCollectionRuleResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    requestBody: body3,
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionRuleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$r
};
const updateOperationSpec$8 = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResource
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    requestBody: body1,
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionRuleName
    ],
    headerParameters: [accept, contentType],
    mediaType: "json",
    serializer: serializer$r
};
const deleteOperationSpec$d = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        dataCollectionRuleName
    ],
    headerParameters: [accept],
    serializer: serializer$r
};
const listByResourceGroupNextOperationSpec$3 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        resourceGroupName,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$r
};
const listBySubscriptionNextOperationSpec$2 = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: DataCollectionRuleResourceListResult
        },
        default: {
            bodyMapper: ErrorResponseCommonV2
        }
    },
    queryParameters: [apiVersion12],
    urlParameters: [
        $host,
        subscriptionId,
        nextLink
    ],
    headerParameters: [accept],
    serializer: serializer$r
};

/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
class MonitorClient extends coreClient.ServiceClient {
    /**
     * Initializes a new instance of the MonitorClient class.
     * @param credentials Subscription credentials which uniquely identify client subscription.
     * @param subscriptionId The ID of the target subscription.
     * @param options The parameter options
     */
    constructor(credentials, subscriptionId, options) {
        if (credentials === undefined) {
            throw new Error("'credentials' cannot be null");
        }
        if (subscriptionId === undefined) {
            throw new Error("'subscriptionId' cannot be null");
        }
        // Initializing default values for options
        if (!options) {
            options = {};
        }
        const defaults = {
            requestContentType: "application/json; charset=utf-8",
            credential: credentials
        };
        const packageDetails = `azsdk-js-arm-monitor/7.0.0`;
        const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
            ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
            : `${packageDetails}`;
        if (!options.credentialScopes) {
            options.credentialScopes = ["https://management.azure.com/.default"];
        }
        const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
                userAgentPrefix
            }, baseUri: options.endpoint || "https://management.azure.com" });
        super(optionsWithDefaults);
        // Parameter assignments
        this.subscriptionId = subscriptionId;
        // Assigning values to Constant parameters
        this.$host = options.$host || "https://management.azure.com";
        this.autoscaleSettings = new AutoscaleSettingsImpl(this);
        this.operations = new OperationsImpl(this);
        this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);
        this.alertRules = new AlertRulesImpl(this);
        this.logProfiles = new LogProfilesImpl(this);
        this.diagnosticSettings = new DiagnosticSettingsImpl(this);
        this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);
        this.actionGroups = new ActionGroupsImpl(this);
        this.activityLogs = new ActivityLogsImpl(this);
        this.eventCategories = new EventCategoriesImpl(this);
        this.tenantActivityLogs = new TenantActivityLogsImpl(this);
        this.metricDefinitions = new MetricDefinitionsImpl(this);
        this.metrics = new MetricsImpl(this);
        this.baselines = new BaselinesImpl(this);
        this.metricAlerts = new MetricAlertsImpl(this);
        this.metricAlertsStatus = new MetricAlertsStatusImpl(this);
        this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);
        this.metricNamespaces = new MetricNamespacesImpl(this);
        this.vMInsights = new VMInsightsImpl(this);
        this.privateLinkScopes = new PrivateLinkScopesImpl(this);
        this.privateLinkScopeOperationStatus = new PrivateLinkScopeOperationStatusImpl(this);
        this.privateLinkResources = new PrivateLinkResourcesImpl(this);
        this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
        this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);
        this.activityLogAlerts = new ActivityLogAlertsImpl(this);
        this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);
        this.dataCollectionRuleAssociations = new DataCollectionRuleAssociationsImpl(this);
        this.dataCollectionRules = new DataCollectionRulesImpl(this);
    }
}

exports.MonitorClient = MonitorClient;
//# sourceMappingURL=index.js.map