/*
 * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
import { setContinuationToken } from "../pagingHelper";
import { StaticSites } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { WebSiteManagementClient } from "../webSiteManagementClient";
import {
  SimplePollerLike,
  OperationState,
  createHttpPoller
} from "@azure/core-lro";
import { createLroSpec } from "../lroImpl";
import {
  StaticSiteARMResource,
  StaticSitesListNextOptionalParams,
  StaticSitesListOptionalParams,
  StaticSitesListResponse,
  StaticSitesGetStaticSitesByResourceGroupNextOptionalParams,
  StaticSitesGetStaticSitesByResourceGroupOptionalParams,
  StaticSitesGetStaticSitesByResourceGroupResponse,
  StaticSiteUserARMResource,
  StaticSitesListStaticSiteUsersNextOptionalParams,
  StaticSitesListStaticSiteUsersOptionalParams,
  StaticSitesListStaticSiteUsersResponse,
  StaticSiteBuildARMResource,
  StaticSitesGetStaticSiteBuildsNextOptionalParams,
  StaticSitesGetStaticSiteBuildsOptionalParams,
  StaticSitesGetStaticSiteBuildsResponse,
  DatabaseConnection,
  StaticSitesGetBuildDatabaseConnectionsNextOptionalParams,
  StaticSitesGetBuildDatabaseConnectionsOptionalParams,
  StaticSitesGetBuildDatabaseConnectionsResponse,
  StaticSiteFunctionOverviewARMResource,
  StaticSitesListStaticSiteBuildFunctionsNextOptionalParams,
  StaticSitesListStaticSiteBuildFunctionsOptionalParams,
  StaticSitesListStaticSiteBuildFunctionsResponse,
  StaticSitesGetBuildDatabaseConnectionsWithDetailsNextOptionalParams,
  StaticSitesGetBuildDatabaseConnectionsWithDetailsOptionalParams,
  StaticSitesGetBuildDatabaseConnectionsWithDetailsResponse,
  StaticSiteUserProvidedFunctionAppARMResource,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildNextOptionalParams,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptionalParams,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildResponse,
  StaticSiteBasicAuthPropertiesARMResource,
  StaticSitesListBasicAuthNextOptionalParams,
  StaticSitesListBasicAuthOptionalParams,
  StaticSitesListBasicAuthResponse,
  StaticSiteCustomDomainOverviewARMResource,
  StaticSitesListStaticSiteCustomDomainsNextOptionalParams,
  StaticSitesListStaticSiteCustomDomainsOptionalParams,
  StaticSitesListStaticSiteCustomDomainsResponse,
  StaticSitesGetDatabaseConnectionsNextOptionalParams,
  StaticSitesGetDatabaseConnectionsOptionalParams,
  StaticSitesGetDatabaseConnectionsResponse,
  StaticSitesListStaticSiteFunctionsNextOptionalParams,
  StaticSitesListStaticSiteFunctionsOptionalParams,
  StaticSitesListStaticSiteFunctionsResponse,
  RemotePrivateEndpointConnectionARMResource,
  StaticSitesGetPrivateEndpointConnectionListNextOptionalParams,
  StaticSitesGetPrivateEndpointConnectionListOptionalParams,
  StaticSitesGetPrivateEndpointConnectionListResponse,
  StaticSitesGetDatabaseConnectionsWithDetailsNextOptionalParams,
  StaticSitesGetDatabaseConnectionsWithDetailsOptionalParams,
  StaticSitesGetDatabaseConnectionsWithDetailsResponse,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteNextOptionalParams,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptionalParams,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteResponse,
  StaticSiteLinkedBackendARMResource,
  StaticSitesGetLinkedBackendsNextOptionalParams,
  StaticSitesGetLinkedBackendsOptionalParams,
  StaticSitesGetLinkedBackendsResponse,
  StaticSitesGetLinkedBackendsForBuildNextOptionalParams,
  StaticSitesGetLinkedBackendsForBuildOptionalParams,
  StaticSitesGetLinkedBackendsForBuildResponse,
  StaticSitesWorkflowPreviewRequest,
  StaticSitesPreviewWorkflowOptionalParams,
  StaticSitesPreviewWorkflowResponse,
  StaticSitesGetStaticSiteOptionalParams,
  StaticSitesGetStaticSiteResponse,
  StaticSitesCreateOrUpdateStaticSiteOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteResponse,
  StaticSitesDeleteStaticSiteOptionalParams,
  StaticSitePatchResource,
  StaticSitesUpdateStaticSiteOptionalParams,
  StaticSitesUpdateStaticSiteResponse,
  StaticSitesDeleteStaticSiteUserOptionalParams,
  StaticSitesUpdateStaticSiteUserOptionalParams,
  StaticSitesUpdateStaticSiteUserResponse,
  StaticSitesGetStaticSiteBuildOptionalParams,
  StaticSitesGetStaticSiteBuildResponse,
  StaticSitesDeleteStaticSiteBuildOptionalParams,
  StringDictionary,
  StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsResponse,
  StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse,
  StaticSitesGetBuildDatabaseConnectionOptionalParams,
  StaticSitesGetBuildDatabaseConnectionResponse,
  StaticSitesCreateOrUpdateBuildDatabaseConnectionOptionalParams,
  StaticSitesCreateOrUpdateBuildDatabaseConnectionResponse,
  StaticSitesDeleteBuildDatabaseConnectionOptionalParams,
  DatabaseConnectionPatchRequest,
  StaticSitesUpdateBuildDatabaseConnectionOptionalParams,
  StaticSitesUpdateBuildDatabaseConnectionResponse,
  StaticSitesGetBuildDatabaseConnectionWithDetailsOptionalParams,
  StaticSitesGetBuildDatabaseConnectionWithDetailsResponse,
  StaticSitesListStaticSiteBuildAppSettingsOptionalParams,
  StaticSitesListStaticSiteBuildAppSettingsResponse,
  StaticSitesListStaticSiteBuildFunctionAppSettingsOptionalParams,
  StaticSitesListStaticSiteBuildFunctionAppSettingsResponse,
  StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildOptionalParams,
  StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildResponse,
  StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildOptionalParams,
  StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse,
  StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildOptionalParams,
  StaticSiteZipDeploymentARMResource,
  StaticSitesCreateZipDeploymentForStaticSiteBuildOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteAppSettingsOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteAppSettingsResponse,
  BasicAuthName,
  StaticSitesGetBasicAuthOptionalParams,
  StaticSitesGetBasicAuthResponse,
  StaticSitesCreateOrUpdateBasicAuthOptionalParams,
  StaticSitesCreateOrUpdateBasicAuthResponse,
  StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsResponse,
  StaticSiteUserInvitationRequestResource,
  StaticSitesCreateUserRolesInvitationLinkOptionalParams,
  StaticSitesCreateUserRolesInvitationLinkResponse,
  StaticSitesGetStaticSiteCustomDomainOptionalParams,
  StaticSitesGetStaticSiteCustomDomainResponse,
  StaticSiteCustomDomainRequestPropertiesARMResource,
  StaticSitesCreateOrUpdateStaticSiteCustomDomainOptionalParams,
  StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse,
  StaticSitesDeleteStaticSiteCustomDomainOptionalParams,
  StaticSitesValidateCustomDomainCanBeAddedToStaticSiteOptionalParams,
  StaticSitesGetDatabaseConnectionOptionalParams,
  StaticSitesGetDatabaseConnectionResponse,
  StaticSitesCreateOrUpdateDatabaseConnectionOptionalParams,
  StaticSitesCreateOrUpdateDatabaseConnectionResponse,
  StaticSitesDeleteDatabaseConnectionOptionalParams,
  StaticSitesUpdateDatabaseConnectionOptionalParams,
  StaticSitesUpdateDatabaseConnectionResponse,
  StaticSitesGetDatabaseConnectionWithDetailsOptionalParams,
  StaticSitesGetDatabaseConnectionWithDetailsResponse,
  StaticSitesDetachStaticSiteOptionalParams,
  StaticSitesListStaticSiteAppSettingsOptionalParams,
  StaticSitesListStaticSiteAppSettingsResponse,
  StaticSitesListStaticSiteConfiguredRolesOptionalParams,
  StaticSitesListStaticSiteConfiguredRolesResponse,
  StaticSitesListStaticSiteFunctionAppSettingsOptionalParams,
  StaticSitesListStaticSiteFunctionAppSettingsResponse,
  StaticSitesListStaticSiteSecretsOptionalParams,
  StaticSitesListStaticSiteSecretsResponse,
  StaticSitesGetPrivateEndpointConnectionOptionalParams,
  StaticSitesGetPrivateEndpointConnectionResponse,
  PrivateLinkConnectionApprovalRequestResource,
  StaticSitesApproveOrRejectPrivateEndpointConnectionOptionalParams,
  StaticSitesApproveOrRejectPrivateEndpointConnectionResponse,
  StaticSitesDeletePrivateEndpointConnectionOptionalParams,
  StaticSitesDeletePrivateEndpointConnectionResponse,
  StaticSitesGetPrivateLinkResourcesOptionalParams,
  StaticSitesGetPrivateLinkResourcesResponse,
  StaticSiteResetPropertiesARMResource,
  StaticSitesResetStaticSiteApiKeyOptionalParams,
  StaticSitesGetUserProvidedFunctionAppForStaticSiteOptionalParams,
  StaticSitesGetUserProvidedFunctionAppForStaticSiteResponse,
  StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteOptionalParams,
  StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse,
  StaticSitesDetachUserProvidedFunctionAppFromStaticSiteOptionalParams,
  StaticSitesCreateZipDeploymentForStaticSiteOptionalParams,
  StaticSitesValidateBackendOptionalParams,
  StaticSitesValidateBackendForBuildOptionalParams,
  StaticSitesGetLinkedBackendOptionalParams,
  StaticSitesGetLinkedBackendResponse,
  StaticSitesLinkBackendOptionalParams,
  StaticSitesLinkBackendResponse,
  StaticSitesUnlinkBackendOptionalParams,
  StaticSitesGetLinkedBackendForBuildOptionalParams,
  StaticSitesGetLinkedBackendForBuildResponse,
  StaticSitesLinkBackendToBuildOptionalParams,
  StaticSitesLinkBackendToBuildResponse,
  StaticSitesUnlinkBackendFromBuildOptionalParams,
  StaticSitesListNextResponse,
  StaticSitesGetStaticSitesByResourceGroupNextResponse,
  StaticSitesListStaticSiteUsersNextResponse,
  StaticSitesGetStaticSiteBuildsNextResponse,
  StaticSitesGetBuildDatabaseConnectionsNextResponse,
  StaticSitesListStaticSiteBuildFunctionsNextResponse,
  StaticSitesGetBuildDatabaseConnectionsWithDetailsNextResponse,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildNextResponse,
  StaticSitesListBasicAuthNextResponse,
  StaticSitesListStaticSiteCustomDomainsNextResponse,
  StaticSitesGetDatabaseConnectionsNextResponse,
  StaticSitesListStaticSiteFunctionsNextResponse,
  StaticSitesGetPrivateEndpointConnectionListNextResponse,
  StaticSitesGetDatabaseConnectionsWithDetailsNextResponse,
  StaticSitesGetUserProvidedFunctionAppsForStaticSiteNextResponse,
  StaticSitesGetLinkedBackendsNextResponse,
  StaticSitesGetLinkedBackendsForBuildNextResponse
} from "../models";

/// <reference lib="esnext.asynciterable" />
/** Class containing StaticSites operations. */
export class StaticSitesImpl implements StaticSites {
  private readonly client: WebSiteManagementClient;

