Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/arm-analysisservices

Package Overview
Dependencies
Maintainers
4
Versions
283
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/arm-analysisservices - npm Package Compare versions

Comparing version 4.0.1-alpha.20220421.1 to 4.1.0-alpha.20220629.1

18

CHANGELOG.md
# Release History
## 4.1.0 (2022-06-29)
**Features**
## 4.0.1 (Unreleased)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
- Added Interface AnalysisServicesServer
- Added Interface AnalysisServicesServerProperties
## 4.0.0 (2021-12-27)

@@ -14,0 +12,0 @@

@@ -17,2 +17,4 @@ import * as coreClient from "@azure/core-client";

constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureAnalysisServicesOptionalParams);
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
private addCustomApiVersionPolicy;
servers: Servers;

@@ -19,0 +21,0 @@ operations: Operations;

@@ -8,3 +8,5 @@ /*

*/
import { __awaiter } from "tslib";
import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import { ServersImpl, OperationsImpl } from "./operations";

@@ -20,2 +22,3 @@ export class AzureAnalysisServices extends coreClient.ServiceClient {

constructor(credentials, subscriptionId, options) {
var _a, _b;
if (credentials === undefined) {

@@ -35,13 +38,26 @@ throw new Error("'credentials' cannot be null");

};
const packageDetails = `azsdk-js-arm-analysisservices/4.0.0`;
const packageDetails = `azsdk-js-arm-analysisservices/4.1.0`;
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
userAgentPrefix
}, baseUri: options.endpoint || "https://management.azure.com" });
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
super(optionsWithDefaults);
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
}
}));
}
}
// Parameter assignments

@@ -54,4 +70,32 @@ this.subscriptionId = subscriptionId;

this.operations = new OperationsImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
}
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
addCustomApiVersionPolicy(apiVersion) {
if (!apiVersion) {
return;
}
const apiVersionPolicy = {
name: "CustomApiVersionPolicy",
sendRequest(request, next) {
return __awaiter(this, void 0, void 0, function* () {
const param = request.url.split("?");
if (param.length > 1) {
const newParams = param[1].split("&").map((item) => {
if (item.indexOf("api-version") > -1) {
return "api-version=" + apiVersion;
}
else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
});
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}
}
//# sourceMappingURL=azureAnalysisServices.js.map

@@ -199,3 +199,3 @@ import * as coreClient from "@azure/core-client";

/** Live message of list gateway. Status: 0 - Live */
status?: "undefined";
status?: 0;
}

@@ -374,3 +374,3 @@ /** Status of gateway is error. */

/** Properties of Analysis Services resource. */
export declare type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
export interface AnalysisServicesServerProperties extends AnalysisServicesServerMutableProperties {
/**

@@ -393,5 +393,5 @@ * The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.

sku?: ResourceSku;
};
}
/** Represents an instance of an Analysis Services resource. */
export declare type AnalysisServicesServer = Resource & {
export interface AnalysisServicesServer extends Resource {
/** A collection of AS server administrators */

@@ -428,16 +428,28 @@ asAdministrators?: ServerAdministrators;

skuPropertiesSku?: ResourceSku;
};
}
/** Known values of {@link State} that the service accepts. */
export declare enum KnownState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -466,13 +478,25 @@ }

export declare enum KnownProvisioningState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -501,4 +525,7 @@ }

export declare enum KnownSkuTier {
/** Development */
Development = "Development",
/** Basic */
Basic = "Basic",
/** Standard */
Standard = "Standard"

@@ -505,0 +532,0 @@ }

@@ -11,13 +11,25 @@ /*

(function (KnownState) {
/** Deleting */
KnownState["Deleting"] = "Deleting";
/** Succeeded */
KnownState["Succeeded"] = "Succeeded";
/** Failed */
KnownState["Failed"] = "Failed";
/** Paused */
KnownState["Paused"] = "Paused";
/** Suspended */
KnownState["Suspended"] = "Suspended";
/** Provisioning */
KnownState["Provisioning"] = "Provisioning";
/** Updating */
KnownState["Updating"] = "Updating";
/** Suspending */
KnownState["Suspending"] = "Suspending";
/** Pausing */
KnownState["Pausing"] = "Pausing";
/** Resuming */
KnownState["Resuming"] = "Resuming";
/** Preparing */
KnownState["Preparing"] = "Preparing";
/** Scaling */
KnownState["Scaling"] = "Scaling";

@@ -28,13 +40,25 @@ })(KnownState || (KnownState = {}));

(function (KnownProvisioningState) {
/** Deleting */
KnownProvisioningState["Deleting"] = "Deleting";
/** Succeeded */
KnownProvisioningState["Succeeded"] = "Succeeded";
/** Failed */
KnownProvisioningState["Failed"] = "Failed";
/** Paused */
KnownProvisioningState["Paused"] = "Paused";
/** Suspended */
KnownProvisioningState["Suspended"] = "Suspended";
/** Provisioning */
KnownProvisioningState["Provisioning"] = "Provisioning";
/** Updating */
KnownProvisioningState["Updating"] = "Updating";
/** Suspending */
KnownProvisioningState["Suspending"] = "Suspending";
/** Pausing */
KnownProvisioningState["Pausing"] = "Pausing";
/** Resuming */
KnownProvisioningState["Resuming"] = "Resuming";
/** Preparing */
KnownProvisioningState["Preparing"] = "Preparing";
/** Scaling */
KnownProvisioningState["Scaling"] = "Scaling";

@@ -45,6 +69,9 @@ })(KnownProvisioningState || (KnownProvisioningState = {}));

(function (KnownSkuTier) {
/** Development */
KnownSkuTier["Development"] = "Development";
/** Basic */
KnownSkuTier["Basic"] = "Basic";
/** Standard */
KnownSkuTier["Standard"] = "Standard";
})(KnownSkuTier || (KnownSkuTier = {}));
//# sourceMappingURL=index.js.map

