-
Notifications
You must be signed in to change notification settings - Fork 0
/
resourceManagementClientBundle.min.js
1 lines (1 loc) · 239 KB
/
resourceManagementClientBundle.min.js
1
var resourceManagementClient=function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=msRest},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"CloudError",function(){return s}),r.d(t,"BaseResource",function(){return i}),r.d(t,"DeploymentExtendedFilter",function(){return o}),r.d(t,"GenericResourceFilter",function(){return a}),r.d(t,"ResourceGroupFilter",function(){return u}),r.d(t,"TemplateLink",function(){return c}),r.d(t,"ParametersLink",function(){return l}),r.d(t,"DebugSetting",function(){return p}),r.d(t,"DeploymentProperties",function(){return d}),r.d(t,"Deployment",function(){return h}),r.d(t,"DeploymentExportResult",function(){return m}),r.d(t,"ResourceManagementErrorWithDetails",function(){return f}),r.d(t,"AliasPathType",function(){return y}),r.d(t,"AliasType",function(){return g}),r.d(t,"ProviderResourceType",function(){return b}),r.d(t,"Provider",function(){return v}),r.d(t,"BasicDependency",function(){return w}),r.d(t,"Dependency",function(){return R}),r.d(t,"DeploymentPropertiesExtended",function(){return P}),r.d(t,"DeploymentValidateResult",function(){return E}),r.d(t,"DeploymentExtended",function(){return N}),r.d(t,"Plan",function(){return q}),r.d(t,"Sku",function(){return O}),r.d(t,"Identity",function(){return z}),r.d(t,"Resource",function(){return L}),r.d(t,"GenericResource",function(){return C}),r.d(t,"ResourceGroupProperties",function(){return I}),r.d(t,"ResourceGroup",function(){return A}),r.d(t,"ResourceGroupPatchable",function(){return j}),r.d(t,"ResourcesMoveInfo",function(){return T}),r.d(t,"ExportTemplateRequest",function(){return x}),r.d(t,"TagCount",function(){return H}),r.d(t,"TagValue",function(){return J}),r.d(t,"TagDetails",function(){return U}),r.d(t,"TargetResource",function(){return G}),r.d(t,"HttpMessage",function(){return W}),r.d(t,"DeploymentOperationProperties",function(){return S}),r.d(t,"DeploymentOperation",function(){return V}),r.d(t,"ResourceProviderOperationDisplayProperties",function(){return k}),r.d(t,"SubResource",function(){return B}),r.d(t,"ResourceGroupExportResult",function(){return M}),r.d(t,"DeploymentsListByResourceGroupOptionalParams",function(){return D}),r.d(t,"ProvidersListOptionalParams",function(){return _}),r.d(t,"ProvidersGetOptionalParams",function(){return $}),r.d(t,"ResourcesListByResourceGroupOptionalParams",function(){return F}),r.d(t,"ResourcesListOptionalParams",function(){return K}),r.d(t,"ResourceGroupsListOptionalParams",function(){return Q}),r.d(t,"DeploymentOperationsListOptionalParams",function(){return X}),r.d(t,"DeploymentListResult",function(){return Y}),r.d(t,"ProviderListResult",function(){return Z}),r.d(t,"ResourceListResult",function(){return ee}),r.d(t,"ResourceGroupListResult",function(){return te}),r.d(t,"TagsListResult",function(){return re}),r.d(t,"DeploymentOperationsListResult",function(){return ne});var n=r(2),s=(r.n(n),n.CloudErrorMapper),i=n.BaseResourceMapper,o={required:!1,serializedName:"DeploymentExtendedFilter",type:{name:"Composite",className:"DeploymentExtendedFilter",modelProperties:{provisioningState:{required:!1,serializedName:"provisioningState",type:{name:"String"}}}}},a={required:!1,serializedName:"GenericResourceFilter",type:{name:"Composite",className:"GenericResourceFilter",modelProperties:{resourceType:{required:!1,serializedName:"resourceType",type:{name:"String"}},tagname:{required:!1,serializedName:"tagname",type:{name:"String"}},tagvalue:{required:!1,serializedName:"tagvalue",type:{name:"String"}}}}},u={required:!1,serializedName:"ResourceGroupFilter",type:{name:"Composite",className:"ResourceGroupFilter",modelProperties:{tagName:{required:!1,serializedName:"tagName",type:{name:"String"}},tagValue:{required:!1,serializedName:"tagValue",type:{name:"String"}}}}},c={required:!1,serializedName:"TemplateLink",type:{name:"Composite",className:"TemplateLink",modelProperties:{uri:{required:!0,serializedName:"uri",type:{name:"String"}},contentVersion:{required:!1,serializedName:"contentVersion",type:{name:"String"}}}}},l={required:!1,serializedName:"ParametersLink",type:{name:"Composite",className:"ParametersLink",modelProperties:{uri:{required:!0,serializedName:"uri",type:{name:"String"}},contentVersion:{required:!1,serializedName:"contentVersion",type:{name:"String"}}}}},p={required:!1,serializedName:"DebugSetting",type:{name:"Composite",className:"DebugSetting",modelProperties:{detailLevel:{required:!1,serializedName:"detailLevel",type:{name:"String"}}}}},d={required:!1,serializedName:"DeploymentProperties",type:{name:"Composite",className:"DeploymentProperties",modelProperties:{template:{required:!1,serializedName:"template",type:{name:"Object"}},templateLink:{required:!1,serializedName:"templateLink",type:{name:"Composite",className:"TemplateLink"}},parameters:{required:!1,serializedName:"parameters",type:{name:"Object"}},parametersLink:{required:!1,serializedName:"parametersLink",type:{name:"Composite",className:"ParametersLink"}},mode:{required:!0,serializedName:"mode",type:{name:"Enum",allowedValues:["Incremental","Complete"]}},debugSetting:{required:!1,serializedName:"debugSetting",type:{name:"Composite",className:"DebugSetting"}}}}},h={required:!1,serializedName:"Deployment",type:{name:"Composite",className:"Deployment",modelProperties:{properties:{required:!0,serializedName:"properties",type:{name:"Composite",className:"DeploymentProperties"}}}}},m={required:!1,serializedName:"DeploymentExportResult",type:{name:"Composite",className:"DeploymentExportResult",modelProperties:{template:{required:!1,serializedName:"template",type:{name:"Object"}}}}},f={required:!1,serializedName:"ResourceManagementErrorWithDetails",type:{name:"Composite",className:"ResourceManagementErrorWithDetails",modelProperties:{code:{required:!1,readOnly:!0,serializedName:"code",type:{name:"String"}},message:{required:!1,readOnly:!0,serializedName:"message",type:{name:"String"}},target:{required:!1,readOnly:!0,serializedName:"target",type:{name:"String"}},details:{required:!1,readOnly:!0,serializedName:"details",type:{name:"Sequence",element:{required:!1,serializedName:"ResourceManagementErrorWithDetailsElementType",type:{name:"Composite",className:"ResourceManagementErrorWithDetails"}}}}}}},y={required:!1,serializedName:"AliasPathType",type:{name:"Composite",className:"AliasPathType",modelProperties:{path:{required:!1,serializedName:"path",type:{name:"String"}},apiVersions:{required:!1,serializedName:"apiVersions",type:{name:"Sequence",element:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}}}}},g={required:!1,serializedName:"AliasType",type:{name:"Composite",className:"AliasType",modelProperties:{name:{required:!1,serializedName:"name",type:{name:"String"}},paths:{required:!1,serializedName:"paths",type:{name:"Sequence",element:{required:!1,serializedName:"AliasPathTypeElementType",type:{name:"Composite",className:"AliasPathType"}}}}}}},b={required:!1,serializedName:"ProviderResourceType",type:{name:"Composite",className:"ProviderResourceType",modelProperties:{resourceType:{required:!1,serializedName:"resourceType",type:{name:"String"}},locations:{required:!1,serializedName:"locations",type:{name:"Sequence",element:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}},aliases:{required:!1,serializedName:"aliases",type:{name:"Sequence",element:{required:!1,serializedName:"AliasTypeElementType",type:{name:"Composite",className:"AliasType"}}}},apiVersions:{required:!1,serializedName:"apiVersions",type:{name:"Sequence",element:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}},properties:{required:!1,serializedName:"properties",type:{name:"Dictionary",value:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}}}}},v={required:!1,serializedName:"Provider",type:{name:"Composite",className:"Provider",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},namespace:{required:!1,serializedName:"namespace",type:{name:"String"}},registrationState:{required:!1,readOnly:!0,serializedName:"registrationState",type:{name:"String"}},resourceTypes:{required:!1,readOnly:!0,serializedName:"resourceTypes",type:{name:"Sequence",element:{required:!1,serializedName:"ProviderResourceTypeElementType",type:{name:"Composite",className:"ProviderResourceType"}}}}}}},w={required:!1,serializedName:"BasicDependency",type:{name:"Composite",className:"BasicDependency",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}},resourceType:{required:!1,serializedName:"resourceType",type:{name:"String"}},resourceName:{required:!1,serializedName:"resourceName",type:{name:"String"}}}}},R={required:!1,serializedName:"Dependency",type:{name:"Composite",className:"Dependency",modelProperties:{dependsOn:{required:!1,serializedName:"dependsOn",type:{name:"Sequence",element:{required:!1,serializedName:"BasicDependencyElementType",type:{name:"Composite",className:"BasicDependency"}}}},id:{required:!1,serializedName:"id",type:{name:"String"}},resourceType:{required:!1,serializedName:"resourceType",type:{name:"String"}},resourceName:{required:!1,serializedName:"resourceName",type:{name:"String"}}}}},P={required:!1,serializedName:"DeploymentPropertiesExtended",type:{name:"Composite",className:"DeploymentPropertiesExtended",modelProperties:{provisioningState:{required:!1,readOnly:!0,serializedName:"provisioningState",type:{name:"String"}},correlationId:{required:!1,readOnly:!0,serializedName:"correlationId",type:{name:"String"}},timestamp:{required:!1,readOnly:!0,serializedName:"timestamp",type:{name:"DateTime"}},outputs:{required:!1,serializedName:"outputs",type:{name:"Object"}},providers:{required:!1,serializedName:"providers",type:{name:"Sequence",element:{required:!1,serializedName:"ProviderElementType",type:{name:"Composite",className:"Provider"}}}},dependencies:{required:!1,serializedName:"dependencies",type:{name:"Sequence",element:{required:!1,serializedName:"DependencyElementType",type:{name:"Composite",className:"Dependency"}}}},template:{required:!1,serializedName:"template",type:{name:"Object"}},templateLink:{required:!1,serializedName:"templateLink",type:{name:"Composite",className:"TemplateLink"}},parameters:{required:!1,serializedName:"parameters",type:{name:"Object"}},parametersLink:{required:!1,serializedName:"parametersLink",type:{name:"Composite",className:"ParametersLink"}},mode:{required:!1,serializedName:"mode",type:{name:"Enum",allowedValues:["Incremental","Complete"]}},debugSetting:{required:!1,serializedName:"debugSetting",type:{name:"Composite",className:"DebugSetting"}}}}},E={required:!1,serializedName:"DeploymentValidateResult",type:{name:"Composite",className:"DeploymentValidateResult",modelProperties:{error:{required:!1,serializedName:"error",type:{name:"Composite",className:"ResourceManagementErrorWithDetails"}},properties:{required:!1,serializedName:"properties",type:{name:"Composite",className:"DeploymentPropertiesExtended"}}}}},N={required:!1,serializedName:"DeploymentExtended",type:{name:"Composite",className:"DeploymentExtended",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}},name:{required:!0,serializedName:"name",type:{name:"String"}},properties:{required:!1,serializedName:"properties",type:{name:"Composite",className:"DeploymentPropertiesExtended"}}}}},q={required:!1,serializedName:"Plan",type:{name:"Composite",className:"Plan",modelProperties:{name:{required:!1,serializedName:"name",type:{name:"String"}},publisher:{required:!1,serializedName:"publisher",type:{name:"String"}},product:{required:!1,serializedName:"product",type:{name:"String"}},promotionCode:{required:!1,serializedName:"promotionCode",type:{name:"String"}},version:{required:!1,serializedName:"version",type:{name:"String"}}}}},O={required:!1,serializedName:"Sku",type:{name:"Composite",className:"Sku",modelProperties:{name:{required:!1,serializedName:"name",type:{name:"String"}},tier:{required:!1,serializedName:"tier",type:{name:"String"}},size:{required:!1,serializedName:"size",type:{name:"String"}},family:{required:!1,serializedName:"family",type:{name:"String"}},model:{required:!1,serializedName:"model",type:{name:"String"}},capacity:{required:!1,serializedName:"capacity",type:{name:"Number"}}}}},z={required:!1,serializedName:"Identity",type:{name:"Composite",className:"Identity",modelProperties:{principalId:{required:!1,readOnly:!0,serializedName:"principalId",type:{name:"String"}},tenantId:{required:!1,readOnly:!0,serializedName:"tenantId",type:{name:"String"}},type:{required:!1,serializedName:"type",type:{name:"Enum",allowedValues:["SystemAssigned"]}}}}},L={required:!1,serializedName:"Resource",type:{name:"Composite",className:"Resource",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},name:{required:!1,readOnly:!0,serializedName:"name",type:{name:"String"}},type:{required:!1,readOnly:!0,serializedName:"type",type:{name:"String"}},location:{required:!1,serializedName:"location",type:{name:"String"}},tags:{required:!1,serializedName:"tags",type:{name:"Dictionary",value:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}}}}},C={required:!1,serializedName:"GenericResource",type:{name:"Composite",className:"GenericResource",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},name:{required:!1,readOnly:!0,serializedName:"name",type:{name:"String"}},type:{required:!1,readOnly:!0,serializedName:"type",type:{name:"String"}},location:{required:!1,serializedName:"location",type:{name:"String"}},tags:{required:!1,serializedName:"tags",type:{name:"Dictionary",value:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}},plan:{required:!1,serializedName:"plan",type:{name:"Composite",className:"Plan"}},properties:{required:!1,serializedName:"properties",type:{name:"Object"}},kind:{required:!1,serializedName:"kind",constraints:{Pattern:"^[-w._,()]+$"},type:{name:"String"}},managedBy:{required:!1,serializedName:"managedBy",type:{name:"String"}},sku:{required:!1,serializedName:"sku",type:{name:"Composite",className:"Sku"}},identity:{required:!1,serializedName:"identity",type:{name:"Composite",className:"Identity"}}}}},I={required:!1,serializedName:"ResourceGroupProperties",type:{name:"Composite",className:"ResourceGroupProperties",modelProperties:{provisioningState:{required:!1,readOnly:!0,serializedName:"provisioningState",type:{name:"String"}}}}},A={required:!1,serializedName:"ResourceGroup",type:{name:"Composite",className:"ResourceGroup",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},name:{required:!1,serializedName:"name",type:{name:"String"}},properties:{required:!1,serializedName:"properties",type:{name:"Composite",className:"ResourceGroupProperties"}},location:{required:!0,serializedName:"location",type:{name:"String"}},managedBy:{required:!1,serializedName:"managedBy",type:{name:"String"}},tags:{required:!1,serializedName:"tags",type:{name:"Dictionary",value:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}}}}},j={required:!1,serializedName:"ResourceGroupPatchable",type:{name:"Composite",className:"ResourceGroupPatchable",modelProperties:{name:{required:!1,serializedName:"name",type:{name:"String"}},properties:{required:!1,serializedName:"properties",type:{name:"Composite",className:"ResourceGroupProperties"}},managedBy:{required:!1,serializedName:"managedBy",type:{name:"String"}},tags:{required:!1,serializedName:"tags",type:{name:"Dictionary",value:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}}}}},T={required:!1,serializedName:"ResourcesMoveInfo",type:{name:"Composite",className:"ResourcesMoveInfo",modelProperties:{resources:{required:!1,serializedName:"resources",type:{name:"Sequence",element:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}},targetResourceGroup:{required:!1,serializedName:"targetResourceGroup",type:{name:"String"}}}}},x={required:!1,serializedName:"ExportTemplateRequest",type:{name:"Composite",className:"ExportTemplateRequest",modelProperties:{resources:{required:!1,serializedName:"resources",type:{name:"Sequence",element:{required:!1,serializedName:"stringElementType",type:{name:"String"}}}},options:{required:!1,serializedName:"options",type:{name:"String"}}}}},H={required:!1,serializedName:"TagCount",type:{name:"Composite",className:"TagCount",modelProperties:{type:{required:!1,serializedName:"type",type:{name:"String"}},value:{required:!1,serializedName:"value",type:{name:"Number"}}}}},J={required:!1,serializedName:"TagValue",type:{name:"Composite",className:"TagValue",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}},tagValue:{required:!1,serializedName:"tagValue",type:{name:"String"}},count:{required:!1,serializedName:"count",type:{name:"Composite",className:"TagCount"}}}}},U={required:!1,serializedName:"TagDetails",type:{name:"Composite",className:"TagDetails",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}},tagName:{required:!1,serializedName:"tagName",type:{name:"String"}},count:{required:!1,serializedName:"count",type:{name:"Composite",className:"TagCount"}},values:{required:!1,serializedName:"values",type:{name:"Sequence",element:{required:!1,serializedName:"TagValueElementType",type:{name:"Composite",className:"TagValue"}}}}}}},G={required:!1,serializedName:"TargetResource",type:{name:"Composite",className:"TargetResource",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}},resourceName:{required:!1,serializedName:"resourceName",type:{name:"String"}},resourceType:{required:!1,serializedName:"resourceType",type:{name:"String"}}}}},W={required:!1,serializedName:"HttpMessage",type:{name:"Composite",className:"HttpMessage",modelProperties:{content:{required:!1,serializedName:"content",type:{name:"Object"}}}}},S={required:!1,serializedName:"DeploymentOperationProperties",type:{name:"Composite",className:"DeploymentOperationProperties",modelProperties:{provisioningState:{required:!1,readOnly:!0,serializedName:"provisioningState",type:{name:"String"}},timestamp:{required:!1,readOnly:!0,serializedName:"timestamp",type:{name:"DateTime"}},serviceRequestId:{required:!1,readOnly:!0,serializedName:"serviceRequestId",type:{name:"String"}},statusCode:{required:!1,readOnly:!0,serializedName:"statusCode",type:{name:"String"}},statusMessage:{required:!1,readOnly:!0,serializedName:"statusMessage",type:{name:"Object"}},targetResource:{required:!1,readOnly:!0,serializedName:"targetResource",type:{name:"Composite",className:"TargetResource"}},request:{required:!1,readOnly:!0,serializedName:"request",type:{name:"Composite",className:"HttpMessage"}},response:{required:!1,readOnly:!0,serializedName:"response",type:{name:"Composite",className:"HttpMessage"}}}}},V={required:!1,serializedName:"DeploymentOperation",type:{name:"Composite",className:"DeploymentOperation",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},operationId:{required:!1,readOnly:!0,serializedName:"operationId",type:{name:"String"}},properties:{required:!1,serializedName:"properties",type:{name:"Composite",className:"DeploymentOperationProperties"}}}}},k={required:!1,serializedName:"ResourceProviderOperationDisplayProperties",type:{name:"Composite",className:"ResourceProviderOperationDisplayProperties",modelProperties:{publisher:{required:!1,serializedName:"publisher",type:{name:"String"}},provider:{required:!1,serializedName:"provider",type:{name:"String"}},resource:{required:!1,serializedName:"resource",type:{name:"String"}},operation:{required:!1,serializedName:"operation",type:{name:"String"}},description:{required:!1,serializedName:"description",type:{name:"String"}}}}},B={required:!1,serializedName:"SubResource",type:{name:"Composite",className:"SubResource",modelProperties:{id:{required:!1,serializedName:"id",type:{name:"String"}}}}},M={required:!1,serializedName:"ResourceGroupExportResult",type:{name:"Composite",className:"ResourceGroupExportResult",modelProperties:{template:{required:!1,serializedName:"template",type:{name:"Object"}},error:{required:!1,serializedName:"error",type:{name:"Composite",className:"ResourceManagementErrorWithDetails"}}}}},D={required:!1,serializedName:"ListByResourceGroupOptions",type:{name:"Composite",className:"DeploymentsListByResourceGroupOptionalParams",modelProperties:{filter:{required:!1,serializedName:"$filter",type:{name:"String"}},top:{required:!1,serializedName:"$top",type:{name:"Number"}}}}},_={required:!1,serializedName:"ListOptions",type:{name:"Composite",className:"ProvidersListOptionalParams",modelProperties:{top:{required:!1,serializedName:"$top",type:{name:"Number"}},expand:{required:!1,serializedName:"$expand",type:{name:"String"}}}}},$={required:!1,serializedName:"GetOptions",type:{name:"Composite",className:"ProvidersGetOptionalParams",modelProperties:{expand:{required:!1,serializedName:"$expand",type:{name:"String"}}}}},F={required:!1,serializedName:"ListByResourceGroupOptions",type:{name:"Composite",className:"ResourcesListByResourceGroupOptionalParams",modelProperties:{filter:{required:!1,serializedName:"$filter",type:{name:"String"}},expand:{required:!1,serializedName:"$expand",type:{name:"String"}},top:{required:!1,serializedName:"$top",type:{name:"Number"}}}}},K={required:!1,serializedName:"ListOptions",type:{name:"Composite",className:"ResourcesListOptionalParams",modelProperties:{filter:{required:!1,serializedName:"$filter",type:{name:"String"}},expand:{required:!1,serializedName:"$expand",type:{name:"String"}},top:{required:!1,serializedName:"$top",type:{name:"Number"}}}}},Q={required:!1,serializedName:"ListOptions",type:{name:"Composite",className:"ResourceGroupsListOptionalParams",modelProperties:{filter:{required:!1,serializedName:"$filter",type:{name:"String"}},top:{required:!1,serializedName:"$top",type:{name:"Number"}}}}},X={required:!1,serializedName:"ListOptions",type:{name:"Composite",className:"DeploymentOperationsListOptionalParams",modelProperties:{top:{required:!1,serializedName:"$top",type:{name:"Number"}}}}},Y={required:!1,serializedName:"DeploymentListResult",type:{name:"Composite",className:"DeploymentListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"DeploymentExtendedElementType",type:{name:"Composite",className:"DeploymentExtended"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}},Z={required:!1,serializedName:"ProviderListResult",type:{name:"Composite",className:"ProviderListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"ProviderElementType",type:{name:"Composite",className:"Provider"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}},ee={required:!1,serializedName:"ResourceListResult",type:{name:"Composite",className:"ResourceListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"GenericResourceElementType",type:{name:"Composite",className:"GenericResource"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}},te={required:!1,serializedName:"ResourceGroupListResult",type:{name:"Composite",className:"ResourceGroupListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"ResourceGroupElementType",type:{name:"Composite",className:"ResourceGroup"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}},re={required:!1,serializedName:"TagsListResult",type:{name:"Composite",className:"TagsListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"TagDetailsElementType",type:{name:"Composite",className:"TagDetails"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}},ne={required:!1,serializedName:"DeploymentOperationsListResult",type:{name:"Composite",className:"DeploymentOperationsListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"DeploymentOperationElementType",type:{name:"Composite",className:"DeploymentOperation"}}}},nextLink:{required:!1,readOnly:!0,serializedName:"nextLink",type:{name:"String"}}}}}},function(e,t){e.exports=msRestAzure},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"CloudError",function(){return s}),r.d(t,"BaseResource",function(){return i}),r.d(t,"Location",function(){return o}),r.d(t,"SubscriptionPolicies",function(){return a}),r.d(t,"Subscription",function(){return u}),r.d(t,"TenantIdDescription",function(){return c}),r.d(t,"LocationListResult",function(){return l}),r.d(t,"SubscriptionListResult",function(){return p}),r.d(t,"TenantListResult",function(){return d});var n=r(2),s=(r.n(n),n.CloudErrorMapper),i=n.BaseResourceMapper,o={required:!1,serializedName:"Location",type:{name:"Composite",className:"Location",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},subscriptionId:{required:!1,readOnly:!0,serializedName:"subscriptionId",type:{name:"String"}},name:{required:!1,readOnly:!0,serializedName:"name",type:{name:"String"}},displayName:{required:!1,readOnly:!0,serializedName:"displayName",type:{name:"String"}},latitude:{required:!1,readOnly:!0,serializedName:"latitude",type:{name:"String"}},longitude:{required:!1,readOnly:!0,serializedName:"longitude",type:{name:"String"}}}}},a={required:!1,serializedName:"SubscriptionPolicies",type:{name:"Composite",className:"SubscriptionPolicies",modelProperties:{locationPlacementId:{required:!1,readOnly:!0,serializedName:"locationPlacementId",type:{name:"String"}},quotaId:{required:!1,readOnly:!0,serializedName:"quotaId",type:{name:"String"}},spendingLimit:{required:!1,readOnly:!0,serializedName:"spendingLimit",type:{name:"Enum",allowedValues:["On","Off","CurrentPeriodOff"]}}}}},u={required:!1,serializedName:"Subscription",type:{name:"Composite",className:"Subscription",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},subscriptionId:{required:!1,readOnly:!0,serializedName:"subscriptionId",type:{name:"String"}},displayName:{required:!1,readOnly:!0,serializedName:"displayName",type:{name:"String"}},state:{required:!1,readOnly:!0,serializedName:"state",type:{name:"Enum",allowedValues:["Enabled","Warned","PastDue","Disabled","Deleted"]}},subscriptionPolicies:{required:!1,serializedName:"subscriptionPolicies",type:{name:"Composite",className:"SubscriptionPolicies"}},authorizationSource:{required:!1,serializedName:"authorizationSource",type:{name:"String"}}}}},c={required:!1,serializedName:"TenantIdDescription",type:{name:"Composite",className:"TenantIdDescription",modelProperties:{id:{required:!1,readOnly:!0,serializedName:"id",type:{name:"String"}},tenantId:{required:!1,readOnly:!0,serializedName:"tenantId",type:{name:"String"}}}}},l={required:!1,serializedName:"LocationListResult",type:{name:"Composite",className:"LocationListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"LocationElementType",type:{name:"Composite",className:"Location"}}}}}}},p={required:!1,serializedName:"SubscriptionListResult",type:{name:"Composite",className:"SubscriptionListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"SubscriptionElementType",type:{name:"Composite",className:"Subscription"}}}},nextLink:{required:!0,serializedName:"nextLink",type:{name:"String"}}}}},d={required:!1,serializedName:"TenantListResult",type:{name:"Composite",className:"TenantListResult",modelProperties:{value:{required:!1,serializedName:"",type:{name:"Sequence",element:{required:!1,serializedName:"TenantIdDescriptionElementType",type:{name:"Composite",className:"TenantIdDescription"}}}},nextLink:{required:!0,serializedName:"nextLink",type:{name:"String"}}}}}},function(e,t,r){"use strict";t.SubscriptionClient=r(5),t.ResourceManagementClient=r(10),t=e.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"SubscriptionClient",function(){return d});var n=r(6),s=r(3),i=r(0),o=(r.n(i),r(2)),a=(r.n(o),r(7));r.d(t,"SubscriptionModels",function(){return n}),r.d(t,"SubscriptionMappers",function(){return s});var u,c=this&&this.__extends||(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l="",p="",d=function(e){function t(t,r,n){var o=this;if(null===t||void 0===t)throw new Error("'credentials' cannot be null.");return n||(n={}),(o=e.call(this,t,n)||this).apiVersion="2016-06-01",o.acceptLanguage="en-US",o.longRunningOperationRetryTimeout=30,o.generateClientRequestId=!0,o.baseUri=r,o.baseUri||(o.baseUri="https://management.azure.com"),o.credentials=t,o.addUserAgentInfo(l+"/"+p),null!==n.acceptLanguage&&void 0!==n.acceptLanguage&&(o.acceptLanguage=n.acceptLanguage),null!==n.longRunningOperationRetryTimeout&&void 0!==n.longRunningOperationRetryTimeout&&(o.longRunningOperationRetryTimeout=n.longRunningOperationRetryTimeout),null!==n.generateClientRequestId&&void 0!==n.generateClientRequestId&&(o.generateClientRequestId=n.generateClientRequestId),o.subscriptions=new a.a(o),o.tenants=new a.b(o),o.serializer=new i.Serializer(s),o}return c(t,e),t}(o.AzureServiceClient)},function(e,t,r){"use strict";var n,s;Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"SubscriptionState",function(){return n}),r.d(t,"SpendingLimit",function(){return s}),function(e){e.Enabled="Enabled",e.Warned="Warned",e.PastDue="PastDue",e.Disabled="Disabled",e.Deleted="Deleted"}(n||(n={})),function(e){e.On="On",e.Off="Off",e.CurrentPeriodOff="CurrentPeriodOff"}(s||(s={}))},function(e,t,r){"use strict";var n=r(8),s=r(9);r.d(t,"a",function(){return n.a}),r.d(t,"b",function(){return s.a})},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(3)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.listLocationsWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("subscriptionId cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/locations").replace("{subscriptionId}",encodeURIComponent(e)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="GET",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(b=s.CloudError,f.body=r.serializer.deserialize(b,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){g=d.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.LocationListResult,d.bodyAsJson=r.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),v.response=n.stripResponse(h),[2,Promise.reject(v)]}}return[3,4];case 3:return w=o.sent(),[2,Promise.reject(w)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.getWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("subscriptionId cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}").replace("{subscriptionId}",encodeURIComponent(e)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="GET",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(b=s.CloudError,f.body=r.serializer.deserialize(b,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){g=d.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.Subscription,d.bodyAsJson=r.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),v.response=n.stripResponse(h),[2,Promise.reject(v)]}}return[3,4];case 3:return w=o.sent(),[2,Promise.reject(w)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:t=this.client;try{if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(r=this.client.baseUri,i=r+(r.endsWith("/")?"":"/")+"subscriptions",(u=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),u.length>0&&(i+="?"+u.join("&")),(c=new a).method="GET",c.url=i,c.headers={},c.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(c.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(c.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(l in e.customHeaders)e.customHeaders.hasOwnProperty(l)&&(c.headers[l]=e.customHeaders[l]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(c)];case 2:if(p=o.sent(),d=p.response,200!==(h=d.status)){(m=new n.RestError(p.bodyAsText)).statusCode=d.status,m.request=n.stripRequest(c),m.response=n.stripResponse(d),f=p.bodyAsJson;try{f&&(f.error&&(f=f.error),f.code&&(m.code=f.code),f.message&&(m.message=f.message)),null!==f&&void 0!==f&&(g=s.CloudError,m.body=t.serializer.deserialize(g,f,"error.body"))}catch(e){return m.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+p.bodyAsText+'" for the default response.',[2,Promise.reject(m)]}return[2,Promise.reject(m)]}if(200===h){y=p.bodyAsJson;try{null!==y&&void 0!==y&&(g=s.SubscriptionListResult,p.bodyAsJson=t.serializer.deserialize(g,y,"operationRes.bodyAsJson"))}catch(e){return(b=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+p.bodyAsText)).request=n.stripRequest(c),b.response=n.stripResponse(d),[2,Promise.reject(b)]}}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(p)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.SubscriptionListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.listLocations=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listLocationsWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listLocationsWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.get=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.getWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(3)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:t=this.client;try{if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(r=this.client.baseUri,i=r+(r.endsWith("/")?"":"/")+"tenants",(u=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),u.length>0&&(i+="?"+u.join("&")),(c=new a).method="GET",c.url=i,c.headers={},c.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(c.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(c.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(l in e.customHeaders)e.customHeaders.hasOwnProperty(l)&&(c.headers[l]=e.customHeaders[l]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(c)];case 2:if(p=o.sent(),d=p.response,200!==(h=d.status)){(m=new n.RestError(p.bodyAsText)).statusCode=d.status,m.request=n.stripRequest(c),m.response=n.stripResponse(d),f=p.bodyAsJson;try{f&&(f.error&&(f=f.error),f.code&&(m.code=f.code),f.message&&(m.message=f.message)),null!==f&&void 0!==f&&(g=s.CloudError,m.body=t.serializer.deserialize(g,f,"error.body"))}catch(e){return m.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+p.bodyAsText+'" for the default response.',[2,Promise.reject(m)]}return[2,Promise.reject(m)]}if(200===h){y=p.bodyAsJson;try{null!==y&&void 0!==y&&(g=s.TenantListResult,p.bodyAsJson=t.serializer.deserialize(g,y,"operationRes.bodyAsJson"))}catch(e){return(b=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+p.bodyAsText)).request=n.stripRequest(c),b.response=n.stripResponse(d),[2,Promise.reject(b)]}}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(p)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.TenantListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"ResourceManagementClient",function(){return d});var n=r(11),s=r(1),i=r(0),o=(r.n(i),r(2)),a=(r.n(o),r(12));r.d(t,"ResourceManagementModels",function(){return n}),r.d(t,"ResourceManagementMappers",function(){return s});var u,c=this&&this.__extends||(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l="",p="",d=function(e){function t(t,r,n,u){var c=this;if(console.log(i),console.log(o),null===t||void 0===t)throw new Error("'credentials' cannot be null.");if(null===r||void 0===r)throw new Error("'subscriptionId' cannot be null.");return u||(u={}),(c=e.call(this,t,u)||this).apiVersion="2017-05-10",c.acceptLanguage="en-US",c.longRunningOperationRetryTimeout=30,c.generateClientRequestId=!0,c.baseUri=n,c.baseUri||(c.baseUri="https://management.azure.com"),c.credentials=t,c.subscriptionId=r,c.addUserAgentInfo(l+"/"+p),null!==u.acceptLanguage&&void 0!==u.acceptLanguage&&(c.acceptLanguage=u.acceptLanguage),null!==u.longRunningOperationRetryTimeout&&void 0!==u.longRunningOperationRetryTimeout&&(c.longRunningOperationRetryTimeout=u.longRunningOperationRetryTimeout),null!==u.generateClientRequestId&&void 0!==u.generateClientRequestId&&(c.generateClientRequestId=u.generateClientRequestId),c.deployments=new a.b(c),c.providers=new a.c(c),c.resources=new a.e(c),c.resourceGroups=new a.d(c),c.tags=new a.f(c),c.deploymentOperations=new a.a(c),c.serializer=new i.Serializer(s),c}return c(t,e),t}(o.AzureServiceClient)},function(e,t,r){"use strict";var n,s;Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"DeploymentMode",function(){return n}),r.d(t,"ResourceIdentityType",function(){return s}),function(e){e.Incremental="Incremental",e.Complete="Complete"}(n||(n={})),function(e){e.SystemAssigned="SystemAssigned"}(s||(s={}))},function(e,t,r){"use strict";var n=r(13),s=r(14),i=r(15),o=r(16),a=r(17),u=r(18);r.d(t,"b",function(){return n.a}),r.d(t,"c",function(){return s.a}),r.d(t,"e",function(){return i.a}),r.d(t,"d",function(){return o.a}),r.d(t,"f",function(){return a.a}),r.d(t,"a",function(){return u.a})},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.deleteMethodWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var n,s,i,a,u;return o(this,function(o){switch(o.label){case 0:n=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginDeleteMethodWithHttpOperationResponse(e,t,r)];case 2:return s=o.sent(),[3,4];case 3:return i=o.sent(),[2,Promise.reject(i)];case 4:return o.trys.push([4,6,,7]),[4,n.getLongRunningOperationResult(s,r)];case 5:return a=o.sent(),[3,7];case 6:return u=o.sent(),[2,Promise.reject(u)];case 7:return[2,Promise.resolve(a)]}})})},e.prototype.checkExistenceWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="HEAD",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,204!==(f=m.status)&&404!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(b=s.CloudError,y.body=i.serializer.deserialize(b,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}return h.bodyAsJson=204===f,[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.createOrUpdateWithHttpOperationResponse=function(e,t,r,a){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,a)];case 2:return u=o.sent(),[3,4];case 3:return c=o.sent(),[2,Promise.reject(c)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(u,a)];case 5:l=o.sent(),p=l.request,d=l.response,h=l.bodyAsJson;try{null!==h&&void 0!==h&&(m=s.DeploymentExtended,l.bodyAsJson=i.serializer.deserialize(m,h,"operationRes.bodyAsJson"))}catch(e){return(f=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(p),f.response=n.stripResponse(d),[2,Promise.reject(f)]}return[3,7];case 6:return y=o.sent(),[2,Promise.reject(y)];case 7:return[2,Promise.resolve(l)]}})})},e.prototype.getWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="GET",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=i.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.DeploymentExtended,h.bodyAsJson=i.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.cancelWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="POST",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,204!==m.status){(f=new n.RestError(h.bodyAsText)).statusCode=m.status,f.request=n.stripRequest(p),f.response=n.stripResponse(m),y=h.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(g=s.CloudError,f.body=i.serializer.deserialize(g,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.validateWithHttpOperationResponse=function(e,t,r,u){return i(this,void 0,void 0,function(){var i,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q,O,z;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===r||void 0===r)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=(l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(p=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="POST",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),u&&u.customHeaders)for(h in u.customHeaders)u.customHeaders.hasOwnProperty(h)&&(d.headers[h]=u.customHeaders[h]);m=null,f=null;try{null!==r&&void 0!==r&&(y=s.Deployment,f=i.serializer.serialize(y,r,"parameters"),m=JSON.stringify(f))}catch(e){return g=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(r,null,2)+"."),[2,Promise.reject(g)]}d.body=m,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(b=o.sent(),v=b.response,200!==(w=v.status)&&400!==w){(R=new n.RestError(b.bodyAsText)).statusCode=v.status,R.request=n.stripRequest(d),R.response=n.stripResponse(v),P=b.bodyAsJson;try{P&&(P.error&&(P=P.error),P.code&&(R.code=P.code),P.message&&(R.message=P.message)),null!==P&&void 0!==P&&(q=s.CloudError,R.body=i.serializer.deserialize(q,P,"error.body"))}catch(e){return R.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+b.bodyAsText+'" for the default response.',[2,Promise.reject(R)]}return[2,Promise.reject(R)]}if(200===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.DeploymentValidateResult,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(E=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),E.response=n.stripResponse(v),[2,Promise.reject(E)]}}if(400===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.DeploymentValidateResult,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(O=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),O.response=n.stripResponse(v),[2,Promise.reject(O)]}}return[3,4];case 3:return z=o.sent(),[2,Promise.reject(z)];case 4:return[2,Promise.resolve(b)]}})})},e.prototype.exportTemplateWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="POST",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=i.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.DeploymentExportResult,h.bodyAsJson=i.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.listByResourceGroupWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P;return o(this,function(o){switch(o.label){case 0:r=this.client,i=t&&void 0!==t.filter?t.filter:void 0,u=t&&void 0!==t.top?t.top:void 0;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null!==i&&void 0!==i&&"string"!=typeof i.valueOf())throw new Error("filter must be of type string.");if(null!==u&&void 0!==u&&"number"!=typeof u)throw new Error("top must be of type number.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),p=[],null!==i&&void 0!==i&&p.push("$filter="+encodeURIComponent(i)),null!==u&&void 0!==u&&p.push("$top="+encodeURIComponent(u.toString())),p.push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="GET",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(h in t.customHeaders)t.customHeaders.hasOwnProperty(h)&&(d.headers[h]=t.customHeaders[h]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(d)];case 2:if(m=o.sent(),f=m.response,200!==(y=f.status)){(g=new n.RestError(m.bodyAsText)).statusCode=f.status,g.request=n.stripRequest(d),g.response=n.stripResponse(f),b=m.bodyAsJson;try{b&&(b.error&&(b=b.error),b.code&&(g.code=b.code),b.message&&(g.message=b.message)),null!==b&&void 0!==b&&(w=s.CloudError,g.body=r.serializer.deserialize(w,b,"error.body"))}catch(e){return g.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+m.bodyAsText+'" for the default response.',[2,Promise.reject(g)]}return[2,Promise.reject(g)]}if(200===y){v=m.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.DeploymentListResult,m.bodyAsJson=r.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(R=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(d),R.response=n.stripResponse(f),[2,Promise.reject(R)]}}return[3,4];case 3:return P=o.sent(),[2,Promise.reject(P)];case 4:return[2,Promise.resolve(m)]}})})},e.prototype.beginDeleteMethodWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="DELETE",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,202!==(f=m.status)&&204!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(b=s.CloudError,y.body=i.serializer.deserialize(b,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.beginCreateOrUpdateWithHttpOperationResponse=function(e,t,r,u){return i(this,void 0,void 0,function(){var i,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q,O,z;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===r||void 0===r)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=(l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(p=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="PUT",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),u&&u.customHeaders)for(h in u.customHeaders)u.customHeaders.hasOwnProperty(h)&&(d.headers[h]=u.customHeaders[h]);m=null,f=null;try{null!==r&&void 0!==r&&(y=s.Deployment,f=i.serializer.serialize(y,r,"parameters"),m=JSON.stringify(f))}catch(e){return g=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(r,null,2)+"."),[2,Promise.reject(g)]}d.body=m,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(b=o.sent(),v=b.response,200!==(w=v.status)&&201!==w){(R=new n.RestError(b.bodyAsText)).statusCode=v.status,R.request=n.stripRequest(d),R.response=n.stripResponse(v),P=b.bodyAsJson;try{P&&(P.error&&(P=P.error),P.code&&(R.code=P.code),P.message&&(R.message=P.message)),null!==P&&void 0!==P&&(q=s.CloudError,R.body=i.serializer.deserialize(q,P,"error.body"))}catch(e){return R.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+b.bodyAsText+'" for the default response.',[2,Promise.reject(R)]}return[2,Promise.reject(R)]}if(200===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.DeploymentExtended,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(E=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),E.response=n.stripResponse(v),[2,Promise.reject(E)]}}if(201===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.DeploymentExtended,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(O=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),O.response=n.stripResponse(v),[2,Promise.reject(O)]}}return[3,4];case 3:return z=o.sent(),[2,Promise.reject(z)];case 4:return[2,Promise.resolve(b)]}})})},e.prototype.listByResourceGroupNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.DeploymentListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.deleteMethod=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.deleteMethodWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteMethodWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.checkExistence=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.checkExistenceWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.checkExistenceWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.createOrUpdate=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.createOrUpdateWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.get=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.getWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.cancel=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.cancelWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.cancelWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.validate=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.validateWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.validateWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.exportTemplate=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.exportTemplateWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.exportTemplateWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.listByResourceGroup=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listByResourceGroupWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listByResourceGroupWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.beginDeleteMethod=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.beginDeleteMethodWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginDeleteMethodWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.beginCreateOrUpdate=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.listByResourceGroupNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listByResourceGroupNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listByResourceGroupNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.unregisterWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister").replace("{resourceProviderNamespace}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="POST",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(b=s.CloudError,f.body=r.serializer.deserialize(b,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){g=d.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.Provider,d.bodyAsJson=r.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),v.response=n.stripResponse(h),[2,Promise.reject(v)]}}return[3,4];case 3:return w=o.sent(),[2,Promise.reject(w)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.registerWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register").replace("{resourceProviderNamespace}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="POST",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(b=s.CloudError,f.body=r.serializer.deserialize(b,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){g=d.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.Provider,d.bodyAsJson=r.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),v.response=n.stripResponse(h),[2,Promise.reject(v)]}}return[3,4];case 3:return w=o.sent(),[2,Promise.reject(w)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:t=this.client,r=e&&void 0!==e.top?e.top:void 0,i=e&&void 0!==e.expand?e.expand:void 0;try{if(null!==r&&void 0!==r&&"number"!=typeof r)throw new Error("top must be of type number.");if(null!==i&&void 0!==i&&"string"!=typeof i.valueOf())throw new Error("expand must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/providers").replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),l=[],null!==r&&void 0!==r&&l.push("$top="+encodeURIComponent(r.toString())),null!==i&&void 0!==i&&l.push("$expand="+encodeURIComponent(i)),l.push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="GET",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(d in e.customHeaders)e.customHeaders.hasOwnProperty(d)&&(p.headers[d]=e.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=t.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.ProviderListResult,h.bodyAsJson=t.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.getWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:r=this.client,i=t&&void 0!==t.expand?t.expand:void 0;try{if(null!==i&&void 0!==i&&"string"!=typeof i.valueOf())throw new Error("expand must be of type string.");if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}").replace("{resourceProviderNamespace}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),l=[],null!==i&&void 0!==i&&l.push("$expand="+encodeURIComponent(i)),l.push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="GET",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(d in t.customHeaders)t.customHeaders.hasOwnProperty(d)&&(p.headers[d]=t.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=r.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.Provider,h.bodyAsJson=r.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.ProviderListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.unregister=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.unregisterWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.unregisterWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.register=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.registerWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.registerWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.get=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.getWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.listByResourceGroupWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E;return o(this,function(o){switch(o.label){case 0:r=this.client,i=t&&void 0!==t.filter?t.filter:void 0,u=t&&void 0!==t.expand?t.expand:void 0,c=t&&void 0!==t.top?t.top:void 0;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null!==i&&void 0!==i&&"string"!=typeof i.valueOf())throw new Error("filter must be of type string.");if(null!==u&&void 0!==u&&"string"!=typeof u.valueOf())throw new Error("expand must be of type string.");if(null!==c&&void 0!==c&&"number"!=typeof c)throw new Error("top must be of type number.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(l=this.client.baseUri,p=(p=(p=l+(l.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),d=[],null!==i&&void 0!==i&&d.push("$filter="+encodeURIComponent(i)),null!==u&&void 0!==u&&d.push("$expand="+encodeURIComponent(u)),null!==c&&void 0!==c&&d.push("$top="+encodeURIComponent(c.toString())),d.push("api-version="+encodeURIComponent(this.client.apiVersion)),d.length>0&&(p+="?"+d.join("&")),(h=new a).method="GET",h.url=p,h.headers={},h.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(h.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(h.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(m in t.customHeaders)t.customHeaders.hasOwnProperty(m)&&(h.headers[m]=t.customHeaders[m]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(h)];case 2:if(f=o.sent(),y=f.response,200!==(g=y.status)){(b=new n.RestError(f.bodyAsText)).statusCode=y.status,b.request=n.stripRequest(h),b.response=n.stripResponse(y),v=f.bodyAsJson;try{v&&(v.error&&(v=v.error),v.code&&(b.code=v.code),v.message&&(b.message=v.message)),null!==v&&void 0!==v&&(R=s.CloudError,b.body=r.serializer.deserialize(R,v,"error.body"))}catch(e){return b.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+f.bodyAsText+'" for the default response.',[2,Promise.reject(b)]}return[2,Promise.reject(b)]}if(200===g){w=f.bodyAsJson;try{null!==w&&void 0!==w&&(R=s.ResourceListResult,f.bodyAsJson=r.serializer.deserialize(R,w,"operationRes.bodyAsJson"))}catch(e){return(P=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+f.bodyAsText)).request=n.stripRequest(h),P.response=n.stripResponse(y),[2,Promise.reject(P)]}}return[3,4];case 3:return E=o.sent(),[2,Promise.reject(E)];case 4:return[2,Promise.resolve(f)]}})})},e.prototype.moveResourcesWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var n,s,i,a,u;return o(this,function(o){switch(o.label){case 0:n=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginMoveResourcesWithHttpOperationResponse(e,t,r)];case 2:return s=o.sent(),[3,4];case 3:return i=o.sent(),[2,Promise.reject(i)];case 4:return o.trys.push([4,6,,7]),[4,n.getLongRunningOperationResult(s,r)];case 5:return a=o.sent(),[3,7];case 6:return u=o.sent(),[2,Promise.reject(u)];case 7:return[2,Promise.resolve(a)]}})})},e.prototype.validateMoveResourcesWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var n,s,i,a,u;return o(this,function(o){switch(o.label){case 0:n=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginValidateMoveResourcesWithHttpOperationResponse(e,t,r)];case 2:return s=o.sent(),[3,4];case 3:return i=o.sent(),[2,Promise.reject(i)];case 4:return o.trys.push([4,6,,7]),[4,n.getLongRunningOperationResult(s,r)];case 5:return a=o.sent(),[3,7];case 6:return u=o.sent(),[2,Promise.reject(u)];case 7:return[2,Promise.resolve(a)]}})})},e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P;return o(this,function(o){switch(o.label){case 0:t=this.client,r=e&&void 0!==e.filter?e.filter:void 0,i=e&&void 0!==e.expand?e.expand:void 0,u=e&&void 0!==e.top?e.top:void 0;try{if(null!==r&&void 0!==r&&"string"!=typeof r.valueOf())throw new Error("filter must be of type string.");if(null!==i&&void 0!==i&&"string"!=typeof i.valueOf())throw new Error("expand must be of type string.");if(null!==u&&void 0!==u&&"number"!=typeof u)throw new Error("top must be of type number.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resources").replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),p=[],null!==r&&void 0!==r&&p.push("$filter="+encodeURIComponent(r)),null!==i&&void 0!==i&&p.push("$expand="+encodeURIComponent(i)),null!==u&&void 0!==u&&p.push("$top="+encodeURIComponent(u.toString())),p.push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="GET",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(h in e.customHeaders)e.customHeaders.hasOwnProperty(h)&&(d.headers[h]=e.customHeaders[h]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(d)];case 2:if(m=o.sent(),f=m.response,200!==(y=f.status)){(g=new n.RestError(m.bodyAsText)).statusCode=f.status,g.request=n.stripRequest(d),g.response=n.stripResponse(f),b=m.bodyAsJson;try{b&&(b.error&&(b=b.error),b.code&&(g.code=b.code),b.message&&(g.message=b.message)),null!==b&&void 0!==b&&(w=s.CloudError,g.body=t.serializer.deserialize(w,b,"error.body"))}catch(e){return g.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+m.bodyAsText+'" for the default response.',[2,Promise.reject(g)]}return[2,Promise.reject(g)]}if(200===y){v=m.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.ResourceListResult,m.bodyAsJson=t.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(R=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(d),R.response=n.stripResponse(f),[2,Promise.reject(R)]}}return[3,4];case 3:return P=o.sent(),[2,Promise.reject(P)];case 4:return[2,Promise.resolve(m)]}})})},e.prototype.checkExistenceWithHttpOperationResponse=function(e,t,r,u,c,l,p){return i(this,void 0,void 0,function(){var i,d,h,m,f,y,g,b,v,w,R,P,E;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("parentResourcePath cannot be null or undefined and it must be of type string.");if(null===u||void 0===u||"string"!=typeof u.valueOf())throw new Error("resourceType cannot be null or undefined and it must be of type string.");if(null===c||void 0===c||"string"!=typeof c.valueOf())throw new Error("resourceName cannot be null or undefined and it must be of type string.");if(null===l||void 0===l||"string"!=typeof l.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(d=this.client.baseUri,h=(h=(h=(h=(h=(h=(h=d+(d.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{resourceProviderNamespace}",encodeURIComponent(t))).replace("{parentResourcePath}",r)).replace("{resourceType}",u)).replace("{resourceName}",encodeURIComponent(c))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(m=[]).push("api-version="+encodeURIComponent(l)),m.length>0&&(h+="?"+m.join("&")),(f=new a).method="HEAD",f.url=h,f.headers={},f.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(f.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(f.headers["accept-language"]=this.client.acceptLanguage),p&&p.customHeaders)for(y in p.customHeaders)p.customHeaders.hasOwnProperty(y)&&(f.headers[y]=p.customHeaders[y]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(f)];case 2:if(g=o.sent(),b=g.response,204!==(v=b.status)&&404!==v){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(f),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(P=s.CloudError,w.body=i.serializer.deserialize(P,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}return g.bodyAsJson=204===v,[3,4];case 3:return E=o.sent(),[2,Promise.reject(E)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.deleteMethodWithHttpOperationResponse=function(e,t,r,n,s,a,u){return i(this,void 0,void 0,function(){var i,c,l,p,d;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginDeleteMethodWithHttpOperationResponse(e,t,r,n,s,a,u)];case 2:return c=o.sent(),[3,4];case 3:return l=o.sent(),[2,Promise.reject(l)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(c,u)];case 5:return p=o.sent(),[3,7];case 6:return d=o.sent(),[2,Promise.reject(d)];case 7:return[2,Promise.resolve(p)]}})})},e.prototype.createOrUpdateWithHttpOperationResponse=function(e,t,r,a,u,c,l,p){return i(this,void 0,void 0,function(){var i,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,a,u,c,l,p)];case 2:return d=o.sent(),[3,4];case 3:return h=o.sent(),[2,Promise.reject(h)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(d,p)];case 5:m=o.sent(),f=m.request,y=m.response,g=m.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.GenericResource,m.bodyAsJson=i.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(f),v.response=n.stripResponse(y),[2,Promise.reject(v)]}return[3,7];case 6:return w=o.sent(),[2,Promise.reject(w)];case 7:return[2,Promise.resolve(m)]}})})},e.prototype.updateWithHttpOperationResponse=function(e,t,r,a,u,c,l,p){return i(this,void 0,void 0,function(){var i,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginUpdateWithHttpOperationResponse(e,t,r,a,u,c,l,p)];case 2:return d=o.sent(),[3,4];case 3:return h=o.sent(),[2,Promise.reject(h)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(d,p)];case 5:m=o.sent(),f=m.request,y=m.response,g=m.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.GenericResource,m.bodyAsJson=i.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(f),v.response=n.stripResponse(y),[2,Promise.reject(v)]}return[3,7];case 6:return w=o.sent(),[2,Promise.reject(w)];case 7:return[2,Promise.resolve(m)]}})})},e.prototype.getWithHttpOperationResponse=function(e,t,r,u,c,l,p){return i(this,void 0,void 0,function(){var i,d,h,m,f,y,g,b,v,w,R,P,E,N,q;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("parentResourcePath cannot be null or undefined and it must be of type string.");if(null===u||void 0===u||"string"!=typeof u.valueOf())throw new Error("resourceType cannot be null or undefined and it must be of type string.");if(null===c||void 0===c||"string"!=typeof c.valueOf())throw new Error("resourceName cannot be null or undefined and it must be of type string.");if(null===l||void 0===l||"string"!=typeof l.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(d=this.client.baseUri,h=(h=(h=(h=(h=(h=(h=d+(d.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{resourceProviderNamespace}",encodeURIComponent(t))).replace("{parentResourcePath}",r)).replace("{resourceType}",u)).replace("{resourceName}",encodeURIComponent(c))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(m=[]).push("api-version="+encodeURIComponent(l)),m.length>0&&(h+="?"+m.join("&")),(f=new a).method="GET",f.url=h,f.headers={},f.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(f.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(f.headers["accept-language"]=this.client.acceptLanguage),p&&p.customHeaders)for(y in p.customHeaders)p.customHeaders.hasOwnProperty(y)&&(f.headers[y]=p.customHeaders[y]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(f)];case 2:if(g=o.sent(),b=g.response,200!==(v=b.status)){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(f),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(E=s.CloudError,w.body=i.serializer.deserialize(E,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}if(200===v){P=g.bodyAsJson;try{null!==P&&void 0!==P&&(E=s.GenericResource,g.bodyAsJson=i.serializer.deserialize(E,P,"operationRes.bodyAsJson"))}catch(e){return(N=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+g.bodyAsText)).request=n.stripRequest(f),N.response=n.stripResponse(b),[2,Promise.reject(N)]}}return[3,4];case 3:return q=o.sent(),[2,Promise.reject(q)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.checkExistenceByIdWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceId cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=u+(u.endsWith("/")?"":"/")+"{resourceId}").replace("{resourceId}",e),(l=[]).push("api-version="+encodeURIComponent(t)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="HEAD",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,204!==(f=m.status)&&404!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(b=s.CloudError,y.body=i.serializer.deserialize(b,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}return h.bodyAsJson=204===f,[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.deleteByIdWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var n,s,i,a,u;return o(this,function(o){switch(o.label){case 0:n=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginDeleteByIdWithHttpOperationResponse(e,t,r)];case 2:return s=o.sent(),[3,4];case 3:return i=o.sent(),[2,Promise.reject(i)];case 4:return o.trys.push([4,6,,7]),[4,n.getLongRunningOperationResult(s,r)];case 5:return a=o.sent(),[3,7];case 6:return u=o.sent(),[2,Promise.reject(u)];case 7:return[2,Promise.resolve(a)]}})})},e.prototype.createOrUpdateByIdWithHttpOperationResponse=function(e,t,r,a){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginCreateOrUpdateByIdWithHttpOperationResponse(e,t,r,a)];case 2:return u=o.sent(),[3,4];case 3:return c=o.sent(),[2,Promise.reject(c)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(u,a)];case 5:l=o.sent(),p=l.request,d=l.response,h=l.bodyAsJson;try{null!==h&&void 0!==h&&(m=s.GenericResource,l.bodyAsJson=i.serializer.deserialize(m,h,"operationRes.bodyAsJson"))}catch(e){return(f=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(p),f.response=n.stripResponse(d),[2,Promise.reject(f)]}return[3,7];case 6:return y=o.sent(),[2,Promise.reject(y)];case 7:return[2,Promise.resolve(l)]}})})},e.prototype.updateByIdWithHttpOperationResponse=function(e,t,r,a){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y;return o(this,function(o){switch(o.label){case 0:i=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginUpdateByIdWithHttpOperationResponse(e,t,r,a)];case 2:return u=o.sent(),[3,4];case 3:return c=o.sent(),[2,Promise.reject(c)];case 4:return o.trys.push([4,6,,7]),[4,i.getLongRunningOperationResult(u,a)];case 5:l=o.sent(),p=l.request,d=l.response,h=l.bodyAsJson;try{null!==h&&void 0!==h&&(m=s.GenericResource,l.bodyAsJson=i.serializer.deserialize(m,h,"operationRes.bodyAsJson"))}catch(e){return(f=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(p),f.response=n.stripResponse(d),[2,Promise.reject(f)]}return[3,7];case 6:return y=o.sent(),[2,Promise.reject(y)];case 7:return[2,Promise.resolve(l)]}})})},e.prototype.getByIdWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceId cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=u+(u.endsWith("/")?"":"/")+"{resourceId}").replace("{resourceId}",e),(l=[]).push("api-version="+encodeURIComponent(t)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="GET",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=i.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.GenericResource,h.bodyAsJson=i.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.beginMoveResourcesWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("sourceResourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"sourceResourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"sourceResourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"sourceResourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources").replace("{sourceResourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="POST",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);h=null,m=null;try{null!==t&&void 0!==t&&(f=s.ResourcesMoveInfo,m=i.serializer.serialize(f,t,"parameters"),h=JSON.stringify(m))}catch(e){return y=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(t,null,2)+"."),[2,Promise.reject(y)]}p.body=h,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(g=o.sent(),b=g.response,202!==(v=b.status)&&204!==v){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(p),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(P=s.CloudError,w.body=i.serializer.deserialize(P,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}return[3,4];case 3:return E=o.sent(),[2,Promise.reject(E)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.beginValidateMoveResourcesWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("sourceResourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"sourceResourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"sourceResourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"sourceResourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources").replace("{sourceResourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="POST",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);h=null,m=null;try{null!==t&&void 0!==t&&(f=s.ResourcesMoveInfo,m=i.serializer.serialize(f,t,"parameters"),h=JSON.stringify(m))}catch(e){return y=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(t,null,2)+"."),[2,Promise.reject(y)]}p.body=h,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(g=o.sent(),b=g.response,202!==(v=b.status)&&204!==v&&409!==v){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(p),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(P=s.CloudError,w.body=i.serializer.deserialize(P,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}return[3,4];case 3:return E=o.sent(),[2,Promise.reject(E)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.beginDeleteMethodWithHttpOperationResponse=function(e,t,r,u,c,l,p){return i(this,void 0,void 0,function(){var i,d,h,m,f,y,g,b,v,w,R,P,E;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("parentResourcePath cannot be null or undefined and it must be of type string.");if(null===u||void 0===u||"string"!=typeof u.valueOf())throw new Error("resourceType cannot be null or undefined and it must be of type string.");if(null===c||void 0===c||"string"!=typeof c.valueOf())throw new Error("resourceName cannot be null or undefined and it must be of type string.");if(null===l||void 0===l||"string"!=typeof l.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(d=this.client.baseUri,h=(h=(h=(h=(h=(h=(h=d+(d.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{resourceProviderNamespace}",encodeURIComponent(t))).replace("{parentResourcePath}",r)).replace("{resourceType}",u)).replace("{resourceName}",encodeURIComponent(c))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(m=[]).push("api-version="+encodeURIComponent(l)),m.length>0&&(h+="?"+m.join("&")),(f=new a).method="DELETE",f.url=h,f.headers={},f.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(f.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(f.headers["accept-language"]=this.client.acceptLanguage),p&&p.customHeaders)for(y in p.customHeaders)p.customHeaders.hasOwnProperty(y)&&(f.headers[y]=p.customHeaders[y]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(f)];case 2:if(g=o.sent(),b=g.response,200!==(v=b.status)&&204!==v&&202!==v){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(f),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(P=s.CloudError,w.body=i.serializer.deserialize(P,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}return[3,4];case 3:return E=o.sent(),[2,Promise.reject(E)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.beginCreateOrUpdateWithHttpOperationResponse=function(e,t,r,u,c,l,p,d){return i(this,void 0,void 0,function(){var i,h,m,f,y,g,b,v,w,R,P,E,N,q,O,z,L,C,I,A;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("parentResourcePath cannot be null or undefined and it must be of type string.");if(null===u||void 0===u||"string"!=typeof u.valueOf())throw new Error("resourceType cannot be null or undefined and it must be of type string.");if(null===c||void 0===c||"string"!=typeof c.valueOf())throw new Error("resourceName cannot be null or undefined and it must be of type string.");if(null===l||void 0===l||"string"!=typeof l.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===p||void 0===p)throw new Error("parameters cannot be null or undefined.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(h=this.client.baseUri,m=(m=(m=(m=(m=(m=(m=h+(h.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{resourceProviderNamespace}",encodeURIComponent(t))).replace("{parentResourcePath}",r)).replace("{resourceType}",u)).replace("{resourceName}",encodeURIComponent(c))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(f=[]).push("api-version="+encodeURIComponent(l)),f.length>0&&(m+="?"+f.join("&")),(y=new a).method="PUT",y.url=m,y.headers={},y.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(y.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(y.headers["accept-language"]=this.client.acceptLanguage),d&&d.customHeaders)for(g in d.customHeaders)d.customHeaders.hasOwnProperty(g)&&(y.headers[g]=d.customHeaders[g]);b=null,v=null;try{null!==p&&void 0!==p&&(w=s.GenericResource,v=i.serializer.serialize(w,p,"parameters"),b=JSON.stringify(v))}catch(e){return R=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(p,null,2)+"."),[2,Promise.reject(R)]}y.body=b,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(y)];case 2:if(P=o.sent(),E=P.response,201!==(N=E.status)&&200!==N&&202!==N){(q=new n.RestError(P.bodyAsText)).statusCode=E.status,q.request=n.stripRequest(y),q.response=n.stripResponse(E),O=P.bodyAsJson;try{O&&(O.error&&(O=O.error),O.code&&(q.code=O.code),O.message&&(q.message=O.message)),null!==O&&void 0!==O&&(C=s.CloudError,q.body=i.serializer.deserialize(C,O,"error.body"))}catch(e){return q.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+P.bodyAsText+'" for the default response.',[2,Promise.reject(q)]}return[2,Promise.reject(q)]}if(201===N){L=P.bodyAsJson;try{null!==L&&void 0!==L&&(C=s.GenericResource,P.bodyAsJson=i.serializer.deserialize(C,L,"operationRes.bodyAsJson"))}catch(e){return(z=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+P.bodyAsText)).request=n.stripRequest(y),z.response=n.stripResponse(E),[2,Promise.reject(z)]}}if(200===N){L=P.bodyAsJson;try{null!==L&&void 0!==L&&(C=s.GenericResource,P.bodyAsJson=i.serializer.deserialize(C,L,"operationRes.bodyAsJson"))}catch(e){return(I=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+P.bodyAsText)).request=n.stripRequest(y),I.response=n.stripResponse(E),[2,Promise.reject(I)]}}return[3,4];case 3:return A=o.sent(),[2,Promise.reject(A)];case 4:return[2,Promise.resolve(P)]}})})},e.prototype.beginUpdateWithHttpOperationResponse=function(e,t,r,u,c,l,p,d){return i(this,void 0,void 0,function(){var i,h,m,f,y,g,b,v,w,R,P,E,N,q,O,z,L,C,I;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("resourceProviderNamespace cannot be null or undefined and it must be of type string.");if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("parentResourcePath cannot be null or undefined and it must be of type string.");if(null===u||void 0===u||"string"!=typeof u.valueOf())throw new Error("resourceType cannot be null or undefined and it must be of type string.");if(null===c||void 0===c||"string"!=typeof c.valueOf())throw new Error("resourceName cannot be null or undefined and it must be of type string.");if(null===l||void 0===l||"string"!=typeof l.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===p||void 0===p)throw new Error("parameters cannot be null or undefined.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(h=this.client.baseUri,m=(m=(m=(m=(m=(m=(m=h+(h.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{resourceProviderNamespace}",encodeURIComponent(t))).replace("{parentResourcePath}",r)).replace("{resourceType}",u)).replace("{resourceName}",encodeURIComponent(c))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(f=[]).push("api-version="+encodeURIComponent(l)),f.length>0&&(m+="?"+f.join("&")),(y=new a).method="PATCH",y.url=m,y.headers={},y.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(y.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(y.headers["accept-language"]=this.client.acceptLanguage),d&&d.customHeaders)for(g in d.customHeaders)d.customHeaders.hasOwnProperty(g)&&(y.headers[g]=d.customHeaders[g]);b=null,v=null;try{null!==p&&void 0!==p&&(w=s.GenericResource,v=i.serializer.serialize(w,p,"parameters"),b=JSON.stringify(v))}catch(e){return R=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(p,null,2)+"."),[2,Promise.reject(R)]}y.body=b,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(y)];case 2:if(P=o.sent(),E=P.response,200!==(N=E.status)&&202!==N){(q=new n.RestError(P.bodyAsText)).statusCode=E.status,q.request=n.stripRequest(y),q.response=n.stripResponse(E),O=P.bodyAsJson;try{O&&(O.error&&(O=O.error),O.code&&(q.code=O.code),O.message&&(q.message=O.message)),null!==O&&void 0!==O&&(L=s.CloudError,q.body=i.serializer.deserialize(L,O,"error.body"))}catch(e){return q.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+P.bodyAsText+'" for the default response.',[2,Promise.reject(q)]}return[2,Promise.reject(q)]}if(200===N){z=P.bodyAsJson;try{null!==z&&void 0!==z&&(L=s.GenericResource,P.bodyAsJson=i.serializer.deserialize(L,z,"operationRes.bodyAsJson"))}catch(e){return(C=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+P.bodyAsText)).request=n.stripRequest(y),C.response=n.stripResponse(E),[2,Promise.reject(C)]}}return[3,4];case 3:return I=o.sent(),[2,Promise.reject(I)];case 4:return[2,Promise.resolve(P)]}})})},e.prototype.beginDeleteByIdWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceId cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=u+(u.endsWith("/")?"":"/")+"{resourceId}").replace("{resourceId}",e),(l=[]).push("api-version="+encodeURIComponent(t)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="DELETE",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)&&204!==f&&202!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(b=s.CloudError,y.body=i.serializer.deserialize(b,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.beginCreateOrUpdateByIdWithHttpOperationResponse=function(e,t,r,u){return i(this,void 0,void 0,function(){var i,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q,O,z;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceId cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===r||void 0===r)throw new Error("parameters cannot be null or undefined.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=c+(c.endsWith("/")?"":"/")+"{resourceId}").replace("{resourceId}",e),(p=[]).push("api-version="+encodeURIComponent(t)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="PUT",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),u&&u.customHeaders)for(h in u.customHeaders)u.customHeaders.hasOwnProperty(h)&&(d.headers[h]=u.customHeaders[h]);m=null,f=null;try{null!==r&&void 0!==r&&(y=s.GenericResource,f=i.serializer.serialize(y,r,"parameters"),m=JSON.stringify(f))}catch(e){return g=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(r,null,2)+"."),[2,Promise.reject(g)]}d.body=m,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(b=o.sent(),v=b.response,201!==(w=v.status)&&200!==w&&202!==w){(R=new n.RestError(b.bodyAsText)).statusCode=v.status,R.request=n.stripRequest(d),R.response=n.stripResponse(v),P=b.bodyAsJson;try{P&&(P.error&&(P=P.error),P.code&&(R.code=P.code),P.message&&(R.message=P.message)),null!==P&&void 0!==P&&(q=s.CloudError,R.body=i.serializer.deserialize(q,P,"error.body"))}catch(e){return R.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+b.bodyAsText+'" for the default response.',[2,Promise.reject(R)]}return[2,Promise.reject(R)]}if(201===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.GenericResource,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(E=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),E.response=n.stripResponse(v),[2,Promise.reject(E)]}}if(200===w){N=b.bodyAsJson;try{null!==N&&void 0!==N&&(q=s.GenericResource,b.bodyAsJson=i.serializer.deserialize(q,N,"operationRes.bodyAsJson"))}catch(e){return(O=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),O.response=n.stripResponse(v),[2,Promise.reject(O)]}}return[3,4];case 3:return z=o.sent(),[2,Promise.reject(z)];case 4:return[2,Promise.resolve(b)]}})})},e.prototype.beginUpdateByIdWithHttpOperationResponse=function(e,t,r,u){return i(this,void 0,void 0,function(){var i,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q,O;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceId cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("apiVersion cannot be null or undefined and it must be of type string.");if(null===r||void 0===r)throw new Error("parameters cannot be null or undefined.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=c+(c.endsWith("/")?"":"/")+"{resourceId}").replace("{resourceId}",e),(p=[]).push("api-version="+encodeURIComponent(t)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="PATCH",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),u&&u.customHeaders)for(h in u.customHeaders)u.customHeaders.hasOwnProperty(h)&&(d.headers[h]=u.customHeaders[h]);m=null,f=null;try{null!==r&&void 0!==r&&(y=s.GenericResource,f=i.serializer.serialize(y,r,"parameters"),m=JSON.stringify(f))}catch(e){return g=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(r,null,2)+"."),[2,Promise.reject(g)]}d.body=m,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(b=o.sent(),v=b.response,200!==(w=v.status)&&202!==w){(R=new n.RestError(b.bodyAsText)).statusCode=v.status,R.request=n.stripRequest(d),R.response=n.stripResponse(v),P=b.bodyAsJson;try{P&&(P.error&&(P=P.error),P.code&&(R.code=P.code),P.message&&(R.message=P.message)),null!==P&&void 0!==P&&(N=s.CloudError,R.body=i.serializer.deserialize(N,P,"error.body"))}catch(e){return R.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+b.bodyAsText+'" for the default response.',[2,Promise.reject(R)]}return[2,Promise.reject(R)]}if(200===w){E=b.bodyAsJson;try{null!==E&&void 0!==E&&(N=s.GenericResource,b.bodyAsJson=i.serializer.deserialize(N,E,"operationRes.bodyAsJson"))}catch(e){return(q=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+b.bodyAsText)).request=n.stripRequest(d),q.response=n.stripResponse(v),[2,Promise.reject(q)]}}return[3,4];case 3:return O=o.sent(),[2,Promise.reject(O)];case 4:return[2,Promise.resolve(b)]}})})},e.prototype.listByResourceGroupNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.ResourceListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.ResourceListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.listByResourceGroup=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listByResourceGroupWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listByResourceGroupWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.moveResources=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.moveResourcesWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.moveResourcesWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.validateMoveResources=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.validateMoveResourcesWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.validateMoveResourcesWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.checkExistence=function(e,t,r,s,i,o,a,u){u||"function"!=typeof a||(u=a,a=void 0);var c=u;if(!u)return this.checkExistenceWithHttpOperationResponse(e,t,r,s,i,o,a).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.checkExistenceWithHttpOperationResponse(e,t,r,s,i,o,a))(function(e,t){if(e)return c(e);var r=t.bodyAsJson;return c(e,r,t.request,t.response)})},e.prototype.deleteMethod=function(e,t,r,s,i,o,a,u){u||"function"!=typeof a||(u=a,a=void 0);var c=u;if(!u)return this.deleteMethodWithHttpOperationResponse(e,t,r,s,i,o,a).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteMethodWithHttpOperationResponse(e,t,r,s,i,o,a))(function(e,t){if(e)return c(e);var r=t.bodyAsJson;return c(e,r,t.request,t.response)})},e.prototype.createOrUpdate=function(e,t,r,s,i,o,a,u,c){c||"function"!=typeof u||(c=u,u=void 0);var l=c;if(!c)return this.createOrUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u))(function(e,t){if(e)return l(e);var r=t.bodyAsJson;return l(e,r,t.request,t.response)})},e.prototype.update=function(e,t,r,s,i,o,a,u,c){c||"function"!=typeof u||(c=u,u=void 0);var l=c;if(!c)return this.updateWithHttpOperationResponse(e,t,r,s,i,o,a,u).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.updateWithHttpOperationResponse(e,t,r,s,i,o,a,u))(function(e,t){if(e)return l(e);var r=t.bodyAsJson;return l(e,r,t.request,t.response)})},e.prototype.get=function(e,t,r,s,i,o,a,u){u||"function"!=typeof a||(u=a,a=void 0);var c=u;if(!u)return this.getWithHttpOperationResponse(e,t,r,s,i,o,a).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t,r,s,i,o,a))(function(e,t){if(e)return c(e);var r=t.bodyAsJson;return c(e,r,t.request,t.response)})},e.prototype.checkExistenceById=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.checkExistenceByIdWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.checkExistenceByIdWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.deleteById=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.deleteByIdWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteByIdWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.createOrUpdateById=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.createOrUpdateByIdWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateByIdWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.updateById=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.updateByIdWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.updateByIdWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.getById=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.getByIdWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getByIdWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.beginMoveResources=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.beginMoveResourcesWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginMoveResourcesWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.beginValidateMoveResources=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.beginValidateMoveResourcesWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginValidateMoveResourcesWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.beginDeleteMethod=function(e,t,r,s,i,o,a,u){u||"function"!=typeof a||(u=a,a=void 0);var c=u;if(!u)return this.beginDeleteMethodWithHttpOperationResponse(e,t,r,s,i,o,a).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginDeleteMethodWithHttpOperationResponse(e,t,r,s,i,o,a))(function(e,t){if(e)return c(e);var r=t.bodyAsJson;return c(e,r,t.request,t.response)})},e.prototype.beginCreateOrUpdate=function(e,t,r,s,i,o,a,u,c){c||"function"!=typeof u||(c=u,u=void 0);var l=c;if(!c)return this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginCreateOrUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u))(function(e,t){if(e)return l(e);var r=t.bodyAsJson;return l(e,r,t.request,t.response)})},e.prototype.beginUpdate=function(e,t,r,s,i,o,a,u,c){c||"function"!=typeof u||(c=u,u=void 0);var l=c;if(!c)return this.beginUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginUpdateWithHttpOperationResponse(e,t,r,s,i,o,a,u))(function(e,t){if(e)return l(e);var r=t.bodyAsJson;return l(e,r,t.request,t.response)})},e.prototype.beginDeleteById=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.beginDeleteByIdWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginDeleteByIdWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.beginCreateOrUpdateById=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.beginCreateOrUpdateByIdWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginCreateOrUpdateByIdWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.beginUpdateById=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.beginUpdateByIdWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginUpdateByIdWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.listByResourceGroupNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listByResourceGroupNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listByResourceGroupNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.checkExistenceWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="HEAD",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,204!==(m=h.status)&&404!==m){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(g=s.CloudError,f.body=r.serializer.deserialize(g,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}return d.bodyAsJson=204===m,[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.createOrUpdateWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q,O;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="PUT",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);h=null,m=null;try{null!==t&&void 0!==t&&(f=s.ResourceGroup,m=i.serializer.serialize(f,t,"parameters"),h=JSON.stringify(m))}catch(e){return y=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(t,null,2)+"."),[2,Promise.reject(y)]}p.body=h,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(g=o.sent(),b=g.response,201!==(v=b.status)&&200!==v){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(p),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(N=s.CloudError,w.body=i.serializer.deserialize(N,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}if(201===v){E=g.bodyAsJson;try{null!==E&&void 0!==E&&(N=s.ResourceGroup,g.bodyAsJson=i.serializer.deserialize(N,E,"operationRes.bodyAsJson"))}catch(e){return(P=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+g.bodyAsText)).request=n.stripRequest(p),P.response=n.stripResponse(b),[2,Promise.reject(P)]}}if(200===v){E=g.bodyAsJson;try{null!==E&&void 0!==E&&(N=s.ResourceGroup,g.bodyAsJson=i.serializer.deserialize(N,E,"operationRes.bodyAsJson"))}catch(e){return(q=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+g.bodyAsText)).request=n.stripRequest(p),q.response=n.stripResponse(b),[2,Promise.reject(q)]}}return[3,4];case 3:return O=o.sent(),[2,Promise.reject(O)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.deleteMethodWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,n,s,i,a;return o(this,function(o){switch(o.label){case 0:r=this.client,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.beginDeleteMethodWithHttpOperationResponse(e,t)];case 2:return n=o.sent(),[3,4];case 3:return s=o.sent(),[2,Promise.reject(s)];case 4:return o.trys.push([4,6,,7]),[4,r.getLongRunningOperationResult(n,t)];case 5:return i=o.sent(),[3,7];case 6:return a=o.sent(),[2,Promise.reject(a)];case 7:return[2,Promise.resolve(i)]}})})},e.prototype.getWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="GET",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(b=s.CloudError,f.body=r.serializer.deserialize(b,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){g=d.bodyAsJson;try{null!==g&&void 0!==g&&(b=s.ResourceGroup,d.bodyAsJson=r.serializer.deserialize(b,g,"operationRes.bodyAsJson"))}catch(e){return(v=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),v.response=n.stripResponse(h),[2,Promise.reject(v)]}}return[3,4];case 3:return w=o.sent(),[2,Promise.reject(w)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.updateWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="PATCH",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);h=null,m=null;try{null!==t&&void 0!==t&&(f=s.ResourceGroupPatchable,m=i.serializer.serialize(f,t,"parameters"),h=JSON.stringify(m))}catch(e){return y=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(t,null,2)+"."),[2,Promise.reject(y)]}p.body=h,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(g=o.sent(),b=g.response,200!==(v=b.status)){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(p),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(E=s.CloudError,w.body=i.serializer.deserialize(E,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}if(200===v){P=g.bodyAsJson;try{null!==P&&void 0!==P&&(E=s.ResourceGroup,g.bodyAsJson=i.serializer.deserialize(E,P,"operationRes.bodyAsJson"))}catch(e){return(N=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+g.bodyAsText)).request=n.stripRequest(p),N.response=n.stripResponse(b),[2,Promise.reject(N)]}}return[3,4];case 3:return q=o.sent(),[2,Promise.reject(q)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.exportTemplateWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P,E,N,q;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t)throw new Error("parameters cannot be null or undefined.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="POST",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);h=null,m=null;try{null!==t&&void 0!==t&&(f=s.ExportTemplateRequest,m=i.serializer.serialize(f,t,"parameters"),h=JSON.stringify(m))}catch(e){return y=new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(t,null,2)+"."),[2,Promise.reject(y)]}p.body=h,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(g=o.sent(),b=g.response,200!==(v=b.status)){(w=new n.RestError(g.bodyAsText)).statusCode=b.status,w.request=n.stripRequest(p),w.response=n.stripResponse(b),R=g.bodyAsJson;try{R&&(R.error&&(R=R.error),R.code&&(w.code=R.code),R.message&&(w.message=R.message)),null!==R&&void 0!==R&&(E=s.CloudError,w.body=i.serializer.deserialize(E,R,"error.body"))}catch(e){return w.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+g.bodyAsText+'" for the default response.',[2,Promise.reject(w)]}return[2,Promise.reject(w)]}if(200===v){P=g.bodyAsJson;try{null!==P&&void 0!==P&&(E=s.ResourceGroupExportResult,g.bodyAsJson=i.serializer.deserialize(E,P,"operationRes.bodyAsJson"))}catch(e){return(N=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+g.bodyAsText)).request=n.stripRequest(p),N.response=n.stripResponse(b),[2,Promise.reject(N)]}}return[3,4];case 3:return q=o.sent(),[2,Promise.reject(q)];case 4:return[2,Promise.resolve(g)]}})})},e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:t=this.client,r=e&&void 0!==e.filter?e.filter:void 0,i=e&&void 0!==e.top?e.top:void 0;try{if(null!==r&&void 0!==r&&"string"!=typeof r.valueOf())throw new Error("filter must be of type string.");if(null!==i&&void 0!==i&&"number"!=typeof i)throw new Error("top must be of type number.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups").replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),l=[],null!==r&&void 0!==r&&l.push("$filter="+encodeURIComponent(r)),null!==i&&void 0!==i&&l.push("$top="+encodeURIComponent(i.toString())),l.push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="GET",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(d in e.customHeaders)e.customHeaders.hasOwnProperty(d)&&(p.headers[d]=e.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(v=s.CloudError,y.body=t.serializer.deserialize(v,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){b=h.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.ResourceGroupListResult,h.bodyAsJson=t.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),w.response=n.stripResponse(m),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.beginDeleteMethodWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="DELETE",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,202!==(m=h.status)&&200!==m){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(g=s.CloudError,f.body=r.serializer.deserialize(g,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.ResourceGroupListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.checkExistence=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.checkExistenceWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.checkExistenceWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.createOrUpdate=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.createOrUpdateWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.deleteMethod=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.deleteMethodWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteMethodWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.get=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.getWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.update=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.updateWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.updateWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.exportTemplate=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.exportTemplateWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.exportTemplateWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.beginDeleteMethod=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.beginDeleteMethodWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.beginDeleteMethodWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.deleteValueWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("tagName cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("tagValue cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}").replace("{tagName}",encodeURIComponent(e))).replace("{tagValue}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="DELETE",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)&&204!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(b=s.CloudError,y.body=i.serializer.deserialize(b,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.createOrUpdateValueWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("tagName cannot be null or undefined and it must be of type string.");if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("tagValue cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(u=this.client.baseUri,c=(c=(c=(c=u+(u.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}").replace("{tagName}",encodeURIComponent(e))).replace("{tagValue}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(l=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),l.length>0&&(c+="?"+l.join("&")),(p=new a).method="PUT",p.url=c,p.headers={},p.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(p.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(p.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(d in r.customHeaders)r.customHeaders.hasOwnProperty(d)&&(p.headers[d]=r.customHeaders[d]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(p)];case 2:if(h=o.sent(),m=h.response,200!==(f=m.status)&&201!==f){(y=new n.RestError(h.bodyAsText)).statusCode=m.status,y.request=n.stripRequest(p),y.response=n.stripResponse(m),g=h.bodyAsJson;try{g&&(g.error&&(g=g.error),g.code&&(y.code=g.code),g.message&&(y.message=g.message)),null!==g&&void 0!==g&&(w=s.CloudError,y.body=i.serializer.deserialize(w,g,"error.body"))}catch(e){return y.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+h.bodyAsText+'" for the default response.',[2,Promise.reject(y)]}return[2,Promise.reject(y)]}if(200===f){v=h.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.TagValue,h.bodyAsJson=i.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(b=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),b.response=n.stripResponse(m),[2,Promise.reject(b)]}}if(201===f){v=h.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.TagValue,h.bodyAsJson=i.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(R=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+h.bodyAsText)).request=n.stripRequest(p),R.response=n.stripResponse(m),[2,Promise.reject(R)]}}return[3,4];case 3:return P=o.sent(),[2,Promise.reject(P)];case 4:return[2,Promise.resolve(h)]}})})},e.prototype.createOrUpdateWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b,v,w,R;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("tagName cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/tagNames/{tagName}").replace("{tagName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="PUT",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)&&201!==m){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(v=s.CloudError,f.body=r.serializer.deserialize(v,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}if(200===m){b=d.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.TagDetails,d.bodyAsJson=r.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),g.response=n.stripResponse(h),[2,Promise.reject(g)]}}if(201===m){b=d.bodyAsJson;try{null!==b&&void 0!==b&&(v=s.TagDetails,d.bodyAsJson=r.serializer.deserialize(v,b,"operationRes.bodyAsJson"))}catch(e){return(w=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+d.bodyAsText)).request=n.stripRequest(l),w.response=n.stripResponse(h),[2,Promise.reject(w)]}}return[3,4];case 3:return R=o.sent(),[2,Promise.reject(R)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.deleteMethodWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("tagName cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=this.client.baseUri,u=(u=(u=i+(i.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/tagNames/{tagName}").replace("{tagName}",encodeURIComponent(e))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(c=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),c.length>0&&(u+="?"+c.join("&")),(l=new a).method="DELETE",l.url=u,l.headers={},l.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(l.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(l.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(p in t.customHeaders)t.customHeaders.hasOwnProperty(p)&&(l.headers[p]=t.customHeaders[p]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(l)];case 2:if(d=o.sent(),h=d.response,200!==(m=h.status)&&204!==m){(f=new n.RestError(d.bodyAsText)).statusCode=h.status,f.request=n.stripRequest(l),f.response=n.stripResponse(h),y=d.bodyAsJson;try{y&&(y.error&&(y=y.error),y.code&&(f.code=y.code),y.message&&(f.message=y.message)),null!==y&&void 0!==y&&(g=s.CloudError,f.body=r.serializer.deserialize(g,y,"error.body"))}catch(e){return f.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+d.bodyAsText+'" for the default response.',[2,Promise.reject(f)]}return[2,Promise.reject(f)]}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(d)]}})})},e.prototype.listWithHttpOperationResponse=function(e){return i(this,void 0,void 0,function(){var t,r,i,u,c,l,p,d,h,m,f,y,g,b,v;return o(this,function(o){switch(o.label){case 0:t=this.client;try{if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(r=this.client.baseUri,i=(i=r+(r.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/tagNames").replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(u=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),u.length>0&&(i+="?"+u.join("&")),(c=new a).method="GET",c.url=i,c.headers={},c.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(c.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(c.headers["accept-language"]=this.client.acceptLanguage),e&&e.customHeaders)for(l in e.customHeaders)e.customHeaders.hasOwnProperty(l)&&(c.headers[l]=e.customHeaders[l]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.pipeline(c)];case 2:if(p=o.sent(),d=p.response,200!==(h=d.status)){(m=new n.RestError(p.bodyAsText)).statusCode=d.status,m.request=n.stripRequest(c),m.response=n.stripResponse(d),f=p.bodyAsJson;try{f&&(f.error&&(f=f.error),f.code&&(m.code=f.code),f.message&&(m.message=f.message)),null!==f&&void 0!==f&&(g=s.CloudError,m.body=t.serializer.deserialize(g,f,"error.body"))}catch(e){return m.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+p.bodyAsText+'" for the default response.',[2,Promise.reject(m)]}return[2,Promise.reject(m)]}if(200===h){y=p.bodyAsJson;try{null!==y&&void 0!==y&&(g=s.TagsListResult,p.bodyAsJson=t.serializer.deserialize(g,y,"operationRes.bodyAsJson"))}catch(e){return(b=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+p.bodyAsText)).request=n.stripRequest(c),b.response=n.stripResponse(d),[2,Promise.reject(b)]}}return[3,4];case 3:return v=o.sent(),[2,Promise.reject(v)];case 4:return[2,Promise.resolve(p)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.TagsListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.deleteValue=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.deleteValueWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteValueWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.createOrUpdateValue=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.createOrUpdateValueWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateValueWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.createOrUpdate=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.createOrUpdateWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.createOrUpdateWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.deleteMethod=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.deleteMethodWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.deleteMethodWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e.prototype.list=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=t;if(!t)return this.listWithHttpOperationResponse(e).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e))(function(e,t){if(e)return r(e);var n=t.bodyAsJson;return r(e,n,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()},function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(0),s=(r.n(n),r(1)),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[0,s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=n.WebResource,u=function(){function e(e){this.client=e}return e.prototype.getWithHttpOperationResponse=function(e,t,r,u){return i(this,void 0,void 0,function(){var i,c,l,p,d,h,m,f,y,g,b,v,w,R,P;return o(this,function(o){switch(o.label){case 0:i=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===r||void 0===r||"string"!=typeof r.valueOf())throw new Error("operationId cannot be null or undefined and it must be of type string.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=(l=(l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{operationId}",encodeURIComponent(r))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),(p=[]).push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="GET",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),u&&u.customHeaders)for(h in u.customHeaders)u.customHeaders.hasOwnProperty(h)&&(d.headers[h]=u.customHeaders[h]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(m=o.sent(),f=m.response,200!==(y=f.status)){(g=new n.RestError(m.bodyAsText)).statusCode=f.status,g.request=n.stripRequest(d),g.response=n.stripResponse(f),b=m.bodyAsJson;try{b&&(b.error&&(b=b.error),b.code&&(g.code=b.code),b.message&&(g.message=b.message)),null!==b&&void 0!==b&&(w=s.CloudError,g.body=i.serializer.deserialize(w,b,"error.body"))}catch(e){return g.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+m.bodyAsText+'" for the default response.',[2,Promise.reject(g)]}return[2,Promise.reject(g)]}if(200===y){v=m.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.DeploymentOperation,m.bodyAsJson=i.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(R=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(d),R.response=n.stripResponse(f),[2,Promise.reject(R)]}}return[3,4];case 3:return P=o.sent(),[2,Promise.reject(P)];case 4:return[2,Promise.resolve(m)]}})})},e.prototype.listWithHttpOperationResponse=function(e,t,r){return i(this,void 0,void 0,function(){var i,u,c,l,p,d,h,m,f,y,g,b,v,w,R,P;return o(this,function(o){switch(o.label){case 0:i=this.client,u=r&&void 0!==r.top?r.top:void 0;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("resourceGroupName cannot be null or undefined and it must be of type string.");if(null!==e&&void 0!==e){if(e.length>90)throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90');if(e.length<1)throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1');if(null===e.match(/^[-\w\._\(\)]+$/))throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null===t||void 0===t||"string"!=typeof t.valueOf())throw new Error("deploymentName cannot be null or undefined and it must be of type string.");if(null!==t&&void 0!==t){if(t.length>64)throw new Error('"deploymentName" should satisfy the constraint - "MaxLength": 64');if(t.length<1)throw new Error('"deploymentName" should satisfy the constraint - "MinLength": 1');if(null===t.match(/^[-\w\._\(\)]+$/))throw new Error('"deploymentName" should satisfy the constraint - "Pattern": /^[-w._()]+$/')}if(null!==u&&void 0!==u&&"number"!=typeof u)throw new Error("top must be of type number.");if(null===this.client.apiVersion||void 0===this.client.apiVersion||"string"!=typeof this.client.apiVersion.valueOf())throw new Error("this.client.apiVersion cannot be null or undefined and it must be of type string.");if(null===this.client.subscriptionId||void 0===this.client.subscriptionId||"string"!=typeof this.client.subscriptionId.valueOf())throw new Error("this.client.subscriptionId cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(c=this.client.baseUri,l=(l=(l=(l=c+(c.endsWith("/")?"":"/")+"subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations").replace("{resourceGroupName}",encodeURIComponent(e))).replace("{deploymentName}",encodeURIComponent(t))).replace("{subscriptionId}",encodeURIComponent(this.client.subscriptionId)),p=[],null!==u&&void 0!==u&&p.push("$top="+encodeURIComponent(u.toString())),p.push("api-version="+encodeURIComponent(this.client.apiVersion)),p.length>0&&(l+="?"+p.join("&")),(d=new a).method="GET",d.url=l,d.headers={},d.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(d.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(d.headers["accept-language"]=this.client.acceptLanguage),r&&r.customHeaders)for(h in r.customHeaders)r.customHeaders.hasOwnProperty(h)&&(d.headers[h]=r.customHeaders[h]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.pipeline(d)];case 2:if(m=o.sent(),f=m.response,200!==(y=f.status)){(g=new n.RestError(m.bodyAsText)).statusCode=f.status,g.request=n.stripRequest(d),g.response=n.stripResponse(f),b=m.bodyAsJson;try{b&&(b.error&&(b=b.error),b.code&&(g.code=b.code),b.message&&(g.message=b.message)),null!==b&&void 0!==b&&(w=s.CloudError,g.body=i.serializer.deserialize(w,b,"error.body"))}catch(e){return g.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+m.bodyAsText+'" for the default response.',[2,Promise.reject(g)]}return[2,Promise.reject(g)]}if(200===y){v=m.bodyAsJson;try{null!==v&&void 0!==v&&(w=s.DeploymentOperationsListResult,m.bodyAsJson=i.serializer.deserialize(w,v,"operationRes.bodyAsJson"))}catch(e){return(R=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+m.bodyAsText)).request=n.stripRequest(d),R.response=n.stripResponse(f),[2,Promise.reject(R)]}}return[3,4];case 3:return P=o.sent(),[2,Promise.reject(P)];case 4:return[2,Promise.resolve(m)]}})})},e.prototype.listNextWithHttpOperationResponse=function(e,t){return i(this,void 0,void 0,function(){var r,i,u,c,l,p,d,h,m,f,y,g,b;return o(this,function(o){switch(o.label){case 0:r=this.client;try{if(null===e||void 0===e||"string"!=typeof e.valueOf())throw new Error("nextPageLink cannot be null or undefined and it must be of type string.");if(null!==this.client.acceptLanguage&&void 0!==this.client.acceptLanguage&&"string"!=typeof this.client.acceptLanguage.valueOf())throw new Error("this.client.acceptLanguage must be of type string.")}catch(e){return[2,Promise.reject(e)]}if(i=(i="{nextLink}").replace("{nextLink}",e),(u=new a).method="GET",u.url=i,u.headers={},u.headers["Content-Type"]="application/json; charset=utf-8",this.client.generateClientRequestId&&(u.headers["x-ms-client-request-id"]=n.generateUuid()),void 0!==this.client.acceptLanguage&&null!==this.client.acceptLanguage&&(u.headers["accept-language"]=this.client.acceptLanguage),t&&t.customHeaders)for(c in t.customHeaders)t.customHeaders.hasOwnProperty(c)&&(u.headers[c]=t.customHeaders[c]);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.pipeline(u)];case 2:if(l=o.sent(),p=l.response,200!==(d=p.status)){(h=new n.RestError(l.bodyAsText)).statusCode=p.status,h.request=n.stripRequest(u),h.response=n.stripResponse(p),m=l.bodyAsJson;try{m&&(m.error&&(m=m.error),m.code&&(h.code=m.code),m.message&&(h.message=m.message)),null!==m&&void 0!==m&&(y=s.CloudError,h.body=r.serializer.deserialize(y,m,"error.body"))}catch(e){return h.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+l.bodyAsText+'" for the default response.',[2,Promise.reject(h)]}return[2,Promise.reject(h)]}if(200===d){f=l.bodyAsJson;try{null!==f&&void 0!==f&&(y=s.DeploymentOperationsListResult,l.bodyAsJson=r.serializer.deserialize(y,f,"operationRes.bodyAsJson"))}catch(e){return(g=new n.RestError("Error "+e+" occurred in deserializing the responseBody - "+l.bodyAsText)).request=n.stripRequest(u),g.response=n.stripResponse(p),[2,Promise.reject(g)]}}return[3,4];case 3:return b=o.sent(),[2,Promise.reject(b)];case 4:return[2,Promise.resolve(l)]}})})},e.prototype.get=function(e,t,r,s,i){i||"function"!=typeof s||(i=s,s=void 0);var o=i;if(!i)return this.getWithHttpOperationResponse(e,t,r,s).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.getWithHttpOperationResponse(e,t,r,s))(function(e,t){if(e)return o(e);var r=t.bodyAsJson;return o(e,r,t.request,t.response)})},e.prototype.list=function(e,t,r,s){s||"function"!=typeof r||(s=r,r=void 0);var i=s;if(!s)return this.listWithHttpOperationResponse(e,t,r).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listWithHttpOperationResponse(e,t,r))(function(e,t){if(e)return i(e);var r=t.bodyAsJson;return i(e,r,t.request,t.response)})},e.prototype.listNext=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var s=r;if(!r)return this.listNextWithHttpOperationResponse(e,t).then(function(e){return Promise.resolve(e.bodyAsJson)}).catch(function(e){return Promise.reject(e)});n.promiseToCallback(this.listNextWithHttpOperationResponse(e,t))(function(e,t){if(e)return s(e);var r=t.bodyAsJson;return s(e,r,t.request,t.response)})},e}()}]);