  /**
   * Initialize a new instance of the class StaticSites class.
   * @param client Reference to the service client
   */
  constructor(client: WebSiteManagementClient) {
    this.client = client;
  }

  /**
   * Description for Get all Static Sites for a subscription.
   * @param options The options parameters.
   */
  public list(
    options?: StaticSitesListOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteARMResource> {
    const iter = this.listPagingAll(options);
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listPagingPage(options, settings);
      }
    };
  }

  private async *listPagingPage(
    options?: StaticSitesListOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteARMResource[]> {
    let result: StaticSitesListResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._list(options);
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listNext(continuationToken, options);
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listPagingAll(
    options?: StaticSitesListOptionalParams
  ): AsyncIterableIterator<StaticSiteARMResource> {
    for await (const page of this.listPagingPage(options)) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSitesByResourceGroup(
    resourceGroupName: string,
    options?: StaticSitesGetStaticSitesByResourceGroupOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteARMResource> {
    const iter = this.getStaticSitesByResourceGroupPagingAll(
      resourceGroupName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getStaticSitesByResourceGroupPagingPage(
          resourceGroupName,
          options,
          settings
        );
      }
    };
  }

  private async *getStaticSitesByResourceGroupPagingPage(
    resourceGroupName: string,
    options?: StaticSitesGetStaticSitesByResourceGroupOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteARMResource[]> {
    let result: StaticSitesGetStaticSitesByResourceGroupResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getStaticSitesByResourceGroup(
        resourceGroupName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getStaticSitesByResourceGroupNext(
        resourceGroupName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getStaticSitesByResourceGroupPagingAll(
    resourceGroupName: string,
    options?: StaticSitesGetStaticSitesByResourceGroupOptionalParams
  ): AsyncIterableIterator<StaticSiteARMResource> {
    for await (const page of this.getStaticSitesByResourceGroupPagingPage(
      resourceGroupName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSiteUsers(
    resourceGroupName: string,
    name: string,
    authprovider: string,
    options?: StaticSitesListStaticSiteUsersOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteUserARMResource> {
    const iter = this.listStaticSiteUsersPagingAll(
      resourceGroupName,
      name,
      authprovider,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listStaticSiteUsersPagingPage(
          resourceGroupName,
          name,
          authprovider,
          options,
          settings
        );
      }
    };
  }

  private async *listStaticSiteUsersPagingPage(
    resourceGroupName: string,
    name: string,
    authprovider: string,
    options?: StaticSitesListStaticSiteUsersOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteUserARMResource[]> {
    let result: StaticSitesListStaticSiteUsersResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._listStaticSiteUsers(
        resourceGroupName,
        name,
        authprovider,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listStaticSiteUsersNext(
        resourceGroupName,
        name,
        authprovider,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listStaticSiteUsersPagingAll(
    resourceGroupName: string,
    name: string,
    authprovider: string,
    options?: StaticSitesListStaticSiteUsersOptionalParams
  ): AsyncIterableIterator<StaticSiteUserARMResource> {
    for await (const page of this.listStaticSiteUsersPagingPage(
      resourceGroupName,
      name,
      authprovider,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSiteBuilds(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetStaticSiteBuildsOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteBuildARMResource> {
    const iter = this.getStaticSiteBuildsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getStaticSiteBuildsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getStaticSiteBuildsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetStaticSiteBuildsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteBuildARMResource[]> {
    let result: StaticSitesGetStaticSiteBuildsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getStaticSiteBuilds(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getStaticSiteBuildsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getStaticSiteBuildsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetStaticSiteBuildsOptionalParams
  ): AsyncIterableIterator<StaticSiteBuildARMResource> {
    for await (const page of this.getStaticSiteBuildsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listBuildDatabaseConnections(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsOptionalParams
  ): PagedAsyncIterableIterator<DatabaseConnection> {
    const iter = this.getBuildDatabaseConnectionsPagingAll(
      resourceGroupName,
      name,
      environmentName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getBuildDatabaseConnectionsPagingPage(
          resourceGroupName,
          name,
          environmentName,
          options,
          settings
        );
      }
    };
  }

  private async *getBuildDatabaseConnectionsPagingPage(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<DatabaseConnection[]> {
    let result: StaticSitesGetBuildDatabaseConnectionsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getBuildDatabaseConnections(
        resourceGroupName,
        name,
        environmentName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getBuildDatabaseConnectionsNext(
        resourceGroupName,
        name,
        environmentName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getBuildDatabaseConnectionsPagingAll(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsOptionalParams
  ): AsyncIterableIterator<DatabaseConnection> {
    for await (const page of this.getBuildDatabaseConnectionsPagingPage(
      resourceGroupName,
      name,
      environmentName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSiteBuildFunctions(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildFunctionsOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteFunctionOverviewARMResource> {
    const iter = this.listStaticSiteBuildFunctionsPagingAll(
      resourceGroupName,
      name,
      environmentName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listStaticSiteBuildFunctionsPagingPage(
          resourceGroupName,
          name,
          environmentName,
          options,
          settings
        );
      }
    };
  }

  private async *listStaticSiteBuildFunctionsPagingPage(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildFunctionsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteFunctionOverviewARMResource[]> {
    let result: StaticSitesListStaticSiteBuildFunctionsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._listStaticSiteBuildFunctions(
        resourceGroupName,
        name,
        environmentName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listStaticSiteBuildFunctionsNext(
        resourceGroupName,
        name,
        environmentName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listStaticSiteBuildFunctionsPagingAll(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildFunctionsOptionalParams
  ): AsyncIterableIterator<StaticSiteFunctionOverviewARMResource> {
    for await (const page of this.listStaticSiteBuildFunctionsPagingPage(
      resourceGroupName,
      name,
      environmentName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listBuildDatabaseConnectionsWithDetails(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsWithDetailsOptionalParams
  ): PagedAsyncIterableIterator<DatabaseConnection> {
    const iter = this.getBuildDatabaseConnectionsWithDetailsPagingAll(
      resourceGroupName,
      name,
      environmentName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getBuildDatabaseConnectionsWithDetailsPagingPage(
          resourceGroupName,
          name,
          environmentName,
          options,
          settings
        );
      }
    };
  }

  private async *getBuildDatabaseConnectionsWithDetailsPagingPage(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsWithDetailsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<DatabaseConnection[]> {
    let result: StaticSitesGetBuildDatabaseConnectionsWithDetailsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getBuildDatabaseConnectionsWithDetails(
        resourceGroupName,
        name,
        environmentName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getBuildDatabaseConnectionsWithDetailsNext(
        resourceGroupName,
        name,
        environmentName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getBuildDatabaseConnectionsWithDetailsPagingAll(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsWithDetailsOptionalParams
  ): AsyncIterableIterator<DatabaseConnection> {
    for await (const page of this.getBuildDatabaseConnectionsWithDetailsPagingPage(
      resourceGroupName,
      name,
      environmentName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listUserProvidedFunctionAppsForStaticSiteBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource> {
    const iter = this.getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(
      resourceGroupName,
      name,
      environmentName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(
          resourceGroupName,
          name,
          environmentName,
          options,
          settings
        );
      }
    };
  }

  private async *getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource[]> {
    let result: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getUserProvidedFunctionAppsForStaticSiteBuild(
        resourceGroupName,
        name,
        environmentName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getUserProvidedFunctionAppsForStaticSiteBuildNext(
        resourceGroupName,
        name,
        environmentName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptionalParams
  ): AsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource> {
    for await (const page of this.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(
      resourceGroupName,
      name,
      environmentName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listBasicAuth(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListBasicAuthOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteBasicAuthPropertiesARMResource> {
    const iter = this.listBasicAuthPagingAll(resourceGroupName, name, options);
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listBasicAuthPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *listBasicAuthPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListBasicAuthOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteBasicAuthPropertiesARMResource[]> {
    let result: StaticSitesListBasicAuthResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._listBasicAuth(resourceGroupName, name, options);
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listBasicAuthNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listBasicAuthPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListBasicAuthOptionalParams
  ): AsyncIterableIterator<StaticSiteBasicAuthPropertiesARMResource> {
    for await (const page of this.listBasicAuthPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSiteCustomDomains(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteCustomDomainsOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteCustomDomainOverviewARMResource> {
    const iter = this.listStaticSiteCustomDomainsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listStaticSiteCustomDomainsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *listStaticSiteCustomDomainsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteCustomDomainsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteCustomDomainOverviewARMResource[]> {
    let result: StaticSitesListStaticSiteCustomDomainsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._listStaticSiteCustomDomains(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listStaticSiteCustomDomainsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listStaticSiteCustomDomainsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteCustomDomainsOptionalParams
  ): AsyncIterableIterator<StaticSiteCustomDomainOverviewARMResource> {
    for await (const page of this.listStaticSiteCustomDomainsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listDatabaseConnections(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsOptionalParams
  ): PagedAsyncIterableIterator<DatabaseConnection> {
    const iter = this.getDatabaseConnectionsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getDatabaseConnectionsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getDatabaseConnectionsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<DatabaseConnection[]> {
    let result: StaticSitesGetDatabaseConnectionsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getDatabaseConnections(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getDatabaseConnectionsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getDatabaseConnectionsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsOptionalParams
  ): AsyncIterableIterator<DatabaseConnection> {
    for await (const page of this.getDatabaseConnectionsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listStaticSiteFunctions(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteFunctionsOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteFunctionOverviewARMResource> {
    const iter = this.listStaticSiteFunctionsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.listStaticSiteFunctionsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *listStaticSiteFunctionsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteFunctionsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteFunctionOverviewARMResource[]> {
    let result: StaticSitesListStaticSiteFunctionsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._listStaticSiteFunctions(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._listStaticSiteFunctionsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *listStaticSiteFunctionsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteFunctionsOptionalParams
  ): AsyncIterableIterator<StaticSiteFunctionOverviewARMResource> {
    for await (const page of this.listStaticSiteFunctionsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listPrivateEndpointConnectionList(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetPrivateEndpointConnectionListOptionalParams
  ): PagedAsyncIterableIterator<RemotePrivateEndpointConnectionARMResource> {
    const iter = this.getPrivateEndpointConnectionListPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getPrivateEndpointConnectionListPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getPrivateEndpointConnectionListPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetPrivateEndpointConnectionListOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<RemotePrivateEndpointConnectionARMResource[]> {
    let result: StaticSitesGetPrivateEndpointConnectionListResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getPrivateEndpointConnectionList(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getPrivateEndpointConnectionListNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getPrivateEndpointConnectionListPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetPrivateEndpointConnectionListOptionalParams
  ): AsyncIterableIterator<RemotePrivateEndpointConnectionARMResource> {
    for await (const page of this.getPrivateEndpointConnectionListPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listDatabaseConnectionsWithDetails(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsWithDetailsOptionalParams
  ): PagedAsyncIterableIterator<DatabaseConnection> {
    const iter = this.getDatabaseConnectionsWithDetailsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getDatabaseConnectionsWithDetailsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getDatabaseConnectionsWithDetailsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsWithDetailsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<DatabaseConnection[]> {
    let result: StaticSitesGetDatabaseConnectionsWithDetailsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getDatabaseConnectionsWithDetails(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getDatabaseConnectionsWithDetailsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getDatabaseConnectionsWithDetailsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsWithDetailsOptionalParams
  ): AsyncIterableIterator<DatabaseConnection> {
    for await (const page of this.getDatabaseConnectionsWithDetailsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listUserProvidedFunctionAppsForStaticSite(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource> {
    const iter = this.getUserProvidedFunctionAppsForStaticSitePagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getUserProvidedFunctionAppsForStaticSitePagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getUserProvidedFunctionAppsForStaticSitePagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource[]> {
    let result: StaticSitesGetUserProvidedFunctionAppsForStaticSiteResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getUserProvidedFunctionAppsForStaticSite(
        resourceGroupName,
        name,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getUserProvidedFunctionAppsForStaticSiteNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getUserProvidedFunctionAppsForStaticSitePagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptionalParams
  ): AsyncIterableIterator<StaticSiteUserProvidedFunctionAppARMResource> {
    for await (const page of this.getUserProvidedFunctionAppsForStaticSitePagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listLinkedBackends(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetLinkedBackendsOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteLinkedBackendARMResource> {
    const iter = this.getLinkedBackendsPagingAll(
      resourceGroupName,
      name,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getLinkedBackendsPagingPage(
          resourceGroupName,
          name,
          options,
          settings
        );
      }
    };
  }

  private async *getLinkedBackendsPagingPage(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetLinkedBackendsOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteLinkedBackendARMResource[]> {
    let result: StaticSitesGetLinkedBackendsResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getLinkedBackends(resourceGroupName, name, options);
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getLinkedBackendsNext(
        resourceGroupName,
        name,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getLinkedBackendsPagingAll(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetLinkedBackendsOptionalParams
  ): AsyncIterableIterator<StaticSiteLinkedBackendARMResource> {
    for await (const page of this.getLinkedBackendsPagingPage(
      resourceGroupName,
      name,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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.
   */
  public listLinkedBackendsForBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetLinkedBackendsForBuildOptionalParams
  ): PagedAsyncIterableIterator<StaticSiteLinkedBackendARMResource> {
    const iter = this.getLinkedBackendsForBuildPagingAll(
      resourceGroupName,
      name,
      environmentName,
      options
    );
    return {
      next() {
        return iter.next();
      },
      [Symbol.asyncIterator]() {
        return this;
      },
      byPage: (settings?: PageSettings) => {
        if (settings?.maxPageSize) {
          throw new Error("maxPageSize is not supported by this operation.");
        }
        return this.getLinkedBackendsForBuildPagingPage(
          resourceGroupName,
          name,
          environmentName,
          options,
          settings
        );
      }
    };
  }

  private async *getLinkedBackendsForBuildPagingPage(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetLinkedBackendsForBuildOptionalParams,
    settings?: PageSettings
  ): AsyncIterableIterator<StaticSiteLinkedBackendARMResource[]> {
    let result: StaticSitesGetLinkedBackendsForBuildResponse;
    let continuationToken = settings?.continuationToken;
    if (!continuationToken) {
      result = await this._getLinkedBackendsForBuild(
        resourceGroupName,
        name,
        environmentName,
        options
      );
      let page = result.value || [];
      continuationToken = result.nextLink;
      setContinuationToken(page, continuationToken);
      yield page;
    }
    while (continuationToken) {
      result = await this._getLinkedBackendsForBuildNext(
        resourceGroupName,
        name,
        environmentName,
        continuationToken,
        options
      );
      continuationToken = result.nextLink;
      let page = result.value || [];
      setContinuationToken(page, continuationToken);
      yield page;
    }
  }

  private async *getLinkedBackendsForBuildPagingAll(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetLinkedBackendsForBuildOptionalParams
  ): AsyncIterableIterator<StaticSiteLinkedBackendARMResource> {
    for await (const page of this.getLinkedBackendsForBuildPagingPage(
      resourceGroupName,
      name,
      environmentName,
      options
    )) {
      yield* page;
    }
  }

  /**
   * 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: string,
    staticSitesWorkflowPreviewRequest: StaticSitesWorkflowPreviewRequest,
    options?: StaticSitesPreviewWorkflowOptionalParams
  ): Promise<StaticSitesPreviewWorkflowResponse> {
    return this.client.sendOperationRequest(
      { location, staticSitesWorkflowPreviewRequest, options },
      previewWorkflowOperationSpec
    );
  }

  /**
   * Description for Get all Static Sites for a subscription.
   * @param options The options parameters.
   */
  private _list(
    options?: StaticSitesListOptionalParams
  ): Promise<StaticSitesListResponse> {
    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.
   */
  private _getStaticSitesByResourceGroup(
    resourceGroupName: string,
    options?: StaticSitesGetStaticSitesByResourceGroupOptionalParams
  ): Promise<StaticSitesGetStaticSitesByResourceGroupResponse> {
    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: string,
    name: string,
    options?: StaticSitesGetStaticSiteOptionalParams
  ): Promise<StaticSitesGetStaticSiteResponse> {
    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.
   */
  async beginCreateOrUpdateStaticSite(
    resourceGroupName: string,
    name: string,
    staticSiteEnvelope: StaticSiteARMResource,
    options?: StaticSitesCreateOrUpdateStaticSiteOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<StaticSitesCreateOrUpdateStaticSiteResponse>,
      StaticSitesCreateOrUpdateStaticSiteResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesCreateOrUpdateStaticSiteResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesCreateOrUpdateStaticSiteResponse,
      OperationState<StaticSitesCreateOrUpdateStaticSiteResponse>
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginCreateOrUpdateStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    staticSiteEnvelope: StaticSiteARMResource,
    options?: StaticSitesCreateOrUpdateStaticSiteOptionalParams
  ): Promise<StaticSitesCreateOrUpdateStaticSiteResponse> {
    const poller = await 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.
   */
  async beginDeleteStaticSite(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesDeleteStaticSiteOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginDeleteStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesDeleteStaticSiteOptionalParams
  ): Promise<void> {
    const poller = await 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: string,
    name: string,
    staticSiteEnvelope: StaticSitePatchResource,
    options?: StaticSitesUpdateStaticSiteOptionalParams
  ): Promise<StaticSitesUpdateStaticSiteResponse> {
    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.
   */
  private _listStaticSiteUsers(
    resourceGroupName: string,
    name: string,
    authprovider: string,
    options?: StaticSitesListStaticSiteUsersOptionalParams
  ): Promise<StaticSitesListStaticSiteUsersResponse> {
    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: string,
    name: string,
    authprovider: string,
    userid: string,
    options?: StaticSitesDeleteStaticSiteUserOptionalParams
  ): Promise<void> {
    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: string,
    name: string,
    authprovider: string,
    userid: string,
    staticSiteUserEnvelope: StaticSiteUserARMResource,
    options?: StaticSitesUpdateStaticSiteUserOptionalParams
  ): Promise<StaticSitesUpdateStaticSiteUserResponse> {
    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.
   */
  private _getStaticSiteBuilds(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetStaticSiteBuildsOptionalParams
  ): Promise<StaticSitesGetStaticSiteBuildsResponse> {
    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: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetStaticSiteBuildOptionalParams
  ): Promise<StaticSitesGetStaticSiteBuildResponse> {
    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.
   */
  async beginDeleteStaticSiteBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesDeleteStaticSiteBuildOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginDeleteStaticSiteBuildAndWait(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesDeleteStaticSiteBuildOptionalParams
  ): Promise<void> {
    const poller = await 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: string,
    name: string,
    environmentName: string,
    appSettings: StringDictionary,
    options?: StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsOptionalParams
  ): Promise<StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsResponse> {
    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: string,
    name: string,
    environmentName: string,
    appSettings: StringDictionary,
    options?: StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptionalParams
  ): Promise<
    StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse
  > {
    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.
   */
  private _getBuildDatabaseConnections(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionsResponse> {
    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: string,
    name: string,
    environmentName: string,
    databaseConnectionName: string,
    options?: StaticSitesGetBuildDatabaseConnectionOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionResponse> {
    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: string,
    name: string,
    environmentName: string,
    databaseConnectionName: string,
    databaseConnectionRequestEnvelope: DatabaseConnection,
    options?: StaticSitesCreateOrUpdateBuildDatabaseConnectionOptionalParams
  ): Promise<StaticSitesCreateOrUpdateBuildDatabaseConnectionResponse> {
    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: string,
    name: string,
    environmentName: string,
    databaseConnectionName: string,
    options?: StaticSitesDeleteBuildDatabaseConnectionOptionalParams
  ): Promise<void> {
    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: string,
    name: string,
    environmentName: string,
    databaseConnectionName: string,
    databaseConnectionRequestEnvelope: DatabaseConnectionPatchRequest,
    options?: StaticSitesUpdateBuildDatabaseConnectionOptionalParams
  ): Promise<StaticSitesUpdateBuildDatabaseConnectionResponse> {
    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: string,
    name: string,
    environmentName: string,
    databaseConnectionName: string,
    options?: StaticSitesGetBuildDatabaseConnectionWithDetailsOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionWithDetailsResponse> {
    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.
   */
  private _listStaticSiteBuildFunctions(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildFunctionsOptionalParams
  ): Promise<StaticSitesListStaticSiteBuildFunctionsResponse> {
    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: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildAppSettingsOptionalParams
  ): Promise<StaticSitesListStaticSiteBuildAppSettingsResponse> {
    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: string,
    name: string,
    environmentName: string,
    options?: StaticSitesListStaticSiteBuildFunctionAppSettingsOptionalParams
  ): Promise<StaticSitesListStaticSiteBuildFunctionAppSettingsResponse> {
    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.
   */
  private _getBuildDatabaseConnectionsWithDetails(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetBuildDatabaseConnectionsWithDetailsOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionsWithDetailsResponse> {
    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.
   */
  private _getUserProvidedFunctionAppsForStaticSiteBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptionalParams
  ): Promise<StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildResponse> {
    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: string,
    name: string,
    environmentName: string,
    functionAppName: string,
    options?: StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildOptionalParams
  ): Promise<StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildResponse> {
    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.
   */
  async beginRegisterUserProvidedFunctionAppWithStaticSiteBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    functionAppName: string,
    staticSiteUserProvidedFunctionEnvelope: StaticSiteUserProvidedFunctionAppARMResource,
    options?: StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<
        StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse
      >,
      StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse,
      OperationState<
        StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse
      >
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAndWait(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    functionAppName: string,
    staticSiteUserProvidedFunctionEnvelope: StaticSiteUserProvidedFunctionAppARMResource,
    options?: StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildOptionalParams
  ): Promise<
    StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse
  > {
    const poller = await 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: string,
    name: string,
    environmentName: string,
    functionAppName: string,
    options?: StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildOptionalParams
  ): Promise<void> {
    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.
   */
  async beginCreateZipDeploymentForStaticSiteBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    staticSiteZipDeploymentEnvelope: StaticSiteZipDeploymentARMResource,
    options?: StaticSitesCreateZipDeploymentForStaticSiteBuildOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginCreateZipDeploymentForStaticSiteBuildAndWait(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    staticSiteZipDeploymentEnvelope: StaticSiteZipDeploymentARMResource,
    options?: StaticSitesCreateZipDeploymentForStaticSiteBuildOptionalParams
  ): Promise<void> {
    const poller = await 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: string,
    name: string,
    appSettings: StringDictionary,
    options?: StaticSitesCreateOrUpdateStaticSiteAppSettingsOptionalParams
  ): Promise<StaticSitesCreateOrUpdateStaticSiteAppSettingsResponse> {
    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.
   */
  private _listBasicAuth(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListBasicAuthOptionalParams
  ): Promise<StaticSitesListBasicAuthResponse> {
    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: string,
    name: string,
    basicAuthName: BasicAuthName,
    options?: StaticSitesGetBasicAuthOptionalParams
  ): Promise<StaticSitesGetBasicAuthResponse> {
    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: string,
    name: string,
    basicAuthName: BasicAuthName,
    basicAuthEnvelope: StaticSiteBasicAuthPropertiesARMResource,
    options?: StaticSitesCreateOrUpdateBasicAuthOptionalParams
  ): Promise<StaticSitesCreateOrUpdateBasicAuthResponse> {
    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: string,
    name: string,
    appSettings: StringDictionary,
    options?: StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsOptionalParams
  ): Promise<StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsResponse> {
    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: string,
    name: string,
    staticSiteUserRolesInvitationEnvelope: StaticSiteUserInvitationRequestResource,
    options?: StaticSitesCreateUserRolesInvitationLinkOptionalParams
  ): Promise<StaticSitesCreateUserRolesInvitationLinkResponse> {
    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.
   */
  private _listStaticSiteCustomDomains(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteCustomDomainsOptionalParams
  ): Promise<StaticSitesListStaticSiteCustomDomainsResponse> {
    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: string,
    name: string,
    domainName: string,
    options?: StaticSitesGetStaticSiteCustomDomainOptionalParams
  ): Promise<StaticSitesGetStaticSiteCustomDomainResponse> {
    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.
   */
  async beginCreateOrUpdateStaticSiteCustomDomain(
    resourceGroupName: string,
    name: string,
    domainName: string,
    staticSiteCustomDomainRequestPropertiesEnvelope: StaticSiteCustomDomainRequestPropertiesARMResource,
    options?: StaticSitesCreateOrUpdateStaticSiteCustomDomainOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse>,
      StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse,
      OperationState<StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse>
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginCreateOrUpdateStaticSiteCustomDomainAndWait(
    resourceGroupName: string,
    name: string,
    domainName: string,
    staticSiteCustomDomainRequestPropertiesEnvelope: StaticSiteCustomDomainRequestPropertiesARMResource,
    options?: StaticSitesCreateOrUpdateStaticSiteCustomDomainOptionalParams
  ): Promise<StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse> {
    const poller = await 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.
   */
  async beginDeleteStaticSiteCustomDomain(
    resourceGroupName: string,
    name: string,
    domainName: string,
    options?: StaticSitesDeleteStaticSiteCustomDomainOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginDeleteStaticSiteCustomDomainAndWait(
    resourceGroupName: string,
    name: string,
    domainName: string,
    options?: StaticSitesDeleteStaticSiteCustomDomainOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  async beginValidateCustomDomainCanBeAddedToStaticSite(
    resourceGroupName: string,
    name: string,
    domainName: string,
    staticSiteCustomDomainRequestPropertiesEnvelope: StaticSiteCustomDomainRequestPropertiesARMResource,
    options?: StaticSitesValidateCustomDomainCanBeAddedToStaticSiteOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginValidateCustomDomainCanBeAddedToStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    domainName: string,
    staticSiteCustomDomainRequestPropertiesEnvelope: StaticSiteCustomDomainRequestPropertiesARMResource,
    options?: StaticSitesValidateCustomDomainCanBeAddedToStaticSiteOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  private _getDatabaseConnections(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionsResponse> {
    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: string,
    name: string,
    databaseConnectionName: string,
    options?: StaticSitesGetDatabaseConnectionOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionResponse> {
    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: string,
    name: string,
    databaseConnectionName: string,
    databaseConnectionRequestEnvelope: DatabaseConnection,
    options?: StaticSitesCreateOrUpdateDatabaseConnectionOptionalParams
  ): Promise<StaticSitesCreateOrUpdateDatabaseConnectionResponse> {
    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: string,
    name: string,
    databaseConnectionName: string,
    options?: StaticSitesDeleteDatabaseConnectionOptionalParams
  ): Promise<void> {
    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: string,
    name: string,
    databaseConnectionName: string,
    databaseConnectionRequestEnvelope: DatabaseConnectionPatchRequest,
    options?: StaticSitesUpdateDatabaseConnectionOptionalParams
  ): Promise<StaticSitesUpdateDatabaseConnectionResponse> {
    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: string,
    name: string,
    databaseConnectionName: string,
    options?: StaticSitesGetDatabaseConnectionWithDetailsOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionWithDetailsResponse> {
    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.
   */
  async beginDetachStaticSite(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesDetachStaticSiteOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginDetachStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesDetachStaticSiteOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  private _listStaticSiteFunctions(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesListStaticSiteFunctionsOptionalParams
  ): Promise<StaticSitesListStaticSiteFunctionsResponse> {
    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: string,
    name: string,
    options?: StaticSitesListStaticSiteAppSettingsOptionalParams
  ): Promise<StaticSitesListStaticSiteAppSettingsResponse> {
    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: string,
    name: string,
    options?: StaticSitesListStaticSiteConfiguredRolesOptionalParams
  ): Promise<StaticSitesListStaticSiteConfiguredRolesResponse> {
    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: string,
    name: string,
    options?: StaticSitesListStaticSiteFunctionAppSettingsOptionalParams
  ): Promise<StaticSitesListStaticSiteFunctionAppSettingsResponse> {
    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: string,
    name: string,
    options?: StaticSitesListStaticSiteSecretsOptionalParams
  ): Promise<StaticSitesListStaticSiteSecretsResponse> {
    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.
   */
  private _getPrivateEndpointConnectionList(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetPrivateEndpointConnectionListOptionalParams
  ): Promise<StaticSitesGetPrivateEndpointConnectionListResponse> {
    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: string,
    name: string,
    privateEndpointConnectionName: string,
    options?: StaticSitesGetPrivateEndpointConnectionOptionalParams
  ): Promise<StaticSitesGetPrivateEndpointConnectionResponse> {
    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.
   */
  async beginApproveOrRejectPrivateEndpointConnection(
    resourceGroupName: string,
    name: string,
    privateEndpointConnectionName: string,
    privateEndpointWrapper: PrivateLinkConnectionApprovalRequestResource,
    options?: StaticSitesApproveOrRejectPrivateEndpointConnectionOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<
        StaticSitesApproveOrRejectPrivateEndpointConnectionResponse
      >,
      StaticSitesApproveOrRejectPrivateEndpointConnectionResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesApproveOrRejectPrivateEndpointConnectionResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesApproveOrRejectPrivateEndpointConnectionResponse,
      OperationState<
        StaticSitesApproveOrRejectPrivateEndpointConnectionResponse
      >
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginApproveOrRejectPrivateEndpointConnectionAndWait(
    resourceGroupName: string,
    name: string,
    privateEndpointConnectionName: string,
    privateEndpointWrapper: PrivateLinkConnectionApprovalRequestResource,
    options?: StaticSitesApproveOrRejectPrivateEndpointConnectionOptionalParams
  ): Promise<StaticSitesApproveOrRejectPrivateEndpointConnectionResponse> {
    const poller = await 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.
   */
  async beginDeletePrivateEndpointConnection(
    resourceGroupName: string,
    name: string,
    privateEndpointConnectionName: string,
    options?: StaticSitesDeletePrivateEndpointConnectionOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<StaticSitesDeletePrivateEndpointConnectionResponse>,
      StaticSitesDeletePrivateEndpointConnectionResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesDeletePrivateEndpointConnectionResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesDeletePrivateEndpointConnectionResponse,
      OperationState<StaticSitesDeletePrivateEndpointConnectionResponse>
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginDeletePrivateEndpointConnectionAndWait(
    resourceGroupName: string,
    name: string,
    privateEndpointConnectionName: string,
    options?: StaticSitesDeletePrivateEndpointConnectionOptionalParams
  ): Promise<StaticSitesDeletePrivateEndpointConnectionResponse> {
    const poller = await 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: string,
    name: string,
    options?: StaticSitesGetPrivateLinkResourcesOptionalParams
  ): Promise<StaticSitesGetPrivateLinkResourcesResponse> {
    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: string,
    name: string,
    resetPropertiesEnvelope: StaticSiteResetPropertiesARMResource,
    options?: StaticSitesResetStaticSiteApiKeyOptionalParams
  ): Promise<void> {
    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.
   */
  private _getDatabaseConnectionsWithDetails(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetDatabaseConnectionsWithDetailsOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionsWithDetailsResponse> {
    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.
   */
  private _getUserProvidedFunctionAppsForStaticSite(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptionalParams
  ): Promise<StaticSitesGetUserProvidedFunctionAppsForStaticSiteResponse> {
    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: string,
    name: string,
    functionAppName: string,
    options?: StaticSitesGetUserProvidedFunctionAppForStaticSiteOptionalParams
  ): Promise<StaticSitesGetUserProvidedFunctionAppForStaticSiteResponse> {
    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.
   */
  async beginRegisterUserProvidedFunctionAppWithStaticSite(
    resourceGroupName: string,
    name: string,
    functionAppName: string,
    staticSiteUserProvidedFunctionEnvelope: StaticSiteUserProvidedFunctionAppARMResource,
    options?: StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<
        StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse
      >,
      StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse,
      OperationState<
        StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse
      >
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginRegisterUserProvidedFunctionAppWithStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    functionAppName: string,
    staticSiteUserProvidedFunctionEnvelope: StaticSiteUserProvidedFunctionAppARMResource,
    options?: StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteOptionalParams
  ): Promise<StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse> {
    const poller = await 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: string,
    name: string,
    functionAppName: string,
    options?: StaticSitesDetachUserProvidedFunctionAppFromStaticSiteOptionalParams
  ): Promise<void> {
    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.
   */
  async beginCreateZipDeploymentForStaticSite(
    resourceGroupName: string,
    name: string,
    staticSiteZipDeploymentEnvelope: StaticSiteZipDeploymentARMResource,
    options?: StaticSitesCreateZipDeploymentForStaticSiteOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginCreateZipDeploymentForStaticSiteAndWait(
    resourceGroupName: string,
    name: string,
    staticSiteZipDeploymentEnvelope: StaticSiteZipDeploymentARMResource,
    options?: StaticSitesCreateZipDeploymentForStaticSiteOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  async beginValidateBackend(
    resourceGroupName: string,
    name: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesValidateBackendOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginValidateBackendAndWait(
    resourceGroupName: string,
    name: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesValidateBackendOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  async beginValidateBackendForBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesValidateBackendForBuildOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<void> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<void, OperationState<void>>(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginValidateBackendForBuildAndWait(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesValidateBackendForBuildOptionalParams
  ): Promise<void> {
    const poller = await 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.
   */
  private _getLinkedBackends(
    resourceGroupName: string,
    name: string,
    options?: StaticSitesGetLinkedBackendsOptionalParams
  ): Promise<StaticSitesGetLinkedBackendsResponse> {
    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.
   */
  private _getLinkedBackendsForBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    options?: StaticSitesGetLinkedBackendsForBuildOptionalParams
  ): Promise<StaticSitesGetLinkedBackendsForBuildResponse> {
    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: string,
    name: string,
    linkedBackendName: string,
    options?: StaticSitesGetLinkedBackendOptionalParams
  ): Promise<StaticSitesGetLinkedBackendResponse> {
    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.
   */
  async beginLinkBackend(
    resourceGroupName: string,
    name: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesLinkBackendOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<StaticSitesLinkBackendResponse>,
      StaticSitesLinkBackendResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesLinkBackendResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesLinkBackendResponse,
      OperationState<StaticSitesLinkBackendResponse>
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginLinkBackendAndWait(
    resourceGroupName: string,
    name: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesLinkBackendOptionalParams
  ): Promise<StaticSitesLinkBackendResponse> {
    const poller = await 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: string,
    name: string,
    linkedBackendName: string,
    options?: StaticSitesUnlinkBackendOptionalParams
  ): Promise<void> {
    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: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    options?: StaticSitesGetLinkedBackendForBuildOptionalParams
  ): Promise<StaticSitesGetLinkedBackendForBuildResponse> {
    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.
   */
  async beginLinkBackendToBuild(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesLinkBackendToBuildOptionalParams
  ): Promise<
    SimplePollerLike<
      OperationState<StaticSitesLinkBackendToBuildResponse>,
      StaticSitesLinkBackendToBuildResponse
    >
  > {
    const directSendOperation = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ): Promise<StaticSitesLinkBackendToBuildResponse> => {
      return this.client.sendOperationRequest(args, spec);
    };
    const sendOperationFn = async (
      args: coreClient.OperationArguments,
      spec: coreClient.OperationSpec
    ) => {
      let currentRawResponse:
        | coreClient.FullOperationResponse
        | undefined = undefined;
      const providedCallback = args.options?.onResponse;
      const callback: coreClient.RawResponseCallback = (
        rawResponse: coreClient.FullOperationResponse,
        flatResponse: unknown
      ) => {
        currentRawResponse = rawResponse;
        providedCallback?.(rawResponse, flatResponse);
      };
      const updatedArgs = {
        ...args,
        options: {
          ...args.options,
          onResponse: callback
        }
      };
      const flatResponse = await 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 = await createHttpPoller<
      StaticSitesLinkBackendToBuildResponse,
      OperationState<StaticSitesLinkBackendToBuildResponse>
    >(lro, {
      restoreFrom: options?.resumeFrom,
      intervalInMs: options?.updateIntervalInMs
    });
    await 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.
   */
  async beginLinkBackendToBuildAndWait(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    staticSiteLinkedBackendEnvelope: StaticSiteLinkedBackendARMResource,
    options?: StaticSitesLinkBackendToBuildOptionalParams
  ): Promise<StaticSitesLinkBackendToBuildResponse> {
    const poller = await 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: string,
    name: string,
    environmentName: string,
    linkedBackendName: string,
    options?: StaticSitesUnlinkBackendFromBuildOptionalParams
  ): Promise<void> {
    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.
   */
  private _listNext(
    nextLink: string,
    options?: StaticSitesListNextOptionalParams
  ): Promise<StaticSitesListNextResponse> {
    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.
   */
  private _getStaticSitesByResourceGroupNext(
    resourceGroupName: string,
    nextLink: string,
    options?: StaticSitesGetStaticSitesByResourceGroupNextOptionalParams
  ): Promise<StaticSitesGetStaticSitesByResourceGroupNextResponse> {
    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.
   */
  private _listStaticSiteUsersNext(
    resourceGroupName: string,
    name: string,
    authprovider: string,
    nextLink: string,
    options?: StaticSitesListStaticSiteUsersNextOptionalParams
  ): Promise<StaticSitesListStaticSiteUsersNextResponse> {
    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.
   */
  private _getStaticSiteBuildsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetStaticSiteBuildsNextOptionalParams
  ): Promise<StaticSitesGetStaticSiteBuildsNextResponse> {
    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.
   */
  private _getBuildDatabaseConnectionsNext(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    nextLink: string,
    options?: StaticSitesGetBuildDatabaseConnectionsNextOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionsNextResponse> {
    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.
   */
  private _listStaticSiteBuildFunctionsNext(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    nextLink: string,
    options?: StaticSitesListStaticSiteBuildFunctionsNextOptionalParams
  ): Promise<StaticSitesListStaticSiteBuildFunctionsNextResponse> {
    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.
   */
  private _getBuildDatabaseConnectionsWithDetailsNext(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    nextLink: string,
    options?: StaticSitesGetBuildDatabaseConnectionsWithDetailsNextOptionalParams
  ): Promise<StaticSitesGetBuildDatabaseConnectionsWithDetailsNextResponse> {
    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.
   */
  private _getUserProvidedFunctionAppsForStaticSiteBuildNext(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    nextLink: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildNextOptionalParams
  ): Promise<
    StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildNextResponse
  > {
    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.
   */
  private _listBasicAuthNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesListBasicAuthNextOptionalParams
  ): Promise<StaticSitesListBasicAuthNextResponse> {
    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.
   */
  private _listStaticSiteCustomDomainsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesListStaticSiteCustomDomainsNextOptionalParams
  ): Promise<StaticSitesListStaticSiteCustomDomainsNextResponse> {
    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.
   */
  private _getDatabaseConnectionsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetDatabaseConnectionsNextOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionsNextResponse> {
    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.
   */
  private _listStaticSiteFunctionsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesListStaticSiteFunctionsNextOptionalParams
  ): Promise<StaticSitesListStaticSiteFunctionsNextResponse> {
    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.
   */
  private _getPrivateEndpointConnectionListNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetPrivateEndpointConnectionListNextOptionalParams
  ): Promise<StaticSitesGetPrivateEndpointConnectionListNextResponse> {
    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.
   */
  private _getDatabaseConnectionsWithDetailsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetDatabaseConnectionsWithDetailsNextOptionalParams
  ): Promise<StaticSitesGetDatabaseConnectionsWithDetailsNextResponse> {
    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.
   */
  private _getUserProvidedFunctionAppsForStaticSiteNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetUserProvidedFunctionAppsForStaticSiteNextOptionalParams
  ): Promise<StaticSitesGetUserProvidedFunctionAppsForStaticSiteNextResponse> {
    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.
   */
  private _getLinkedBackendsNext(
    resourceGroupName: string,
    name: string,
    nextLink: string,
    options?: StaticSitesGetLinkedBackendsNextOptionalParams
  ): Promise<StaticSitesGetLinkedBackendsNextResponse> {
    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.
   */
  private _getLinkedBackendsForBuildNext(
    resourceGroupName: string,
    name: string,
    environmentName: string,
    nextLink: string,
    options?: StaticSitesGetLinkedBackendsForBuildNextOptionalParams
  ): Promise<StaticSitesGetLinkedBackendsForBuildNextResponse> {
    return this.client.sendOperationRequest(
      { resourceGroupName, name, environmentName, nextLink, options },
      getLinkedBackendsForBuildNextOperationSpec
    );
  }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);

const previewWorkflowOperationSpec: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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: coreClient.OperationSpec = {
  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
};