@@ -156,6 +156,8 @@ /*

const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, serverParameters, options }, createOperationSpec);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});

@@ -212,6 +214,8 @@ }

const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, deleteOperationSpec);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});

@@ -267,6 +271,8 @@ }

const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, serverUpdateParameters, options }, updateOperationSpec);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});

@@ -322,6 +328,8 @@ }

const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, suspendOperationSpec);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});

@@ -376,6 +384,8 @@ }

const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, resumeOperationSpec);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});

@@ -382,0 +392,0 @@ }

@@ -9,15 +9,12 @@ /*

import { __awaiter } from "tslib";
import { record } from "@azure-tools/test-recorder";
const recorderEnvSetup = {
replaceableVariables: {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
},
customizationsOnRecordings: [
(recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
],
queryParametersToSkip: []
import { Recorder } from "@azure-tools/test-recorder";
const replaceableVariables = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};
const recorderOptions = {
envSetupForPlayback: replaceableVariables
};
describe("My test", () => {

@@ -27,3 +24,4 @@ let recorder;

return __awaiter(this, void 0, void 0, function* () {
recorder = record(this, recorderEnvSetup);
recorder = new Recorder(this.currentTest);
yield recorder.start(recorderOptions);
});

@@ -30,0 +28,0 @@ });

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var coreClient=require("@azure/core-client"),tslib=require("tslib"),coreLro=require("@azure/core-lro");function _interopNamespace(s){if(s&&s.__esModule)return s;var a=Object.create(null);return s&&Object.keys(s).forEach(function(e){var r;"default"!==e&&(r=Object.getOwnPropertyDescriptor(s,e),Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:function(){return s[e]}}))}),a.default=s,Object.freeze(a)}var coreClient__namespace=_interopNamespace(coreClient);exports.KnownState=void 0,function(e){e.Deleting="Deleting",e.Succeeded="Succeeded",e.Failed="Failed",e.Paused="Paused",e.Suspended="Suspended",e.Provisioning="Provisioning",e.Updating="Updating",e.Suspending="Suspending",e.Pausing="Pausing",e.Resuming="Resuming",e.Preparing="Preparing",e.Scaling="Scaling"}(exports.KnownState||(exports.KnownState={})),exports.KnownProvisioningState=void 0,function(e){e.Deleting="Deleting",e.Succeeded="Succeeded",e.Failed="Failed",e.Paused="Paused",e.Suspended="Suspended",e.Provisioning="Provisioning",e.Updating="Updating",e.Suspending="Suspending",e.Pausing="Pausing",e.Resuming="Resuming",e.Preparing="Preparing",e.Scaling="Scaling"}(exports.KnownProvisioningState||(exports.KnownProvisioningState={})),exports.KnownSkuTier=void 0,function(e){e.Development="Development",e.Basic="Basic",e.Standard="Standard"}(exports.KnownSkuTier||(exports.KnownSkuTier={}));const ResourceSku={type:{name:"Composite",className:"ResourceSku",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},tier:{serializedName:"tier",type:{name:"String"}},capacity:{defaultValue:1,constraints:{InclusiveMaximum:8,InclusiveMinimum:1},serializedName:"capacity",type:{name:"Number"}}}}},AnalysisServicesServerMutableProperties={type:{name:"Composite",className:"AnalysisServicesServerMutableProperties",modelProperties:{asAdministrators:{serializedName:"asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}}}}},ServerAdministrators={type:{name:"Composite",className:"ServerAdministrators",modelProperties:{members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},GatewayDetails={type:{name:"Composite",className:"GatewayDetails",modelProperties:{gatewayResourceId:{serializedName:"gatewayResourceId",type:{name:"String"}},gatewayObjectId:{serializedName:"gatewayObjectId",readOnly:!0,type:{name:"String"}},dmtsClusterUri:{serializedName:"dmtsClusterUri",readOnly:!0,type:{name:"String"}}}}},IPv4FirewallSettings={type:{name:"Composite",className:"IPv4FirewallSettings",modelProperties:{firewallRules:{serializedName:"firewallRules",type:{name:"Sequence",element:{type:{name:"Composite",className:"IPv4FirewallRule"}}}},enablePowerBIService:{serializedName:"enablePowerBIService",type:{name:"Boolean"}}}}},IPv4FirewallRule={type:{name:"Composite",className:"IPv4FirewallRule",modelProperties:{firewallRuleName:{serializedName:"firewallRuleName",type:{name:"String"}},rangeStart:{serializedName:"rangeStart",type:{name:"String"}},rangeEnd:{serializedName:"rangeEnd",type:{name:"String"}}}}},Resource={type:{name:"Composite",className:"Resource",modelProperties:{id:{serializedName:"id",readOnly:!0,type:{name:"String"}},name:{serializedName:"name",readOnly:!0,type:{name:"String"}},type:{serializedName:"type",readOnly:!0,type:{name:"String"}},location:{serializedName:"location",required:!0,type:{name:"String"}},sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},tags:{serializedName:"tags",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},ErrorDetail={type:{name:"Composite",className:"ErrorDetail",modelProperties:{code:{serializedName:"code",readOnly:!0,type:{name:"String"}},message:{serializedName:"message",readOnly:!0,type:{name:"String"}},target:{serializedName:"target",readOnly:!0,type:{name:"String"}},subCode:{serializedName:"subCode",readOnly:!0,type:{name:"Number"}},httpStatusCode:{serializedName:"httpStatusCode",readOnly:!0,type:{name:"Number"}},timeStamp:{serializedName:"timeStamp",readOnly:!0,type:{name:"String"}},details:{serializedName:"details",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorDetail"}}}},additionalInfo:{serializedName:"additionalInfo",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorAdditionalInfo"}}}}}}},ErrorAdditionalInfo={type:{name:"Composite",className:"ErrorAdditionalInfo",modelProperties:{type:{serializedName:"type",readOnly:!0,type:{name:"String"}},info:{serializedName:"info",readOnly:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},AnalysisServicesServerUpdateParameters={type:{name:"Composite",className:"AnalysisServicesServerUpdateParameters",modelProperties:{sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},tags:{serializedName:"tags",type:{name:"Dictionary",value:{type:{name:"String"}}}},asAdministrators:{serializedName:"properties.asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"properties.backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"properties.gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"properties.ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"properties.querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"properties.managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"properties.serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}}}}},AnalysisServicesServers={type:{name:"Composite",className:"AnalysisServicesServers",modelProperties:{value:{serializedName:"value",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"AnalysisServicesServer"}}}}}}},SkuEnumerationForNewResourceResult={type:{name:"Composite",className:"SkuEnumerationForNewResourceResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"ResourceSku"}}}}}}},SkuEnumerationForExistingResourceResult={type:{name:"Composite",className:"SkuEnumerationForExistingResourceResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"SkuDetailsForExistingResource"}}}}}}},SkuDetailsForExistingResource={type:{name:"Composite",className:"SkuDetailsForExistingResource",modelProperties:{sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},resourceType:{serializedName:"resourceType",type:{name:"String"}}}}},GatewayListStatusLive={type:{name:"Composite",className:"GatewayListStatusLive",modelProperties:{status:{defaultValue:0,isConstant:!0,serializedName:"status",type:{name:"Number"}}}}},GatewayListStatusError={type:{name:"Composite",className:"GatewayListStatusError",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},CheckServerNameAvailabilityParameters={type:{name:"Composite",className:"CheckServerNameAvailabilityParameters",modelProperties:{name:{constraints:{Pattern:new RegExp("^[a-z][a-z0-9]*$"),MaxLength:63,MinLength:3},serializedName:"name",type:{name:"String"}},type:{defaultValue:"Microsoft.AnalysisServices/servers",serializedName:"type",type:{name:"String"}}}}},CheckServerNameAvailabilityResult={type:{name:"Composite",className:"CheckServerNameAvailabilityResult",modelProperties:{nameAvailable:{serializedName:"nameAvailable",type:{name:"Boolean"}},reason:{serializedName:"reason",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}}}}},OperationStatus={type:{name:"Composite",className:"OperationStatus",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},startTime:{serializedName:"startTime",type:{name:"String"}},endTime:{serializedName:"endTime",type:{name:"String"}},status:{serializedName:"status",type:{name:"String"}},error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},OperationListResult={type:{name:"Composite",className:"OperationListResult",modelProperties:{value:{serializedName:"value",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Operation"}}}},nextLink:{serializedName:"nextLink",readOnly:!0,type:{name:"String"}}}}},Operation={type:{name:"Composite",className:"Operation",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},display:{serializedName:"display",type:{name:"Composite",className:"OperationDisplay"}},origin:{serializedName:"origin",readOnly:!0,type:{name:"String"}},properties:{serializedName:"properties",type:{name:"Composite",className:"OperationProperties"}}}}},OperationDisplay={type:{name:"Composite",className:"OperationDisplay",modelProperties:{provider:{serializedName:"provider",readOnly:!0,type:{name:"String"}},resource:{serializedName:"resource",readOnly:!0,type:{name:"String"}},operation:{serializedName:"operation",readOnly:!0,type:{name:"String"}},description:{serializedName:"description",readOnly:!0,type:{name:"String"}}}}},OperationProperties={type:{name:"Composite",className:"OperationProperties",modelProperties:{serviceSpecification:{serializedName:"serviceSpecification",type:{name:"Composite",className:"OperationPropertiesServiceSpecification"}}}}},OperationPropertiesServiceSpecification={type:{name:"Composite",className:"OperationPropertiesServiceSpecification",modelProperties:{metricSpecifications:{serializedName:"metricSpecifications",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MetricSpecifications"}}}},logSpecifications:{serializedName:"logSpecifications",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"LogSpecifications"}}}}}}},MetricSpecifications={type:{name:"Composite",className:"MetricSpecifications",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}},displayDescription:{serializedName:"displayDescription",readOnly:!0,type:{name:"String"}},unit:{serializedName:"unit",readOnly:!0,type:{name:"String"}},aggregationType:{serializedName:"aggregationType",readOnly:!0,type:{name:"String"}},dimensions:{serializedName:"dimensions",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MetricDimensions"}}}}}}},MetricDimensions={type:{name:"Composite",className:"MetricDimensions",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}}}}},LogSpecifications={type:{name:"Composite",className:"LogSpecifications",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}},blobDuration:{serializedName:"blobDuration",readOnly:!0,type:{name:"String"}}}}},AnalysisServicesServerProperties={type:{name:"Composite",className:"AnalysisServicesServerProperties",modelProperties:Object.assign(Object.assign({},AnalysisServicesServerMutableProperties.type.modelProperties),{state:{serializedName:"state",readOnly:!0,type:{name:"String"}},provisioningState:{serializedName:"provisioningState",readOnly:!0,type:{name:"String"}},serverFullName:{serializedName:"serverFullName",readOnly:!0,type:{name:"String"}},sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}}})}},AnalysisServicesServer={type:{name:"Composite",className:"AnalysisServicesServer",modelProperties:Object.assign(Object.assign({},Resource.type.modelProperties),{asAdministrators:{serializedName:"properties.asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"properties.backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"properties.gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"properties.ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"properties.querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"properties.managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"properties.serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}},state:{serializedName:"properties.state",readOnly:!0,type:{name:"String"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,type:{name:"String"}},serverFullName:{serializedName:"properties.serverFullName",readOnly:!0,type:{name:"String"}},skuPropertiesSku:{serializedName:"properties.sku",type:{name:"Composite",className:"ResourceSku"}}})}};var Mappers=Object.freeze({__proto__:null,ResourceSku:ResourceSku,AnalysisServicesServerMutableProperties:AnalysisServicesServerMutableProperties,ServerAdministrators:ServerAdministrators,GatewayDetails:GatewayDetails,IPv4FirewallSettings:IPv4FirewallSettings,IPv4FirewallRule:IPv4FirewallRule,Resource:Resource,ErrorResponse:ErrorResponse,ErrorDetail:ErrorDetail,ErrorAdditionalInfo:ErrorAdditionalInfo,AnalysisServicesServerUpdateParameters:AnalysisServicesServerUpdateParameters,AnalysisServicesServers:AnalysisServicesServers,SkuEnumerationForNewResourceResult:SkuEnumerationForNewResourceResult,SkuEnumerationForExistingResourceResult:SkuEnumerationForExistingResourceResult,SkuDetailsForExistingResource:SkuDetailsForExistingResource,GatewayListStatusLive:GatewayListStatusLive,GatewayListStatusError:GatewayListStatusError,CheckServerNameAvailabilityParameters:CheckServerNameAvailabilityParameters,CheckServerNameAvailabilityResult:CheckServerNameAvailabilityResult,OperationStatus:OperationStatus,OperationListResult:OperationListResult,Operation:Operation,OperationDisplay:OperationDisplay,OperationProperties:OperationProperties,OperationPropertiesServiceSpecification:OperationPropertiesServiceSpecification,MetricSpecifications:MetricSpecifications,MetricDimensions:MetricDimensions,LogSpecifications:LogSpecifications,AnalysisServicesServerProperties:AnalysisServicesServerProperties,AnalysisServicesServer:AnalysisServicesServer});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},resourceGroupName={parameterPath:"resourceGroupName",mapper:{constraints:{Pattern:new RegExp("^[-\\w\\._\\(\\)]+$"),MaxLength:90,MinLength:1},serializedName:"resourceGroupName",required:!0,type:{name:"String"}}},serverName={parameterPath:"serverName",mapper:{constraints:{Pattern:new RegExp("^[a-z][a-z0-9]*$"),MaxLength:63,MinLength:3},serializedName:"serverName",required:!0,type:{name:"String"}}},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2017-08-01",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},subscriptionId={parameterPath:"subscriptionId",mapper:{serializedName:"subscriptionId",required:!0,type:{name:"String"}}},contentType={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},serverParameters={parameterPath:"serverParameters",mapper:AnalysisServicesServer},serverUpdateParameters={parameterPath:"serverUpdateParameters",mapper:AnalysisServicesServerUpdateParameters},serverParameters1={parameterPath:"serverParameters",mapper:CheckServerNameAvailabilityParameters},location={parameterPath:"location",mapper:{serializedName:"location",required:!0,type:{name:"String"}}},operationId={parameterPath:"operationId",mapper:{serializedName:"operationId",required:!0,type:{name:"String"}}},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0};class LroImpl{constructor(e,r,s,a=s.path,i=s.httpMethod){this.sendOperationFn=e,this.args=r,this.spec=s,this.requestPath=a,this.requestMethod=i}sendInitialRequest(){return tslib.__awaiter(this,void 0,void 0,function*(){return this.sendOperationFn(this.args,this.spec)})}sendPollRequest(r){return tslib.__awaiter(this,void 0,void 0,function*(){var e=this.spec,e=tslib.__rest(e,["requestBody"]);return this.sendOperationFn(this.args,Object.assign(Object.assign({},e),{path:r,httpMethod:"GET"}))})}}class ServersImpl{constructor(e){this.client=e}listByResourceGroup(e,r){const s=this.listByResourceGroupPagingAll(e,r);return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listByResourceGroupPagingPage(e,r)}}listByResourceGroupPagingPage(r,s){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._listByResourceGroup(r,s));yield yield tslib.__await(e.value||[])})}listByResourceGroupPagingAll(t,n){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var s,a=tslib.__asyncValues(this.listByResourceGroupPagingPage(t,n));!(s=yield tslib.__await(a.next())).done;){var i=s.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(e=a.return)&&(yield tslib.__await(e.call(a)))}finally{if(r)throw r.error}}})}list(e){const r=this.listPagingAll(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listPagingPage(e)}}listPagingPage(r){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._list(r));yield yield tslib.__await(e.value||[])})}listPagingAll(t){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var s,a=tslib.__asyncValues(this.listPagingPage(t));!(s=yield tslib.__await(a.next())).done;){var i=s.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(e=a.return)&&(yield tslib.__await(e.call(a)))}finally{if(r)throw r.error}}})}getDetails(e,r,s){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:s},getDetailsOperationSpec)}beginCreate(r,s,a,i){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,i)=>tslib.__awaiter(this,void 0,void 0,function*(){let s=void 0;const a=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{s=e,null!==a&&void 0!==a&&a(e,r)}})});return{flatResponse:yield t(e,i),rawResponse:{statusCode:s.status,body:s.parsedBody,headers:s.headers.toJSON()}}}),{resourceGroupName:r,serverName:s,serverParameters:a,options:i},createOperationSpec);return new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs})})}beginCreateAndWait(r,s,a,i){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginCreate(r,s,a,i);return e.pollUntilDone()})}beginDelete(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,i)=>tslib.__awaiter(this,void 0,void 0,function*(){let s=void 0;const a=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{s=e,null!==a&&void 0!==a&&a(e,r)}})});return{flatResponse:yield t(e,i),rawResponse:{statusCode:s.status,body:s.parsedBody,headers:s.headers.toJSON()}}}),{resourceGroupName:r,serverName:s,options:a},deleteOperationSpec);return new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs})})}beginDeleteAndWait(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginDelete(r,s,a);return e.pollUntilDone()})}beginUpdate(r,s,a,i){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,i)=>tslib.__awaiter(this,void 0,void 0,function*(){let s=void 0;const a=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{s=e,null!==a&&void 0!==a&&a(e,r)}})});return{flatResponse:yield t(e,i),rawResponse:{statusCode:s.status,body:s.parsedBody,headers:s.headers.toJSON()}}}),{resourceGroupName:r,serverName:s,serverUpdateParameters:a,options:i},updateOperationSpec);return new coreLro.LroEngine(e,{resumeFrom:null==i?void 0:i.resumeFrom,intervalInMs:null==i?void 0:i.updateIntervalInMs})})}beginUpdateAndWait(r,s,a,i){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginUpdate(r,s,a,i);return e.pollUntilDone()})}beginSuspend(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,i)=>tslib.__awaiter(this,void 0,void 0,function*(){let s=void 0;const a=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{s=e,null!==a&&void 0!==a&&a(e,r)}})});return{flatResponse:yield t(e,i),rawResponse:{statusCode:s.status,body:s.parsedBody,headers:s.headers.toJSON()}}}),{resourceGroupName:r,serverName:s,options:a},suspendOperationSpec);return new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs})})}beginSuspendAndWait(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginSuspend(r,s,a);return e.pollUntilDone()})}beginResume(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,i)=>tslib.__awaiter(this,void 0,void 0,function*(){let s=void 0;const a=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{s=e,null!==a&&void 0!==a&&a(e,r)}})});return{flatResponse:yield t(e,i),rawResponse:{statusCode:s.status,body:s.parsedBody,headers:s.headers.toJSON()}}}),{resourceGroupName:r,serverName:s,options:a},resumeOperationSpec);return new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs})})}beginResumeAndWait(r,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginResume(r,s,a);return e.pollUntilDone()})}_listByResourceGroup(e,r){return this.client.sendOperationRequest({resourceGroupName:e,options:r},listByResourceGroupOperationSpec)}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec$1)}listSkusForNew(e){return this.client.sendOperationRequest({options:e},listSkusForNewOperationSpec)}listSkusForExisting(e,r,s){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:s},listSkusForExistingOperationSpec)}listGatewayStatus(e,r,s){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:s},listGatewayStatusOperationSpec)}dissociateGateway(e,r,s){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:s},dissociateGatewayOperationSpec)}checkNameAvailability(e,r,s){return this.client.sendOperationRequest({location:e,serverParameters:r,options:s},checkNameAvailabilityOperationSpec)}listOperationResults(e,r,s){return this.client.sendOperationRequest({location:e,operationId:r,options:s},listOperationResultsOperationSpec)}listOperationStatuses(e,r,s){return this.client.sendOperationRequest({location:e,operationId:r,options:s},listOperationStatusesOperationSpec)}}const serializer$1=coreClient__namespace.createSerializer(Mappers,!1),getDetailsOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},createOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"PUT",responses:{200:{bodyMapper:AnalysisServicesServer},201:{bodyMapper:AnalysisServicesServer},202:{bodyMapper:AnalysisServicesServer},204:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},requestBody:serverParameters,queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},deleteOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"DELETE",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},updateOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"PATCH",responses:{200:{bodyMapper:AnalysisServicesServer},201:{bodyMapper:AnalysisServicesServer},202:{bodyMapper:AnalysisServicesServer},204:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},requestBody:serverUpdateParameters,queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},suspendOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/suspend",httpMethod:"POST",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},resumeOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/resume",httpMethod:"POST",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listByResourceGroupOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServers},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listOperationSpec$1={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/servers",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServers},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1},listSkusForNewOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus",httpMethod:"GET",responses:{200:{bodyMapper:SkuEnumerationForNewResourceResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1},listSkusForExistingOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus",httpMethod:"GET",responses:{200:{bodyMapper:SkuEnumerationForExistingResourceResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listGatewayStatusOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus",httpMethod:"POST",responses:{200:{bodyMapper:GatewayListStatusLive},default:{bodyMapper:GatewayListStatusError}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},dissociateGatewayOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway",httpMethod:"POST",responses:{200:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},checkNameAvailabilityOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/checkNameAvailability",httpMethod:"POST",responses:{200:{bodyMapper:CheckServerNameAvailabilityResult},default:{bodyMapper:ErrorResponse}},requestBody:serverParameters1,queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},listOperationResultsOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/operationresults/{operationId}",httpMethod:"GET",responses:{200:{},202:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location,operationId],headerParameters:[accept],serializer:serializer$1},listOperationStatusesOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/operationstatuses/{operationId}",httpMethod:"GET",responses:{200:{bodyMapper:OperationStatus},202:{bodyMapper:OperationStatus},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location,operationId],headerParameters:[accept],serializer:serializer$1};class OperationsImpl{constructor(e){this.client=e}list(e){const r=this.listPagingAll(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listPagingPage(e)}}listPagingPage(s){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._list(s));yield yield tslib.__await(e.value||[]);let r=e.nextLink;for(;r;)e=yield tslib.__await(this._listNext(r,s)),r=e.nextLink,yield yield tslib.__await(e.value||[])})}listPagingAll(t){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var s,a=tslib.__asyncValues(this.listPagingPage(t));!(s=yield tslib.__await(a.next())).done;){var i=s.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(e=a.return)&&(yield tslib.__await(e.call(a)))}finally{if(r)throw r.error}}})}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec)}_listNext(e,r){return this.client.sendOperationRequest({nextLink:e,options:r},listNextOperationSpec)}}const serializer=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec={path:"/providers/Microsoft.AnalysisServices/operations",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host],headerParameters:[accept],serializer:serializer},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,nextLink],headerParameters:[accept],serializer:serializer};class AzureAnalysisServices extends coreClient__namespace.ServiceClient{constructor(e,r,s){if(void 0===e)throw new Error("'credentials' cannot be null");if(void 0===r)throw new Error("'subscriptionId' cannot be null");var e={requestContentType:"application/json; charset=utf-8",credential:e},a="azsdk-js-arm-analysisservices/4.0.0",a=(s=s||{}).userAgentOptions&&s.userAgentOptions.userAgentPrefix?s.userAgentOptions.userAgentPrefix+" "+a:a,e=(s.credentialScopes||(s.credentialScopes=["https://management.azure.com/.default"]),Object.assign(Object.assign(Object.assign({},e),s),{userAgentOptions:{userAgentPrefix:a},baseUri:s.endpoint||"https://management.azure.com"}));super(e),this.subscriptionId=r,this.$host=s.$host||"https://management.azure.com",this.apiVersion=s.apiVersion||"2017-08-01",this.servers=new ServersImpl(this),this.operations=new OperationsImpl(this)}}exports.AzureAnalysisServices=AzureAnalysisServices;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),coreClient=require("@azure/core-client"),coreRestPipeline=require("@azure/core-rest-pipeline"),coreLro=require("@azure/core-lro");function _interopNamespace(i){if(i&&i.__esModule)return i;var s=Object.create(null);return i&&Object.keys(i).forEach(function(e){var r;"default"!==e&&(r=Object.getOwnPropertyDescriptor(i,e),Object.defineProperty(s,e,r.get?r:{enumerable:!0,get:function(){return i[e]}}))}),s.default=i,Object.freeze(s)}var coreClient__namespace=_interopNamespace(coreClient),coreRestPipeline__namespace=_interopNamespace(coreRestPipeline);exports.KnownState=void 0,function(e){e.Deleting="Deleting",e.Succeeded="Succeeded",e.Failed="Failed",e.Paused="Paused",e.Suspended="Suspended",e.Provisioning="Provisioning",e.Updating="Updating",e.Suspending="Suspending",e.Pausing="Pausing",e.Resuming="Resuming",e.Preparing="Preparing",e.Scaling="Scaling"}(exports.KnownState||(exports.KnownState={})),exports.KnownProvisioningState=void 0,function(e){e.Deleting="Deleting",e.Succeeded="Succeeded",e.Failed="Failed",e.Paused="Paused",e.Suspended="Suspended",e.Provisioning="Provisioning",e.Updating="Updating",e.Suspending="Suspending",e.Pausing="Pausing",e.Resuming="Resuming",e.Preparing="Preparing",e.Scaling="Scaling"}(exports.KnownProvisioningState||(exports.KnownProvisioningState={})),exports.KnownSkuTier=void 0,function(e){e.Development="Development",e.Basic="Basic",e.Standard="Standard"}(exports.KnownSkuTier||(exports.KnownSkuTier={}));const ResourceSku={type:{name:"Composite",className:"ResourceSku",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},tier:{serializedName:"tier",type:{name:"String"}},capacity:{defaultValue:1,constraints:{InclusiveMaximum:8,InclusiveMinimum:1},serializedName:"capacity",type:{name:"Number"}}}}},AnalysisServicesServerMutableProperties={type:{name:"Composite",className:"AnalysisServicesServerMutableProperties",modelProperties:{asAdministrators:{serializedName:"asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}}}}},ServerAdministrators={type:{name:"Composite",className:"ServerAdministrators",modelProperties:{members:{serializedName:"members",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},GatewayDetails={type:{name:"Composite",className:"GatewayDetails",modelProperties:{gatewayResourceId:{serializedName:"gatewayResourceId",type:{name:"String"}},gatewayObjectId:{serializedName:"gatewayObjectId",readOnly:!0,type:{name:"String"}},dmtsClusterUri:{serializedName:"dmtsClusterUri",readOnly:!0,type:{name:"String"}}}}},IPv4FirewallSettings={type:{name:"Composite",className:"IPv4FirewallSettings",modelProperties:{firewallRules:{serializedName:"firewallRules",type:{name:"Sequence",element:{type:{name:"Composite",className:"IPv4FirewallRule"}}}},enablePowerBIService:{serializedName:"enablePowerBIService",type:{name:"Boolean"}}}}},IPv4FirewallRule={type:{name:"Composite",className:"IPv4FirewallRule",modelProperties:{firewallRuleName:{serializedName:"firewallRuleName",type:{name:"String"}},rangeStart:{serializedName:"rangeStart",type:{name:"String"}},rangeEnd:{serializedName:"rangeEnd",type:{name:"String"}}}}},Resource={type:{name:"Composite",className:"Resource",modelProperties:{id:{serializedName:"id",readOnly:!0,type:{name:"String"}},name:{serializedName:"name",readOnly:!0,type:{name:"String"}},type:{serializedName:"type",readOnly:!0,type:{name:"String"}},location:{serializedName:"location",required:!0,type:{name:"String"}},sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},tags:{serializedName:"tags",type:{name:"Dictionary",value:{type:{name:"String"}}}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},ErrorDetail={type:{name:"Composite",className:"ErrorDetail",modelProperties:{code:{serializedName:"code",readOnly:!0,type:{name:"String"}},message:{serializedName:"message",readOnly:!0,type:{name:"String"}},target:{serializedName:"target",readOnly:!0,type:{name:"String"}},subCode:{serializedName:"subCode",readOnly:!0,type:{name:"Number"}},httpStatusCode:{serializedName:"httpStatusCode",readOnly:!0,type:{name:"Number"}},timeStamp:{serializedName:"timeStamp",readOnly:!0,type:{name:"String"}},details:{serializedName:"details",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorDetail"}}}},additionalInfo:{serializedName:"additionalInfo",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ErrorAdditionalInfo"}}}}}}},ErrorAdditionalInfo={type:{name:"Composite",className:"ErrorAdditionalInfo",modelProperties:{type:{serializedName:"type",readOnly:!0,type:{name:"String"}},info:{serializedName:"info",readOnly:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},AnalysisServicesServerUpdateParameters={type:{name:"Composite",className:"AnalysisServicesServerUpdateParameters",modelProperties:{sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},tags:{serializedName:"tags",type:{name:"Dictionary",value:{type:{name:"String"}}}},asAdministrators:{serializedName:"properties.asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"properties.backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"properties.gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"properties.ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"properties.querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"properties.managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"properties.serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}}}}},AnalysisServicesServers={type:{name:"Composite",className:"AnalysisServicesServers",modelProperties:{value:{serializedName:"value",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"AnalysisServicesServer"}}}}}}},SkuEnumerationForNewResourceResult={type:{name:"Composite",className:"SkuEnumerationForNewResourceResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"ResourceSku"}}}}}}},SkuEnumerationForExistingResourceResult={type:{name:"Composite",className:"SkuEnumerationForExistingResourceResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"SkuDetailsForExistingResource"}}}}}}},SkuDetailsForExistingResource={type:{name:"Composite",className:"SkuDetailsForExistingResource",modelProperties:{sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}},resourceType:{serializedName:"resourceType",type:{name:"String"}}}}},GatewayListStatusLive={type:{name:"Composite",className:"GatewayListStatusLive",modelProperties:{status:{defaultValue:0,isConstant:!0,serializedName:"status",type:{name:"Number"}}}}},GatewayListStatusError={type:{name:"Composite",className:"GatewayListStatusError",modelProperties:{error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},CheckServerNameAvailabilityParameters={type:{name:"Composite",className:"CheckServerNameAvailabilityParameters",modelProperties:{name:{constraints:{Pattern:new RegExp("^[a-z][a-z0-9]*$"),MaxLength:63,MinLength:3},serializedName:"name",type:{name:"String"}},type:{defaultValue:"Microsoft.AnalysisServices/servers",serializedName:"type",type:{name:"String"}}}}},CheckServerNameAvailabilityResult={type:{name:"Composite",className:"CheckServerNameAvailabilityResult",modelProperties:{nameAvailable:{serializedName:"nameAvailable",type:{name:"Boolean"}},reason:{serializedName:"reason",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}}}}},OperationStatus={type:{name:"Composite",className:"OperationStatus",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},startTime:{serializedName:"startTime",type:{name:"String"}},endTime:{serializedName:"endTime",type:{name:"String"}},status:{serializedName:"status",type:{name:"String"}},error:{serializedName:"error",type:{name:"Composite",className:"ErrorDetail"}}}}},OperationListResult={type:{name:"Composite",className:"OperationListResult",modelProperties:{value:{serializedName:"value",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Operation"}}}},nextLink:{serializedName:"nextLink",readOnly:!0,type:{name:"String"}}}}},Operation={type:{name:"Composite",className:"Operation",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},display:{serializedName:"display",type:{name:"Composite",className:"OperationDisplay"}},origin:{serializedName:"origin",readOnly:!0,type:{name:"String"}},properties:{serializedName:"properties",type:{name:"Composite",className:"OperationProperties"}}}}},OperationDisplay={type:{name:"Composite",className:"OperationDisplay",modelProperties:{provider:{serializedName:"provider",readOnly:!0,type:{name:"String"}},resource:{serializedName:"resource",readOnly:!0,type:{name:"String"}},operation:{serializedName:"operation",readOnly:!0,type:{name:"String"}},description:{serializedName:"description",readOnly:!0,type:{name:"String"}}}}},OperationProperties={type:{name:"Composite",className:"OperationProperties",modelProperties:{serviceSpecification:{serializedName:"serviceSpecification",type:{name:"Composite",className:"OperationPropertiesServiceSpecification"}}}}},OperationPropertiesServiceSpecification={type:{name:"Composite",className:"OperationPropertiesServiceSpecification",modelProperties:{metricSpecifications:{serializedName:"metricSpecifications",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MetricSpecifications"}}}},logSpecifications:{serializedName:"logSpecifications",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"LogSpecifications"}}}}}}},MetricSpecifications={type:{name:"Composite",className:"MetricSpecifications",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}},displayDescription:{serializedName:"displayDescription",readOnly:!0,type:{name:"String"}},unit:{serializedName:"unit",readOnly:!0,type:{name:"String"}},aggregationType:{serializedName:"aggregationType",readOnly:!0,type:{name:"String"}},dimensions:{serializedName:"dimensions",readOnly:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MetricDimensions"}}}}}}},MetricDimensions={type:{name:"Composite",className:"MetricDimensions",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}}}}},LogSpecifications={type:{name:"Composite",className:"LogSpecifications",modelProperties:{name:{serializedName:"name",readOnly:!0,type:{name:"String"}},displayName:{serializedName:"displayName",readOnly:!0,type:{name:"String"}},blobDuration:{serializedName:"blobDuration",readOnly:!0,type:{name:"String"}}}}},AnalysisServicesServerProperties={type:{name:"Composite",className:"AnalysisServicesServerProperties",modelProperties:Object.assign(Object.assign({},AnalysisServicesServerMutableProperties.type.modelProperties),{state:{serializedName:"state",readOnly:!0,type:{name:"String"}},provisioningState:{serializedName:"provisioningState",readOnly:!0,type:{name:"String"}},serverFullName:{serializedName:"serverFullName",readOnly:!0,type:{name:"String"}},sku:{serializedName:"sku",type:{name:"Composite",className:"ResourceSku"}}})}},AnalysisServicesServer={type:{name:"Composite",className:"AnalysisServicesServer",modelProperties:Object.assign(Object.assign({},Resource.type.modelProperties),{asAdministrators:{serializedName:"properties.asAdministrators",type:{name:"Composite",className:"ServerAdministrators"}},backupBlobContainerUri:{serializedName:"properties.backupBlobContainerUri",type:{name:"String"}},gatewayDetails:{serializedName:"properties.gatewayDetails",type:{name:"Composite",className:"GatewayDetails"}},ipV4FirewallSettings:{serializedName:"properties.ipV4FirewallSettings",type:{name:"Composite",className:"IPv4FirewallSettings"}},querypoolConnectionMode:{defaultValue:"All",serializedName:"properties.querypoolConnectionMode",type:{name:"Enum",allowedValues:["All","ReadOnly"]}},managedMode:{defaultValue:"1",serializedName:"properties.managedMode",type:{name:"Enum",allowedValues:[0,1]}},serverMonitorMode:{defaultValue:"1",serializedName:"properties.serverMonitorMode",type:{name:"Enum",allowedValues:[0,1]}},state:{serializedName:"properties.state",readOnly:!0,type:{name:"String"}},provisioningState:{serializedName:"properties.provisioningState",readOnly:!0,type:{name:"String"}},serverFullName:{serializedName:"properties.serverFullName",readOnly:!0,type:{name:"String"}},skuPropertiesSku:{serializedName:"properties.sku",type:{name:"Composite",className:"ResourceSku"}}})}};var Mappers=Object.freeze({__proto__:null,ResourceSku:ResourceSku,AnalysisServicesServerMutableProperties:AnalysisServicesServerMutableProperties,ServerAdministrators:ServerAdministrators,GatewayDetails:GatewayDetails,IPv4FirewallSettings:IPv4FirewallSettings,IPv4FirewallRule:IPv4FirewallRule,Resource:Resource,ErrorResponse:ErrorResponse,ErrorDetail:ErrorDetail,ErrorAdditionalInfo:ErrorAdditionalInfo,AnalysisServicesServerUpdateParameters:AnalysisServicesServerUpdateParameters,AnalysisServicesServers:AnalysisServicesServers,SkuEnumerationForNewResourceResult:SkuEnumerationForNewResourceResult,SkuEnumerationForExistingResourceResult:SkuEnumerationForExistingResourceResult,SkuDetailsForExistingResource:SkuDetailsForExistingResource,GatewayListStatusLive:GatewayListStatusLive,GatewayListStatusError:GatewayListStatusError,CheckServerNameAvailabilityParameters:CheckServerNameAvailabilityParameters,CheckServerNameAvailabilityResult:CheckServerNameAvailabilityResult,OperationStatus:OperationStatus,OperationListResult:OperationListResult,Operation:Operation,OperationDisplay:OperationDisplay,OperationProperties:OperationProperties,OperationPropertiesServiceSpecification:OperationPropertiesServiceSpecification,MetricSpecifications:MetricSpecifications,MetricDimensions:MetricDimensions,LogSpecifications:LogSpecifications,AnalysisServicesServerProperties:AnalysisServicesServerProperties,AnalysisServicesServer:AnalysisServicesServer});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},resourceGroupName={parameterPath:"resourceGroupName",mapper:{constraints:{Pattern:new RegExp("^[-\\w\\._\\(\\)]+$"),MaxLength:90,MinLength:1},serializedName:"resourceGroupName",required:!0,type:{name:"String"}}},serverName={parameterPath:"serverName",mapper:{constraints:{Pattern:new RegExp("^[a-z][a-z0-9]*$"),MaxLength:63,MinLength:3},serializedName:"serverName",required:!0,type:{name:"String"}}},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2017-08-01",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},subscriptionId={parameterPath:"subscriptionId",mapper:{serializedName:"subscriptionId",required:!0,type:{name:"String"}}},contentType={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},serverParameters={parameterPath:"serverParameters",mapper:AnalysisServicesServer},serverUpdateParameters={parameterPath:"serverUpdateParameters",mapper:AnalysisServicesServerUpdateParameters},serverParameters1={parameterPath:"serverParameters",mapper:CheckServerNameAvailabilityParameters},location={parameterPath:"location",mapper:{serializedName:"location",required:!0,type:{name:"String"}}},operationId={parameterPath:"operationId",mapper:{serializedName:"operationId",required:!0,type:{name:"String"}}},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0};class LroImpl{constructor(e,r,i,s=i.path,a=i.httpMethod){this.sendOperationFn=e,this.args=r,this.spec=i,this.requestPath=s,this.requestMethod=a}sendInitialRequest(){return tslib.__awaiter(this,void 0,void 0,function*(){return this.sendOperationFn(this.args,this.spec)})}sendPollRequest(r){return tslib.__awaiter(this,void 0,void 0,function*(){var e=this.spec,e=tslib.__rest(e,["requestBody"]);return this.sendOperationFn(this.args,Object.assign(Object.assign({},e),{path:r,httpMethod:"GET"}))})}}class ServersImpl{constructor(e){this.client=e}listByResourceGroup(e,r){const i=this.listByResourceGroupPagingAll(e,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listByResourceGroupPagingPage(e,r)}}listByResourceGroupPagingPage(r,i){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._listByResourceGroup(r,i));yield yield tslib.__await(e.value||[])})}listByResourceGroupPagingAll(t,n){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var i,s=tslib.__asyncValues(this.listByResourceGroupPagingPage(t,n));!(i=yield tslib.__await(s.next())).done;){var a=i.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(a)))}}catch(e){r={error:e}}finally{try{i&&!i.done&&(e=s.return)&&(yield tslib.__await(e.call(s)))}finally{if(r)throw r.error}}})}list(e){const r=this.listPagingAll(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listPagingPage(e)}}listPagingPage(r){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._list(r));yield yield tslib.__await(e.value||[])})}listPagingAll(t){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var i,s=tslib.__asyncValues(this.listPagingPage(t));!(i=yield tslib.__await(s.next())).done;){var a=i.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(a)))}}catch(e){r={error:e}}finally{try{i&&!i.done&&(e=s.return)&&(yield tslib.__await(e.call(s)))}finally{if(r)throw r.error}}})}getDetails(e,r,i){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:i},getDetailsOperationSpec)}beginCreate(i,s,a,n){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let i=void 0;const s=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{i=e,null!==s&&void 0!==s&&s(e,r)}})});return{flatResponse:yield t(e,a),rawResponse:{statusCode:i.status,body:i.parsedBody,headers:i.headers.toJSON()}}}),{resourceGroupName:i,serverName:s,serverParameters:a,options:n},createOperationSpec);const r=new coreLro.LroEngine(e,{resumeFrom:null==n?void 0:n.resumeFrom,intervalInMs:null==n?void 0:n.updateIntervalInMs});return yield r.poll(),r})}beginCreateAndWait(r,i,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginCreate(r,i,s,a);return e.pollUntilDone()})}beginDelete(i,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let i=void 0;const s=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{i=e,null!==s&&void 0!==s&&s(e,r)}})});return{flatResponse:yield t(e,a),rawResponse:{statusCode:i.status,body:i.parsedBody,headers:i.headers.toJSON()}}}),{resourceGroupName:i,serverName:s,options:a},deleteOperationSpec);const r=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs});return yield r.poll(),r})}beginDeleteAndWait(r,i,s){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginDelete(r,i,s);return e.pollUntilDone()})}beginUpdate(i,s,a,n){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let i=void 0;const s=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{i=e,null!==s&&void 0!==s&&s(e,r)}})});return{flatResponse:yield t(e,a),rawResponse:{statusCode:i.status,body:i.parsedBody,headers:i.headers.toJSON()}}}),{resourceGroupName:i,serverName:s,serverUpdateParameters:a,options:n},updateOperationSpec);const r=new coreLro.LroEngine(e,{resumeFrom:null==n?void 0:n.resumeFrom,intervalInMs:null==n?void 0:n.updateIntervalInMs});return yield r.poll(),r})}beginUpdateAndWait(r,i,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginUpdate(r,i,s,a);return e.pollUntilDone()})}beginSuspend(i,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let i=void 0;const s=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{i=e,null!==s&&void 0!==s&&s(e,r)}})});return{flatResponse:yield t(e,a),rawResponse:{statusCode:i.status,body:i.parsedBody,headers:i.headers.toJSON()}}}),{resourceGroupName:i,serverName:s,options:a},suspendOperationSpec);const r=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs});return yield r.poll(),r})}beginSuspendAndWait(r,i,s){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginSuspend(r,i,s);return e.pollUntilDone()})}beginResume(i,s,a){return tslib.__awaiter(this,void 0,void 0,function*(){const t=(e,r)=>tslib.__awaiter(this,void 0,void 0,function*(){return this.client.sendOperationRequest(e,r)});var e=new LroImpl((r,a)=>tslib.__awaiter(this,void 0,void 0,function*(){let i=void 0;const s=null==(e=r.options)?void 0:e.onResponse;var e=Object.assign(Object.assign({},r),{options:Object.assign(Object.assign({},r.options),{onResponse:(e,r)=>{i=e,null!==s&&void 0!==s&&s(e,r)}})});return{flatResponse:yield t(e,a),rawResponse:{statusCode:i.status,body:i.parsedBody,headers:i.headers.toJSON()}}}),{resourceGroupName:i,serverName:s,options:a},resumeOperationSpec);const r=new coreLro.LroEngine(e,{resumeFrom:null==a?void 0:a.resumeFrom,intervalInMs:null==a?void 0:a.updateIntervalInMs});return yield r.poll(),r})}beginResumeAndWait(r,i,s){return tslib.__awaiter(this,void 0,void 0,function*(){const e=yield this.beginResume(r,i,s);return e.pollUntilDone()})}_listByResourceGroup(e,r){return this.client.sendOperationRequest({resourceGroupName:e,options:r},listByResourceGroupOperationSpec)}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec$1)}listSkusForNew(e){return this.client.sendOperationRequest({options:e},listSkusForNewOperationSpec)}listSkusForExisting(e,r,i){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:i},listSkusForExistingOperationSpec)}listGatewayStatus(e,r,i){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:i},listGatewayStatusOperationSpec)}dissociateGateway(e,r,i){return this.client.sendOperationRequest({resourceGroupName:e,serverName:r,options:i},dissociateGatewayOperationSpec)}checkNameAvailability(e,r,i){return this.client.sendOperationRequest({location:e,serverParameters:r,options:i},checkNameAvailabilityOperationSpec)}listOperationResults(e,r,i){return this.client.sendOperationRequest({location:e,operationId:r,options:i},listOperationResultsOperationSpec)}listOperationStatuses(e,r,i){return this.client.sendOperationRequest({location:e,operationId:r,options:i},listOperationStatusesOperationSpec)}}const serializer$1=coreClient__namespace.createSerializer(Mappers,!1),getDetailsOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},createOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"PUT",responses:{200:{bodyMapper:AnalysisServicesServer},201:{bodyMapper:AnalysisServicesServer},202:{bodyMapper:AnalysisServicesServer},204:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},requestBody:serverParameters,queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},deleteOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"DELETE",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},updateOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}",httpMethod:"PATCH",responses:{200:{bodyMapper:AnalysisServicesServer},201:{bodyMapper:AnalysisServicesServer},202:{bodyMapper:AnalysisServicesServer},204:{bodyMapper:AnalysisServicesServer},default:{bodyMapper:ErrorResponse}},requestBody:serverUpdateParameters,queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},suspendOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/suspend",httpMethod:"POST",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},resumeOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/resume",httpMethod:"POST",responses:{200:{},201:{},202:{},204:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listByResourceGroupOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServers},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listOperationSpec$1={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/servers",httpMethod:"GET",responses:{200:{bodyMapper:AnalysisServicesServers},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1},listSkusForNewOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus",httpMethod:"GET",responses:{200:{bodyMapper:SkuEnumerationForNewResourceResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1},listSkusForExistingOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus",httpMethod:"GET",responses:{200:{bodyMapper:SkuEnumerationForExistingResourceResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},listGatewayStatusOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus",httpMethod:"POST",responses:{200:{bodyMapper:GatewayListStatusLive},default:{bodyMapper:GatewayListStatusError}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},dissociateGatewayOperationSpec={path:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway",httpMethod:"POST",responses:{200:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,resourceGroupName,serverName,subscriptionId],headerParameters:[accept],serializer:serializer$1},checkNameAvailabilityOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/checkNameAvailability",httpMethod:"POST",responses:{200:{bodyMapper:CheckServerNameAvailabilityResult},default:{bodyMapper:ErrorResponse}},requestBody:serverParameters1,queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location],headerParameters:[accept,contentType],mediaType:"json",serializer:serializer$1},listOperationResultsOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/operationresults/{operationId}",httpMethod:"GET",responses:{200:{},202:{},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location,operationId],headerParameters:[accept],serializer:serializer$1},listOperationStatusesOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/operationstatuses/{operationId}",httpMethod:"GET",responses:{200:{bodyMapper:OperationStatus},202:{bodyMapper:OperationStatus},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,subscriptionId,location,operationId],headerParameters:[accept],serializer:serializer$1};class OperationsImpl{constructor(e){this.client=e}list(e){const r=this.listPagingAll(e);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listPagingPage(e)}}listPagingPage(i){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._list(i));yield yield tslib.__await(e.value||[]);let r=e.nextLink;for(;r;)e=yield tslib.__await(this._listNext(r,i)),r=e.nextLink,yield yield tslib.__await(e.value||[])})}listPagingAll(t){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var i,s=tslib.__asyncValues(this.listPagingPage(t));!(i=yield tslib.__await(s.next())).done;){var a=i.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(a)))}}catch(e){r={error:e}}finally{try{i&&!i.done&&(e=s.return)&&(yield tslib.__await(e.call(s)))}finally{if(r)throw r.error}}})}_list(e){return this.client.sendOperationRequest({options:e},listOperationSpec)}_listNext(e,r){return this.client.sendOperationRequest({nextLink:e,options:r},listNextOperationSpec)}}const serializer=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec={path:"/providers/Microsoft.AnalysisServices/operations",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host],headerParameters:[accept],serializer:serializer},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:OperationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion],urlParameters:[$host,nextLink],headerParameters:[accept],serializer:serializer};class AzureAnalysisServices extends coreClient__namespace.ServiceClient{constructor(e,r,i){if(void 0===e)throw new Error("'credentials' cannot be null");if(void 0===r)throw new Error("'subscriptionId' cannot be null");var s="azsdk-js-arm-analysisservices/4.1.0",s=(i=i||{}).userAgentOptions&&i.userAgentOptions.userAgentPrefix?i.userAgentOptions.userAgentPrefix+" "+s:s,e=Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8",credential:e}),i),{userAgentOptions:{userAgentPrefix:s},baseUri:null!=(s=null!=(e=i.endpoint)?e:i.baseUri)?s:"https://management.azure.com"});if(super(e),null!=i&&i.pipeline&&0<i.pipeline.getOrderedPolicies().length){const a=i.pipeline.getOrderedPolicies();a.some(e=>e.name===coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName)||(this.pipeline.removePolicy({name:coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName}),this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({scopes:e.baseUri+"/.default",challengeCallbacks:{authorizeRequestOnChallenge:coreClient__namespace.authorizeRequestOnClaimChallenge}})))}this.subscriptionId=r,this.$host=i.$host||"https://management.azure.com",this.apiVersion=i.apiVersion||"2017-08-01",this.servers=new ServersImpl(this),this.operations=new OperationsImpl(this),this.addCustomApiVersionPolicy(i.apiVersion)}addCustomApiVersionPolicy(a){a&&this.pipeline.addPolicy({name:"CustomApiVersionPolicy",sendRequest(i,s){return tslib.__awaiter(this,void 0,void 0,function*(){const e=i.url.split("?");if(1<e.length){const r=e[1].split("&").map(e=>-1<e.indexOf("api-version")?"api-version="+a:e);i.url=e[0]+"?"+r.join("&")}return s(i)})}})}}exports.AzureAnalysisServices=AzureAnalysisServices;

@@ -6,3 +6,3 @@ {

"description": "A generated SDK for AzureAnalysisServices.",
"version": "4.0.1-alpha.20220421.1",
"version": "4.1.0-alpha.20220629.1",
"engines": {

@@ -15,5 +15,5 @@ "node": ">=12.0.0"

"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0",
"@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"

@@ -35,8 +35,8 @@ },

"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",

@@ -46,5 +46,9 @@ "uglify-js": "^3.4.9",

"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb"
},

@@ -100,8 +104,15 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/analysisservices/arm-analysisservices",

"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/azureAnalysisServices.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true
}

@@ -1,4 +0,4 @@

# Azure Service client library for JavaScript
# AzureAnalysisServices client library for JavaScript
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureAnalysisServices client.

@@ -19,2 +19,4 @@ The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites

@@ -26,3 +28,3 @@

Install the Azure Service client library for JavaScript with `npm`:
Install the AzureAnalysisServices client library for JavaScript with `npm`:

@@ -35,4 +37,4 @@ ```bash

To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal].
To create a client object to access the AzureAnalysisServices API, you will need the `endpoint` of your AzureAnalysisServices resource and a `credential`. The AzureAnalysisServices client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureAnalysisServices resource in the [Azure Portal][azure_portal].

@@ -47,3 +49,3 @@ You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to AzureAnalysisServices** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.

@@ -56,4 +58,13 @@

const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new AzureAnalysisServices(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new AzureAnalysisServices(credential, subscriptionId);
```

@@ -69,3 +80,3 @@

`AzureAnalysisServices` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access.
`AzureAnalysisServices` is the primary interface for developers using the AzureAnalysisServices client library. Explore the methods on this client object to understand the different features of the AzureAnalysisServices service that you can access.

@@ -72,0 +83,0 @@ ## Troubleshooting

@@ -14,3 +14,3 @@ ## API Report File for "@azure/arm-analysisservices"

// @public
export type AnalysisServicesServer = Resource & {
export interface AnalysisServicesServer extends Resource {
asAdministrators?: ServerAdministrators;

@@ -20,10 +20,10 @@ backupBlobContainerUri?: string;

ipV4FirewallSettings?: IPv4FirewallSettings;
querypoolConnectionMode?: ConnectionMode;
managedMode?: ManagedMode;
serverMonitorMode?: ServerMonitorMode;
readonly state?: State;
readonly provisioningState?: ProvisioningState;
querypoolConnectionMode?: ConnectionMode;
readonly serverFullName?: string;
serverMonitorMode?: ServerMonitorMode;
skuPropertiesSku?: ResourceSku;
};
readonly state?: State;
}

@@ -42,8 +42,8 @@ // @public

// @public
export type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
readonly state?: State;
export interface AnalysisServicesServerProperties extends AnalysisServicesServerMutableProperties {
readonly provisioningState?: ProvisioningState;
readonly serverFullName?: string;
sku?: ResourceSku;
};
readonly state?: State;
}

@@ -145,3 +145,3 @@ // @public

export interface GatewayListStatusLive {
status?: "undefined";
status?: 0;
}

@@ -164,25 +164,13 @@

export enum KnownProvisioningState {
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
Paused = "Paused",
// (undocumented)
Pausing = "Pausing",
// (undocumented)
Preparing = "Preparing",
// (undocumented)
Provisioning = "Provisioning",
// (undocumented)
Resuming = "Resuming",
// (undocumented)
Scaling = "Scaling",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Suspended = "Suspended",
// (undocumented)
Suspending = "Suspending",
// (undocumented)
Updating = "Updating"

@@ -193,7 +181,4 @@ }

export enum KnownSkuTier {
// (undocumented)
Basic = "Basic",
// (undocumented)
Development = "Development",
// (undocumented)
Standard = "Standard"

@@ -204,25 +189,13 @@ }

export enum KnownState {
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
Paused = "Paused",
// (undocumented)
Pausing = "Pausing",
// (undocumented)
Preparing = "Preparing",
// (undocumented)
Provisioning = "Provisioning",
// (undocumented)
Resuming = "Resuming",
// (undocumented)
Scaling = "Scaling",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Suspended = "Suspended",
// (undocumented)
Suspending = "Suspending",
// (undocumented)
Updating = "Updating"

@@ -229,0 +202,0 @@ }

@@ -17,58 +17,10 @@ /*

/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler
/**
* A function that can determine whether a rollupwarning should be ignored. If
* A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed.
*/
function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (

@@ -82,3 +34,3 @@ warning.code === "EVAL" &&

function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (

@@ -90,6 +42,3 @@ warning.code === "CIRCULAR_DEPENDENCY" &&

const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];

@@ -128,18 +77,3 @@ /**

}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),

@@ -180,3 +114,3 @@ sourcemaps()

preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};

@@ -183,0 +117,0 @@

@@ -10,2 +10,8 @@ /*

import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import {
PipelineRequest,
PipelineResponse,
SendRequest
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";

@@ -49,3 +55,3 @@ import { ServersImpl, OperationsImpl } from "./operations";

const packageDetails = `azsdk-js-arm-analysisservices/4.0.0`;
const packageDetails = `azsdk-js-arm-analysisservices/4.1.0`;
const userAgentPrefix =

@@ -56,5 +62,2 @@ options.userAgentOptions && options.userAgentOptions.userAgentPrefix

if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {

@@ -66,5 +69,29 @@ ...defaults,

},
baseUri: options.endpoint || "https://management.azure.com"
baseUri:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
};
super(optionsWithDefaults);
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments

@@ -78,6 +105,35 @@ this.subscriptionId = subscriptionId;

this.operations = new OperationsImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
}
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
private addCustomApiVersionPolicy(apiVersion?: string) {
if (!apiVersion) {
return;
}
const apiVersionPolicy = {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
const newParams = param[1].split("&").map((item) => {
if (item.indexOf("api-version") > -1) {
return "api-version=" + apiVersion;
} else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}
servers: Servers;
operations: Operations;
}

@@ -219,3 +219,3 @@ /*

/** Live message of list gateway. Status: 0 - Live */
status?: "undefined";
status?: 0;
}

