@azure/arm-connectedvmware 1.0.0-beta.1 → 1.0.0-beta.2
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/index.js +415 -175
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/clustersCreateSample.js +11 -3
- package/dist-esm/samples-dev/clustersCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersDeleteSample.js +11 -3
- package/dist-esm/samples-dev/clustersDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersGetSample.js +11 -3
- package/dist-esm/samples-dev/clustersGetSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/clustersListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersListSample.js +10 -2
- package/dist-esm/samples-dev/clustersListSample.js.map +1 -1
- package/dist-esm/samples-dev/clustersUpdateSample.js +11 -3
- package/dist-esm/samples-dev/clustersUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresCreateSample.js +11 -3
- package/dist-esm/samples-dev/datastoresCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresDeleteSample.js +11 -3
- package/dist-esm/samples-dev/datastoresDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresGetSample.js +11 -3
- package/dist-esm/samples-dev/datastoresGetSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/datastoresListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresListSample.js +10 -2
- package/dist-esm/samples-dev/datastoresListSample.js.map +1 -1
- package/dist-esm/samples-dev/datastoresUpdateSample.js +11 -3
- package/dist-esm/samples-dev/datastoresUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/guestAgentsCreateSample.js +11 -3
- package/dist-esm/samples-dev/guestAgentsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/guestAgentsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/guestAgentsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/guestAgentsGetSample.js +11 -3
- package/dist-esm/samples-dev/guestAgentsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/guestAgentsListByVMSample.js +11 -3
- package/dist-esm/samples-dev/guestAgentsListByVMSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsCreateSample.js +11 -3
- package/dist-esm/samples-dev/hostsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/hostsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsGetSample.js +11 -3
- package/dist-esm/samples-dev/hostsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/hostsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsListSample.js +10 -2
- package/dist-esm/samples-dev/hostsListSample.js.map +1 -1
- package/dist-esm/samples-dev/hostsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/hostsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridIdentityMetadataCreateSample.js +11 -3
- package/dist-esm/samples-dev/hybridIdentityMetadataCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridIdentityMetadataDeleteSample.js +11 -3
- package/dist-esm/samples-dev/hybridIdentityMetadataDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridIdentityMetadataGetSample.js +11 -3
- package/dist-esm/samples-dev/hybridIdentityMetadataGetSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridIdentityMetadataListByVMSample.js +11 -3
- package/dist-esm/samples-dev/hybridIdentityMetadataListByVMSample.js.map +1 -1
- package/dist-esm/samples-dev/inventoryItemsCreateSample.js +11 -3
- package/dist-esm/samples-dev/inventoryItemsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/inventoryItemsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/inventoryItemsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/inventoryItemsGetSample.js +11 -3
- package/dist-esm/samples-dev/inventoryItemsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/inventoryItemsListByVCenterSample.js +11 -3
- package/dist-esm/samples-dev/inventoryItemsListByVCenterSample.js.map +1 -1
- package/dist-esm/samples-dev/machineExtensionsCreateOrUpdateSample.js +10 -3
- package/dist-esm/samples-dev/machineExtensionsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/machineExtensionsDeleteSample.js +10 -3
- package/dist-esm/samples-dev/machineExtensionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/machineExtensionsGetSample.js +10 -3
- package/dist-esm/samples-dev/machineExtensionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/machineExtensionsListSample.js +10 -3
- package/dist-esm/samples-dev/machineExtensionsListSample.js.map +1 -1
- package/dist-esm/samples-dev/machineExtensionsUpdateSample.js +10 -3
- package/dist-esm/samples-dev/machineExtensionsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsCreateSample.js +11 -3
- package/dist-esm/samples-dev/resourcePoolsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/resourcePoolsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsGetSample.js +11 -3
- package/dist-esm/samples-dev/resourcePoolsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/resourcePoolsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsListSample.js +10 -2
- package/dist-esm/samples-dev/resourcePoolsListSample.js.map +1 -1
- package/dist-esm/samples-dev/resourcePoolsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/resourcePoolsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersCreateSample.js +11 -3
- package/dist-esm/samples-dev/vCentersCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersDeleteSample.js +11 -3
- package/dist-esm/samples-dev/vCentersDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersGetSample.js +11 -3
- package/dist-esm/samples-dev/vCentersGetSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/vCentersListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersListSample.js +10 -2
- package/dist-esm/samples-dev/vCentersListSample.js.map +1 -1
- package/dist-esm/samples-dev/vCentersUpdateSample.js +11 -3
- package/dist-esm/samples-dev/vCentersUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesCreateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesDeleteSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesGetSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesListSample.js +10 -2
- package/dist-esm/samples-dev/virtualMachineTemplatesListSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachineTemplatesUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesAssessPatchesSample.js +10 -3
- package/dist-esm/samples-dev/virtualMachinesAssessPatchesSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesCreateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesDeleteSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesGetSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesInstallPatchesSample.js +10 -3
- package/dist-esm/samples-dev/virtualMachinesInstallPatchesSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesListSample.js +10 -2
- package/dist-esm/samples-dev/virtualMachinesListSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesRestartSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesRestartSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesStartSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesStartSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesStopSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesStopSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksCreateSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksDeleteSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksGetSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksGetSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksListSample.js +10 -2
- package/dist-esm/samples-dev/virtualNetworksListSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualNetworksUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksUpdateSample.js.map +1 -1
- package/dist-esm/src/azureArcVMwareManagementServiceAPI.d.ts.map +1 -1
- package/dist-esm/src/azureArcVMwareManagementServiceAPI.js +4 -7
- package/dist-esm/src/azureArcVMwareManagementServiceAPI.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +0 -2
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/clusters.d.ts.map +1 -1
- package/dist-esm/src/operations/clusters.js +37 -16
- package/dist-esm/src/operations/clusters.js.map +1 -1
- package/dist-esm/src/operations/datastores.d.ts.map +1 -1
- package/dist-esm/src/operations/datastores.js +37 -16
- package/dist-esm/src/operations/datastores.js.map +1 -1
- package/dist-esm/src/operations/guestAgents.d.ts.map +1 -1
- package/dist-esm/src/operations/guestAgents.js +19 -8
- package/dist-esm/src/operations/guestAgents.js.map +1 -1
- package/dist-esm/src/operations/hosts.d.ts.map +1 -1
- package/dist-esm/src/operations/hosts.js +37 -16
- package/dist-esm/src/operations/hosts.js.map +1 -1
- package/dist-esm/src/operations/hybridIdentityMetadataOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/hybridIdentityMetadataOperations.js +19 -8
- package/dist-esm/src/operations/hybridIdentityMetadataOperations.js.map +1 -1
- package/dist-esm/src/operations/inventoryItems.d.ts.map +1 -1
- package/dist-esm/src/operations/inventoryItems.js +19 -8
- package/dist-esm/src/operations/inventoryItems.js.map +1 -1
- package/dist-esm/src/operations/machineExtensions.d.ts.map +1 -1
- package/dist-esm/src/operations/machineExtensions.js +19 -8
- package/dist-esm/src/operations/machineExtensions.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/resourcePools.d.ts.map +1 -1
- package/dist-esm/src/operations/resourcePools.js +37 -16
- package/dist-esm/src/operations/resourcePools.js.map +1 -1
- package/dist-esm/src/operations/vCenters.d.ts.map +1 -1
- package/dist-esm/src/operations/vCenters.js +37 -16
- package/dist-esm/src/operations/vCenters.js.map +1 -1
- package/dist-esm/src/operations/virtualMachineTemplates.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualMachineTemplates.js +37 -16
- package/dist-esm/src/operations/virtualMachineTemplates.js.map +1 -1
- package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualMachines.js +37 -16
- package/dist-esm/src/operations/virtualMachines.js.map +1 -1
- package/dist-esm/src/operations/virtualNetworks.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualNetworks.js +37 -16
- package/dist-esm/src/operations/virtualNetworks.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/package.json +8 -6
- package/review/arm-connectedvmware.api.md +3 -1
- package/src/azureArcVMwareManagementServiceAPI.ts +5 -6
- package/src/index.ts +1 -0
- package/src/models/index.ts +1 -4
- package/src/operations/clusters.ts +46 -19
- package/src/operations/datastores.ts +46 -19
- package/src/operations/guestAgents.ts +27 -14
- package/src/operations/hosts.ts +46 -19
- package/src/operations/hybridIdentityMetadataOperations.ts +27 -14
- package/src/operations/inventoryItems.ts +27 -14
- package/src/operations/machineExtensions.ts +22 -10
- package/src/operations/operations.ts +21 -9
- package/src/operations/resourcePools.ts +46 -19
- package/src/operations/vCenters.ts +46 -19
- package/src/operations/virtualMachineTemplates.ts +46 -19
- package/src/operations/virtualMachines.ts +46 -19
- package/src/operations/virtualNetworks.ts +46 -19
- package/src/pagingHelper.ts +39 -0
- package/types/arm-connectedvmware.d.ts +9 -2
- package/types/tsdoc-metadata.json +1 -1
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ResourcePools } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
ResourcePool,
|
|
19
20
|
ResourcePoolsListNextOptionalParams,
|
|
20
21
|
ResourcePoolsListOptionalParams,
|
|
22
|
+
ResourcePoolsListResponse,
|
|
21
23
|
ResourcePoolsListByResourceGroupNextOptionalParams,
|
|
22
24
|
ResourcePoolsListByResourceGroupOptionalParams,
|
|
25
|
+
ResourcePoolsListByResourceGroupResponse,
|
|
23
26
|
ResourcePoolsCreateOptionalParams,
|
|
24
27
|
ResourcePoolsCreateResponse,
|
|
25
28
|
ResourcePoolsGetOptionalParams,
|
|
@@ -27,8 +30,6 @@ import {
|
|
|
27
30
|
ResourcePoolsUpdateOptionalParams,
|
|
28
31
|
ResourcePoolsUpdateResponse,
|
|
29
32
|
ResourcePoolsDeleteOptionalParams,
|
|
30
|
-
ResourcePoolsListResponse,
|
|
31
|
-
ResourcePoolsListByResourceGroupResponse,
|
|
32
33
|
ResourcePoolsListNextResponse,
|
|
33
34
|
ResourcePoolsListByResourceGroupNextResponse
|
|
34
35
|
} from "../models";
|
|
@@ -61,22 +62,34 @@ export class ResourcePoolsImpl implements ResourcePools {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
-
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
69
|
+
return this.listPagingPage(options, settings);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
private async *listPagingPage(
|
|
71
|
-
options?: ResourcePoolsListOptionalParams
|
|
75
|
+
options?: ResourcePoolsListOptionalParams,
|
|
76
|
+
settings?: PageSettings
|
|
72
77
|
): AsyncIterableIterator<ResourcePool[]> {
|
|
73
|
-
let result
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
let result: ResourcePoolsListResponse;
|
|
79
|
+
let continuationToken = settings?.continuationToken;
|
|
80
|
+
if (!continuationToken) {
|
|
81
|
+
result = await this._list(options);
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
setContinuationToken(page, continuationToken);
|
|
85
|
+
yield page;
|
|
86
|
+
}
|
|
76
87
|
while (continuationToken) {
|
|
77
88
|
result = await this._listNext(continuationToken, options);
|
|
78
89
|
continuationToken = result.nextLink;
|
|
79
|
-
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
setContinuationToken(page, continuationToken);
|
|
92
|
+
yield page;
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
@@ -105,19 +118,33 @@ export class ResourcePoolsImpl implements ResourcePools {
|
|
|
105
118
|
[Symbol.asyncIterator]() {
|
|
106
119
|
return this;
|
|
107
120
|
},
|
|
108
|
-
byPage: () => {
|
|
109
|
-
|
|
121
|
+
byPage: (settings?: PageSettings) => {
|
|
122
|
+
if (settings?.maxPageSize) {
|
|
123
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
124
|
+
}
|
|
125
|
+
return this.listByResourceGroupPagingPage(
|
|
126
|
+
resourceGroupName,
|
|
127
|
+
options,
|
|
128
|
+
settings
|
|
129
|
+
);
|
|
110
130
|
}
|
|
111
131
|
};
|
|
112
132
|
}
|
|
113
133
|
|
|
114
134
|
private async *listByResourceGroupPagingPage(
|
|
115
135
|
resourceGroupName: string,
|
|
116
|
-
options?: ResourcePoolsListByResourceGroupOptionalParams
|
|
136
|
+
options?: ResourcePoolsListByResourceGroupOptionalParams,
|
|
137
|
+
settings?: PageSettings
|
|
117
138
|
): AsyncIterableIterator<ResourcePool[]> {
|
|
118
|
-
let result
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
let result: ResourcePoolsListByResourceGroupResponse;
|
|
140
|
+
let continuationToken = settings?.continuationToken;
|
|
141
|
+
if (!continuationToken) {
|
|
142
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
143
|
+
let page = result.value || [];
|
|
144
|
+
continuationToken = result.nextLink;
|
|
145
|
+
setContinuationToken(page, continuationToken);
|
|
146
|
+
yield page;
|
|
147
|
+
}
|
|
121
148
|
while (continuationToken) {
|
|
122
149
|
result = await this._listByResourceGroupNext(
|
|
123
150
|
resourceGroupName,
|
|
@@ -125,7 +152,9 @@ export class ResourcePoolsImpl implements ResourcePools {
|
|
|
125
152
|
options
|
|
126
153
|
);
|
|
127
154
|
continuationToken = result.nextLink;
|
|
128
|
-
|
|
155
|
+
let page = result.value || [];
|
|
156
|
+
setContinuationToken(page, continuationToken);
|
|
157
|
+
yield page;
|
|
129
158
|
}
|
|
130
159
|
}
|
|
131
160
|
|
|
@@ -556,7 +585,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
556
585
|
bodyMapper: Mappers.ErrorResponse
|
|
557
586
|
}
|
|
558
587
|
},
|
|
559
|
-
queryParameters: [Parameters.apiVersion],
|
|
560
588
|
urlParameters: [
|
|
561
589
|
Parameters.$host,
|
|
562
590
|
Parameters.nextLink,
|
|
@@ -576,7 +604,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
576
604
|
bodyMapper: Mappers.ErrorResponse
|
|
577
605
|
}
|
|
578
606
|
},
|
|
579
|
-
queryParameters: [Parameters.apiVersion],
|
|
580
607
|
urlParameters: [
|
|
581
608
|
Parameters.$host,
|
|
582
609
|
Parameters.nextLink,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { VCenters } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
VCenter,
|
|
19
20
|
VCentersListNextOptionalParams,
|
|
20
21
|
VCentersListOptionalParams,
|
|
22
|
+
VCentersListResponse,
|
|
21
23
|
VCentersListByResourceGroupNextOptionalParams,
|
|
22
24
|
VCentersListByResourceGroupOptionalParams,
|
|
25
|
+
VCentersListByResourceGroupResponse,
|
|
23
26
|
VCentersCreateOptionalParams,
|
|
24
27
|
VCentersCreateResponse,
|
|
25
28
|
VCentersGetOptionalParams,
|
|
@@ -27,8 +30,6 @@ import {
|
|
|
27
30
|
VCentersUpdateOptionalParams,
|
|
28
31
|
VCentersUpdateResponse,
|
|
29
32
|
VCentersDeleteOptionalParams,
|
|
30
|
-
VCentersListResponse,
|
|
31
|
-
VCentersListByResourceGroupResponse,
|
|
32
33
|
VCentersListNextResponse,
|
|
33
34
|
VCentersListByResourceGroupNextResponse
|
|
34
35
|
} from "../models";
|
|
@@ -61,22 +62,34 @@ export class VCentersImpl implements VCenters {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
-
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
69
|
+
return this.listPagingPage(options, settings);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
private async *listPagingPage(
|
|
71
|
-
options?: VCentersListOptionalParams
|
|
75
|
+
options?: VCentersListOptionalParams,
|
|
76
|
+
settings?: PageSettings
|
|
72
77
|
): AsyncIterableIterator<VCenter[]> {
|
|
73
|
-
let result
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
let result: VCentersListResponse;
|
|
79
|
+
let continuationToken = settings?.continuationToken;
|
|
80
|
+
if (!continuationToken) {
|
|
81
|
+
result = await this._list(options);
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
setContinuationToken(page, continuationToken);
|
|
85
|
+
yield page;
|
|
86
|
+
}
|
|
76
87
|
while (continuationToken) {
|
|
77
88
|
result = await this._listNext(continuationToken, options);
|
|
78
89
|
continuationToken = result.nextLink;
|
|
79
|
-
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
setContinuationToken(page, continuationToken);
|
|
92
|
+
yield page;
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
@@ -105,19 +118,33 @@ export class VCentersImpl implements VCenters {
|
|
|
105
118
|
[Symbol.asyncIterator]() {
|
|
106
119
|
return this;
|
|
107
120
|
},
|
|
108
|
-
byPage: () => {
|
|
109
|
-
|
|
121
|
+
byPage: (settings?: PageSettings) => {
|
|
122
|
+
if (settings?.maxPageSize) {
|
|
123
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
124
|
+
}
|
|
125
|
+
return this.listByResourceGroupPagingPage(
|
|
126
|
+
resourceGroupName,
|
|
127
|
+
options,
|
|
128
|
+
settings
|
|
129
|
+
);
|
|
110
130
|
}
|
|
111
131
|
};
|
|
112
132
|
}
|
|
113
133
|
|
|
114
134
|
private async *listByResourceGroupPagingPage(
|
|
115
135
|
resourceGroupName: string,
|
|
116
|
-
options?: VCentersListByResourceGroupOptionalParams
|
|
136
|
+
options?: VCentersListByResourceGroupOptionalParams,
|
|
137
|
+
settings?: PageSettings
|
|
117
138
|
): AsyncIterableIterator<VCenter[]> {
|
|
118
|
-
let result
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
let result: VCentersListByResourceGroupResponse;
|
|
140
|
+
let continuationToken = settings?.continuationToken;
|
|
141
|
+
if (!continuationToken) {
|
|
142
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
143
|
+
let page = result.value || [];
|
|
144
|
+
continuationToken = result.nextLink;
|
|
145
|
+
setContinuationToken(page, continuationToken);
|
|
146
|
+
yield page;
|
|
147
|
+
}
|
|
121
148
|
while (continuationToken) {
|
|
122
149
|
result = await this._listByResourceGroupNext(
|
|
123
150
|
resourceGroupName,
|
|
@@ -125,7 +152,9 @@ export class VCentersImpl implements VCenters {
|
|
|
125
152
|
options
|
|
126
153
|
);
|
|
127
154
|
continuationToken = result.nextLink;
|
|
128
|
-
|
|
155
|
+
let page = result.value || [];
|
|
156
|
+
setContinuationToken(page, continuationToken);
|
|
157
|
+
yield page;
|
|
129
158
|
}
|
|
130
159
|
}
|
|
131
160
|
|
|
@@ -556,7 +585,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
556
585
|
bodyMapper: Mappers.ErrorResponse
|
|
557
586
|
}
|
|
558
587
|
},
|
|
559
|
-
queryParameters: [Parameters.apiVersion],
|
|
560
588
|
urlParameters: [
|
|
561
589
|
Parameters.$host,
|
|
562
590
|
Parameters.nextLink,
|
|
@@ -576,7 +604,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
576
604
|
bodyMapper: Mappers.ErrorResponse
|
|
577
605
|
}
|
|
578
606
|
},
|
|
579
|
-
queryParameters: [Parameters.apiVersion],
|
|
580
607
|
urlParameters: [
|
|
581
608
|
Parameters.$host,
|
|
582
609
|
Parameters.nextLink,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { VirtualMachineTemplates } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
VirtualMachineTemplate,
|
|
19
20
|
VirtualMachineTemplatesListNextOptionalParams,
|
|
20
21
|
VirtualMachineTemplatesListOptionalParams,
|
|
22
|
+
VirtualMachineTemplatesListResponse,
|
|
21
23
|
VirtualMachineTemplatesListByResourceGroupNextOptionalParams,
|
|
22
24
|
VirtualMachineTemplatesListByResourceGroupOptionalParams,
|
|
25
|
+
VirtualMachineTemplatesListByResourceGroupResponse,
|
|
23
26
|
VirtualMachineTemplatesCreateOptionalParams,
|
|
24
27
|
VirtualMachineTemplatesCreateResponse,
|
|
25
28
|
VirtualMachineTemplatesGetOptionalParams,
|
|
@@ -27,8 +30,6 @@ import {
|
|
|
27
30
|
VirtualMachineTemplatesUpdateOptionalParams,
|
|
28
31
|
VirtualMachineTemplatesUpdateResponse,
|
|
29
32
|
VirtualMachineTemplatesDeleteOptionalParams,
|
|
30
|
-
VirtualMachineTemplatesListResponse,
|
|
31
|
-
VirtualMachineTemplatesListByResourceGroupResponse,
|
|
32
33
|
VirtualMachineTemplatesListNextResponse,
|
|
33
34
|
VirtualMachineTemplatesListByResourceGroupNextResponse
|
|
34
35
|
} from "../models";
|
|
@@ -61,22 +62,34 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
-
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
69
|
+
return this.listPagingPage(options, settings);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
private async *listPagingPage(
|
|
71
|
-
options?: VirtualMachineTemplatesListOptionalParams
|
|
75
|
+
options?: VirtualMachineTemplatesListOptionalParams,
|
|
76
|
+
settings?: PageSettings
|
|
72
77
|
): AsyncIterableIterator<VirtualMachineTemplate[]> {
|
|
73
|
-
let result
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
let result: VirtualMachineTemplatesListResponse;
|
|
79
|
+
let continuationToken = settings?.continuationToken;
|
|
80
|
+
if (!continuationToken) {
|
|
81
|
+
result = await this._list(options);
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
setContinuationToken(page, continuationToken);
|
|
85
|
+
yield page;
|
|
86
|
+
}
|
|
76
87
|
while (continuationToken) {
|
|
77
88
|
result = await this._listNext(continuationToken, options);
|
|
78
89
|
continuationToken = result.nextLink;
|
|
79
|
-
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
setContinuationToken(page, continuationToken);
|
|
92
|
+
yield page;
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
@@ -105,19 +118,33 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
105
118
|
[Symbol.asyncIterator]() {
|
|
106
119
|
return this;
|
|
107
120
|
},
|
|
108
|
-
byPage: () => {
|
|
109
|
-
|
|
121
|
+
byPage: (settings?: PageSettings) => {
|
|
122
|
+
if (settings?.maxPageSize) {
|
|
123
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
124
|
+
}
|
|
125
|
+
return this.listByResourceGroupPagingPage(
|
|
126
|
+
resourceGroupName,
|
|
127
|
+
options,
|
|
128
|
+
settings
|
|
129
|
+
);
|
|
110
130
|
}
|
|
111
131
|
};
|
|
112
132
|
}
|
|
113
133
|
|
|
114
134
|
private async *listByResourceGroupPagingPage(
|
|
115
135
|
resourceGroupName: string,
|
|
116
|
-
options?: VirtualMachineTemplatesListByResourceGroupOptionalParams
|
|
136
|
+
options?: VirtualMachineTemplatesListByResourceGroupOptionalParams,
|
|
137
|
+
settings?: PageSettings
|
|
117
138
|
): AsyncIterableIterator<VirtualMachineTemplate[]> {
|
|
118
|
-
let result
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
let result: VirtualMachineTemplatesListByResourceGroupResponse;
|
|
140
|
+
let continuationToken = settings?.continuationToken;
|
|
141
|
+
if (!continuationToken) {
|
|
142
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
143
|
+
let page = result.value || [];
|
|
144
|
+
continuationToken = result.nextLink;
|
|
145
|
+
setContinuationToken(page, continuationToken);
|
|
146
|
+
yield page;
|
|
147
|
+
}
|
|
121
148
|
while (continuationToken) {
|
|
122
149
|
result = await this._listByResourceGroupNext(
|
|
123
150
|
resourceGroupName,
|
|
@@ -125,7 +152,9 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
125
152
|
options
|
|
126
153
|
);
|
|
127
154
|
continuationToken = result.nextLink;
|
|
128
|
-
|
|
155
|
+
let page = result.value || [];
|
|
156
|
+
setContinuationToken(page, continuationToken);
|
|
157
|
+
yield page;
|
|
129
158
|
}
|
|
130
159
|
}
|
|
131
160
|
|
|
@@ -556,7 +585,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
556
585
|
bodyMapper: Mappers.ErrorResponse
|
|
557
586
|
}
|
|
558
587
|
},
|
|
559
|
-
queryParameters: [Parameters.apiVersion],
|
|
560
588
|
urlParameters: [
|
|
561
589
|
Parameters.$host,
|
|
562
590
|
Parameters.nextLink,
|
|
@@ -576,7 +604,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
576
604
|
bodyMapper: Mappers.ErrorResponse
|
|
577
605
|
}
|
|
578
606
|
},
|
|
579
|
-
queryParameters: [Parameters.apiVersion],
|
|
580
607
|
urlParameters: [
|
|
581
608
|
Parameters.$host,
|
|
582
609
|
Parameters.nextLink,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { VirtualMachines } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
VirtualMachine,
|
|
19
20
|
VirtualMachinesListNextOptionalParams,
|
|
20
21
|
VirtualMachinesListOptionalParams,
|
|
22
|
+
VirtualMachinesListResponse,
|
|
21
23
|
VirtualMachinesListByResourceGroupNextOptionalParams,
|
|
22
24
|
VirtualMachinesListByResourceGroupOptionalParams,
|
|
25
|
+
VirtualMachinesListByResourceGroupResponse,
|
|
23
26
|
VirtualMachinesAssessPatchesOptionalParams,
|
|
24
27
|
VirtualMachinesAssessPatchesResponse,
|
|
25
28
|
VirtualMachineInstallPatchesParameters,
|
|
@@ -35,8 +38,6 @@ import {
|
|
|
35
38
|
VirtualMachinesStopOptionalParams,
|
|
36
39
|
VirtualMachinesStartOptionalParams,
|
|
37
40
|
VirtualMachinesRestartOptionalParams,
|
|
38
|
-
VirtualMachinesListResponse,
|
|
39
|
-
VirtualMachinesListByResourceGroupResponse,
|
|
40
41
|
VirtualMachinesListNextResponse,
|
|
41
42
|
VirtualMachinesListByResourceGroupNextResponse
|
|
42
43
|
} from "../models";
|
|
@@ -69,22 +70,34 @@ export class VirtualMachinesImpl implements VirtualMachines {
|
|
|
69
70
|
[Symbol.asyncIterator]() {
|
|
70
71
|
return this;
|
|
71
72
|
},
|
|
72
|
-
byPage: () => {
|
|
73
|
-
|
|
73
|
+
byPage: (settings?: PageSettings) => {
|
|
74
|
+
if (settings?.maxPageSize) {
|
|
75
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
76
|
+
}
|
|
77
|
+
return this.listPagingPage(options, settings);
|
|
74
78
|
}
|
|
75
79
|
};
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
private async *listPagingPage(
|
|
79
|
-
options?: VirtualMachinesListOptionalParams
|
|
83
|
+
options?: VirtualMachinesListOptionalParams,
|
|
84
|
+
settings?: PageSettings
|
|
80
85
|
): AsyncIterableIterator<VirtualMachine[]> {
|
|
81
|
-
let result
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
let result: VirtualMachinesListResponse;
|
|
87
|
+
let continuationToken = settings?.continuationToken;
|
|
88
|
+
if (!continuationToken) {
|
|
89
|
+
result = await this._list(options);
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
continuationToken = result.nextLink;
|
|
92
|
+
setContinuationToken(page, continuationToken);
|
|
93
|
+
yield page;
|
|
94
|
+
}
|
|
84
95
|
while (continuationToken) {
|
|
85
96
|
result = await this._listNext(continuationToken, options);
|
|
86
97
|
continuationToken = result.nextLink;
|
|
87
|
-
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
88
101
|
}
|
|
89
102
|
}
|
|
90
103
|
|
|
@@ -113,19 +126,33 @@ export class VirtualMachinesImpl implements VirtualMachines {
|
|
|
113
126
|
[Symbol.asyncIterator]() {
|
|
114
127
|
return this;
|
|
115
128
|
},
|
|
116
|
-
byPage: () => {
|
|
117
|
-
|
|
129
|
+
byPage: (settings?: PageSettings) => {
|
|
130
|
+
if (settings?.maxPageSize) {
|
|
131
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
132
|
+
}
|
|
133
|
+
return this.listByResourceGroupPagingPage(
|
|
134
|
+
resourceGroupName,
|
|
135
|
+
options,
|
|
136
|
+
settings
|
|
137
|
+
);
|
|
118
138
|
}
|
|
119
139
|
};
|
|
120
140
|
}
|
|
121
141
|
|
|
122
142
|
private async *listByResourceGroupPagingPage(
|
|
123
143
|
resourceGroupName: string,
|
|
124
|
-
options?: VirtualMachinesListByResourceGroupOptionalParams
|
|
144
|
+
options?: VirtualMachinesListByResourceGroupOptionalParams,
|
|
145
|
+
settings?: PageSettings
|
|
125
146
|
): AsyncIterableIterator<VirtualMachine[]> {
|
|
126
|
-
let result
|
|
127
|
-
|
|
128
|
-
|
|
147
|
+
let result: VirtualMachinesListByResourceGroupResponse;
|
|
148
|
+
let continuationToken = settings?.continuationToken;
|
|
149
|
+
if (!continuationToken) {
|
|
150
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
151
|
+
let page = result.value || [];
|
|
152
|
+
continuationToken = result.nextLink;
|
|
153
|
+
setContinuationToken(page, continuationToken);
|
|
154
|
+
yield page;
|
|
155
|
+
}
|
|
129
156
|
while (continuationToken) {
|
|
130
157
|
result = await this._listByResourceGroupNext(
|
|
131
158
|
resourceGroupName,
|
|
@@ -133,7 +160,9 @@ export class VirtualMachinesImpl implements VirtualMachines {
|
|
|
133
160
|
options
|
|
134
161
|
);
|
|
135
162
|
continuationToken = result.nextLink;
|
|
136
|
-
|
|
163
|
+
let page = result.value || [];
|
|
164
|
+
setContinuationToken(page, continuationToken);
|
|
165
|
+
yield page;
|
|
137
166
|
}
|
|
138
167
|
}
|
|
139
168
|
|
|
@@ -1205,7 +1234,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
1205
1234
|
bodyMapper: Mappers.ErrorResponse
|
|
1206
1235
|
}
|
|
1207
1236
|
},
|
|
1208
|
-
queryParameters: [Parameters.apiVersion],
|
|
1209
1237
|
urlParameters: [
|
|
1210
1238
|
Parameters.$host,
|
|
1211
1239
|
Parameters.nextLink,
|
|
@@ -1225,7 +1253,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
1225
1253
|
bodyMapper: Mappers.ErrorResponse
|
|
1226
1254
|
}
|
|
1227
1255
|
},
|
|
1228
|
-
queryParameters: [Parameters.apiVersion],
|
|
1229
1256
|
urlParameters: [
|
|
1230
1257
|
Parameters.$host,
|
|
1231
1258
|
Parameters.nextLink,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { VirtualNetworks } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
VirtualNetwork,
|
|
19
20
|
VirtualNetworksListNextOptionalParams,
|
|
20
21
|
VirtualNetworksListOptionalParams,
|
|
22
|
+
VirtualNetworksListResponse,
|
|
21
23
|
VirtualNetworksListByResourceGroupNextOptionalParams,
|
|
22
24
|
VirtualNetworksListByResourceGroupOptionalParams,
|
|
25
|
+
VirtualNetworksListByResourceGroupResponse,
|
|
23
26
|
VirtualNetworksCreateOptionalParams,
|
|
24
27
|
VirtualNetworksCreateResponse,
|
|
25
28
|
VirtualNetworksGetOptionalParams,
|
|
@@ -27,8 +30,6 @@ import {
|
|
|
27
30
|
VirtualNetworksUpdateOptionalParams,
|
|
28
31
|
VirtualNetworksUpdateResponse,
|
|
29
32
|
VirtualNetworksDeleteOptionalParams,
|
|
30
|
-
VirtualNetworksListResponse,
|
|
31
|
-
VirtualNetworksListByResourceGroupResponse,
|
|
32
33
|
VirtualNetworksListNextResponse,
|
|
33
34
|
VirtualNetworksListByResourceGroupNextResponse
|
|
34
35
|
} from "../models";
|
|
@@ -61,22 +62,34 @@ export class VirtualNetworksImpl implements VirtualNetworks {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
-
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
69
|
+
return this.listPagingPage(options, settings);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
private async *listPagingPage(
|
|
71
|
-
options?: VirtualNetworksListOptionalParams
|
|
75
|
+
options?: VirtualNetworksListOptionalParams,
|
|
76
|
+
settings?: PageSettings
|
|
72
77
|
): AsyncIterableIterator<VirtualNetwork[]> {
|
|
73
|
-
let result
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
let result: VirtualNetworksListResponse;
|
|
79
|
+
let continuationToken = settings?.continuationToken;
|
|
80
|
+
if (!continuationToken) {
|
|
81
|
+
result = await this._list(options);
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
setContinuationToken(page, continuationToken);
|
|
85
|
+
yield page;
|
|
86
|
+
}
|
|
76
87
|
while (continuationToken) {
|
|
77
88
|
result = await this._listNext(continuationToken, options);
|
|
78
89
|
continuationToken = result.nextLink;
|
|
79
|
-
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
setContinuationToken(page, continuationToken);
|
|
92
|
+
yield page;
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
@@ -105,19 +118,33 @@ export class VirtualNetworksImpl implements VirtualNetworks {
|
|
|
105
118
|
[Symbol.asyncIterator]() {
|
|
106
119
|
return this;
|
|
107
120
|
},
|
|
108
|
-
byPage: () => {
|
|
109
|
-
|
|
121
|
+
byPage: (settings?: PageSettings) => {
|
|
122
|
+
if (settings?.maxPageSize) {
|
|
123
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
124
|
+
}
|
|
125
|
+
return this.listByResourceGroupPagingPage(
|
|
126
|
+
resourceGroupName,
|
|
127
|
+
options,
|
|
128
|
+
settings
|
|
129
|
+
);
|
|
110
130
|
}
|
|
111
131
|
};
|
|
112
132
|
}
|
|
113
133
|
|
|
114
134
|
private async *listByResourceGroupPagingPage(
|
|
115
135
|
resourceGroupName: string,
|
|
116
|
-
options?: VirtualNetworksListByResourceGroupOptionalParams
|
|
136
|
+
options?: VirtualNetworksListByResourceGroupOptionalParams,
|
|
137
|
+
settings?: PageSettings
|
|
117
138
|
): AsyncIterableIterator<VirtualNetwork[]> {
|
|
118
|
-
let result
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
let result: VirtualNetworksListByResourceGroupResponse;
|
|
140
|
+
let continuationToken = settings?.continuationToken;
|
|
141
|
+
if (!continuationToken) {
|
|
142
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
143
|
+
let page = result.value || [];
|
|
144
|
+
continuationToken = result.nextLink;
|
|
145
|
+
setContinuationToken(page, continuationToken);
|
|
146
|
+
yield page;
|
|
147
|
+
}
|
|
121
148
|
while (continuationToken) {
|
|
122
149
|
result = await this._listByResourceGroupNext(
|
|
123
150
|
resourceGroupName,
|
|
@@ -125,7 +152,9 @@ export class VirtualNetworksImpl implements VirtualNetworks {
|
|
|
125
152
|
options
|
|
126
153
|
);
|
|
127
154
|
continuationToken = result.nextLink;
|
|
128
|
-
|
|
155
|
+
let page = result.value || [];
|
|
156
|
+
setContinuationToken(page, continuationToken);
|
|
157
|
+
yield page;
|
|
129
158
|
}
|
|
130
159
|
}
|
|
131
160
|
|
|
@@ -556,7 +585,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
556
585
|
bodyMapper: Mappers.ErrorResponse
|
|
557
586
|
}
|
|
558
587
|
},
|
|
559
|
-
queryParameters: [Parameters.apiVersion],
|
|
560
588
|
urlParameters: [
|
|
561
589
|
Parameters.$host,
|
|
562
590
|
Parameters.nextLink,
|
|
@@ -576,7 +604,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
576
604
|
bodyMapper: Mappers.ErrorResponse
|
|
577
605
|
}
|
|
578
606
|
},
|
|
579
|
-
queryParameters: [Parameters.apiVersion],
|
|
580
607
|
urlParameters: [
|
|
581
608
|
Parameters.$host,
|
|
582
609
|
Parameters.nextLink,
|