/*
 * 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, __awaiter } 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";
import { createHttpPoller } from "@azure/core-lro";
import { createLroSpec } from "../lroImpl";
/// <reference lib="esnext.asynciterable" />
/** Class containing StaticSites operations. */
export class StaticSitesImpl {
    /**
     * Initialize a new instance of the class StaticSites class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Description for Get all Static Sites 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 Gets all static sites in the specified resource group.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param options The options parameters.
     */
    listStaticSitesByResourceGroup(resourceGroupName, options) {
        const iter = this.getStaticSitesByResourceGroupPagingAll(resourceGroupName, 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.getStaticSitesByResourceGroupPagingPage(resourceGroupName, options, settings);
            }
        };
    }
    getStaticSitesByResourceGroupPagingPage(resourceGroupName, options, settings) {
        return __asyncGenerator(this, arguments, function* getStaticSitesByResourceGroupPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getStaticSitesByResourceGroup(resourceGroupName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getStaticSitesByResourceGroupNext(resourceGroupName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getStaticSitesByResourceGroupPagingAll(resourceGroupName, options) {
        return __asyncGenerator(this, arguments, function* getStaticSitesByResourceGroupPagingAll_1() {
            var _a, e_2, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getStaticSitesByResourceGroupPagingPage(resourceGroupName, 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 Gets the list of users of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param authprovider The auth provider for the users.
     * @param options The options parameters.
     */
    listStaticSiteUsers(resourceGroupName, name, authprovider, options) {
        const iter = this.listStaticSiteUsersPagingAll(resourceGroupName, name, authprovider, 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.listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, options, settings);
            }
        };
    }
    listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, options, settings) {
        return __asyncGenerator(this, arguments, function* listStaticSiteUsersPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listStaticSiteUsers(resourceGroupName, name, authprovider, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listStaticSiteUsersNext(resourceGroupName, name, authprovider, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listStaticSiteUsersPagingAll(resourceGroupName, name, authprovider, options) {
        return __asyncGenerator(this, arguments, function* listStaticSiteUsersPagingAll_1() {
            var _a, e_3, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, 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 Gets all static site builds for a particular static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteBuilds(resourceGroupName, name, options) {
        const iter = this.getStaticSiteBuildsPagingAll(resourceGroupName, name, 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.getStaticSiteBuildsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getStaticSiteBuildsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getStaticSiteBuildsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getStaticSiteBuilds(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getStaticSiteBuildsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getStaticSiteBuildsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getStaticSiteBuildsPagingAll_1() {
            var _a, e_4, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getStaticSiteBuildsPagingPage(resourceGroupName, name, 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; }
            }
        });
    }
    /**
     * Returns overviews of database connections for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listBuildDatabaseConnections(resourceGroupName, name, environmentName, options) {
        const iter = this.getBuildDatabaseConnectionsPagingAll(resourceGroupName, name, environmentName, 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.getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, options, settings);
            }
        };
    }
    getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* getBuildDatabaseConnectionsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getBuildDatabaseConnections(resourceGroupName, name, environmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getBuildDatabaseConnectionsNext(resourceGroupName, name, environmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getBuildDatabaseConnectionsPagingAll(resourceGroupName, name, environmentName, options) {
        return __asyncGenerator(this, arguments, function* getBuildDatabaseConnectionsPagingAll_1() {
            var _a, e_5, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, 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 Gets the functions of a particular static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, options) {
        const iter = this.listStaticSiteBuildFunctionsPagingAll(resourceGroupName, name, environmentName, 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.listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, options, settings);
            }
        };
    }
    listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* listStaticSiteBuildFunctionsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listStaticSiteBuildFunctionsNext(resourceGroupName, name, environmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listStaticSiteBuildFunctionsPagingAll(resourceGroupName, name, environmentName, options) {
        return __asyncGenerator(this, arguments, function* listStaticSiteBuildFunctionsPagingAll_1() {
            var _a, e_6, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, 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_6_1) { e_6 = { error: e_6_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_6) throw e_6.error; }
            }
        });
    }
    /**
     * Returns details of database connections for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listBuildDatabaseConnectionsWithDetails(resourceGroupName, name, environmentName, options) {
        const iter = this.getBuildDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, environmentName, 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.getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, options, settings);
            }
        };
    }
    getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* getBuildDatabaseConnectionsWithDetailsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getBuildDatabaseConnectionsWithDetails(resourceGroupName, name, environmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getBuildDatabaseConnectionsWithDetailsNext(resourceGroupName, name, environmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getBuildDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, environmentName, options) {
        return __asyncGenerator(this, arguments, function* getBuildDatabaseConnectionsWithDetailsPagingAll_1() {
            var _a, e_7, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, 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_7_1) { e_7 = { error: e_7_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_7) throw e_7.error; }
            }
        });
    }
    /**
     * Description for Gets the details of the user provided function apps registered with a static site
     * build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, options) {
        const iter = this.getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(resourceGroupName, name, environmentName, 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.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, options, settings);
            }
        };
    }
    getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* getUserProvidedFunctionAppsForStaticSiteBuildPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getUserProvidedFunctionAppsForStaticSiteBuildNext(resourceGroupName, name, environmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(resourceGroupName, name, environmentName, options) {
        return __asyncGenerator(this, arguments, function* getUserProvidedFunctionAppsForStaticSiteBuildPagingAll_1() {
            var _a, e_8, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, 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_8_1) { e_8 = { error: e_8_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_8) throw e_8.error; }
            }
        });
    }
    /**
     * Description for Gets the basic auth properties for a static site as a collection.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listBasicAuth(resourceGroupName, name, options) {
        const iter = this.listBasicAuthPagingAll(resourceGroupName, name, 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.listBasicAuthPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    listBasicAuthPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* listBasicAuthPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listBasicAuth(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listBasicAuthNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listBasicAuthPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* listBasicAuthPagingAll_1() {
            var _a, e_9, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listBasicAuthPagingPage(resourceGroupName, name, 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_9_1) { e_9 = { error: e_9_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_9) throw e_9.error; }
            }
        });
    }
    /**
     * Description for Gets all static site custom domains for a particular static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site resource to search in.
     * @param options The options parameters.
     */
    listStaticSiteCustomDomains(resourceGroupName, name, options) {
        const iter = this.listStaticSiteCustomDomainsPagingAll(resourceGroupName, name, 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.listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* listStaticSiteCustomDomainsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listStaticSiteCustomDomains(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listStaticSiteCustomDomainsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listStaticSiteCustomDomainsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* listStaticSiteCustomDomainsPagingAll_1() {
            var _a, e_10, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, 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_10_1) { e_10 = { error: e_10_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_10) throw e_10.error; }
            }
        });
    }
    /**
     * Returns overviews of database connections for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    listDatabaseConnections(resourceGroupName, name, options) {
        const iter = this.getDatabaseConnectionsPagingAll(resourceGroupName, name, 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.getDatabaseConnectionsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getDatabaseConnectionsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getDatabaseConnectionsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getDatabaseConnections(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getDatabaseConnectionsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getDatabaseConnectionsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getDatabaseConnectionsPagingAll_1() {
            var _a, e_11, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getDatabaseConnectionsPagingPage(resourceGroupName, name, 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_11_1) { e_11 = { error: e_11_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_11) throw e_11.error; }
            }
        });
    }
    /**
     * Description for Gets the functions of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteFunctions(resourceGroupName, name, options) {
        const iter = this.listStaticSiteFunctionsPagingAll(resourceGroupName, name, 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.listStaticSiteFunctionsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    listStaticSiteFunctionsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* listStaticSiteFunctionsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._listStaticSiteFunctions(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._listStaticSiteFunctionsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    listStaticSiteFunctionsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* listStaticSiteFunctionsPagingAll_1() {
            var _a, e_12, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.listStaticSiteFunctionsPagingPage(resourceGroupName, name, 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_12_1) { e_12 = { error: e_12_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_12) throw e_12.error; }
            }
        });
    }
    /**
     * Description for Gets the list of private endpoint connections associated with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listPrivateEndpointConnectionList(resourceGroupName, name, options) {
        const iter = this.getPrivateEndpointConnectionListPagingAll(resourceGroupName, name, 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.getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getPrivateEndpointConnectionListPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getPrivateEndpointConnectionList(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getPrivateEndpointConnectionListNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getPrivateEndpointConnectionListPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getPrivateEndpointConnectionListPagingAll_1() {
            var _a, e_13, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, 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_13_1) { e_13 = { error: e_13_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_13) throw e_13.error; }
            }
        });
    }
    /**
     * Returns details of database connections for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    listDatabaseConnectionsWithDetails(resourceGroupName, name, options) {
        const iter = this.getDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, 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.getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getDatabaseConnectionsWithDetailsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getDatabaseConnectionsWithDetails(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getDatabaseConnectionsWithDetailsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getDatabaseConnectionsWithDetailsPagingAll_1() {
            var _a, e_14, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, 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_14_1) { e_14 = { error: e_14_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_14) throw e_14.error; }
            }
        });
    }
    /**
     * Description for Gets the details of the user provided function apps registered with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, options) {
        const iter = this.getUserProvidedFunctionAppsForStaticSitePagingAll(resourceGroupName, name, 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.getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getUserProvidedFunctionAppsForStaticSitePagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getUserProvidedFunctionAppsForStaticSiteNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getUserProvidedFunctionAppsForStaticSitePagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getUserProvidedFunctionAppsForStaticSitePagingAll_1() {
            var _a, e_15, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, 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_15_1) { e_15 = { error: e_15_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_15) throw e_15.error; }
            }
        });
    }
    /**
     * Returns details of all backends linked to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    listLinkedBackends(resourceGroupName, name, options) {
        const iter = this.getLinkedBackendsPagingAll(resourceGroupName, name, 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.getLinkedBackendsPagingPage(resourceGroupName, name, options, settings);
            }
        };
    }
    getLinkedBackendsPagingPage(resourceGroupName, name, options, settings) {
        return __asyncGenerator(this, arguments, function* getLinkedBackendsPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getLinkedBackends(resourceGroupName, name, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getLinkedBackendsNext(resourceGroupName, name, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getLinkedBackendsPagingAll(resourceGroupName, name, options) {
        return __asyncGenerator(this, arguments, function* getLinkedBackendsPagingAll_1() {
            var _a, e_16, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getLinkedBackendsPagingPage(resourceGroupName, name, 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_16_1) { e_16 = { error: e_16_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_16) throw e_16.error; }
            }
        });
    }
    /**
     * Returns details of all backends linked to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param options The options parameters.
     */
    listLinkedBackendsForBuild(resourceGroupName, name, environmentName, options) {
        const iter = this.getLinkedBackendsForBuildPagingAll(resourceGroupName, name, environmentName, 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.getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, options, settings);
            }
        };
    }
    getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, options, settings) {
        return __asyncGenerator(this, arguments, function* getLinkedBackendsForBuildPagingPage_1() {
            let result;
            let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
            if (!continuationToken) {
                result = yield __await(this._getLinkedBackendsForBuild(resourceGroupName, name, environmentName, options));
                let page = result.value || [];
                continuationToken = result.nextLink;
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
            while (continuationToken) {
                result = yield __await(this._getLinkedBackendsForBuildNext(resourceGroupName, name, environmentName, continuationToken, options));
                continuationToken = result.nextLink;
                let page = result.value || [];
                setContinuationToken(page, continuationToken);
                yield yield __await(page);
            }
        });
    }
    getLinkedBackendsForBuildPagingAll(resourceGroupName, name, environmentName, options) {
        return __asyncGenerator(this, arguments, function* getLinkedBackendsForBuildPagingAll_1() {
            var _a, e_17, _b, _c;
            try {
                for (var _d = true, _e = __asyncValues(this.getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, 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_17_1) { e_17 = { error: e_17_1 }; }
            finally {
                try {
                    if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
                }
                finally { if (e_17) throw e_17.error; }
            }
        });
    }
    /**
     * Description for Generates a preview workflow file for the static site
     * @param location Location where you plan to create the static site.
     * @param staticSitesWorkflowPreviewRequest A JSON representation of the
     *                                          StaticSitesWorkflowPreviewRequest properties. See example.
     * @param options The options parameters.
     */
    previewWorkflow(location, staticSitesWorkflowPreviewRequest, options) {
        return this.client.sendOperationRequest({ location, staticSitesWorkflowPreviewRequest, options }, previewWorkflowOperationSpec);
    }
    /**
     * Description for Get all Static Sites for a subscription.
     * @param options The options parameters.
     */
    _list(options) {
        return this.client.sendOperationRequest({ options }, listOperationSpec);
    }
    /**
     * Description for Gets all static sites in the specified resource group.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param options The options parameters.
     */
    _getStaticSitesByResourceGroup(resourceGroupName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, options }, getStaticSitesByResourceGroupOperationSpec);
    }
    /**
     * Description for Gets the details of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    getStaticSite(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getStaticSiteOperationSpec);
    }
    /**
     * Description for Creates a new static site in an existing resource group, or updates an existing
     * static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to create or update.
     * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
     * @param options The options parameters.
     */
    beginCreateOrUpdateStaticSite(resourceGroupName, name, staticSiteEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, staticSiteEnvelope, options },
                spec: createOrUpdateStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Creates a new static site in an existing resource group, or updates an existing
     * static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to create or update.
     * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
     * @param options The options parameters.
     */
    beginCreateOrUpdateStaticSiteAndWait(resourceGroupName, name, staticSiteEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateOrUpdateStaticSite(resourceGroupName, name, staticSiteEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Deletes a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to delete.
     * @param options The options parameters.
     */
    beginDeleteStaticSite(resourceGroupName, name, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, options },
                spec: deleteStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deletes a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to delete.
     * @param options The options parameters.
     */
    beginDeleteStaticSiteAndWait(resourceGroupName, name, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDeleteStaticSite(resourceGroupName, name, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Creates a new static site in an existing resource group, or updates an existing
     * static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to create or update.
     * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
     * @param options The options parameters.
     */
    updateStaticSite(resourceGroupName, name, staticSiteEnvelope, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, staticSiteEnvelope, options }, updateStaticSiteOperationSpec);
    }
    /**
     * Description for Gets the list of users of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param authprovider The auth provider for the users.
     * @param options The options parameters.
     */
    _listStaticSiteUsers(resourceGroupName, name, authprovider, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, authprovider, options }, listStaticSiteUsersOperationSpec);
    }
    /**
     * Description for Deletes the user entry from the static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the staticsite.
     * @param authprovider The auth provider for this user.
     * @param userid The user id of the user.
     * @param options The options parameters.
     */
    deleteStaticSiteUser(resourceGroupName, name, authprovider, userid, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, authprovider, userid, options }, deleteStaticSiteUserOperationSpec);
    }
    /**
     * Description for Updates a user entry with the listed roles
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param authprovider The auth provider for this user.
     * @param userid The user id of the user.
     * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example.
     * @param options The options parameters.
     */
    updateStaticSiteUser(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            authprovider,
            userid,
            staticSiteUserEnvelope,
            options
        }, updateStaticSiteUserOperationSpec);
    }
    /**
     * Description for Gets all static site builds for a particular static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    _getStaticSiteBuilds(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getStaticSiteBuildsOperationSpec);
    }
    /**
     * Description for Gets the details of a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    getStaticSiteBuild(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getStaticSiteBuildOperationSpec);
    }
    /**
     * Description for Deletes a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    beginDeleteStaticSiteBuild(resourceGroupName, name, environmentName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, environmentName, options },
                spec: deleteStaticSiteBuildOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deletes a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    beginDeleteStaticSiteBuildAndWait(resourceGroupName, name, environmentName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDeleteStaticSiteBuild(resourceGroupName, name, environmentName, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Creates or updates the app settings of a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param appSettings The dictionary containing the static site app settings to update.
     * @param options The options parameters.
     */
    createOrUpdateStaticSiteBuildAppSettings(resourceGroupName, name, environmentName, appSettings, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, appSettings, options }, createOrUpdateStaticSiteBuildAppSettingsOperationSpec);
    }
    /**
     * Description for Creates or updates the function app settings of a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param appSettings The dictionary containing the static site function app settings to update.
     * @param options The options parameters.
     */
    createOrUpdateStaticSiteBuildFunctionAppSettings(resourceGroupName, name, environmentName, appSettings, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, appSettings, options }, createOrUpdateStaticSiteBuildFunctionAppSettingsOperationSpec);
    }
    /**
     * Returns overviews of database connections for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    _getBuildDatabaseConnections(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getBuildDatabaseConnectionsOperationSpec);
    }
    /**
     * Returns overview of a database connection for a static site build by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    getBuildDatabaseConnection(resourceGroupName, name, environmentName, databaseConnectionName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            environmentName,
            databaseConnectionName,
            options
        }, getBuildDatabaseConnectionOperationSpec);
    }
    /**
     * Description for Create or update a database connection for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param databaseConnectionName Name of the database connection.
     * @param databaseConnectionRequestEnvelope A JSON representation of the database connection request
     *                                          properties
     * @param options The options parameters.
     */
    createOrUpdateBuildDatabaseConnection(resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            environmentName,
            databaseConnectionName,
            databaseConnectionRequestEnvelope,
            options
        }, createOrUpdateBuildDatabaseConnectionOperationSpec);
    }
    /**
     * Delete a database connection for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    deleteBuildDatabaseConnection(resourceGroupName, name, environmentName, databaseConnectionName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            environmentName,
            databaseConnectionName,
            options
        }, deleteBuildDatabaseConnectionOperationSpec);
    }
    /**
     * Description for Create or update a database connection for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param databaseConnectionName Name of the database connection.
     * @param databaseConnectionRequestEnvelope A JSON representation of the database connection request
     *                                          properties
     * @param options The options parameters.
     */
    updateBuildDatabaseConnection(resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            environmentName,
            databaseConnectionName,
            databaseConnectionRequestEnvelope,
            options
        }, updateBuildDatabaseConnectionOperationSpec);
    }
    /**
     * Returns details of a database connection for a static site build by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    getBuildDatabaseConnectionWithDetails(resourceGroupName, name, environmentName, databaseConnectionName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            environmentName,
            databaseConnectionName,
            options
        }, getBuildDatabaseConnectionWithDetailsOperationSpec);
    }
    /**
     * Description for Gets the functions of a particular static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    _listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, listStaticSiteBuildFunctionsOperationSpec);
    }
    /**
     * Description for Gets the application settings of a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listStaticSiteBuildAppSettings(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, listStaticSiteBuildAppSettingsOperationSpec);
    }
    /**
     * Description for Gets the application settings of a static site build.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    listStaticSiteBuildFunctionAppSettings(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, listStaticSiteBuildFunctionAppSettingsOperationSpec);
    }
    /**
     * Returns details of database connections for a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    _getBuildDatabaseConnectionsWithDetails(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getBuildDatabaseConnectionsWithDetailsOperationSpec);
    }
    /**
     * Description for Gets the details of the user provided function apps registered with a static site
     * build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param options The options parameters.
     */
    _getUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getUserProvidedFunctionAppsForStaticSiteBuildOperationSpec);
    }
    /**
     * Description for Gets the details of the user provided function app registered with a static site
     * build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param functionAppName Name of the function app registered with the static site build.
     * @param options The options parameters.
     */
    getUserProvidedFunctionAppForStaticSiteBuild(resourceGroupName, name, environmentName, functionAppName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, functionAppName, options }, getUserProvidedFunctionAppForStaticSiteBuildOperationSpec);
    }
    /**
     * Description for Register a user provided function app with a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param functionAppName Name of the function app to register with the static site build.
     * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function
     *                                               app properties. See example.
     * @param options The options parameters.
     */
    beginRegisterUserProvidedFunctionAppWithStaticSiteBuild(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    environmentName,
                    functionAppName,
                    staticSiteUserProvidedFunctionEnvelope,
                    options
                },
                spec: registerUserProvidedFunctionAppWithStaticSiteBuildOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Register a user provided function app with a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param functionAppName Name of the function app to register with the static site build.
     * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function
     *                                               app properties. See example.
     * @param options The options parameters.
     */
    beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAndWait(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginRegisterUserProvidedFunctionAppWithStaticSiteBuild(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Detach the user provided function app from the static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param functionAppName Name of the function app registered with the static site build.
     * @param options The options parameters.
     */
    detachUserProvidedFunctionAppFromStaticSiteBuild(resourceGroupName, name, environmentName, functionAppName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, functionAppName, options }, detachUserProvidedFunctionAppFromStaticSiteBuildOperationSpec);
    }
    /**
     * Description for Deploys zipped content to a specific environment of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName Name of the environment.
     * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment
     *                                        properties. See example.
     * @param options The options parameters.
     */
    beginCreateZipDeploymentForStaticSiteBuild(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    environmentName,
                    staticSiteZipDeploymentEnvelope,
                    options
                },
                spec: createZipDeploymentForStaticSiteBuildOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deploys zipped content to a specific environment of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName Name of the environment.
     * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment
     *                                        properties. See example.
     * @param options The options parameters.
     */
    beginCreateZipDeploymentForStaticSiteBuildAndWait(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateZipDeploymentForStaticSiteBuild(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Creates or updates the app settings of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param appSettings The dictionary containing the static site app settings to update.
     * @param options The options parameters.
     */
    createOrUpdateStaticSiteAppSettings(resourceGroupName, name, appSettings, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, appSettings, options }, createOrUpdateStaticSiteAppSettingsOperationSpec);
    }
    /**
     * Description for Gets the basic auth properties for a static site as a collection.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    _listBasicAuth(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listBasicAuthOperationSpec);
    }
    /**
     * Description for Gets the basic auth properties for a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param basicAuthName name of the basic auth entry.
     * @param options The options parameters.
     */
    getBasicAuth(resourceGroupName, name, basicAuthName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, basicAuthName, options }, getBasicAuthOperationSpec);
    }
    /**
     * Description for Adds or updates basic auth for a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param basicAuthName name of the basic auth entry.
     * @param basicAuthEnvelope A JSON representation of the basic auth properties.
     * @param options The options parameters.
     */
    createOrUpdateBasicAuth(resourceGroupName, name, basicAuthName, basicAuthEnvelope, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, basicAuthName, basicAuthEnvelope, options }, createOrUpdateBasicAuthOperationSpec);
    }
    /**
     * Description for Creates or updates the function app settings of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param appSettings The dictionary containing the static site function app settings to update.
     * @param options The options parameters.
     */
    createOrUpdateStaticSiteFunctionAppSettings(resourceGroupName, name, appSettings, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, appSettings, options }, createOrUpdateStaticSiteFunctionAppSettingsOperationSpec);
    }
    /**
     * Description for Creates an invitation link for a user with the role
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource.
     * @param options The options parameters.
     */
    createUserRolesInvitationLink(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            staticSiteUserRolesInvitationEnvelope,
            options
        }, createUserRolesInvitationLinkOperationSpec);
    }
    /**
     * Description for Gets all static site custom domains for a particular static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site resource to search in.
     * @param options The options parameters.
     */
    _listStaticSiteCustomDomains(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteCustomDomainsOperationSpec);
    }
    /**
     * Description for Gets an existing custom domain for a particular static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site resource to search in.
     * @param domainName The custom domain name.
     * @param options The options parameters.
     */
    getStaticSiteCustomDomain(resourceGroupName, name, domainName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, domainName, options }, getStaticSiteCustomDomainOperationSpec);
    }
    /**
     * Description for Creates a new static site custom domain in an existing resource group and static
     * site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to create.
     * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site
     *                                                        custom domain request properties. See example.
     * @param options The options parameters.
     */
    beginCreateOrUpdateStaticSiteCustomDomain(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    domainName,
                    staticSiteCustomDomainRequestPropertiesEnvelope,
                    options
                },
                spec: createOrUpdateStaticSiteCustomDomainOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Creates a new static site custom domain in an existing resource group and static
     * site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to create.
     * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site
     *                                                        custom domain request properties. See example.
     * @param options The options parameters.
     */
    beginCreateOrUpdateStaticSiteCustomDomainAndWait(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateOrUpdateStaticSiteCustomDomain(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Deletes a custom domain.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to delete.
     * @param options The options parameters.
     */
    beginDeleteStaticSiteCustomDomain(resourceGroupName, name, domainName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, domainName, options },
                spec: deleteStaticSiteCustomDomainOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deletes a custom domain.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to delete.
     * @param options The options parameters.
     */
    beginDeleteStaticSiteCustomDomainAndWait(resourceGroupName, name, domainName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDeleteStaticSiteCustomDomain(resourceGroupName, name, domainName, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Validates a particular custom domain can be added to a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to validate.
     * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site
     *                                                        custom domain request properties. See example.
     * @param options The options parameters.
     */
    beginValidateCustomDomainCanBeAddedToStaticSite(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    domainName,
                    staticSiteCustomDomainRequestPropertiesEnvelope,
                    options
                },
                spec: validateCustomDomainCanBeAddedToStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Validates a particular custom domain can be added to a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param domainName The custom domain to validate.
     * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site
     *                                                        custom domain request properties. See example.
     * @param options The options parameters.
     */
    beginValidateCustomDomainCanBeAddedToStaticSiteAndWait(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginValidateCustomDomainCanBeAddedToStaticSite(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Returns overviews of database connections for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    _getDatabaseConnections(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getDatabaseConnectionsOperationSpec);
    }
    /**
     * Returns overview of a database connection for a static site by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    getDatabaseConnection(resourceGroupName, name, databaseConnectionName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, databaseConnectionName, options }, getDatabaseConnectionOperationSpec);
    }
    /**
     * Description for Create or update a database connection for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param databaseConnectionName Name of the database connection.
     * @param databaseConnectionRequestEnvelope A JSON representation of the database connection request
     *                                          properties
     * @param options The options parameters.
     */
    createOrUpdateDatabaseConnection(resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            databaseConnectionName,
            databaseConnectionRequestEnvelope,
            options
        }, createOrUpdateDatabaseConnectionOperationSpec);
    }
    /**
     * Delete a database connection for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    deleteDatabaseConnection(resourceGroupName, name, databaseConnectionName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, databaseConnectionName, options }, deleteDatabaseConnectionOperationSpec);
    }
    /**
     * Description for Create or update a database connection for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param databaseConnectionName Name of the database connection.
     * @param databaseConnectionRequestEnvelope A JSON representation of the database connection request
     *                                          properties
     * @param options The options parameters.
     */
    updateDatabaseConnection(resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            name,
            databaseConnectionName,
            databaseConnectionRequestEnvelope,
            options
        }, updateDatabaseConnectionOperationSpec);
    }
    /**
     * Returns details of a database connection for a static site by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param databaseConnectionName Name of the database connection.
     * @param options The options parameters.
     */
    getDatabaseConnectionWithDetails(resourceGroupName, name, databaseConnectionName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, databaseConnectionName, options }, getDatabaseConnectionWithDetailsOperationSpec);
    }
    /**
     * Description for Detaches a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to detach.
     * @param options The options parameters.
     */
    beginDetachStaticSite(resourceGroupName, name, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, options },
                spec: detachStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Detaches a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site to detach.
     * @param options The options parameters.
     */
    beginDetachStaticSiteAndWait(resourceGroupName, name, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDetachStaticSite(resourceGroupName, name, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Gets the functions of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    _listStaticSiteFunctions(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteFunctionsOperationSpec);
    }
    /**
     * Description for Gets the application settings of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteAppSettings(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteAppSettingsOperationSpec);
    }
    /**
     * Description for Lists the roles configured for the static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteConfiguredRoles(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteConfiguredRolesOperationSpec);
    }
    /**
     * Description for Gets the application settings of a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteFunctionAppSettings(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteFunctionAppSettingsOperationSpec);
    }
    /**
     * Description for Lists the secrets for an existing static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    listStaticSiteSecrets(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, listStaticSiteSecretsOperationSpec);
    }
    /**
     * Description for Gets the list of private endpoint connections associated with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    _getPrivateEndpointConnectionList(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getPrivateEndpointConnectionListOperationSpec);
    }
    /**
     * Description for Gets a private endpoint connection
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param privateEndpointConnectionName Name of the private endpoint connection.
     * @param options The options parameters.
     */
    getPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, privateEndpointConnectionName, options }, getPrivateEndpointConnectionOperationSpec);
    }
    /**
     * Description for Approves or rejects a private endpoint connection
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param privateEndpointConnectionName Name of the private endpoint connection.
     * @param privateEndpointWrapper Request body.
     * @param options The options parameters.
     */
    beginApproveOrRejectPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    privateEndpointConnectionName,
                    privateEndpointWrapper,
                    options
                },
                spec: approveOrRejectPrivateEndpointConnectionOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Approves or rejects a private endpoint connection
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param privateEndpointConnectionName Name of the private endpoint connection.
     * @param privateEndpointWrapper Request body.
     * @param options The options parameters.
     */
    beginApproveOrRejectPrivateEndpointConnectionAndWait(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginApproveOrRejectPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Deletes a private endpoint connection
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param privateEndpointConnectionName Name of the private endpoint connection.
     * @param options The options parameters.
     */
    beginDeletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: { resourceGroupName, name, privateEndpointConnectionName, options },
                spec: deletePrivateEndpointConnectionOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deletes a private endpoint connection
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param privateEndpointConnectionName Name of the private endpoint connection.
     * @param options The options parameters.
     */
    beginDeletePrivateEndpointConnectionAndWait(resourceGroupName, name, privateEndpointConnectionName, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginDeletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Gets the private link resources
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the site.
     * @param options The options parameters.
     */
    getPrivateLinkResources(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getPrivateLinkResourcesOperationSpec);
    }
    /**
     * Description for Resets the api key for an existing static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource.
     * @param options The options parameters.
     */
    resetStaticSiteApiKey(resourceGroupName, name, resetPropertiesEnvelope, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, resetPropertiesEnvelope, options }, resetStaticSiteApiKeyOperationSpec);
    }
    /**
     * Returns details of database connections for a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    _getDatabaseConnectionsWithDetails(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getDatabaseConnectionsWithDetailsOperationSpec);
    }
    /**
     * Description for Gets the details of the user provided function apps registered with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param options The options parameters.
     */
    _getUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getUserProvidedFunctionAppsForStaticSiteOperationSpec);
    }
    /**
     * Description for Gets the details of the user provided function app registered with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param functionAppName Name of the function app registered with the static site.
     * @param options The options parameters.
     */
    getUserProvidedFunctionAppForStaticSite(resourceGroupName, name, functionAppName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, functionAppName, options }, getUserProvidedFunctionAppForStaticSiteOperationSpec);
    }
    /**
     * Description for Register a user provided function app with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param functionAppName Name of the function app to register with the static site.
     * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function
     *                                               app properties. See example.
     * @param options The options parameters.
     */
    beginRegisterUserProvidedFunctionAppWithStaticSite(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    functionAppName,
                    staticSiteUserProvidedFunctionEnvelope,
                    options
                },
                spec: registerUserProvidedFunctionAppWithStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Register a user provided function app with a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param functionAppName Name of the function app to register with the static site.
     * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function
     *                                               app properties. See example.
     * @param options The options parameters.
     */
    beginRegisterUserProvidedFunctionAppWithStaticSiteAndWait(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginRegisterUserProvidedFunctionAppWithStaticSite(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Description for Detach the user provided function app from the static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param functionAppName Name of the function app registered with the static site.
     * @param options The options parameters.
     */
    detachUserProvidedFunctionAppFromStaticSite(resourceGroupName, name, functionAppName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, functionAppName, options }, detachUserProvidedFunctionAppFromStaticSiteOperationSpec);
    }
    /**
     * Description for Deploys zipped content to a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment
     *                                        properties. See example.
     * @param options The options parameters.
     */
    beginCreateZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    staticSiteZipDeploymentEnvelope,
                    options
                },
                spec: createZipDeploymentForStaticSiteOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Description for Deploys zipped content to a static site.
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment
     *                                        properties. See example.
     * @param options The options parameters.
     */
    beginCreateZipDeploymentForStaticSiteAndWait(resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginCreateZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Validates that a backend can be linked to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginValidateBackend(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    linkedBackendName,
                    staticSiteLinkedBackendEnvelope,
                    options
                },
                spec: validateBackendOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Validates that a backend can be linked to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginValidateBackendAndWait(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginValidateBackend(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Validates that a backend can be linked to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginValidateBackendForBuild(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    environmentName,
                    linkedBackendName,
                    staticSiteLinkedBackendEnvelope,
                    options
                },
                spec: validateBackendForBuildOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Validates that a backend can be linked to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginValidateBackendForBuildAndWait(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginValidateBackendForBuild(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Returns details of all backends linked to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param options The options parameters.
     */
    _getLinkedBackends(resourceGroupName, name, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, options }, getLinkedBackendsOperationSpec);
    }
    /**
     * Returns details of all backends linked to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param options The options parameters.
     */
    _getLinkedBackendsForBuild(resourceGroupName, name, environmentName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getLinkedBackendsForBuildOperationSpec);
    }
    /**
     * Returns the details of a linked backend linked to a static site by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param options The options parameters.
     */
    getLinkedBackend(resourceGroupName, name, linkedBackendName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, linkedBackendName, options }, getLinkedBackendOperationSpec);
    }
    /**
     * Link backend to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the backend to link to the static site
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginLinkBackend(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    linkedBackendName,
                    staticSiteLinkedBackendEnvelope,
                    options
                },
                spec: linkBackendOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Link backend to a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the backend to link to the static site
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginLinkBackendAndWait(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginLinkBackend(resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Unlink a backend from a static site
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param linkedBackendName Name of the backend linked to the static site
     * @param options The options parameters.
     */
    unlinkBackend(resourceGroupName, name, linkedBackendName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, linkedBackendName, options }, unlinkBackendOperationSpec);
    }
    /**
     * Returns the details of a linked backend linked to a static site build by name
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the linked backend that should be retrieved
     * @param options The options parameters.
     */
    getLinkedBackendForBuild(resourceGroupName, name, environmentName, linkedBackendName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, linkedBackendName, options }, getLinkedBackendForBuildOperationSpec);
    }
    /**
     * Link backend to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the backend to link to the static site
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginLinkBackendToBuild(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
                return this.client.sendOperationRequest(args, spec);
            });
            const sendOperationFn = (args, spec) => __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 = createLroSpec({
                sendOperationFn,
                args: {
                    resourceGroupName,
                    name,
                    environmentName,
                    linkedBackendName,
                    staticSiteLinkedBackendEnvelope,
                    options
                },
                spec: linkBackendToBuildOperationSpec
            });
            const poller = yield createHttpPoller(lro, {
                restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
                intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
            });
            yield poller.poll();
            return poller;
        });
    }
    /**
     * Link backend to a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the backend to link to the static site
     * @param staticSiteLinkedBackendEnvelope A JSON representation of the linked backend request
     *                                        properties
     * @param options The options parameters.
     */
    beginLinkBackendToBuildAndWait(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) {
        return __awaiter(this, void 0, void 0, function* () {
            const poller = yield this.beginLinkBackendToBuild(resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options);
            return poller.pollUntilDone();
        });
    }
    /**
     * Unlink a backend from a static site build
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param linkedBackendName Name of the backend linked to the static site
     * @param options The options parameters.
     */
    unlinkBackendFromBuild(resourceGroupName, name, environmentName, linkedBackendName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, linkedBackendName, options }, unlinkBackendFromBuildOperationSpec);
    }
    /**
     * 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);
    }
    /**
     * GetStaticSitesByResourceGroupNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param nextLink The nextLink from the previous successful call to the GetStaticSitesByResourceGroup
     *                 method.
     * @param options The options parameters.
     */
    _getStaticSitesByResourceGroupNext(resourceGroupName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, getStaticSitesByResourceGroupNextOperationSpec);
    }
    /**
     * ListStaticSiteUsersNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param authprovider The auth provider for the users.
     * @param nextLink The nextLink from the previous successful call to the ListStaticSiteUsers method.
     * @param options The options parameters.
     */
    _listStaticSiteUsersNext(resourceGroupName, name, authprovider, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, authprovider, nextLink, options }, listStaticSiteUsersNextOperationSpec);
    }
    /**
     * GetStaticSiteBuildsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param nextLink The nextLink from the previous successful call to the GetStaticSiteBuilds method.
     * @param options The options parameters.
     */
    _getStaticSiteBuildsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getStaticSiteBuildsNextOperationSpec);
    }
    /**
     * GetBuildDatabaseConnectionsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param nextLink The nextLink from the previous successful call to the GetBuildDatabaseConnections
     *                 method.
     * @param options The options parameters.
     */
    _getBuildDatabaseConnectionsNext(resourceGroupName, name, environmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, nextLink, options }, getBuildDatabaseConnectionsNextOperationSpec);
    }
    /**
     * ListStaticSiteBuildFunctionsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param nextLink The nextLink from the previous successful call to the ListStaticSiteBuildFunctions
     *                 method.
     * @param options The options parameters.
     */
    _listStaticSiteBuildFunctionsNext(resourceGroupName, name, environmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, nextLink, options }, listStaticSiteBuildFunctionsNextOperationSpec);
    }
    /**
     * GetBuildDatabaseConnectionsWithDetailsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier.
     * @param nextLink The nextLink from the previous successful call to the
     *                 GetBuildDatabaseConnectionsWithDetails method.
     * @param options The options parameters.
     */
    _getBuildDatabaseConnectionsWithDetailsNext(resourceGroupName, name, environmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, nextLink, options }, getBuildDatabaseConnectionsWithDetailsNextOperationSpec);
    }
    /**
     * GetUserProvidedFunctionAppsForStaticSiteBuildNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param environmentName The stage site identifier.
     * @param nextLink The nextLink from the previous successful call to the
     *                 GetUserProvidedFunctionAppsForStaticSiteBuild method.
     * @param options The options parameters.
     */
    _getUserProvidedFunctionAppsForStaticSiteBuildNext(resourceGroupName, name, environmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, nextLink, options }, getUserProvidedFunctionAppsForStaticSiteBuildNextOperationSpec);
    }
    /**
     * ListBasicAuthNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param nextLink The nextLink from the previous successful call to the ListBasicAuth method.
     * @param options The options parameters.
     */
    _listBasicAuthNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, listBasicAuthNextOperationSpec);
    }
    /**
     * ListStaticSiteCustomDomainsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site resource to search in.
     * @param nextLink The nextLink from the previous successful call to the ListStaticSiteCustomDomains
     *                 method.
     * @param options The options parameters.
     */
    _listStaticSiteCustomDomainsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, listStaticSiteCustomDomainsNextOperationSpec);
    }
    /**
     * GetDatabaseConnectionsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param nextLink The nextLink from the previous successful call to the GetDatabaseConnections method.
     * @param options The options parameters.
     */
    _getDatabaseConnectionsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getDatabaseConnectionsNextOperationSpec);
    }
    /**
     * ListStaticSiteFunctionsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param nextLink The nextLink from the previous successful call to the ListStaticSiteFunctions
     *                 method.
     * @param options The options parameters.
     */
    _listStaticSiteFunctionsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, listStaticSiteFunctionsNextOperationSpec);
    }
    /**
     * GetPrivateEndpointConnectionListNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param nextLink The nextLink from the previous successful call to the
     *                 GetPrivateEndpointConnectionList method.
     * @param options The options parameters.
     */
    _getPrivateEndpointConnectionListNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getPrivateEndpointConnectionListNextOperationSpec);
    }
    /**
     * GetDatabaseConnectionsWithDetailsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param nextLink The nextLink from the previous successful call to the
     *                 GetDatabaseConnectionsWithDetails method.
     * @param options The options parameters.
     */
    _getDatabaseConnectionsWithDetailsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getDatabaseConnectionsWithDetailsNextOperationSpec);
    }
    /**
     * GetUserProvidedFunctionAppsForStaticSiteNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site.
     * @param nextLink The nextLink from the previous successful call to the
     *                 GetUserProvidedFunctionAppsForStaticSite method.
     * @param options The options parameters.
     */
    _getUserProvidedFunctionAppsForStaticSiteNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getUserProvidedFunctionAppsForStaticSiteNextOperationSpec);
    }
    /**
     * GetLinkedBackendsNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param nextLink The nextLink from the previous successful call to the GetLinkedBackends method.
     * @param options The options parameters.
     */
    _getLinkedBackendsNext(resourceGroupName, name, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, getLinkedBackendsNextOperationSpec);
    }
    /**
     * GetLinkedBackendsForBuildNext
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the static site
     * @param environmentName The stage site identifier
     * @param nextLink The nextLink from the previous successful call to the GetLinkedBackendsForBuild
     *                 method.
     * @param options The options parameters.
     */
    _getLinkedBackendsForBuildNext(resourceGroupName, name, environmentName, nextLink, options) {
        return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, nextLink, options }, getLinkedBackendsForBuildNextOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const previewWorkflowOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSitesWorkflowPreview
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSitesWorkflowPreviewRequest,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.location
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const listOperationSpec = {
    path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [Parameters.$host, Parameters.subscriptionId],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSitesByResourceGroupOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const deleteStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const updateStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteEnvelope1,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const listStaticSiteUsersOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.authprovider
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const deleteStaticSiteUserOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.authprovider,
        Parameters.userid
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const updateStaticSiteUserOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteUserEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.authprovider,
        Parameters.userid
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getStaticSiteBuildsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBuildCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBuildARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const deleteStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateStaticSiteBuildAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.appSettings,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const createOrUpdateStaticSiteBuildFunctionAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.appSettings,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getBuildDatabaseConnectionsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getBuildDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateBuildDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.databaseConnectionRequestEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const deleteBuildDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const updateBuildDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.databaseConnectionRequestEnvelope1,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getBuildDatabaseConnectionWithDetailsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteBuildFunctionsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteFunctionOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteBuildAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteBuildFunctionAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getBuildDatabaseConnectionsWithDetailsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName2
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppsForStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppForStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const registerUserProvidedFunctionAppWithStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteUserProvidedFunctionEnvelope,
    queryParameters: [Parameters.apiVersion, Parameters.isForced],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const detachUserProvidedFunctionAppFromStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createZipDeploymentForStaticSiteBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteZipDeploymentEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const createOrUpdateStaticSiteAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.appSettings,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const listBasicAuthOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBasicAuthPropertiesCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getBasicAuthOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBasicAuthPropertiesARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.basicAuthName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateBasicAuthOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBasicAuthPropertiesARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.basicAuthEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.basicAuthName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const createOrUpdateStaticSiteFunctionAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.appSettings,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const createUserRolesInvitationLinkOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserInvitationResponseResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteUserRolesInvitationEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const listStaticSiteCustomDomainsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSiteCustomDomainOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.domainName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateStaticSiteCustomDomainOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteCustomDomainRequestPropertiesEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.domainName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const deleteStaticSiteCustomDomainOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.domainName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const validateCustomDomainCanBeAddedToStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteCustomDomainRequestPropertiesEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.domainName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getDatabaseConnectionsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createOrUpdateDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.databaseConnectionRequestEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const deleteDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const updateDatabaseConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}",
    httpMethod: "PATCH",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.databaseConnectionRequestEnvelope1,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getDatabaseConnectionWithDetailsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.databaseConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const detachStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteFunctionsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteFunctionOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteConfiguredRolesOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringList
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteFunctionAppSettingsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteSecretsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.StringDictionary
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getPrivateEndpointConnectionListOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.PrivateEndpointConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getPrivateEndpointConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.RemotePrivateEndpointConnectionARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.privateEndpointConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const approveOrRejectPrivateEndpointConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.RemotePrivateEndpointConnectionARMResource
        },
        201: {
            bodyMapper: Mappers.RemotePrivateEndpointConnectionARMResource
        },
        202: {
            bodyMapper: Mappers.RemotePrivateEndpointConnectionARMResource
        },
        204: {
            bodyMapper: Mappers.RemotePrivateEndpointConnectionARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.privateEndpointWrapper,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.privateEndpointConnectionName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const deletePrivateEndpointConnectionOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}",
    httpMethod: "DELETE",
    responses: {
        200: {
            bodyMapper: {
                type: { name: "Dictionary", value: { type: { name: "any" } } }
            }
        },
        201: {
            bodyMapper: {
                type: { name: "Dictionary", value: { type: { name: "any" } } }
            }
        },
        202: {
            bodyMapper: {
                type: { name: "Dictionary", value: { type: { name: "any" } } }
            }
        },
        204: {
            bodyMapper: {
                type: { name: "Dictionary", value: { type: { name: "any" } } }
            }
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.privateEndpointConnectionName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getPrivateLinkResourcesOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.PrivateLinkResourcesWrapper
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const resetStaticSiteApiKeyOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey",
    httpMethod: "POST",
    responses: {
        200: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.resetPropertiesEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getDatabaseConnectionsWithDetailsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections",
    httpMethod: "POST",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppsForStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppForStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const registerUserProvidedFunctionAppWithStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteUserProvidedFunctionEnvelope,
    queryParameters: [Parameters.apiVersion, Parameters.isForced],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const detachUserProvidedFunctionAppFromStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.functionAppName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const createZipDeploymentForStaticSiteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteZipDeploymentEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const validateBackendOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteLinkedBackendEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const validateBackendForBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate",
    httpMethod: "POST",
    responses: {
        200: {},
        201: {},
        202: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteLinkedBackendEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const getLinkedBackendsOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getLinkedBackendsForBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getLinkedBackendOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const linkBackendOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteLinkedBackendEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const unlinkBackendOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion, Parameters.isCleaningAuthConfig],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getLinkedBackendForBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const linkBackendToBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        201: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        202: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        204: {
            bodyMapper: Mappers.StaticSiteLinkedBackendARMResource
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    requestBody: Parameters.staticSiteLinkedBackendEnvelope,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer
};
const unlinkBackendFromBuildOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    queryParameters: [Parameters.apiVersion, Parameters.isCleaningAuthConfig],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.environmentName1,
        Parameters.linkedBackendName
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSitesByResourceGroupNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteUsersNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.authprovider
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getStaticSiteBuildsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBuildCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getBuildDatabaseConnectionsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.environmentName2
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteBuildFunctionsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteFunctionOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getBuildDatabaseConnectionsWithDetailsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.environmentName2
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppsForStaticSiteBuildNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listBasicAuthNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteBasicAuthPropertiesCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteCustomDomainsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteCustomDomainOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getDatabaseConnectionsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const listStaticSiteFunctionsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteFunctionOverviewCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getPrivateEndpointConnectionListNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.PrivateEndpointConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getDatabaseConnectionsWithDetailsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseConnectionCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getUserProvidedFunctionAppsForStaticSiteNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteUserProvidedFunctionAppsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getLinkedBackendsNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink
    ],
    headerParameters: [Parameters.accept],
    serializer
};
const getLinkedBackendsForBuildNextOperationSpec = {
    path: "{nextLink}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.StaticSiteLinkedBackendsCollection
        },
        default: {
            bodyMapper: Mappers.DefaultErrorResponse
        }
    },
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.name,
        Parameters.nextLink,
        Parameters.environmentName1
    ],
    headerParameters: [Parameters.accept],
    serializer
};
//# sourceMappingURL=staticSites.js.map