@@ -407,3 +407,4 @@

/** Properties of Analysis Services resource. */
export type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
export interface AnalysisServicesServerProperties
extends AnalysisServicesServerMutableProperties {
/**

@@ -426,6 +427,6 @@ * The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.

sku?: ResourceSku;
};
}
/** Represents an instance of an Analysis Services resource. */
export type AnalysisServicesServer = Resource & {
export interface AnalysisServicesServer extends Resource {
/** A collection of AS server administrators */

@@ -462,17 +463,29 @@ asAdministrators?: ServerAdministrators;

skuPropertiesSku?: ResourceSku;
};
}
/** Known values of {@link State} that the service accepts. */
export enum KnownState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -503,13 +516,25 @@ }

export enum KnownProvisioningState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -540,4 +565,7 @@ }

export enum KnownSkuTier {
/** Development */
Development = "Development",
/** Basic */
Basic = "Basic",
/** Standard */
Standard = "Standard"

@@ -544,0 +572,0 @@ }

@@ -222,6 +222,8 @@ /*

);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}

@@ -311,6 +313,8 @@

);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}

@@ -400,6 +404,8 @@

);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}

@@ -488,6 +494,8 @@

);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}

@@ -573,6 +581,8 @@

);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}

@@ -579,0 +589,0 @@

@@ -12,3 +12,6 @@ {

"forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"],
"lib": [
"es6",
"dom"
],
"declaration": true,

@@ -18,4 +21,9 @@ "outDir": "./dist-esm",

},
"include": ["./src/**/*.ts", "./test/**/*.ts"],
"exclude": ["node_modules"]
}
"include": [
"./src/**/*.ts",
"./test/**/*.ts"
],
"exclude": [
"node_modules"
]
}

