@azure/arm-loadtesting 1.0.1-alpha.20250718.1 → 1.0.1-alpha.20250721.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/loadTestClient.js +16 -5
- package/dist/browser/loadTestClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +47 -21
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/loadTests.js +100 -136
- package/dist/browser/operations/loadTests.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/quotas.js +23 -40
- package/dist/browser/operations/quotas.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/loadTestClient.js +16 -5
- package/dist/commonjs/loadTestClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +47 -21
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/loadTests.js +100 -135
- package/dist/commonjs/operations/loadTests.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/quotas.js +23 -39
- package/dist/commonjs/operations/quotas.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/loadTestClient.js +16 -5
- package/dist/esm/loadTestClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +47 -21
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/loadTests.js +100 -136
- package/dist/esm/operations/loadTests.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/quotas.js +23 -40
- package/dist/esm/operations/quotas.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/loadTestClient.js +16 -5
- package/dist/react-native/loadTestClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +47 -21
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/loadTests.js +100 -136
- package/dist/react-native/operations/loadTests.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/quotas.js +23 -40
- package/dist/react-native/operations/quotas.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-loadtesting-node.api.md +437 -437
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAiB;IAExC;;;OAGG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,G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IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { LoadTestClient } from \"../loadTestClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: LoadTestClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: LoadTestClient) {\n this.client = client;\n }\n\n /**\n * Lists all the available API operations for Load Test Resource.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the available API operations for Load Test Resource.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.LoadTestService/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing Quotas operations. */
|
|
18
18
|
class QuotasImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class Quotas class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -38,52 +39,35 @@ class QuotasImpl {
|
|
|
38
39
|
return this;
|
|
39
40
|
},
|
|
40
41
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
44
|
}
|
|
44
45
|
return this.listPagingPage(location, options, settings);
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
listPagingPage(location, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
49
|
+
async *listPagingPage(location, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._list(location, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listNext(location, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
|
-
listPagingAll(location, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
67
|
+
async *listPagingAll(location, options) {
|
|
68
|
+
for await (const page of this.listPagingPage(location, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
73
|
* Lists all the available quota per region per subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotas.js","sourceRoot":"","sources":["../../../src/operations/quotas.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;IAGrB;;;OAGG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,QAAgB,EAChB,OAAkC;QAElC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACnD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR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AC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Quotas } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { LoadTestClient } from \"../loadTestClient.js\";\nimport {\n QuotaResource,\n QuotasListNextOptionalParams,\n QuotasListOptionalParams,\n QuotasListResponse,\n QuotasGetOptionalParams,\n QuotasGetResponse,\n QuotaBucketRequest,\n QuotasCheckAvailabilityOptionalParams,\n QuotasCheckAvailabilityResponse,\n QuotasListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Quotas operations. */\nexport class QuotasImpl implements Quotas {\n private readonly client: LoadTestClient;\n\n /**\n * Initialize a new instance of the class Quotas class.\n * @param client Reference to the service client\n */\n constructor(client: LoadTestClient) {\n this.client = client;\n }\n\n /**\n * Lists all the available quota per region per subscription.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n public list(\n location: string,\n options?: QuotasListOptionalParams\n ): PagedAsyncIterableIterator<QuotaResource> {\n const iter = this.listPagingAll(location, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n location: string,\n options?: QuotasListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaResource[]> {\n let result: QuotasListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(location, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n location: string,\n options?: QuotasListOptionalParams\n ): AsyncIterableIterator<QuotaResource> {\n for await (const page of this.listPagingPage(location, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the available quota per region per subscription.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n options?: QuotasListOptionalParams\n ): Promise<QuotasListResponse> {\n return this.client.sendOperationRequest(\n { location, options },\n listOperationSpec\n );\n }\n\n /**\n * Get the available quota for a quota bucket per region per subscription.\n * @param location The name of Azure region.\n * @param quotaBucketName Quota Bucket name.\n * @param options The options parameters.\n */\n get(\n location: string,\n quotaBucketName: string,\n options?: QuotasGetOptionalParams\n ): Promise<QuotasGetResponse> {\n return this.client.sendOperationRequest(\n { location, quotaBucketName, options },\n getOperationSpec\n );\n }\n\n /**\n * Check Quota Availability on quota bucket per region per subscription.\n * @param location The name of Azure region.\n * @param quotaBucketName Quota Bucket name.\n * @param quotaBucketRequest Quota Bucket Request data\n * @param options The options parameters.\n */\n checkAvailability(\n location: string,\n quotaBucketName: string,\n quotaBucketRequest: QuotaBucketRequest,\n options?: QuotasCheckAvailabilityOptionalParams\n ): Promise<QuotasCheckAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { location, quotaBucketName, quotaBucketRequest, options },\n checkAvailabilityOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param location The name of Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n location: string,\n nextLink: string,\n options?: QuotasListNextOptionalParams\n ): Promise<QuotasListNextResponse> {\n return this.client.sendOperationRequest(\n { location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResourceList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResource\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.quotaBucketName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst checkAvailabilityOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}/checkAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckQuotaAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.quotaBucketRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.quotaBucketName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResourceList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"quotas.js","sourceRoot":"","sources":["../../../src/operations/quotas.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;IACJ,MAAM,CAAiB;IAExC;;;OAGG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,QAAgB,EAChB,OAAkC;QAElC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACnD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW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,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Quotas } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { LoadTestClient } from \"../loadTestClient.js\";\nimport {\n QuotaResource,\n QuotasListNextOptionalParams,\n QuotasListOptionalParams,\n QuotasListResponse,\n QuotasGetOptionalParams,\n QuotasGetResponse,\n QuotaBucketRequest,\n QuotasCheckAvailabilityOptionalParams,\n QuotasCheckAvailabilityResponse,\n QuotasListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Quotas operations. */\nexport class QuotasImpl implements Quotas {\n private readonly client: LoadTestClient;\n\n /**\n * Initialize a new instance of the class Quotas class.\n * @param client Reference to the service client\n */\n constructor(client: LoadTestClient) {\n this.client = client;\n }\n\n /**\n * Lists all the available quota per region per subscription.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n public list(\n location: string,\n options?: QuotasListOptionalParams\n ): PagedAsyncIterableIterator<QuotaResource> {\n const iter = this.listPagingAll(location, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n location: string,\n options?: QuotasListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaResource[]> {\n let result: QuotasListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(location, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n location: string,\n options?: QuotasListOptionalParams\n ): AsyncIterableIterator<QuotaResource> {\n for await (const page of this.listPagingPage(location, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the available quota per region per subscription.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n options?: QuotasListOptionalParams\n ): Promise<QuotasListResponse> {\n return this.client.sendOperationRequest(\n { location, options },\n listOperationSpec\n );\n }\n\n /**\n * Get the available quota for a quota bucket per region per subscription.\n * @param location The name of Azure region.\n * @param quotaBucketName Quota Bucket name.\n * @param options The options parameters.\n */\n get(\n location: string,\n quotaBucketName: string,\n options?: QuotasGetOptionalParams\n ): Promise<QuotasGetResponse> {\n return this.client.sendOperationRequest(\n { location, quotaBucketName, options },\n getOperationSpec\n );\n }\n\n /**\n * Check Quota Availability on quota bucket per region per subscription.\n * @param location The name of Azure region.\n * @param quotaBucketName Quota Bucket name.\n * @param quotaBucketRequest Quota Bucket Request data\n * @param options The options parameters.\n */\n checkAvailability(\n location: string,\n quotaBucketName: string,\n quotaBucketRequest: QuotaBucketRequest,\n options?: QuotasCheckAvailabilityOptionalParams\n ): Promise<QuotasCheckAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { location, quotaBucketName, quotaBucketRequest, options },\n checkAvailabilityOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param location The name of Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n location: string,\n nextLink: string,\n options?: QuotasListNextOptionalParams\n ): Promise<QuotasListNextResponse> {\n return this.client.sendOperationRequest(\n { location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResourceList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResource\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.quotaBucketName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst checkAvailabilityOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}/checkAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckQuotaAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.quotaBucketRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.quotaBucketName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaResourceList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -18,18 +18,16 @@ const pageMap = new WeakMap();
|
|
|
18
18
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
19
19
|
*/
|
|
20
20
|
function getContinuationToken(page) {
|
|
21
|
-
var _a;
|
|
22
21
|
if (typeof page !== "object" || page === null) {
|
|
23
22
|
return undefined;
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return pageMap.get(page)?.continuationToken;
|
|
26
25
|
}
|
|
27
26
|
function setContinuationToken(page, continuationToken) {
|
|
28
|
-
var _a;
|
|
29
27
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
32
|
-
const pageInfo =
|
|
30
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
33
31
|
pageInfo.continuationToken = continuationToken;
|
|
34
32
|
pageMap.set(page, pageInfo);
|
|
35
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.8"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { OperationsImpl, QuotasImpl, LoadTestsImpl } from "./operations/index.js";
|
|
11
11
|
export class LoadTestClient extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the LoadTestClient class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -16,7 +19,6 @@ export class LoadTestClient extends coreClient.ServiceClient {
|
|
|
16
19
|
* @param options The parameter options
|
|
17
20
|
*/
|
|
18
21
|
constructor(credentials, subscriptionId, options) {
|
|
19
|
-
var _a, _b, _c;
|
|
20
22
|
if (credentials === undefined) {
|
|
21
23
|
throw new Error("'credentials' cannot be null");
|
|
22
24
|
}
|
|
@@ -35,12 +37,17 @@ export class LoadTestClient extends coreClient.ServiceClient {
|
|
|
35
37
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
38
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
39
|
: `${packageDetails}`;
|
|
38
|
-
const optionsWithDefaults =
|
|
40
|
+
const optionsWithDefaults = {
|
|
41
|
+
...defaults,
|
|
42
|
+
...options,
|
|
43
|
+
userAgentOptions: {
|
|
39
44
|
userAgentPrefix
|
|
40
|
-
},
|
|
45
|
+
},
|
|
46
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
47
|
+
};
|
|
41
48
|
super(optionsWithDefaults);
|
|
42
49
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
-
if (
|
|
50
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
51
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
52
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
53
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -54,7 +61,8 @@ export class LoadTestClient extends coreClient.ServiceClient {
|
|
|
54
61
|
});
|
|
55
62
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
63
|
credential: credentials,
|
|
57
|
-
scopes:
|
|
64
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
65
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
58
66
|
challengeCallbacks: {
|
|
59
67
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
60
68
|
}
|
|
@@ -95,5 +103,8 @@ export class LoadTestClient extends coreClient.ServiceClient {
|
|
|
95
103
|
};
|
|
96
104
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
97
105
|
}
|
|
106
|
+
operations;
|
|
107
|
+
quotas;
|
|
108
|
+
loadTests;
|
|
98
109
|
}
|
|
99
110
|
//# sourceMappingURL=loadTestClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadTestClient.js","sourceRoot":"","sources":["../../src/loadTestClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIlF,MAAM,OAAO,cAAe,SAAQ,UAAU,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"loadTestClient.js","sourceRoot":"","sources":["../../src/loadTestClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIlF,MAAM,OAAO,cAAe,SAAQ,UAAU,CAAC,aAAa;IAC1D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAsC;QAEtC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAiC;YAC7C,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,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,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,MAAM,CAAS;IACf,SAAS,CAAY;CACtB","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl, QuotasImpl, LoadTestsImpl } from \"./operations/index.js\";\nimport { Operations, Quotas, LoadTests } from \"./operationsInterfaces/index.js\";\nimport { LoadTestClientOptionalParams } from \"./models/index.js\";\n\nexport class LoadTestClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the LoadTestClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: LoadTestClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: LoadTestClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-loadtesting/1.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2022-12-01\";\n this.operations = new OperationsImpl(this);\n this.quotas = new QuotasImpl(this);\n this.loadTests = new LoadTestsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n quotas: Quotas;\n loadTests: LoadTests;\n}\n"]}
|
package/dist/esm/lroImpl.js
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __rest } from "tslib";
|
|
9
8
|
export class LroImpl {
|
|
9
|
+
sendOperationFn;
|
|
10
|
+
args;
|
|
11
|
+
spec;
|
|
12
|
+
requestPath;
|
|
13
|
+
requestMethod;
|
|
10
14
|
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
11
15
|
this.sendOperationFn = sendOperationFn;
|
|
12
16
|
this.args = args;
|
|
@@ -18,8 +22,12 @@ export class LroImpl {
|
|
|
18
22
|
return this.sendOperationFn(this.args, this.spec);
|
|
19
23
|
}
|
|
20
24
|
async sendPollRequest(path) {
|
|
21
|
-
const
|
|
22
|
-
return this.sendOperationFn(this.args,
|
|
25
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
26
|
+
return this.sendOperationFn(this.args, {
|
|
27
|
+
...restSpec,
|
|
28
|
+
path,
|
|
29
|
+
httpMethod: "GET"
|
|
30
|
+
});
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
//# sourceMappingURL=lroImpl.js.map
|
package/dist/esm/lroImpl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
|
|
@@ -615,7 +615,9 @@ export const QuotaResource = {
|
|
|
615
615
|
type: {
|
|
616
616
|
name: "Composite",
|
|
617
617
|
className: "QuotaResource",
|
|
618
|
-
modelProperties:
|
|
618
|
+
modelProperties: {
|
|
619
|
+
...Resource.type.modelProperties,
|
|
620
|
+
limit: {
|
|
619
621
|
constraints: {
|
|
620
622
|
InclusiveMinimum: 0
|
|
621
623
|
},
|
|
@@ -623,7 +625,8 @@ export const QuotaResource = {
|
|
|
623
625
|
type: {
|
|
624
626
|
name: "Number"
|
|
625
627
|
}
|
|
626
|
-
},
|
|
628
|
+
},
|
|
629
|
+
usage: {
|
|
627
630
|
constraints: {
|
|
628
631
|
InclusiveMinimum: 0
|
|
629
632
|
},
|
|
@@ -631,20 +634,24 @@ export const QuotaResource = {
|
|
|
631
634
|
type: {
|
|
632
635
|
name: "Number"
|
|
633
636
|
}
|
|
634
|
-
},
|
|
637
|
+
},
|
|
638
|
+
provisioningState: {
|
|
635
639
|
serializedName: "properties.provisioningState",
|
|
636
640
|
readOnly: true,
|
|
637
641
|
type: {
|
|
638
642
|
name: "String"
|
|
639
643
|
}
|
|
640
|
-
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
641
646
|
}
|
|
642
647
|
};
|
|
643
648
|
export const QuotaBucketRequest = {
|
|
644
649
|
type: {
|
|
645
650
|
name: "Composite",
|
|
646
651
|
className: "QuotaBucketRequest",
|
|
647
|
-
modelProperties:
|
|
652
|
+
modelProperties: {
|
|
653
|
+
...Resource.type.modelProperties,
|
|
654
|
+
currentUsage: {
|
|
648
655
|
constraints: {
|
|
649
656
|
InclusiveMinimum: 0
|
|
650
657
|
},
|
|
@@ -652,7 +659,8 @@ export const QuotaBucketRequest = {
|
|
|
652
659
|
type: {
|
|
653
660
|
name: "Number"
|
|
654
661
|
}
|
|
655
|
-
},
|
|
662
|
+
},
|
|
663
|
+
currentQuota: {
|
|
656
664
|
constraints: {
|
|
657
665
|
InclusiveMinimum: 0
|
|
658
666
|
},
|
|
@@ -660,7 +668,8 @@ export const QuotaBucketRequest = {
|
|
|
660
668
|
type: {
|
|
661
669
|
name: "Number"
|
|
662
670
|
}
|
|
663
|
-
},
|
|
671
|
+
},
|
|
672
|
+
newQuota: {
|
|
664
673
|
constraints: {
|
|
665
674
|
InclusiveMinimum: 0
|
|
666
675
|
},
|
|
@@ -668,62 +677,75 @@ export const QuotaBucketRequest = {
|
|
|
668
677
|
type: {
|
|
669
678
|
name: "Number"
|
|
670
679
|
}
|
|
671
|
-
},
|
|
680
|
+
},
|
|
681
|
+
dimensions: {
|
|
672
682
|
serializedName: "properties.dimensions",
|
|
673
683
|
type: {
|
|
674
684
|
name: "Composite",
|
|
675
685
|
className: "QuotaBucketRequestPropertiesDimensions"
|
|
676
686
|
}
|
|
677
|
-
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
678
689
|
}
|
|
679
690
|
};
|
|
680
691
|
export const CheckQuotaAvailabilityResponse = {
|
|
681
692
|
type: {
|
|
682
693
|
name: "Composite",
|
|
683
694
|
className: "CheckQuotaAvailabilityResponse",
|
|
684
|
-
modelProperties:
|
|
695
|
+
modelProperties: {
|
|
696
|
+
...Resource.type.modelProperties,
|
|
697
|
+
isAvailable: {
|
|
685
698
|
serializedName: "properties.isAvailable",
|
|
686
699
|
type: {
|
|
687
700
|
name: "Boolean"
|
|
688
701
|
}
|
|
689
|
-
},
|
|
702
|
+
},
|
|
703
|
+
availabilityStatus: {
|
|
690
704
|
serializedName: "properties.availabilityStatus",
|
|
691
705
|
type: {
|
|
692
706
|
name: "String"
|
|
693
707
|
}
|
|
694
|
-
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
695
710
|
}
|
|
696
711
|
};
|
|
697
712
|
export const TrackedResource = {
|
|
698
713
|
type: {
|
|
699
714
|
name: "Composite",
|
|
700
715
|
className: "TrackedResource",
|
|
701
|
-
modelProperties:
|
|
716
|
+
modelProperties: {
|
|
717
|
+
...Resource.type.modelProperties,
|
|
718
|
+
tags: {
|
|
702
719
|
serializedName: "tags",
|
|
703
720
|
type: {
|
|
704
721
|
name: "Dictionary",
|
|
705
722
|
value: { type: { name: "String" } }
|
|
706
723
|
}
|
|
707
|
-
},
|
|
724
|
+
},
|
|
725
|
+
location: {
|
|
708
726
|
serializedName: "location",
|
|
709
727
|
required: true,
|
|
710
728
|
type: {
|
|
711
729
|
name: "String"
|
|
712
730
|
}
|
|
713
|
-
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
714
733
|
}
|
|
715
734
|
};
|
|
716
735
|
export const LoadTestResource = {
|
|
717
736
|
type: {
|
|
718
737
|
name: "Composite",
|
|
719
738
|
className: "LoadTestResource",
|
|
720
|
-
modelProperties:
|
|
739
|
+
modelProperties: {
|
|
740
|
+
...TrackedResource.type.modelProperties,
|
|
741
|
+
identity: {
|
|
721
742
|
serializedName: "identity",
|
|
722
743
|
type: {
|
|
723
744
|
name: "Composite",
|
|
724
745
|
className: "ManagedServiceIdentity"
|
|
725
746
|
}
|
|
726
|
-
},
|
|
747
|
+
},
|
|
748
|
+
description: {
|
|
727
749
|
constraints: {
|
|
728
750
|
MaxLength: 512
|
|
729
751
|
},
|
|
@@ -731,13 +753,15 @@ export const LoadTestResource = {
|
|
|
731
753
|
type: {
|
|
732
754
|
name: "String"
|
|
733
755
|
}
|
|
734
|
-
},
|
|
756
|
+
},
|
|
757
|
+
provisioningState: {
|
|
735
758
|
serializedName: "properties.provisioningState",
|
|
736
759
|
readOnly: true,
|
|
737
760
|
type: {
|
|
738
761
|
name: "String"
|
|
739
762
|
}
|
|
740
|
-
},
|
|
763
|
+
},
|
|
764
|
+
dataPlaneURI: {
|
|
741
765
|
constraints: {
|
|
742
766
|
MaxLength: 2083
|
|
743
767
|
},
|
|
@@ -746,13 +770,15 @@ export const LoadTestResource = {
|
|
|
746
770
|
type: {
|
|
747
771
|
name: "String"
|
|
748
772
|
}
|
|
749
|
-
},
|
|
773
|
+
},
|
|
774
|
+
encryption: {
|
|
750
775
|
serializedName: "properties.encryption",
|
|
751
776
|
type: {
|
|
752
777
|
name: "Composite",
|
|
753
778
|
className: "EncryptionProperties"
|
|
754
779
|
}
|
|
755
|
-
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
756
782
|
}
|
|
757
783
|
};
|
|
758
784
|
export const LoadTestsCreateOrUpdateHeaders = {
|