/*
 * 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.
 */
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing Recommendations operations. */
export class RecommendationsImpl {
    /**
     * Initialize a new instance of the class Recommendations class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Description for List all recommendations for a subscription.
     * @param options The options parameters.
     */
    list(options) {
        const iter = this.listPagingAll(options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: (settings) => {
                if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
                    throw new Error("maxPageSize is not supported by this operation.");
                }
                return this.listPagingPage(options, settings);
            }
        };
    }
    listPagingPage(options, settings) {
        return __asyncGenerator(this, arguments, function* listPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._list(options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listNext(continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listPagingAll(options) {
        return __asyncGenerator(this, arguments, function* listPagingAll_1() {
            var _a, e_1, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
                    _c = _f.value;
                    _d = false;
                    const page = _c;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    }
    /**
     * Description for Get past recommendations for an app, optionally specified by the time range.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the hosting environment.
     * @param options The options parameters.
     */
    listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options) {
        const iter = this.listHistoryForHostingEnvironmentPagingAll(resourceGroupName, hostingEnvironmentName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: (settings) => {
                if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
                    throw new Error("maxPageSize is not supported by this operation.");
                }
                return this.listHistoryForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options, settings);
            }
        };
    }
    listHistoryForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* listHistoryForHostingEnvironmentPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listHistoryForHostingEnvironmentNext(resourceGroupName, hostingEnvironmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listHistoryForHostingEnvironmentPagingAll(resourceGroupName, hostingEnvironmentName, options) {
        return __asyncGenerator(this, arguments, function* listHistoryForHostingEnvironmentPagingAll_1() {
            var _a, e_2, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listHistoryForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
                    _c = _f.value;
                    _d = false;
                    const page = _c;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_2) throw e_2.error; }
            }
        });
    }
    /**
     * Description for Get all recommendations for a hosting environment.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the app.
     * @param options The options parameters.
     */
    listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options) {
        const iter = this.listRecommendedRulesForHostingEnvironmentPagingAll(resourceGroupName, hostingEnvironmentName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: (settings) => {
                if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
                    throw new Error("maxPageSize is not supported by this operation.");
                }
                return this.listRecommendedRulesForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options, settings);
            }
        };
    }
    listRecommendedRulesForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* listRecommendedRulesForHostingEnvironmentPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listRecommendedRulesForHostingEnvironmentNext(resourceGroupName, hostingEnvironmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listRecommendedRulesForHostingEnvironmentPagingAll(resourceGroupName, hostingEnvironmentName, options) {
        return __asyncGenerator(this, arguments, function* listRecommendedRulesForHostingEnvironmentPagingAll_1() {
            var _a, e_3, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listRecommendedRulesForHostingEnvironmentPagingPage(resourceGroupName, hostingEnvironmentName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
                    _c = _f.value;
                    _d = false;
                    const page = _c;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_3_1) { e_3 = { error: e_3_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_3) throw e_3.error; }
            }
        });
    }
    /**
     * Description for Get past recommendations for an app, optionally specified by the time range.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    listHistoryForWebApp(resourceGroupName, siteName, options) {
        const iter = this.listHistoryForWebAppPagingAll(resourceGroupName, siteName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: (settings) => {
                if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
                    throw new Error("maxPageSize is not supported by this operation.");
                }
                return this.listHistoryForWebAppPagingPage(resourceGroupName, siteName, options, settings);
            }
        };
    }
    listHistoryForWebAppPagingPage(resourceGroupName, siteName, options, settings) {
        return __asyncGenerator(this, arguments, function* listHistoryForWebAppPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listHistoryForWebApp(resourceGroupName, siteName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listHistoryForWebAppNext(resourceGroupName, siteName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listHistoryForWebAppPagingAll(resourceGroupName, siteName, options) {
        return __asyncGenerator(this, arguments, function* listHistoryForWebAppPagingAll_1() {
            var _a, e_4, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listHistoryForWebAppPagingPage(resourceGroupName, siteName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
                    _c = _f.value;
                    _d = false;
                    const page = _c;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_4_1) { e_4 = { error: e_4_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_4) throw e_4.error; }
            }
        });
    }
    /**
     * Description for Get all recommendations for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    listRecommendedRulesForWebApp(resourceGroupName, siteName, options) {
        const iter = this.listRecommendedRulesForWebAppPagingAll(resourceGroupName, siteName, options);
        return {
            next() {
                return iter.next();
            },
            [Symbol.asyncIterator]() {
                return this;
            },
            byPage: (settings) => {
                if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
                    throw new Error("maxPageSize is not supported by this operation.");
                }
                return this.listRecommendedRulesForWebAppPagingPage(resourceGroupName, siteName, options, settings);
            }
        };
    }
    listRecommendedRulesForWebAppPagingPage(resourceGroupName, siteName, options, settings) {
        return __asyncGenerator(this, arguments, function* listRecommendedRulesForWebAppPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listRecommendedRulesForWebApp(resourceGroupName, siteName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listRecommendedRulesForWebAppNext(resourceGroupName, siteName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listRecommendedRulesForWebAppPagingAll(resourceGroupName, siteName, options) {
        return __asyncGenerator(this, arguments, function* listRecommendedRulesForWebAppPagingAll_1() {
            var _a, e_5, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listRecommendedRulesForWebAppPagingPage(resourceGroupName, siteName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
                    _c = _f.value;
                    _d = false;
                    const page = _c;
                    yield __await(yield* __asyncDelegator(__asyncValues(page)));
                }
            }
            catch (e_5_1) { e_5 = { error: e_5_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_5) throw e_5.error; }
            }
        });
    }
    /**
     * Description for List all recommendations for a subscription.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec);
    }
    /**
     * Description for Reset all recommendation opt-out settings for a subscription.
     * @param options The options parameters.
     */
    resetAllFilters(options) {
        return this.client.sendOperationRequest({ options }, resetAllFiltersOperationSpec);
    }
    /**
     * Description for Disables the specified rule so it will not apply to a subscription in the future.
     * @param name Rule name
     * @param options The options parameters.
     */
    disableRecommendationForSubscription(name, options) {
        return this.client.sendOperationRequest({ name, options }, disableRecommendationForSubscriptionOperationSpec);
    }
    /**
     * Description for Get past recommendations for an app, optionally specified by the time range.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the hosting environment.
     * @param options The options parameters.
     */
    _listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, hostingEnvironmentName, options }, listHistoryForHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Get all recommendations for a hosting environment.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the app.
     * @param options The options parameters.
     */
    _listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, hostingEnvironmentName, options }, listRecommendedRulesForHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Disable all recommendations for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param environmentName Name of the app.
     * @param hostingEnvironmentName
     * @param options The options parameters.
     */
    disableAllForHostingEnvironment(resourceGroupName, environmentName, hostingEnvironmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, environmentName, hostingEnvironmentName, options }, disableAllForHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Reset all recommendation opt-out settings for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param environmentName Name of the app.
     * @param hostingEnvironmentName
     * @param options The options parameters.
     */
    resetAllFiltersForHostingEnvironment(resourceGroupName, environmentName, hostingEnvironmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, environmentName, hostingEnvironmentName, options }, resetAllFiltersForHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Get a recommendation rule for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the hosting environment.
     * @param name Name of the recommendation.
     * @param options The options parameters.
     */
    getRuleDetailsByHostingEnvironment(resourceGroupName, hostingEnvironmentName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, hostingEnvironmentName, name, options }, getRuleDetailsByHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Disables the specific rule for a web site permanently.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param environmentName Site name
     * @param name Rule name
     * @param hostingEnvironmentName
     * @param options The options parameters.
     */
    disableRecommendationForHostingEnvironment(resourceGroupName, environmentName, name, hostingEnvironmentName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            environmentName,
            name,
            hostingEnvironmentName,
            options
        }, disableRecommendationForHostingEnvironmentOperationSpec);
    }
    /**
     * Description for Get past recommendations for an app, optionally specified by the time range.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    _listHistoryForWebApp(resourceGroupName, siteName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, options }, listHistoryForWebAppOperationSpec);
    }
    /**
     * Description for Get all recommendations for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    _listRecommendedRulesForWebApp(resourceGroupName, siteName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, options }, listRecommendedRulesForWebAppOperationSpec);
    }
    /**
     * Description for Disable all recommendations for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    disableAllForWebApp(resourceGroupName, siteName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, options }, disableAllForWebAppOperationSpec);
    }
    /**
     * Description for Reset all recommendation opt-out settings for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param options The options parameters.
     */
    resetAllFiltersForWebApp(resourceGroupName, siteName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, options }, resetAllFiltersForWebAppOperationSpec);
    }
    /**
     * Description for Get a recommendation rule for an app.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param name Name of the recommendation.
     * @param options The options parameters.
     */
    getRuleDetailsByWebApp(resourceGroupName, siteName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, name, options }, getRuleDetailsByWebAppOperationSpec);
    }
    /**
     * Description for Disables the specific rule for a web site permanently.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Site name
     * @param name Rule name
     * @param options The options parameters.
     */
    disableRecommendationForSite(resourceGroupName, siteName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, name, options }, disableRecommendationForSiteOperationSpec);
    }
    /**
     * 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);
    }
    /**
     * ListHistoryForHostingEnvironmentNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the hosting environment.
     * @param nextLink The nextLink from the previous successful call to the
     *                 ListHistoryForHostingEnvironment method.
     * @param options The options parameters.
     */
    _listHistoryForHostingEnvironmentNext(resourceGroupName, hostingEnvironmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, hostingEnvironmentName, nextLink, options }, listHistoryForHostingEnvironmentNextOperationSpec);
    }
    /**
     * ListRecommendedRulesForHostingEnvironmentNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param hostingEnvironmentName Name of the app.
     * @param nextLink The nextLink from the previous successful call to the
     *                 ListRecommendedRulesForHostingEnvironment method.
     * @param options The options parameters.
     */
    _listRecommendedRulesForHostingEnvironmentNext(resourceGroupName, hostingEnvironmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, hostingEnvironmentName, nextLink, options }, listRecommendedRulesForHostingEnvironmentNextOperationSpec);
    }
    /**
     * ListHistoryForWebAppNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param nextLink The nextLink from the previous successful call to the ListHistoryForWebApp method.
     * @param options The options parameters.
     */
    _listHistoryForWebAppNext(resourceGroupName, siteName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, nextLink, options }, listHistoryForWebAppNextOperationSpec);
    }
    /**
     * ListRecommendedRulesForWebAppNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param siteName Name of the app.
     * @param nextLink The nextLink from the previous successful call to the ListRecommendedRulesForWebApp
     *                 method.
     * @param options The options parameters.
     */
    _listRecommendedRulesForWebAppNext(resourceGroupName, siteName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, siteName, nextLink, options }, listRecommendedRulesForWebAppNextOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.filter,
        Parameters.featured
    ],
    urlParameters: [Parameters.$host, Parameters.subscriptionId],
    headerParameters: [Parameters.accept],
    serializer
};
const resetAllFiltersOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset",
    httpMethod: "POST",
    responses: {
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [Parameters.$host, Parameters.subscriptionId],
    headerParameters: [Parameters.accept],
    serializer
};
const disableRecommendationForSubscriptionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable",
    httpMethod: "POST",
    responses: {
        200: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.name],
    headerParameters: [Parameters.accept],
    serializer
};
const listHistoryForHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.filter,
        Parameters.expiredOnly
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listRecommendedRulesForHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.filter,
        Parameters.featured
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const disableAllForHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable",
    httpMethod: "POST",
    responses: {
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion, Parameters.environmentName],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const resetAllFiltersForHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset",
    httpMethod: "POST",
    responses: {
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion, Parameters.environmentName],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getRuleDetailsByHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationRule
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.updateSeen,
        Parameters.recommendationId
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const disableRecommendationForHostingEnvironmentOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable",
    httpMethod: "POST",
    responses: {
        200: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion, Parameters.environmentName],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listHistoryForWebAppOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.filter,
        Parameters.expiredOnly
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listRecommendedRulesForWebAppOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.filter,
        Parameters.featured
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const disableAllForWebAppOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable",
    httpMethod: "POST",
    responses: {
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const resetAllFiltersForWebAppOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset",
    httpMethod: "POST",
    responses: {
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getRuleDetailsByWebAppOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationRule
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.updateSeen,
        Parameters.recommendationId
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const disableRecommendationForSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable",
    httpMethod: "POST",
    responses: {
        200: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listHistoryForHostingEnvironmentNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.nextLink,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listRecommendedRulesForHostingEnvironmentNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.nextLink,
        Parameters.hostingEnvironmentName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listHistoryForWebAppNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.nextLink,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listRecommendedRulesForWebAppNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RecommendationCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.nextLink,
        Parameters.siteName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
//# sourceMappingURL=recommendations.js.map