@@ -8,3 +8,3 @@ import * as coreAuth from '@azure/core-auth';

/** Represents an instance of an Analysis Services resource. */
export declare type AnalysisServicesServer = Resource & {
export declare interface AnalysisServicesServer extends Resource {
/** A collection of AS server administrators */

@@ -41,3 +41,3 @@ asAdministrators?: ServerAdministrators;

skuPropertiesSku?: ResourceSku;
};
}

@@ -63,3 +63,3 @@ /** An object that represents a set of mutable Analysis Services resource properties. */

/** Properties of Analysis Services resource. */
export declare type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
export declare interface AnalysisServicesServerProperties extends AnalysisServicesServerMutableProperties {
/**

@@ -82,3 +82,3 @@ * The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.

sku?: ResourceSku;
};
}

@@ -127,2 +127,4 @@ /** An array of Analysis Services resources. */

constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureAnalysisServicesOptionalParams);
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
private addCustomApiVersionPolicy;
servers: Servers;

@@ -252,3 +254,3 @@ operations: Operations;

/** Live message of list gateway. Status: 0 - Live */
status?: "undefined";
status?: 0;
}

@@ -276,13 +278,25 @@

export declare enum KnownProvisioningState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -293,4 +307,7 @@ }

export declare enum KnownSkuTier {
/** Development */
Development = "Development",
/** Basic */
Basic = "Basic",
/** Standard */
Standard = "Standard"

@@ -301,13 +318,25 @@ }

export declare enum KnownState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"

@@ -314,0 +343,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc