import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { AppServicePlans } 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 { PollerLike , PollOperationState , LroEngine } from "@azure/core-lro" ; import { LroImpl } from "../lroImpl" ; import { AppServicePlan , AppServicePlansListNextOptionalParams , AppServicePlansListOptionalParams , AppServicePlansListByResourceGroupNextOptionalParams , AppServicePlansListByResourceGroupOptionalParams , AppServicePlansListWebAppsByHybridConnectionNextOptionalParams , AppServicePlansListWebAppsByHybridConnectionOptionalParams , HybridConnection , AppServicePlansListHybridConnectionsNextOptionalParams , AppServicePlansListHybridConnectionsOptionalParams , Site , AppServicePlansListWebAppsNextOptionalParams , AppServicePlansListWebAppsOptionalParams , CsmUsageQuota , AppServicePlansListUsagesNextOptionalParams , AppServicePlansListUsagesOptionalParams , AppServicePlansListResponse , AppServicePlansListByResourceGroupResponse , AppServicePlansGetOptionalParams , AppServicePlansGetResponse , AppServicePlansCreateOrUpdateOptionalParams , AppServicePlansCreateOrUpdateResponse , AppServicePlansDeleteOptionalParams , AppServicePlanPatchResource , AppServicePlansUpdateOptionalParams , AppServicePlansUpdateResponse , AppServicePlansListCapabilitiesOptionalParams , AppServicePlansListCapabilitiesResponse , AppServicePlansGetHybridConnectionOptionalParams , AppServicePlansGetHybridConnectionResponse , AppServicePlansDeleteHybridConnectionOptionalParams , AppServicePlansListHybridConnectionKeysOptionalParams , AppServicePlansListHybridConnectionKeysResponse , AppServicePlansListWebAppsByHybridConnectionResponse , AppServicePlansGetHybridConnectionPlanLimitOptionalParams , AppServicePlansGetHybridConnectionPlanLimitResponse , AppServicePlansListHybridConnectionsResponse , AppServicePlansRestartWebAppsOptionalParams , AppServicePlansListWebAppsResponse , AppServicePlansGetServerFarmSkusOptionalParams , AppServicePlansGetServerFarmSkusResponse , AppServicePlansListUsagesResponse , AppServicePlansListVnetsOptionalParams , AppServicePlansListVnetsResponse , AppServicePlansGetVnetFromServerFarmOptionalParams , AppServicePlansGetVnetFromServerFarmResponse , AppServicePlansGetVnetGatewayOptionalParams , AppServicePlansGetVnetGatewayResponse , VnetGateway , AppServicePlansUpdateVnetGatewayOptionalParams , AppServicePlansUpdateVnetGatewayResponse , AppServicePlansListRoutesForVnetOptionalParams , AppServicePlansListRoutesForVnetResponse , AppServicePlansGetRouteForVnetOptionalParams , AppServicePlansGetRouteForVnetResponse , VnetRoute , AppServicePlansCreateOrUpdateVnetRouteOptionalParams , AppServicePlansCreateOrUpdateVnetRouteResponse , AppServicePlansDeleteVnetRouteOptionalParams , AppServicePlansUpdateVnetRouteOptionalParams , AppServicePlansUpdateVnetRouteResponse , AppServicePlansRebootWorkerOptionalParams , AppServicePlansListNextResponse , AppServicePlansListByResourceGroupNextResponse , AppServicePlansListWebAppsByHybridConnectionNextResponse , AppServicePlansListHybridConnectionsNextResponse , AppServicePlansListWebAppsNextResponse , AppServicePlansListUsagesNextResponse } from "../models" ; /** Class containing AppServicePlans operations. */ export class AppServicePlansImpl implements AppServicePlans { private readonly client : WebSiteManagementClient ; param client constructor ( client ) { this . client = client ; } param options public list ( options ? ) { const iter = this . listPagingAll ( options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listPagingPage ( options ) ; } } ; } private async * listPagingPage ( options ? ) { let result = await this . _list ( options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listNext ( continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listPagingAll ( options ? ) { for await ( const page of this . listPagingPage ( options ) ) { yield * page ; } } param resourceGroupName param options public listByResourceGroup ( resourceGroupName , options ? ) { const iter = this . listByResourceGroupPagingAll ( resourceGroupName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listByResourceGroupPagingPage ( resourceGroupName , options ) ; } } ; } private async * listByResourceGroupPagingPage ( resourceGroupName , options ? ) { let result = await this . _listByResourceGroup ( resourceGroupName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listByResourceGroupNext ( resourceGroupName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listByResourceGroupPagingAll ( resourceGroupName , options ? ) { for await ( const page of this . listByResourceGroupPagingPage ( resourceGroupName , options ) ) { yield * page ; } } param resourceGroupName param name param namespaceName param relayName param options public listWebAppsByHybridConnection ( resourceGroupName , name , namespaceName , relayName , options ? ) { const iter = this . listWebAppsByHybridConnectionPagingAll ( resourceGroupName , name , namespaceName , relayName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listWebAppsByHybridConnectionPagingPage ( resourceGroupName , name , namespaceName , relayName , options ) ; } } ; } private async * listWebAppsByHybridConnectionPagingPage ( resourceGroupName , name , namespaceName , relayName , options ? ) { let result = await this . _listWebAppsByHybridConnection ( resourceGroupName , name , namespaceName , relayName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listWebAppsByHybridConnectionNext ( resourceGroupName , name , namespaceName , relayName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listWebAppsByHybridConnectionPagingAll ( resourceGroupName , name , namespaceName , relayName , options ? ) { for await ( const page of this . listWebAppsByHybridConnectionPagingPage ( resourceGroupName , name , namespaceName , relayName , options ) ) { yield * page ; } } param resourceGroupName param name param options public listHybridConnections ( resourceGroupName , name , options ? ) { const iter = this . listHybridConnectionsPagingAll ( resourceGroupName , name , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listHybridConnectionsPagingPage ( resourceGroupName , name , options ) ; } } ; } private async * listHybridConnectionsPagingPage ( resourceGroupName , name , options ? ) { let result = await this . _listHybridConnections ( resourceGroupName , name , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listHybridConnectionsNext ( resourceGroupName , name , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listHybridConnectionsPagingAll ( resourceGroupName , name , options ? ) { for await ( const page of this . listHybridConnectionsPagingPage ( resourceGroupName , name , options ) ) { yield * page ; } } param resourceGroupName param name param options public listWebApps ( resourceGroupName , name , options ? ) { const iter = this . listWebAppsPagingAll ( resourceGroupName , name , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listWebAppsPagingPage ( resourceGroupName , name , options ) ; } } ; } private async * listWebAppsPagingPage ( resourceGroupName , name , options ? ) { let result = await this . _listWebApps ( resourceGroupName , name , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listWebAppsNext ( resourceGroupName , name , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listWebAppsPagingAll ( resourceGroupName , name , options ? ) { for await ( const page of this . listWebAppsPagingPage ( resourceGroupName , name , options ) ) { yield * page ; } } param resourceGroupName param name param options public listUsages ( resourceGroupName , name , options ? ) { const iter = this . listUsagesPagingAll ( resourceGroupName , name , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listUsagesPagingPage ( resourceGroupName , name , options ) ; } } ; } private async * listUsagesPagingPage ( resourceGroupName , name , options ? ) { let result = await this . _listUsages ( resourceGroupName , name , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listUsagesNext ( resourceGroupName , name , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listUsagesPagingAll ( resourceGroupName , name , options ? ) { for await ( const page of this . listUsagesPagingPage ( resourceGroupName , name , options ) ) { yield * page ; } } param options private _list ( options ? ) { return this . client . sendOperationRequest ( { options } , listOperationSpec ) ; } param resourceGroupName param options private _listByResourceGroup ( resourceGroupName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , options } , listByResourceGroupOperationSpec ) ; } param resourceGroupName param name param options get ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , getOperationSpec ) ; } param resourceGroupName param name param appServicePlan param options async beginCreateOrUpdate ( resourceGroupName , name , appServicePlan , options ? ) { const directSendOperation = async ( args , spec ) : Promise < AppServicePlansCreateOrUpdateResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { 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 = new LroImpl ( sendOperation , { resourceGroupName , name , appServicePlan , options } , createOrUpdateOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param name param appServicePlan param options async beginCreateOrUpdateAndWait ( resourceGroupName , name , appServicePlan , options ? ) { const poller = await this . beginCreateOrUpdate ( resourceGroupName , name , appServicePlan , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param name param options delete ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , deleteOperationSpec ) ; } param resourceGroupName param name param appServicePlan param options update ( resourceGroupName , name , appServicePlan , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , appServicePlan , options } , updateOperationSpec ) ; } param resourceGroupName param name param options listCapabilities ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , listCapabilitiesOperationSpec ) ; } param resourceGroupName param name param namespaceName param relayName param options getHybridConnection ( resourceGroupName , name , namespaceName , relayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , namespaceName , relayName , options } , getHybridConnectionOperationSpec ) ; } param resourceGroupName param name param namespaceName param relayName param options deleteHybridConnection ( resourceGroupName , name , namespaceName , relayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , namespaceName , relayName , options } , deleteHybridConnectionOperationSpec ) ; } param resourceGroupName param name param namespaceName param relayName param options listHybridConnectionKeys ( resourceGroupName , name , namespaceName , relayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , namespaceName , relayName , options } , listHybridConnectionKeysOperationSpec ) ; } param resourceGroupName param name param namespaceName param relayName param options private _listWebAppsByHybridConnection ( resourceGroupName , name , namespaceName , relayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , namespaceName , relayName , options } , listWebAppsByHybridConnectionOperationSpec ) ; } param resourceGroupName param name param options getHybridConnectionPlanLimit ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , getHybridConnectionPlanLimitOperationSpec ) ; } param resourceGroupName param name param options private _listHybridConnections ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , listHybridConnectionsOperationSpec ) ; } param resourceGroupName param name param options restartWebApps ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , restartWebAppsOperationSpec ) ; } param resourceGroupName param name param options private _listWebApps ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , listWebAppsOperationSpec ) ; } param resourceGroupName param name param options getServerFarmSkus ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , getServerFarmSkusOperationSpec ) ; } param resourceGroupName param name param options private _listUsages ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , listUsagesOperationSpec ) ; } param resourceGroupName param name param options listVnets ( resourceGroupName , name , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , options } , listVnetsOperationSpec ) ; } param resourceGroupName param name param vnetName param options getVnetFromServerFarm ( resourceGroupName , name , vnetName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , options } , getVnetFromServerFarmOperationSpec ) ; } param resourceGroupName param name param vnetName param gatewayName param options getVnetGateway ( resourceGroupName , name , vnetName , gatewayName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , gatewayName , options } , getVnetGatewayOperationSpec ) ; } param resourceGroupName param name param vnetName param gatewayName param connectionEnvelope param options updateVnetGateway ( resourceGroupName , name , vnetName , gatewayName , connectionEnvelope , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , gatewayName , connectionEnvelope , options } , updateVnetGatewayOperationSpec ) ; } param resourceGroupName param name param vnetName param options listRoutesForVnet ( resourceGroupName , name , vnetName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , options } , listRoutesForVnetOperationSpec ) ; } param resourceGroupName param name param vnetName param routeName param options getRouteForVnet ( resourceGroupName , name , vnetName , routeName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , routeName , options } , getRouteForVnetOperationSpec ) ; } param resourceGroupName param name param vnetName param routeName param route param options createOrUpdateVnetRoute ( resourceGroupName , name , vnetName , routeName , route , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , routeName , route , options } , createOrUpdateVnetRouteOperationSpec ) ; } param resourceGroupName param name param vnetName param routeName param options deleteVnetRoute ( resourceGroupName , name , vnetName , routeName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , routeName , options } , deleteVnetRouteOperationSpec ) ; } param resourceGroupName param name param vnetName param routeName param route param options updateVnetRoute ( resourceGroupName , name , vnetName , routeName , route , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , vnetName , routeName , route , options } , updateVnetRouteOperationSpec ) ; } param resourceGroupName param name param workerName param options rebootWorker ( resourceGroupName , name , workerName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , workerName , options } , rebootWorkerOperationSpec ) ; } param nextLink param options private _listNext ( nextLink , options ? ) { return this . client . sendOperationRequest ( { nextLink , options } , listNextOperationSpec ) ; } param resourceGroupName param nextLink param options private _listByResourceGroupNext ( resourceGroupName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , nextLink , options } , listByResourceGroupNextOperationSpec ) ; } param resourceGroupName param name param namespaceName param relayName param nextLink param options private _listWebAppsByHybridConnectionNext ( resourceGroupName , name , namespaceName , relayName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , namespaceName , relayName , nextLink , options } , listWebAppsByHybridConnectionNextOperationSpec ) ; } param resourceGroupName param name param nextLink param options private _listHybridConnectionsNext ( resourceGroupName , name , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , nextLink , options } , listHybridConnectionsNextOperationSpec ) ; } param resourceGroupName param name param nextLink param options private _listWebAppsNext ( resourceGroupName , name , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , nextLink , options } , listWebAppsNextOperationSpec ) ; } param resourceGroupName param name param nextLink param options private _listUsagesNext ( resourceGroupName , name , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , name , nextLink , options } , listUsagesNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AppServicePlanCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . detailed ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId ] , headerParameters : [ Parameters . accept ] , serializer } ; const listByResourceGroupOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AppServicePlanCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AppServicePlan } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const createOrUpdateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . AppServicePlan } , 201 : { bodyMapper : Mappers . AppServicePlan } , 202 : { bodyMapper : Mappers . AppServicePlan } , 204 : { bodyMapper : Mappers . AppServicePlan } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , requestBody : Parameters . appServicePlan , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" , httpMethod : "DELETE" , responses : { 200 : { } , 204 : { } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const updateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" , httpMethod : "PATCH" , responses : { 200 : { bodyMapper : Mappers . AppServicePlan } , 202 : { bodyMapper : Mappers . AppServicePlan } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , requestBody : Parameters . appServicePlan1 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const listCapabilitiesOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "Capability" } } } } } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const getHybridConnectionOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . HybridConnection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . namespaceName , Parameters . relayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const deleteHybridConnectionOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" , httpMethod : "DELETE" , responses : { 200 : { } , 204 : { } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . namespaceName , Parameters . relayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listHybridConnectionKeysOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . HybridConnectionKey } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . namespaceName , Parameters . relayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listWebAppsByHybridConnectionOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . ResourceCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . namespaceName , Parameters . relayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getHybridConnectionPlanLimitOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . HybridConnectionLimits } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const listHybridConnectionsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . HybridConnectionCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const restartWebAppsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites" , httpMethod : "POST" , responses : { 204 : { } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . softRestart ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const listWebAppsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . WebAppCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . filter , Parameters . skipToken , Parameters . top ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const getServerFarmSkusOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Dictionary" , value : { type : { name : "any" } } } } } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const listUsagesOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . CsmUsageQuotaCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . filter ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const listVnetsOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VnetInfoResource" } } } } } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name ] , headerParameters : [ Parameters . accept ] , serializer } ; const getVnetFromServerFarmOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VnetInfoResource } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getVnetGatewayOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VnetGateway } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . gatewayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const updateVnetGatewayOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . VnetGateway } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , requestBody : Parameters . connectionEnvelope , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . gatewayName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const listRoutesForVnetOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VnetRoute" } } } } } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getRouteForVnetOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "Sequence" , element : { type : { name : "Composite" , className : "VnetRoute" } } } } } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . routeName ] , headerParameters : [ Parameters . accept ] , serializer } ; const createOrUpdateVnetRouteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . VnetRoute } , 400 : { isError : true } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , requestBody : Parameters . route , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . routeName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const deleteVnetRouteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" , httpMethod : "DELETE" , responses : { 200 : { } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . routeName ] , headerParameters : [ Parameters . accept ] , serializer } ; const updateVnetRouteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" , httpMethod : "PATCH" , responses : { 200 : { bodyMapper : Mappers . VnetRoute } , 400 : { isError : true } , 404 : { isError : true } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , requestBody : Parameters . route , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . vnetName , Parameters . routeName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const rebootWorkerOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot" , httpMethod : "POST" , responses : { 204 : { } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . workerName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AppServicePlanCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . detailed ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ; const listByResourceGroupNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AppServicePlanCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ; const listWebAppsByHybridConnectionNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . ResourceCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . nextLink , Parameters . namespaceName , Parameters . relayName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listHybridConnectionsNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . HybridConnectionCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ; const listWebAppsNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . WebAppCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . filter , Parameters . skipToken , Parameters . top ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ; const listUsagesNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . CsmUsageQuotaCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . filter ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . name , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ;