@azure/arm-scvmm 1.0.0-beta.1 → 1.0.0-beta.3
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 +22 -0
- package/LICENSE +1 -1
- package/README.md +8 -8
- package/dist/index.js +355 -131
- 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/availabilitySetsCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/availabilitySetsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilitySetsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/availabilitySetsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilitySetsGetSample.js +11 -3
- package/dist-esm/samples-dev/availabilitySetsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilitySetsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/availabilitySetsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilitySetsListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/availabilitySetsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilitySetsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/availabilitySetsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/cloudsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/cloudsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsGetSample.js +11 -3
- package/dist-esm/samples-dev/cloudsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/cloudsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/cloudsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/cloudsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/cloudsUpdateSample.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/inventoryItemsListByVmmServerSample.js +11 -3
- package/dist-esm/samples-dev/inventoryItemsListByVmmServerSample.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/virtualMachineTemplatesCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachineTemplatesCreateOrUpdateSample.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/virtualMachineTemplatesListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/virtualMachineTemplatesListBySubscriptionSample.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/virtualMachinesCreateCheckpointSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesCreateCheckpointSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesDeleteCheckpointSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesDeleteCheckpointSample.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/virtualMachinesListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/virtualMachinesListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/virtualMachinesListBySubscriptionSample.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/virtualMachinesRestoreCheckpointSample.js +11 -3
- package/dist-esm/samples-dev/virtualMachinesRestoreCheckpointSample.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/virtualNetworksCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/virtualNetworksCreateOrUpdateSample.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/virtualNetworksListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/virtualNetworksListBySubscriptionSample.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/samples-dev/vmmServersCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/vmmServersCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/vmmServersDeleteSample.js +11 -3
- package/dist-esm/samples-dev/vmmServersDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/vmmServersGetSample.js +11 -3
- package/dist-esm/samples-dev/vmmServersGetSample.js.map +1 -1
- package/dist-esm/samples-dev/vmmServersListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/vmmServersListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/vmmServersListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/vmmServersListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/vmmServersUpdateSample.js +11 -3
- package/dist-esm/samples-dev/vmmServersUpdateSample.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 +33 -11
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +21 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/availabilitySets.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilitySets.js +37 -16
- package/dist-esm/src/operations/availabilitySets.js.map +1 -1
- package/dist-esm/src/operations/clouds.d.ts.map +1 -1
- package/dist-esm/src/operations/clouds.js +37 -16
- package/dist-esm/src/operations/clouds.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/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/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/operations/vmmServers.d.ts.map +1 -1
- package/dist-esm/src/operations/vmmServers.js +37 -16
- package/dist-esm/src/operations/vmmServers.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/dist-esm/src/scvmm.d.ts +2 -0
- package/dist-esm/src/scvmm.d.ts.map +1 -1
- package/dist-esm/src/scvmm.js +49 -18
- package/dist-esm/src/scvmm.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +16 -11
- package/review/arm-scvmm.api.md +24 -41
- package/src/index.ts +1 -0
- package/src/models/index.ts +33 -11
- package/src/operations/availabilitySets.ts +46 -19
- package/src/operations/clouds.ts +46 -19
- package/src/operations/inventoryItems.ts +27 -14
- package/src/operations/operations.ts +21 -9
- package/src/operations/virtualMachineTemplates.ts +46 -19
- package/src/operations/virtualMachines.ts +46 -19
- package/src/operations/virtualNetworks.ts +46 -19
- package/src/operations/vmmServers.ts +46 -19
- package/src/pagingHelper.ts +39 -0
- package/src/scvmm.ts +60 -20
- package/types/arm-scvmm.d.ts +44 -11
- 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 { AvailabilitySets } 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
|
AvailabilitySet,
|
|
19
20
|
AvailabilitySetsListByResourceGroupNextOptionalParams,
|
|
20
21
|
AvailabilitySetsListByResourceGroupOptionalParams,
|
|
22
|
+
AvailabilitySetsListByResourceGroupResponse,
|
|
21
23
|
AvailabilitySetsListBySubscriptionNextOptionalParams,
|
|
22
24
|
AvailabilitySetsListBySubscriptionOptionalParams,
|
|
25
|
+
AvailabilitySetsListBySubscriptionResponse,
|
|
23
26
|
AvailabilitySetsGetOptionalParams,
|
|
24
27
|
AvailabilitySetsGetResponse,
|
|
25
28
|
AvailabilitySetsCreateOrUpdateOptionalParams,
|
|
@@ -28,8 +31,6 @@ import {
|
|
|
28
31
|
ResourcePatch,
|
|
29
32
|
AvailabilitySetsUpdateOptionalParams,
|
|
30
33
|
AvailabilitySetsUpdateResponse,
|
|
31
|
-
AvailabilitySetsListByResourceGroupResponse,
|
|
32
|
-
AvailabilitySetsListBySubscriptionResponse,
|
|
33
34
|
AvailabilitySetsListByResourceGroupNextResponse,
|
|
34
35
|
AvailabilitySetsListBySubscriptionNextResponse
|
|
35
36
|
} from "../models";
|
|
@@ -64,19 +65,33 @@ export class AvailabilitySetsImpl implements AvailabilitySets {
|
|
|
64
65
|
[Symbol.asyncIterator]() {
|
|
65
66
|
return this;
|
|
66
67
|
},
|
|
67
|
-
byPage: () => {
|
|
68
|
-
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
72
|
+
return this.listByResourceGroupPagingPage(
|
|
73
|
+
resourceGroupName,
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
76
|
+
);
|
|
69
77
|
}
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
private async *listByResourceGroupPagingPage(
|
|
74
82
|
resourceGroupName: string,
|
|
75
|
-
options?: AvailabilitySetsListByResourceGroupOptionalParams
|
|
83
|
+
options?: AvailabilitySetsListByResourceGroupOptionalParams,
|
|
84
|
+
settings?: PageSettings
|
|
76
85
|
): AsyncIterableIterator<AvailabilitySet[]> {
|
|
77
|
-
let result
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
let result: AvailabilitySetsListByResourceGroupResponse;
|
|
87
|
+
let continuationToken = settings?.continuationToken;
|
|
88
|
+
if (!continuationToken) {
|
|
89
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
continuationToken = result.nextLink;
|
|
92
|
+
setContinuationToken(page, continuationToken);
|
|
93
|
+
yield page;
|
|
94
|
+
}
|
|
80
95
|
while (continuationToken) {
|
|
81
96
|
result = await this._listByResourceGroupNext(
|
|
82
97
|
resourceGroupName,
|
|
@@ -84,7 +99,9 @@ export class AvailabilitySetsImpl implements AvailabilitySets {
|
|
|
84
99
|
options
|
|
85
100
|
);
|
|
86
101
|
continuationToken = result.nextLink;
|
|
87
|
-
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
setContinuationToken(page, continuationToken);
|
|
104
|
+
yield page;
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
107
|
|
|
@@ -115,22 +132,34 @@ export class AvailabilitySetsImpl implements AvailabilitySets {
|
|
|
115
132
|
[Symbol.asyncIterator]() {
|
|
116
133
|
return this;
|
|
117
134
|
},
|
|
118
|
-
byPage: () => {
|
|
119
|
-
|
|
135
|
+
byPage: (settings?: PageSettings) => {
|
|
136
|
+
if (settings?.maxPageSize) {
|
|
137
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
138
|
+
}
|
|
139
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
120
140
|
}
|
|
121
141
|
};
|
|
122
142
|
}
|
|
123
143
|
|
|
124
144
|
private async *listBySubscriptionPagingPage(
|
|
125
|
-
options?: AvailabilitySetsListBySubscriptionOptionalParams
|
|
145
|
+
options?: AvailabilitySetsListBySubscriptionOptionalParams,
|
|
146
|
+
settings?: PageSettings
|
|
126
147
|
): AsyncIterableIterator<AvailabilitySet[]> {
|
|
127
|
-
let result
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
let result: AvailabilitySetsListBySubscriptionResponse;
|
|
149
|
+
let continuationToken = settings?.continuationToken;
|
|
150
|
+
if (!continuationToken) {
|
|
151
|
+
result = await this._listBySubscription(options);
|
|
152
|
+
let page = result.value || [];
|
|
153
|
+
continuationToken = result.nextLink;
|
|
154
|
+
setContinuationToken(page, continuationToken);
|
|
155
|
+
yield page;
|
|
156
|
+
}
|
|
130
157
|
while (continuationToken) {
|
|
131
158
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
132
159
|
continuationToken = result.nextLink;
|
|
133
|
-
|
|
160
|
+
let page = result.value || [];
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
134
163
|
}
|
|
135
164
|
}
|
|
136
165
|
|
|
@@ -650,7 +679,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
650
679
|
bodyMapper: Mappers.ErrorResponse
|
|
651
680
|
}
|
|
652
681
|
},
|
|
653
|
-
queryParameters: [Parameters.apiVersion],
|
|
654
682
|
urlParameters: [
|
|
655
683
|
Parameters.$host,
|
|
656
684
|
Parameters.subscriptionId,
|
|
@@ -671,7 +699,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
671
699
|
bodyMapper: Mappers.ErrorResponse
|
|
672
700
|
}
|
|
673
701
|
},
|
|
674
|
-
queryParameters: [Parameters.apiVersion],
|
|
675
702
|
urlParameters: [
|
|
676
703
|
Parameters.$host,
|
|
677
704
|
Parameters.subscriptionId,
|
package/src/operations/clouds.ts
CHANGED
|
@@ -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 { Clouds } 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
|
Cloud,
|
|
19
20
|
CloudsListByResourceGroupNextOptionalParams,
|
|
20
21
|
CloudsListByResourceGroupOptionalParams,
|
|
22
|
+
CloudsListByResourceGroupResponse,
|
|
21
23
|
CloudsListBySubscriptionNextOptionalParams,
|
|
22
24
|
CloudsListBySubscriptionOptionalParams,
|
|
25
|
+
CloudsListBySubscriptionResponse,
|
|
23
26
|
CloudsGetOptionalParams,
|
|
24
27
|
CloudsGetResponse,
|
|
25
28
|
CloudsCreateOrUpdateOptionalParams,
|
|
@@ -28,8 +31,6 @@ import {
|
|
|
28
31
|
ResourcePatch,
|
|
29
32
|
CloudsUpdateOptionalParams,
|
|
30
33
|
CloudsUpdateResponse,
|
|
31
|
-
CloudsListByResourceGroupResponse,
|
|
32
|
-
CloudsListBySubscriptionResponse,
|
|
33
34
|
CloudsListByResourceGroupNextResponse,
|
|
34
35
|
CloudsListBySubscriptionNextResponse
|
|
35
36
|
} from "../models";
|
|
@@ -64,19 +65,33 @@ export class CloudsImpl implements Clouds {
|
|
|
64
65
|
[Symbol.asyncIterator]() {
|
|
65
66
|
return this;
|
|
66
67
|
},
|
|
67
|
-
byPage: () => {
|
|
68
|
-
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
72
|
+
return this.listByResourceGroupPagingPage(
|
|
73
|
+
resourceGroupName,
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
76
|
+
);
|
|
69
77
|
}
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
private async *listByResourceGroupPagingPage(
|
|
74
82
|
resourceGroupName: string,
|
|
75
|
-
options?: CloudsListByResourceGroupOptionalParams
|
|
83
|
+
options?: CloudsListByResourceGroupOptionalParams,
|
|
84
|
+
settings?: PageSettings
|
|
76
85
|
): AsyncIterableIterator<Cloud[]> {
|
|
77
|
-
let result
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
let result: CloudsListByResourceGroupResponse;
|
|
87
|
+
let continuationToken = settings?.continuationToken;
|
|
88
|
+
if (!continuationToken) {
|
|
89
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
continuationToken = result.nextLink;
|
|
92
|
+
setContinuationToken(page, continuationToken);
|
|
93
|
+
yield page;
|
|
94
|
+
}
|
|
80
95
|
while (continuationToken) {
|
|
81
96
|
result = await this._listByResourceGroupNext(
|
|
82
97
|
resourceGroupName,
|
|
@@ -84,7 +99,9 @@ export class CloudsImpl implements Clouds {
|
|
|
84
99
|
options
|
|
85
100
|
);
|
|
86
101
|
continuationToken = result.nextLink;
|
|
87
|
-
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
setContinuationToken(page, continuationToken);
|
|
104
|
+
yield page;
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
107
|
|
|
@@ -115,22 +132,34 @@ export class CloudsImpl implements Clouds {
|
|
|
115
132
|
[Symbol.asyncIterator]() {
|
|
116
133
|
return this;
|
|
117
134
|
},
|
|
118
|
-
byPage: () => {
|
|
119
|
-
|
|
135
|
+
byPage: (settings?: PageSettings) => {
|
|
136
|
+
if (settings?.maxPageSize) {
|
|
137
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
138
|
+
}
|
|
139
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
120
140
|
}
|
|
121
141
|
};
|
|
122
142
|
}
|
|
123
143
|
|
|
124
144
|
private async *listBySubscriptionPagingPage(
|
|
125
|
-
options?: CloudsListBySubscriptionOptionalParams
|
|
145
|
+
options?: CloudsListBySubscriptionOptionalParams,
|
|
146
|
+
settings?: PageSettings
|
|
126
147
|
): AsyncIterableIterator<Cloud[]> {
|
|
127
|
-
let result
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
let result: CloudsListBySubscriptionResponse;
|
|
149
|
+
let continuationToken = settings?.continuationToken;
|
|
150
|
+
if (!continuationToken) {
|
|
151
|
+
result = await this._listBySubscription(options);
|
|
152
|
+
let page = result.value || [];
|
|
153
|
+
continuationToken = result.nextLink;
|
|
154
|
+
setContinuationToken(page, continuationToken);
|
|
155
|
+
yield page;
|
|
156
|
+
}
|
|
130
157
|
while (continuationToken) {
|
|
131
158
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
132
159
|
continuationToken = result.nextLink;
|
|
133
|
-
|
|
160
|
+
let page = result.value || [];
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
134
163
|
}
|
|
135
164
|
}
|
|
136
165
|
|
|
@@ -647,7 +676,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
647
676
|
bodyMapper: Mappers.ErrorResponse
|
|
648
677
|
}
|
|
649
678
|
},
|
|
650
|
-
queryParameters: [Parameters.apiVersion],
|
|
651
679
|
urlParameters: [
|
|
652
680
|
Parameters.$host,
|
|
653
681
|
Parameters.subscriptionId,
|
|
@@ -668,7 +696,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
668
696
|
bodyMapper: Mappers.ErrorResponse
|
|
669
697
|
}
|
|
670
698
|
},
|
|
671
|
-
queryParameters: [Parameters.apiVersion],
|
|
672
699
|
urlParameters: [
|
|
673
700
|
Parameters.$host,
|
|
674
701
|
Parameters.subscriptionId,
|
|
@@ -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 { InventoryItems } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,12 +17,12 @@ import {
|
|
|
16
17
|
InventoryItem,
|
|
17
18
|
InventoryItemsListByVMMServerNextOptionalParams,
|
|
18
19
|
InventoryItemsListByVMMServerOptionalParams,
|
|
20
|
+
InventoryItemsListByVMMServerResponse,
|
|
19
21
|
InventoryItemsCreateOptionalParams,
|
|
20
22
|
InventoryItemsCreateResponse,
|
|
21
23
|
InventoryItemsGetOptionalParams,
|
|
22
24
|
InventoryItemsGetResponse,
|
|
23
25
|
InventoryItemsDeleteOptionalParams,
|
|
24
|
-
InventoryItemsListByVMMServerResponse,
|
|
25
26
|
InventoryItemsListByVMMServerNextResponse
|
|
26
27
|
} from "../models";
|
|
27
28
|
|
|
@@ -61,11 +62,15 @@ export class InventoryItemsImpl implements InventoryItems {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
65
69
|
return this.listByVMMServerPagingPage(
|
|
66
70
|
resourceGroupName,
|
|
67
71
|
vmmServerName,
|
|
68
|
-
options
|
|
72
|
+
options,
|
|
73
|
+
settings
|
|
69
74
|
);
|
|
70
75
|
}
|
|
71
76
|
};
|
|
@@ -74,15 +79,22 @@ export class InventoryItemsImpl implements InventoryItems {
|
|
|
74
79
|
private async *listByVMMServerPagingPage(
|
|
75
80
|
resourceGroupName: string,
|
|
76
81
|
vmmServerName: string,
|
|
77
|
-
options?: InventoryItemsListByVMMServerOptionalParams
|
|
82
|
+
options?: InventoryItemsListByVMMServerOptionalParams,
|
|
83
|
+
settings?: PageSettings
|
|
78
84
|
): AsyncIterableIterator<InventoryItem[]> {
|
|
79
|
-
let result
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
let result: InventoryItemsListByVMMServerResponse;
|
|
86
|
+
let continuationToken = settings?.continuationToken;
|
|
87
|
+
if (!continuationToken) {
|
|
88
|
+
result = await this._listByVMMServer(
|
|
89
|
+
resourceGroupName,
|
|
90
|
+
vmmServerName,
|
|
91
|
+
options
|
|
92
|
+
);
|
|
93
|
+
let page = result.value || [];
|
|
94
|
+
continuationToken = result.nextLink;
|
|
95
|
+
setContinuationToken(page, continuationToken);
|
|
96
|
+
yield page;
|
|
97
|
+
}
|
|
86
98
|
while (continuationToken) {
|
|
87
99
|
result = await this._listByVMMServerNext(
|
|
88
100
|
resourceGroupName,
|
|
@@ -91,7 +103,9 @@ export class InventoryItemsImpl implements InventoryItems {
|
|
|
91
103
|
options
|
|
92
104
|
);
|
|
93
105
|
continuationToken = result.nextLink;
|
|
94
|
-
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
setContinuationToken(page, continuationToken);
|
|
108
|
+
yield page;
|
|
95
109
|
}
|
|
96
110
|
}
|
|
97
111
|
|
|
@@ -308,7 +322,6 @@ const listByVMMServerNextOperationSpec: coreClient.OperationSpec = {
|
|
|
308
322
|
bodyMapper: Mappers.ErrorResponse
|
|
309
323
|
}
|
|
310
324
|
},
|
|
311
|
-
queryParameters: [Parameters.apiVersion],
|
|
312
325
|
urlParameters: [
|
|
313
326
|
Parameters.$host,
|
|
314
327
|
Parameters.subscriptionId,
|
|
@@ -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 { Operations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
|
|
|
48
49
|
[Symbol.asyncIterator]() {
|
|
49
50
|
return this;
|
|
50
51
|
},
|
|
51
|
-
byPage: () => {
|
|
52
|
-
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
private async *listPagingPage(
|
|
58
|
-
options?: OperationsListOptionalParams
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
59
64
|
): AsyncIterableIterator<ResourceProviderOperation[]> {
|
|
60
|
-
let result
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
63
74
|
while (continuationToken) {
|
|
64
75
|
result = await this._listNext(continuationToken, options);
|
|
65
76
|
continuationToken = result.nextLink;
|
|
66
|
-
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -130,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
130
143
|
bodyMapper: Mappers.ErrorResponse
|
|
131
144
|
}
|
|
132
145
|
},
|
|
133
|
-
queryParameters: [Parameters.apiVersion],
|
|
134
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
147
|
headerParameters: [Parameters.accept],
|
|
136
148
|
serializer
|
|
@@ -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
|
VirtualMachineTemplatesListByResourceGroupNextOptionalParams,
|
|
20
21
|
VirtualMachineTemplatesListByResourceGroupOptionalParams,
|
|
22
|
+
VirtualMachineTemplatesListByResourceGroupResponse,
|
|
21
23
|
VirtualMachineTemplatesListBySubscriptionNextOptionalParams,
|
|
22
24
|
VirtualMachineTemplatesListBySubscriptionOptionalParams,
|
|
25
|
+
VirtualMachineTemplatesListBySubscriptionResponse,
|
|
23
26
|
VirtualMachineTemplatesGetOptionalParams,
|
|
24
27
|
VirtualMachineTemplatesGetResponse,
|
|
25
28
|
VirtualMachineTemplatesCreateOrUpdateOptionalParams,
|
|
@@ -28,8 +31,6 @@ import {
|
|
|
28
31
|
ResourcePatch,
|
|
29
32
|
VirtualMachineTemplatesUpdateOptionalParams,
|
|
30
33
|
VirtualMachineTemplatesUpdateResponse,
|
|
31
|
-
VirtualMachineTemplatesListByResourceGroupResponse,
|
|
32
|
-
VirtualMachineTemplatesListBySubscriptionResponse,
|
|
33
34
|
VirtualMachineTemplatesListByResourceGroupNextResponse,
|
|
34
35
|
VirtualMachineTemplatesListBySubscriptionNextResponse
|
|
35
36
|
} from "../models";
|
|
@@ -64,19 +65,33 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
64
65
|
[Symbol.asyncIterator]() {
|
|
65
66
|
return this;
|
|
66
67
|
},
|
|
67
|
-
byPage: () => {
|
|
68
|
-
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
72
|
+
return this.listByResourceGroupPagingPage(
|
|
73
|
+
resourceGroupName,
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
76
|
+
);
|
|
69
77
|
}
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
private async *listByResourceGroupPagingPage(
|
|
74
82
|
resourceGroupName: string,
|
|
75
|
-
options?: VirtualMachineTemplatesListByResourceGroupOptionalParams
|
|
83
|
+
options?: VirtualMachineTemplatesListByResourceGroupOptionalParams,
|
|
84
|
+
settings?: PageSettings
|
|
76
85
|
): AsyncIterableIterator<VirtualMachineTemplate[]> {
|
|
77
|
-
let result
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
let result: VirtualMachineTemplatesListByResourceGroupResponse;
|
|
87
|
+
let continuationToken = settings?.continuationToken;
|
|
88
|
+
if (!continuationToken) {
|
|
89
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
90
|
+
let page = result.value || [];
|
|
91
|
+
continuationToken = result.nextLink;
|
|
92
|
+
setContinuationToken(page, continuationToken);
|
|
93
|
+
yield page;
|
|
94
|
+
}
|
|
80
95
|
while (continuationToken) {
|
|
81
96
|
result = await this._listByResourceGroupNext(
|
|
82
97
|
resourceGroupName,
|
|
@@ -84,7 +99,9 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
84
99
|
options
|
|
85
100
|
);
|
|
86
101
|
continuationToken = result.nextLink;
|
|
87
|
-
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
setContinuationToken(page, continuationToken);
|
|
104
|
+
yield page;
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
107
|
|
|
@@ -115,22 +132,34 @@ export class VirtualMachineTemplatesImpl implements VirtualMachineTemplates {
|
|
|
115
132
|
[Symbol.asyncIterator]() {
|
|
116
133
|
return this;
|
|
117
134
|
},
|
|
118
|
-
byPage: () => {
|
|
119
|
-
|
|
135
|
+
byPage: (settings?: PageSettings) => {
|
|
136
|
+
if (settings?.maxPageSize) {
|
|
137
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
138
|
+
}
|
|
139
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
120
140
|
}
|
|
121
141
|
};
|
|
122
142
|
}
|
|
123
143
|
|
|
124
144
|
private async *listBySubscriptionPagingPage(
|
|
125
|
-
options?: VirtualMachineTemplatesListBySubscriptionOptionalParams
|
|
145
|
+
options?: VirtualMachineTemplatesListBySubscriptionOptionalParams,
|
|
146
|
+
settings?: PageSettings
|
|
126
147
|
): AsyncIterableIterator<VirtualMachineTemplate[]> {
|
|
127
|
-
let result
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
let result: VirtualMachineTemplatesListBySubscriptionResponse;
|
|
149
|
+
let continuationToken = settings?.continuationToken;
|
|
150
|
+
if (!continuationToken) {
|
|
151
|
+
result = await this._listBySubscription(options);
|
|
152
|
+
let page = result.value || [];
|
|
153
|
+
continuationToken = result.nextLink;
|
|
154
|
+
setContinuationToken(page, continuationToken);
|
|
155
|
+
yield page;
|
|
156
|
+
}
|
|
130
157
|
while (continuationToken) {
|
|
131
158
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
132
159
|
continuationToken = result.nextLink;
|
|
133
|
-
|
|
160
|
+
let page = result.value || [];
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
134
163
|
}
|
|
135
164
|
}
|
|
136
165
|
|
|
@@ -651,7 +680,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
651
680
|
bodyMapper: Mappers.ErrorResponse
|
|
652
681
|
}
|
|
653
682
|
},
|
|
654
|
-
queryParameters: [Parameters.apiVersion],
|
|
655
683
|
urlParameters: [
|
|
656
684
|
Parameters.$host,
|
|
657
685
|
Parameters.subscriptionId,
|
|
@@ -672,7 +700,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
672
700
|
bodyMapper: Mappers.ErrorResponse
|
|
673
701
|
}
|
|
674
702
|
},
|
|
675
|
-
queryParameters: [Parameters.apiVersion],
|
|
676
703
|
urlParameters: [
|
|
677
704
|
Parameters.$host,
|
|
678
705
|
Parameters.subscriptionId,
|