@azure/arm-vmwarecloudsimple 3.1.1-alpha.20250717.1 → 3.1.1-alpha.20250730.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/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/operations/customizationPolicies.js +23 -40
- package/dist/browser/operations/customizationPolicies.js.map +1 -1
- package/dist/browser/operations/dedicatedCloudNodes.js +56 -85
- package/dist/browser/operations/dedicatedCloudNodes.js.map +1 -1
- package/dist/browser/operations/dedicatedCloudServices.js +56 -85
- package/dist/browser/operations/dedicatedCloudServices.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/privateClouds.js +23 -40
- package/dist/browser/operations/privateClouds.js.map +1 -1
- package/dist/browser/operations/resourcePools.js +23 -40
- package/dist/browser/operations/resourcePools.js.map +1 -1
- package/dist/browser/operations/skusAvailability.js +23 -40
- package/dist/browser/operations/skusAvailability.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/operations/virtualMachineTemplates.js +23 -40
- package/dist/browser/operations/virtualMachineTemplates.js.map +1 -1
- package/dist/browser/operations/virtualMachines.js +100 -109
- package/dist/browser/operations/virtualMachines.js.map +1 -1
- package/dist/browser/operations/virtualNetworks.js +23 -40
- package/dist/browser/operations/virtualNetworks.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/vMwareCloudSimple.js +24 -5
- package/dist/browser/vMwareCloudSimple.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/operations/customizationPolicies.js +23 -39
- package/dist/commonjs/operations/customizationPolicies.js.map +1 -1
- package/dist/commonjs/operations/dedicatedCloudNodes.js +56 -84
- package/dist/commonjs/operations/dedicatedCloudNodes.js.map +1 -1
- package/dist/commonjs/operations/dedicatedCloudServices.js +56 -84
- package/dist/commonjs/operations/dedicatedCloudServices.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/privateClouds.js +23 -39
- package/dist/commonjs/operations/privateClouds.js.map +1 -1
- package/dist/commonjs/operations/resourcePools.js +23 -39
- package/dist/commonjs/operations/resourcePools.js.map +1 -1
- package/dist/commonjs/operations/skusAvailability.js +23 -39
- package/dist/commonjs/operations/skusAvailability.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/operations/virtualMachineTemplates.js +23 -39
- package/dist/commonjs/operations/virtualMachineTemplates.js.map +1 -1
- package/dist/commonjs/operations/virtualMachines.js +100 -108
- package/dist/commonjs/operations/virtualMachines.js.map +1 -1
- package/dist/commonjs/operations/virtualNetworks.js +23 -39
- package/dist/commonjs/operations/virtualNetworks.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/commonjs/vMwareCloudSimple.js +24 -5
- package/dist/commonjs/vMwareCloudSimple.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/operations/customizationPolicies.js +23 -40
- package/dist/esm/operations/customizationPolicies.js.map +1 -1
- package/dist/esm/operations/dedicatedCloudNodes.js +56 -85
- package/dist/esm/operations/dedicatedCloudNodes.js.map +1 -1
- package/dist/esm/operations/dedicatedCloudServices.js +56 -85
- package/dist/esm/operations/dedicatedCloudServices.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/privateClouds.js +23 -40
- package/dist/esm/operations/privateClouds.js.map +1 -1
- package/dist/esm/operations/resourcePools.js +23 -40
- package/dist/esm/operations/resourcePools.js.map +1 -1
- package/dist/esm/operations/skusAvailability.js +23 -40
- package/dist/esm/operations/skusAvailability.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/operations/virtualMachineTemplates.js +23 -40
- package/dist/esm/operations/virtualMachineTemplates.js.map +1 -1
- package/dist/esm/operations/virtualMachines.js +100 -109
- package/dist/esm/operations/virtualMachines.js.map +1 -1
- package/dist/esm/operations/virtualNetworks.js +23 -40
- package/dist/esm/operations/virtualNetworks.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/vMwareCloudSimple.js +24 -5
- package/dist/esm/vMwareCloudSimple.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/operations/customizationPolicies.js +23 -40
- package/dist/react-native/operations/customizationPolicies.js.map +1 -1
- package/dist/react-native/operations/dedicatedCloudNodes.js +56 -85
- package/dist/react-native/operations/dedicatedCloudNodes.js.map +1 -1
- package/dist/react-native/operations/dedicatedCloudServices.js +56 -85
- package/dist/react-native/operations/dedicatedCloudServices.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/privateClouds.js +23 -40
- package/dist/react-native/operations/privateClouds.js.map +1 -1
- package/dist/react-native/operations/resourcePools.js +23 -40
- package/dist/react-native/operations/resourcePools.js.map +1 -1
- package/dist/react-native/operations/skusAvailability.js +23 -40
- package/dist/react-native/operations/skusAvailability.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/operations/virtualMachineTemplates.js +23 -40
- package/dist/react-native/operations/virtualMachineTemplates.js.map +1 -1
- package/dist/react-native/operations/virtualMachines.js +100 -109
- package/dist/react-native/operations/virtualMachines.js.map +1 -1
- package/dist/react-native/operations/virtualNetworks.js +23 -40
- package/dist/react-native/operations/virtualNetworks.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/vMwareCloudSimple.js +24 -5
- package/dist/react-native/vMwareCloudSimple.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-vmwarecloudsimple-node.api.md +1104 -1104
|
@@ -5,7 +5,6 @@
|
|
|
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 { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing VirtualNetworks operations. */
|
|
15
14
|
export class VirtualNetworksImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class VirtualNetworks class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -37,52 +37,35 @@ export class VirtualNetworksImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listPagingPage(regionId, pcName, resourcePoolName, options, settings);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listPagingPage(regionId, pcName, resourcePoolName, options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
47
|
+
async *listPagingPage(regionId, pcName, resourcePoolName, options, settings) {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings?.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = await this._list(regionId, pcName, resourcePoolName, options);
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield page;
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = await this._listNext(regionId, pcName, continuationToken, options);
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
|
-
listPagingAll(regionId, pcName, resourcePoolName, options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(regionId, pcName, resourcePoolName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
65
|
+
async *listPagingAll(regionId, pcName, resourcePoolName, options) {
|
|
66
|
+
for await (const page of this.listPagingPage(regionId, pcName, resourcePoolName, options)) {
|
|
67
|
+
yield* page;
|
|
68
|
+
}
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* Return list of virtual networks in location for private cloud
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualNetworks.js","sourceRoot":"","sources":["../../../src/operations/virtualNetworks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,QAAgB,EAChB,MAAc,EACd,gBAAwB,EACxB,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAC7B,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,OAAO,CACR,CAAC;QACF,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,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAA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,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,wJAAwJ;IAC1J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,kBAAkB;KAC9B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,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,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;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 { VirtualNetworks } 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 { VMwareCloudSimple } from \"../vMwareCloudSimple.js\";\nimport {\n VirtualNetwork,\n VirtualNetworksListNextOptionalParams,\n VirtualNetworksListOptionalParams,\n VirtualNetworksListResponse,\n VirtualNetworksGetOptionalParams,\n VirtualNetworksGetResponse,\n VirtualNetworksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing VirtualNetworks operations. */\nexport class VirtualNetworksImpl implements VirtualNetworks {\n private readonly client: VMwareCloudSimple;\n\n /**\n * Initialize a new instance of the class VirtualNetworks class.\n * @param client Reference to the service client\n */\n constructor(client: VMwareCloudSimple) {\n this.client = client;\n }\n\n /**\n * Return list of virtual networks in location for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual networks\n * @param options The options parameters.\n */\n public list(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): PagedAsyncIterableIterator<VirtualNetwork> {\n const iter = this.listPagingAll(\n regionId,\n pcName,\n resourcePoolName,\n options\n );\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(\n regionId,\n pcName,\n resourcePoolName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<VirtualNetwork[]> {\n let result: VirtualNetworksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(regionId, pcName, resourcePoolName, 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(\n regionId,\n pcName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): AsyncIterableIterator<VirtualNetwork> {\n for await (const page of this.listPagingPage(\n regionId,\n pcName,\n resourcePoolName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Return list of virtual networks in location for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual networks\n * @param options The options parameters.\n */\n private _list(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): Promise<VirtualNetworksListResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, resourcePoolName, options },\n listOperationSpec\n );\n }\n\n /**\n * Return virtual network by its name\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param virtualNetworkName virtual network id (vsphereId)\n * @param options The options parameters.\n */\n get(\n regionId: string,\n pcName: string,\n virtualNetworkName: string,\n options?: VirtualNetworksGetOptionalParams\n ): Promise<VirtualNetworksGetResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, virtualNetworkName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\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 regionId: string,\n pcName: string,\n nextLink: string,\n options?: VirtualNetworksListNextOptionalParams\n ): Promise<VirtualNetworksListNextResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, 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.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetworkListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.resourcePoolName1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks/{virtualNetworkName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetwork\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName,\n Parameters.virtualNetworkName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetworkListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.nextLink,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"virtualNetworks.js","sourceRoot":"","sources":["../../../src/operations/virtualNetworks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,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,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,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,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;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 { VirtualNetworks } 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 { VMwareCloudSimple } from \"../vMwareCloudSimple.js\";\nimport {\n VirtualNetwork,\n VirtualNetworksListNextOptionalParams,\n VirtualNetworksListOptionalParams,\n VirtualNetworksListResponse,\n VirtualNetworksGetOptionalParams,\n VirtualNetworksGetResponse,\n VirtualNetworksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing VirtualNetworks operations. */\nexport class VirtualNetworksImpl implements VirtualNetworks {\n private readonly client: VMwareCloudSimple;\n\n /**\n * Initialize a new instance of the class VirtualNetworks class.\n * @param client Reference to the service client\n */\n constructor(client: VMwareCloudSimple) {\n this.client = client;\n }\n\n /**\n * Return list of virtual networks in location for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual networks\n * @param options The options parameters.\n */\n public list(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): PagedAsyncIterableIterator<VirtualNetwork> {\n const iter = this.listPagingAll(\n regionId,\n pcName,\n resourcePoolName,\n options\n );\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(\n regionId,\n pcName,\n resourcePoolName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<VirtualNetwork[]> {\n let result: VirtualNetworksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(regionId, pcName, resourcePoolName, 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(\n regionId,\n pcName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): AsyncIterableIterator<VirtualNetwork> {\n for await (const page of this.listPagingPage(\n regionId,\n pcName,\n resourcePoolName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Return list of virtual networks in location for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual networks\n * @param options The options parameters.\n */\n private _list(\n regionId: string,\n pcName: string,\n resourcePoolName: string,\n options?: VirtualNetworksListOptionalParams\n ): Promise<VirtualNetworksListResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, resourcePoolName, options },\n listOperationSpec\n );\n }\n\n /**\n * Return virtual network by its name\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param virtualNetworkName virtual network id (vsphereId)\n * @param options The options parameters.\n */\n get(\n regionId: string,\n pcName: string,\n virtualNetworkName: string,\n options?: VirtualNetworksGetOptionalParams\n ): Promise<VirtualNetworksGetResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, virtualNetworkName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\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 regionId: string,\n pcName: string,\n nextLink: string,\n options?: VirtualNetworksListNextOptionalParams\n ): Promise<VirtualNetworksListNextResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, 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.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetworkListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.resourcePoolName1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks/{virtualNetworkName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetwork\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName,\n Parameters.virtualNetworkName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VirtualNetworkListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.nextLink,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,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,MAAM,UAAU,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"]}
|
|
@@ -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, DedicatedCloudNodesImpl, DedicatedCloudServicesImpl, SkusAvailabilityImpl, PrivateCloudsImpl, CustomizationPoliciesImpl, ResourcePoolsImpl, VirtualMachineTemplatesImpl, VirtualNetworksImpl, UsagesImpl, VirtualMachinesImpl } from "./operations/index.js";
|
|
11
11
|
export class VMwareCloudSimple extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the VMwareCloudSimple class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -16,7 +19,6 @@ export class VMwareCloudSimple 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 VMwareCloudSimple 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 VMwareCloudSimple 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
|
}
|
|
@@ -103,5 +111,16 @@ export class VMwareCloudSimple extends coreClient.ServiceClient {
|
|
|
103
111
|
};
|
|
104
112
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
105
113
|
}
|
|
114
|
+
operations;
|
|
115
|
+
dedicatedCloudNodes;
|
|
116
|
+
dedicatedCloudServices;
|
|
117
|
+
skusAvailability;
|
|
118
|
+
privateClouds;
|
|
119
|
+
customizationPolicies;
|
|
120
|
+
resourcePools;
|
|
121
|
+
virtualMachineTemplates;
|
|
122
|
+
virtualNetworks;
|
|
123
|
+
usages;
|
|
124
|
+
virtualMachines;
|
|
106
125
|
}
|
|
107
126
|
//# sourceMappingURL=vMwareCloudSimple.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vMwareCloudSimple.js","sourceRoot":"","sources":["../../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AAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,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;CAaF","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 {\n OperationsImpl,\n DedicatedCloudNodesImpl,\n DedicatedCloudServicesImpl,\n SkusAvailabilityImpl,\n PrivateCloudsImpl,\n CustomizationPoliciesImpl,\n ResourcePoolsImpl,\n VirtualMachineTemplatesImpl,\n VirtualNetworksImpl,\n UsagesImpl,\n VirtualMachinesImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n DedicatedCloudNodes,\n DedicatedCloudServices,\n SkusAvailability,\n PrivateClouds,\n CustomizationPolicies,\n ResourcePools,\n VirtualMachineTemplates,\n VirtualNetworks,\n Usages,\n VirtualMachines\n} from \"./operationsInterfaces/index.js\";\nimport { VMwareCloudSimpleOptionalParams } from \"./models/index.js\";\n\nexport class VMwareCloudSimple extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the VMwareCloudSimple class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: VMwareCloudSimpleOptionalParams\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: VMwareCloudSimpleOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.1.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 || \"2019-04-01\";\n this.operations = new OperationsImpl(this);\n this.dedicatedCloudNodes = new DedicatedCloudNodesImpl(this);\n this.dedicatedCloudServices = new DedicatedCloudServicesImpl(this);\n this.skusAvailability = new SkusAvailabilityImpl(this);\n this.privateClouds = new PrivateCloudsImpl(this);\n this.customizationPolicies = new CustomizationPoliciesImpl(this);\n this.resourcePools = new ResourcePoolsImpl(this);\n this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this);\n this.virtualNetworks = new VirtualNetworksImpl(this);\n this.usages = new UsagesImpl(this);\n this.virtualMachines = new VirtualMachinesImpl(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 dedicatedCloudNodes: DedicatedCloudNodes;\n dedicatedCloudServices: DedicatedCloudServices;\n skusAvailability: SkusAvailability;\n privateClouds: PrivateClouds;\n customizationPolicies: CustomizationPolicies;\n resourcePools: ResourcePools;\n virtualMachineTemplates: VirtualMachineTemplates;\n virtualNetworks: VirtualNetworks;\n usages: Usages;\n virtualMachines: VirtualMachines;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vMwareCloudSimple.js","sourceRoot":"","sources":["../../src/vMwareCloudSimple.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAgB/B,MAAM,OAAO,iBAAkB,SAAQ,UAAU,CAAC,aAAa;IAC7D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAyC;QAEzC,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,GAAoC;YAChD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc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AAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,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,mBAAmB,CAAsB;IACzC,sBAAsB,CAAyB;IAC/C,gBAAgB,CAAmB;IACnC,aAAa,CAAgB;IAC7B,qBAAqB,CAAwB;IAC7C,aAAa,CAAgB;IAC7B,uBAAuB,CAA0B;IACjD,eAAe,CAAkB;IACjC,MAAM,CAAS;IACf,eAAe,CAAkB;CAClC","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 {\n OperationsImpl,\n DedicatedCloudNodesImpl,\n DedicatedCloudServicesImpl,\n SkusAvailabilityImpl,\n PrivateCloudsImpl,\n CustomizationPoliciesImpl,\n ResourcePoolsImpl,\n VirtualMachineTemplatesImpl,\n VirtualNetworksImpl,\n UsagesImpl,\n VirtualMachinesImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n DedicatedCloudNodes,\n DedicatedCloudServices,\n SkusAvailability,\n PrivateClouds,\n CustomizationPolicies,\n ResourcePools,\n VirtualMachineTemplates,\n VirtualNetworks,\n Usages,\n VirtualMachines\n} from \"./operationsInterfaces/index.js\";\nimport { VMwareCloudSimpleOptionalParams } from \"./models/index.js\";\n\nexport class VMwareCloudSimple extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the VMwareCloudSimple class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: VMwareCloudSimpleOptionalParams\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: VMwareCloudSimpleOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.1.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 || \"2019-04-01\";\n this.operations = new OperationsImpl(this);\n this.dedicatedCloudNodes = new DedicatedCloudNodesImpl(this);\n this.dedicatedCloudServices = new DedicatedCloudServicesImpl(this);\n this.skusAvailability = new SkusAvailabilityImpl(this);\n this.privateClouds = new PrivateCloudsImpl(this);\n this.customizationPolicies = new CustomizationPoliciesImpl(this);\n this.resourcePools = new ResourcePoolsImpl(this);\n this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this);\n this.virtualNetworks = new VirtualNetworksImpl(this);\n this.usages = new UsagesImpl(this);\n this.virtualMachines = new VirtualMachinesImpl(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 dedicatedCloudNodes: DedicatedCloudNodes;\n dedicatedCloudServices: DedicatedCloudServices;\n skusAvailability: SkusAvailability;\n privateClouds: PrivateClouds;\n customizationPolicies: CustomizationPolicies;\n resourcePools: ResourcePools;\n virtualMachineTemplates: VirtualMachineTemplates;\n virtualNetworks: VirtualNetworks;\n usages: Usages;\n virtualMachines: VirtualMachines;\n}\n"]}
|
package/dist/commonjs/lroImpl.js
CHANGED
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.LroImpl = void 0;
|
|
11
|
-
const tslib_1 = require("tslib");
|
|
12
11
|
class LroImpl {
|
|
12
|
+
sendOperationFn;
|
|
13
|
+
args;
|
|
14
|
+
spec;
|
|
15
|
+
requestPath;
|
|
16
|
+
requestMethod;
|
|
13
17
|
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
14
18
|
this.sendOperationFn = sendOperationFn;
|
|
15
19
|
this.args = args;
|
|
@@ -21,8 +25,12 @@ class LroImpl {
|
|
|
21
25
|
return this.sendOperationFn(this.args, this.spec);
|
|
22
26
|
}
|
|
23
27
|
async sendPollRequest(path) {
|
|
24
|
-
const
|
|
25
|
-
return this.sendOperationFn(this.args,
|
|
28
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
29
|
+
return this.sendOperationFn(this.args, {
|
|
30
|
+
...restSpec,
|
|
31
|
+
path,
|
|
32
|
+
httpMethod: "GET"
|
|
33
|
+
});
|
|
26
34
|
}
|
|
27
35
|
}
|
|
28
36
|
exports.LroImpl = LroImpl;
|
|
@@ -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,MAAa,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;AAvBD,0BAuBC","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"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing CustomizationPolicies operations. */
|
|
18
18
|
class CustomizationPoliciesImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class CustomizationPolicies class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -39,52 +40,35 @@ class CustomizationPoliciesImpl {
|
|
|
39
40
|
return this;
|
|
40
41
|
},
|
|
41
42
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
43
|
+
if (settings?.maxPageSize) {
|
|
43
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
45
|
}
|
|
45
46
|
return this.listPagingPage(regionId, pcName, options, settings);
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
listPagingPage(regionId, pcName, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
50
|
+
async *listPagingPage(regionId, pcName, options, settings) {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings?.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = await this._list(regionId, pcName, options);
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield page;
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = await this._listNext(regionId, pcName, continuationToken, options);
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
68
67
|
}
|
|
69
|
-
listPagingAll(regionId, pcName, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(regionId, pcName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
68
|
+
async *listPagingAll(regionId, pcName, options) {
|
|
69
|
+
for await (const page of this.listPagingPage(regionId, pcName, options)) {
|
|
70
|
+
yield* page;
|
|
71
|
+
}
|
|
88
72
|
}
|
|
89
73
|
/**
|
|
90
74
|
* Returns list of customization policies in region for private cloud
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customizationPolicies.js","sourceRoot":"","sources":["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AU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,uBAAuB;KACnC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,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,iCAAiC;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;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 { CustomizationPolicies } 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 { VMwareCloudSimple } from \"../vMwareCloudSimple.js\";\nimport {\n CustomizationPolicy,\n CustomizationPoliciesListNextOptionalParams,\n CustomizationPoliciesListOptionalParams,\n CustomizationPoliciesListOperationResponse,\n CustomizationPoliciesGetOptionalParams,\n CustomizationPoliciesGetResponse,\n CustomizationPoliciesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing CustomizationPolicies operations. */\nexport class CustomizationPoliciesImpl implements CustomizationPolicies {\n private readonly client: VMwareCloudSimple;\n\n /**\n * Initialize a new instance of the class CustomizationPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: VMwareCloudSimple) {\n this.client = client;\n }\n\n /**\n * Returns list of customization policies in region for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param options The options parameters.\n */\n public list(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): PagedAsyncIterableIterator<CustomizationPolicy> {\n const iter = this.listPagingAll(regionId, pcName, 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(regionId, pcName, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<CustomizationPolicy[]> {\n let result: CustomizationPoliciesListOperationResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(regionId, pcName, 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(\n regionId,\n pcName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): AsyncIterableIterator<CustomizationPolicy> {\n for await (const page of this.listPagingPage(regionId, pcName, options)) {\n yield* page;\n }\n }\n\n /**\n * Returns list of customization policies in region for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param options The options parameters.\n */\n private _list(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): Promise<CustomizationPoliciesListOperationResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, options },\n listOperationSpec\n );\n }\n\n /**\n * Returns customization policy by its name\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param customizationPolicyName customization policy name\n * @param options The options parameters.\n */\n get(\n regionId: string,\n pcName: string,\n customizationPolicyName: string,\n options?: CustomizationPoliciesGetOptionalParams\n ): Promise<CustomizationPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, customizationPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\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 regionId: string,\n pcName: string,\n nextLink: string,\n options?: CustomizationPoliciesListNextOptionalParams\n ): Promise<CustomizationPoliciesListNextResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, 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.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPoliciesListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies/{customizationPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPolicy\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName,\n Parameters.customizationPolicyName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPoliciesListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.nextLink,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"customizationPolicies.js","sourceRoot":"","sources":["../../../src/operations/customizationPolicies.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAa,yBAAyB;IACnB,MAAM,CAAoB;IAE3C;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,QAAgB,EAChB,MAAc,EACd,OAAiD;QAEjD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3D,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,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,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,EACF,mKAAmK;IACrK,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,uBAAuB;KACnC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,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,iCAAiC;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;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 { CustomizationPolicies } 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 { VMwareCloudSimple } from \"../vMwareCloudSimple.js\";\nimport {\n CustomizationPolicy,\n CustomizationPoliciesListNextOptionalParams,\n CustomizationPoliciesListOptionalParams,\n CustomizationPoliciesListOperationResponse,\n CustomizationPoliciesGetOptionalParams,\n CustomizationPoliciesGetResponse,\n CustomizationPoliciesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing CustomizationPolicies operations. */\nexport class CustomizationPoliciesImpl implements CustomizationPolicies {\n private readonly client: VMwareCloudSimple;\n\n /**\n * Initialize a new instance of the class CustomizationPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: VMwareCloudSimple) {\n this.client = client;\n }\n\n /**\n * Returns list of customization policies in region for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param options The options parameters.\n */\n public list(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): PagedAsyncIterableIterator<CustomizationPolicy> {\n const iter = this.listPagingAll(regionId, pcName, 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(regionId, pcName, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<CustomizationPolicy[]> {\n let result: CustomizationPoliciesListOperationResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(regionId, pcName, 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(\n regionId,\n pcName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): AsyncIterableIterator<CustomizationPolicy> {\n for await (const page of this.listPagingPage(regionId, pcName, options)) {\n yield* page;\n }\n }\n\n /**\n * Returns list of customization policies in region for private cloud\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param options The options parameters.\n */\n private _list(\n regionId: string,\n pcName: string,\n options?: CustomizationPoliciesListOptionalParams\n ): Promise<CustomizationPoliciesListOperationResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, options },\n listOperationSpec\n );\n }\n\n /**\n * Returns customization policy by its name\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\n * @param customizationPolicyName customization policy name\n * @param options The options parameters.\n */\n get(\n regionId: string,\n pcName: string,\n customizationPolicyName: string,\n options?: CustomizationPoliciesGetOptionalParams\n ): Promise<CustomizationPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, customizationPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param regionId The region Id (westus, eastus)\n * @param pcName The private cloud name\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 regionId: string,\n pcName: string,\n nextLink: string,\n options?: CustomizationPoliciesListNextOptionalParams\n ): Promise<CustomizationPoliciesListNextResponse> {\n return this.client.sendOperationRequest(\n { regionId, pcName, 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.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPoliciesListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies/{customizationPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPolicy\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.pcName,\n Parameters.customizationPolicyName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CustomizationPoliciesListResponse\n },\n default: {\n bodyMapper: Mappers.CsrpError\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.regionId,\n Parameters.nextLink,\n Parameters.pcName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|