@azure/arm-security 6.0.0-beta.1 → 6.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 +35 -5
- package/README.md +7 -7
- package/dist/index.js +2502 -1258
- 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/adaptiveApplicationControlsPutSample.js +6 -6
- package/dist-esm/samples-dev/adaptiveApplicationControlsPutSample.js.map +1 -1
- package/dist-esm/samples-dev/apiCollectionGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionListSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionListSample.js +45 -0
- package/dist-esm/samples-dev/apiCollectionListSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/connectorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/securityConnectorsCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/securityConnectorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/securityConnectorsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsGetSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsListSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/securityContactsCreateSample.js +1 -1
- package/dist-esm/samples-dev/securityContactsCreateSample.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 +151 -47
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +10 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +16 -5
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +227 -107
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +55 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/aPICollection.d.ts +56 -0
- package/dist-esm/src/operations/aPICollection.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollection.js +191 -0
- package/dist-esm/src/operations/aPICollection.js.map +1 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.d.ts +23 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.js +56 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.js.map +1 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.d.ts +24 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.js +58 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.js.map +1 -0
- package/dist-esm/src/operations/adaptiveNetworkHardenings.d.ts.map +1 -1
- package/dist-esm/src/operations/adaptiveNetworkHardenings.js +19 -7
- package/dist-esm/src/operations/adaptiveNetworkHardenings.js.map +1 -1
- package/dist-esm/src/operations/alerts.d.ts.map +1 -1
- package/dist-esm/src/operations/alerts.js +73 -28
- package/dist-esm/src/operations/alerts.js.map +1 -1
- package/dist-esm/src/operations/alertsSuppressionRules.d.ts.map +1 -1
- package/dist-esm/src/operations/alertsSuppressionRules.js +19 -7
- package/dist-esm/src/operations/alertsSuppressionRules.js.map +1 -1
- package/dist-esm/src/operations/allowedConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/allowedConnections.js +37 -14
- package/dist-esm/src/operations/allowedConnections.js.map +1 -1
- package/dist-esm/src/operations/applications.d.ts.map +1 -1
- package/dist-esm/src/operations/applications.js +19 -7
- package/dist-esm/src/operations/applications.js.map +1 -1
- package/dist-esm/src/operations/assessments.d.ts.map +1 -1
- package/dist-esm/src/operations/assessments.js +19 -7
- package/dist-esm/src/operations/assessments.js.map +1 -1
- package/dist-esm/src/operations/assessmentsMetadata.d.ts.map +1 -1
- package/dist-esm/src/operations/assessmentsMetadata.js +37 -14
- package/dist-esm/src/operations/assessmentsMetadata.js.map +1 -1
- package/dist-esm/src/operations/autoProvisioningSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/autoProvisioningSettings.js +19 -7
- package/dist-esm/src/operations/autoProvisioningSettings.js.map +1 -1
- package/dist-esm/src/operations/automations.d.ts.map +1 -1
- package/dist-esm/src/operations/automations.js +37 -14
- package/dist-esm/src/operations/automations.js.map +1 -1
- package/dist-esm/src/operations/complianceResults.d.ts.map +1 -1
- package/dist-esm/src/operations/complianceResults.js +19 -7
- package/dist-esm/src/operations/complianceResults.js.map +1 -1
- package/dist-esm/src/operations/compliances.d.ts.map +1 -1
- package/dist-esm/src/operations/compliances.js +19 -7
- package/dist-esm/src/operations/compliances.js.map +1 -1
- package/dist-esm/src/operations/connectors.d.ts.map +1 -1
- package/dist-esm/src/operations/connectors.js +19 -7
- package/dist-esm/src/operations/connectors.js.map +1 -1
- package/dist-esm/src/operations/customAssessmentAutomations.d.ts.map +1 -1
- package/dist-esm/src/operations/customAssessmentAutomations.js +37 -14
- package/dist-esm/src/operations/customAssessmentAutomations.js.map +1 -1
- package/dist-esm/src/operations/customEntityStoreAssignments.d.ts.map +1 -1
- package/dist-esm/src/operations/customEntityStoreAssignments.js +37 -14
- package/dist-esm/src/operations/customEntityStoreAssignments.js.map +1 -1
- package/dist-esm/src/operations/deviceSecurityGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/deviceSecurityGroups.js +19 -7
- package/dist-esm/src/operations/deviceSecurityGroups.js.map +1 -1
- package/dist-esm/src/operations/discoveredSecuritySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/discoveredSecuritySolutions.js +37 -14
- package/dist-esm/src/operations/discoveredSecuritySolutions.js.map +1 -1
- package/dist-esm/src/operations/externalSecuritySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/externalSecuritySolutions.js +37 -14
- package/dist-esm/src/operations/externalSecuritySolutions.js.map +1 -1
- package/dist-esm/src/operations/governanceAssignments.d.ts.map +1 -1
- package/dist-esm/src/operations/governanceAssignments.js +19 -7
- package/dist-esm/src/operations/governanceAssignments.js.map +1 -1
- package/dist-esm/src/operations/governanceRuleOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/governanceRuleOperations.js +19 -7
- package/dist-esm/src/operations/governanceRuleOperations.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +3 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/informationProtectionPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/informationProtectionPolicies.js +19 -7
- package/dist-esm/src/operations/informationProtectionPolicies.js.map +1 -1
- package/dist-esm/src/operations/ingestionSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/ingestionSettings.js +19 -7
- package/dist-esm/src/operations/ingestionSettings.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolution.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolution.js +37 -14
- package/dist-esm/src/operations/iotSecuritySolution.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.js +19 -7
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.js +19 -7
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.js.map +1 -1
- package/dist-esm/src/operations/jitNetworkAccessPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/jitNetworkAccessPolicies.js +73 -28
- package/dist-esm/src/operations/jitNetworkAccessPolicies.js.map +1 -1
- package/dist-esm/src/operations/locations.d.ts.map +1 -1
- package/dist-esm/src/operations/locations.js +19 -7
- package/dist-esm/src/operations/locations.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -7
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceAssessments.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceAssessments.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceAssessments.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceControls.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceControls.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceControls.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceStandards.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceStandards.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceStandards.js.map +1 -1
- package/dist-esm/src/operations/secureScoreControlDefinitions.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScoreControlDefinitions.js +37 -14
- package/dist-esm/src/operations/secureScoreControlDefinitions.js.map +1 -1
- package/dist-esm/src/operations/secureScoreControls.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScoreControls.js +37 -14
- package/dist-esm/src/operations/secureScoreControls.js.map +1 -1
- package/dist-esm/src/operations/secureScores.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScores.js +19 -7
- package/dist-esm/src/operations/secureScores.js.map +1 -1
- package/dist-esm/src/operations/securityConnectorApplications.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectorApplications.js +19 -7
- package/dist-esm/src/operations/securityConnectorApplications.js.map +1 -1
- package/dist-esm/src/operations/securityConnectorGovernanceRule.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectorGovernanceRule.js +19 -7
- package/dist-esm/src/operations/securityConnectorGovernanceRule.js.map +1 -1
- package/dist-esm/src/operations/securityConnectors.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectors.js +37 -14
- package/dist-esm/src/operations/securityConnectors.js.map +1 -1
- package/dist-esm/src/operations/securityContacts.d.ts.map +1 -1
- package/dist-esm/src/operations/securityContacts.js +19 -7
- package/dist-esm/src/operations/securityContacts.js.map +1 -1
- package/dist-esm/src/operations/securitySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/securitySolutions.js +19 -7
- package/dist-esm/src/operations/securitySolutions.js.map +1 -1
- package/dist-esm/src/operations/settings.d.ts.map +1 -1
- package/dist-esm/src/operations/settings.js +19 -7
- package/dist-esm/src/operations/settings.js.map +1 -1
- package/dist-esm/src/operations/softwareInventories.d.ts.map +1 -1
- package/dist-esm/src/operations/softwareInventories.js +37 -14
- package/dist-esm/src/operations/softwareInventories.js.map +1 -1
- package/dist-esm/src/operations/subAssessments.d.ts.map +1 -1
- package/dist-esm/src/operations/subAssessments.js +37 -14
- package/dist-esm/src/operations/subAssessments.js.map +1 -1
- package/dist-esm/src/operations/tasks.d.ts.map +1 -1
- package/dist-esm/src/operations/tasks.js +55 -21
- package/dist-esm/src/operations/tasks.js.map +1 -1
- package/dist-esm/src/operations/topology.d.ts.map +1 -1
- package/dist-esm/src/operations/topology.js +37 -14
- package/dist-esm/src/operations/topology.js.map +1 -1
- package/dist-esm/src/operations/workspaceSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaceSettings.js +19 -7
- package/dist-esm/src/operations/workspaceSettings.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/aPICollection.d.ts +28 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.d.ts +15 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +3 -0
- package/dist-esm/src/operationsInterfaces/index.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/securityCenter.d.ts +4 -1
- package/dist-esm/src/securityCenter.d.ts.map +1 -1
- package/dist-esm/src/securityCenter.js +8 -8
- package/dist-esm/src/securityCenter.js.map +1 -1
- package/package.json +6 -5
- package/review/arm-security.api.md +139 -35
- package/src/index.ts +1 -0
- package/src/models/index.ts +171 -49
- package/src/models/mappers.ts +251 -117
- package/src/models/parameters.ts +59 -1
- package/src/operations/aPICollection.ts +249 -0
- package/src/operations/aPICollectionOffboarding.ts +73 -0
- package/src/operations/aPICollectionOnboarding.ts +78 -0
- package/src/operations/adaptiveNetworkHardenings.ts +28 -14
- package/src/operations/alerts.ts +91 -39
- package/src/operations/alertsSuppressionRules.ts +21 -8
- package/src/operations/allowedConnections.ts +41 -16
- package/src/operations/applications.ts +21 -8
- package/src/operations/assessments.ts +21 -8
- package/src/operations/assessmentsMetadata.ts +42 -17
- package/src/operations/autoProvisioningSettings.ts +21 -8
- package/src/operations/automations.ts +45 -16
- package/src/operations/complianceResults.ts +21 -8
- package/src/operations/compliances.ts +21 -8
- package/src/operations/connectors.ts +21 -8
- package/src/operations/customAssessmentAutomations.ts +46 -17
- package/src/operations/customEntityStoreAssignments.ts +46 -17
- package/src/operations/deviceSecurityGroups.ts +21 -8
- package/src/operations/discoveredSecuritySolutions.ts +41 -16
- package/src/operations/externalSecuritySolutions.ts +41 -16
- package/src/operations/governanceAssignments.ts +21 -8
- package/src/operations/governanceRuleOperations.ts +21 -8
- package/src/operations/index.ts +3 -0
- package/src/operations/informationProtectionPolicies.ts +22 -9
- package/src/operations/ingestionSettings.ts +21 -8
- package/src/operations/iotSecuritySolution.ts +45 -16
- package/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts +26 -8
- package/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts +27 -9
- package/src/operations/jitNetworkAccessPolicies.ts +90 -36
- package/src/operations/locations.ts +21 -8
- package/src/operations/operations.ts +21 -8
- package/src/operations/regulatoryComplianceAssessments.ts +26 -12
- package/src/operations/regulatoryComplianceControls.ts +25 -8
- package/src/operations/regulatoryComplianceStandards.ts +21 -8
- package/src/operations/secureScoreControlDefinitions.ts +41 -16
- package/src/operations/secureScoreControls.ts +45 -16
- package/src/operations/secureScores.ts +21 -8
- package/src/operations/securityConnectorApplications.ts +26 -12
- package/src/operations/securityConnectorGovernanceRule.ts +26 -12
- package/src/operations/securityConnectors.ts +45 -16
- package/src/operations/securityContacts.ts +21 -8
- package/src/operations/securitySolutions.ts +21 -8
- package/src/operations/settings.ts +21 -8
- package/src/operations/softwareInventories.ts +48 -22
- package/src/operations/subAssessments.ts +41 -16
- package/src/operations/tasks.ts +67 -29
- package/src/operations/topology.ts +41 -16
- package/src/operations/workspaceSettings.ts +21 -8
- package/src/operationsInterfaces/aPICollection.ts +51 -0
- package/src/operationsInterfaces/aPICollectionOffboarding.ts +28 -0
- package/src/operationsInterfaces/aPICollectionOnboarding.ts +32 -0
- package/src/operationsInterfaces/index.ts +3 -0
- package/src/pagingHelper.ts +39 -0
- package/src/securityCenter.ts +19 -8
- package/types/arm-security.d.ts +238 -52
- 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 { Automations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,9 +17,9 @@ import {
|
|
|
16
17
|
Automation,
|
|
17
18
|
AutomationsListNextOptionalParams,
|
|
18
19
|
AutomationsListOptionalParams,
|
|
20
|
+
AutomationsListResponse,
|
|
19
21
|
AutomationsListByResourceGroupNextOptionalParams,
|
|
20
22
|
AutomationsListByResourceGroupOptionalParams,
|
|
21
|
-
AutomationsListResponse,
|
|
22
23
|
AutomationsListByResourceGroupResponse,
|
|
23
24
|
AutomationsGetOptionalParams,
|
|
24
25
|
AutomationsGetResponse,
|
|
@@ -60,22 +61,34 @@ export class AutomationsImpl implements Automations {
|
|
|
60
61
|
[Symbol.asyncIterator]() {
|
|
61
62
|
return this;
|
|
62
63
|
},
|
|
63
|
-
byPage: () => {
|
|
64
|
-
|
|
64
|
+
byPage: (settings?: PageSettings) => {
|
|
65
|
+
if (settings?.maxPageSize) {
|
|
66
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
67
|
+
}
|
|
68
|
+
return this.listPagingPage(options, settings);
|
|
65
69
|
}
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
private async *listPagingPage(
|
|
70
|
-
options?: AutomationsListOptionalParams
|
|
74
|
+
options?: AutomationsListOptionalParams,
|
|
75
|
+
settings?: PageSettings
|
|
71
76
|
): AsyncIterableIterator<Automation[]> {
|
|
72
|
-
let result
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
let result: AutomationsListResponse;
|
|
78
|
+
let continuationToken = settings?.continuationToken;
|
|
79
|
+
if (!continuationToken) {
|
|
80
|
+
result = await this._list(options);
|
|
81
|
+
let page = result.value || [];
|
|
82
|
+
continuationToken = result.nextLink;
|
|
83
|
+
setContinuationToken(page, continuationToken);
|
|
84
|
+
yield page;
|
|
85
|
+
}
|
|
75
86
|
while (continuationToken) {
|
|
76
87
|
result = await this._listNext(continuationToken, options);
|
|
77
88
|
continuationToken = result.nextLink;
|
|
78
|
-
|
|
89
|
+
let page = result.value || [];
|
|
90
|
+
setContinuationToken(page, continuationToken);
|
|
91
|
+
yield page;
|
|
79
92
|
}
|
|
80
93
|
}
|
|
81
94
|
|
|
@@ -106,19 +119,33 @@ export class AutomationsImpl implements Automations {
|
|
|
106
119
|
[Symbol.asyncIterator]() {
|
|
107
120
|
return this;
|
|
108
121
|
},
|
|
109
|
-
byPage: () => {
|
|
110
|
-
|
|
122
|
+
byPage: (settings?: PageSettings) => {
|
|
123
|
+
if (settings?.maxPageSize) {
|
|
124
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
125
|
+
}
|
|
126
|
+
return this.listByResourceGroupPagingPage(
|
|
127
|
+
resourceGroupName,
|
|
128
|
+
options,
|
|
129
|
+
settings
|
|
130
|
+
);
|
|
111
131
|
}
|
|
112
132
|
};
|
|
113
133
|
}
|
|
114
134
|
|
|
115
135
|
private async *listByResourceGroupPagingPage(
|
|
116
136
|
resourceGroupName: string,
|
|
117
|
-
options?: AutomationsListByResourceGroupOptionalParams
|
|
137
|
+
options?: AutomationsListByResourceGroupOptionalParams,
|
|
138
|
+
settings?: PageSettings
|
|
118
139
|
): AsyncIterableIterator<Automation[]> {
|
|
119
|
-
let result
|
|
120
|
-
|
|
121
|
-
|
|
140
|
+
let result: AutomationsListByResourceGroupResponse;
|
|
141
|
+
let continuationToken = settings?.continuationToken;
|
|
142
|
+
if (!continuationToken) {
|
|
143
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
144
|
+
let page = result.value || [];
|
|
145
|
+
continuationToken = result.nextLink;
|
|
146
|
+
setContinuationToken(page, continuationToken);
|
|
147
|
+
yield page;
|
|
148
|
+
}
|
|
122
149
|
while (continuationToken) {
|
|
123
150
|
result = await this._listByResourceGroupNext(
|
|
124
151
|
resourceGroupName,
|
|
@@ -126,7 +153,9 @@ export class AutomationsImpl implements Automations {
|
|
|
126
153
|
options
|
|
127
154
|
);
|
|
128
155
|
continuationToken = result.nextLink;
|
|
129
|
-
|
|
156
|
+
let page = result.value || [];
|
|
157
|
+
setContinuationToken(page, continuationToken);
|
|
158
|
+
yield page;
|
|
130
159
|
}
|
|
131
160
|
}
|
|
132
161
|
|
|
@@ -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 { ComplianceResults } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -54,23 +55,35 @@ export class ComplianceResultsImpl implements ComplianceResults {
|
|
|
54
55
|
[Symbol.asyncIterator]() {
|
|
55
56
|
return this;
|
|
56
57
|
},
|
|
57
|
-
byPage: () => {
|
|
58
|
-
|
|
58
|
+
byPage: (settings?: PageSettings) => {
|
|
59
|
+
if (settings?.maxPageSize) {
|
|
60
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
+
}
|
|
62
|
+
return this.listPagingPage(scope, options, settings);
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
private async *listPagingPage(
|
|
64
68
|
scope: string,
|
|
65
|
-
options?: ComplianceResultsListOptionalParams
|
|
69
|
+
options?: ComplianceResultsListOptionalParams,
|
|
70
|
+
settings?: PageSettings
|
|
66
71
|
): AsyncIterableIterator<ComplianceResult[]> {
|
|
67
|
-
let result
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
let result: ComplianceResultsListResponse;
|
|
73
|
+
let continuationToken = settings?.continuationToken;
|
|
74
|
+
if (!continuationToken) {
|
|
75
|
+
result = await this._list(scope, options);
|
|
76
|
+
let page = result.value || [];
|
|
77
|
+
continuationToken = result.nextLink;
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
70
81
|
while (continuationToken) {
|
|
71
82
|
result = await this._listNext(scope, continuationToken, options);
|
|
72
83
|
continuationToken = result.nextLink;
|
|
73
|
-
|
|
84
|
+
let page = result.value || [];
|
|
85
|
+
setContinuationToken(page, continuationToken);
|
|
86
|
+
yield page;
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
|
|
@@ -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 { Compliances } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -54,23 +55,35 @@ export class CompliancesImpl implements Compliances {
|
|
|
54
55
|
[Symbol.asyncIterator]() {
|
|
55
56
|
return this;
|
|
56
57
|
},
|
|
57
|
-
byPage: () => {
|
|
58
|
-
|
|
58
|
+
byPage: (settings?: PageSettings) => {
|
|
59
|
+
if (settings?.maxPageSize) {
|
|
60
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
+
}
|
|
62
|
+
return this.listPagingPage(scope, options, settings);
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
private async *listPagingPage(
|
|
64
68
|
scope: string,
|
|
65
|
-
options?: CompliancesListOptionalParams
|
|
69
|
+
options?: CompliancesListOptionalParams,
|
|
70
|
+
settings?: PageSettings
|
|
66
71
|
): AsyncIterableIterator<Compliance[]> {
|
|
67
|
-
let result
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
let result: CompliancesListResponse;
|
|
73
|
+
let continuationToken = settings?.continuationToken;
|
|
74
|
+
if (!continuationToken) {
|
|
75
|
+
result = await this._list(scope, options);
|
|
76
|
+
let page = result.value || [];
|
|
77
|
+
continuationToken = result.nextLink;
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
70
81
|
while (continuationToken) {
|
|
71
82
|
result = await this._listNext(scope, continuationToken, options);
|
|
72
83
|
continuationToken = result.nextLink;
|
|
73
|
-
|
|
84
|
+
let page = result.value || [];
|
|
85
|
+
setContinuationToken(page, continuationToken);
|
|
86
|
+
yield page;
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
|
|
@@ -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 { Connectors } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -53,22 +54,34 @@ export class ConnectorsImpl implements Connectors {
|
|
|
53
54
|
[Symbol.asyncIterator]() {
|
|
54
55
|
return this;
|
|
55
56
|
},
|
|
56
|
-
byPage: () => {
|
|
57
|
-
|
|
57
|
+
byPage: (settings?: PageSettings) => {
|
|
58
|
+
if (settings?.maxPageSize) {
|
|
59
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
60
|
+
}
|
|
61
|
+
return this.listPagingPage(options, settings);
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
private async *listPagingPage(
|
|
63
|
-
options?: ConnectorsListOptionalParams
|
|
67
|
+
options?: ConnectorsListOptionalParams,
|
|
68
|
+
settings?: PageSettings
|
|
64
69
|
): AsyncIterableIterator<ConnectorSetting[]> {
|
|
65
|
-
let result
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
let result: ConnectorsListResponse;
|
|
71
|
+
let continuationToken = settings?.continuationToken;
|
|
72
|
+
if (!continuationToken) {
|
|
73
|
+
result = await this._list(options);
|
|
74
|
+
let page = result.value || [];
|
|
75
|
+
continuationToken = result.nextLink;
|
|
76
|
+
setContinuationToken(page, continuationToken);
|
|
77
|
+
yield page;
|
|
78
|
+
}
|
|
68
79
|
while (continuationToken) {
|
|
69
80
|
result = await this._listNext(continuationToken, options);
|
|
70
81
|
continuationToken = result.nextLink;
|
|
71
|
-
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
setContinuationToken(page, continuationToken);
|
|
84
|
+
yield page;
|
|
72
85
|
}
|
|
73
86
|
}
|
|
74
87
|
|
|
@@ -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 { CustomAssessmentAutomations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,16 +17,16 @@ import {
|
|
|
16
17
|
CustomAssessmentAutomation,
|
|
17
18
|
CustomAssessmentAutomationsListByResourceGroupNextOptionalParams,
|
|
18
19
|
CustomAssessmentAutomationsListByResourceGroupOptionalParams,
|
|
20
|
+
CustomAssessmentAutomationsListByResourceGroupResponse,
|
|
19
21
|
CustomAssessmentAutomationsListBySubscriptionNextOptionalParams,
|
|
20
22
|
CustomAssessmentAutomationsListBySubscriptionOptionalParams,
|
|
23
|
+
CustomAssessmentAutomationsListBySubscriptionResponse,
|
|
21
24
|
CustomAssessmentAutomationsGetOptionalParams,
|
|
22
25
|
CustomAssessmentAutomationsGetResponse,
|
|
23
26
|
CustomAssessmentAutomationRequest,
|
|
24
27
|
CustomAssessmentAutomationsCreateOptionalParams,
|
|
25
28
|
CustomAssessmentAutomationsCreateResponse,
|
|
26
29
|
CustomAssessmentAutomationsDeleteOptionalParams,
|
|
27
|
-
CustomAssessmentAutomationsListByResourceGroupResponse,
|
|
28
|
-
CustomAssessmentAutomationsListBySubscriptionResponse,
|
|
29
30
|
CustomAssessmentAutomationsListByResourceGroupNextResponse,
|
|
30
31
|
CustomAssessmentAutomationsListBySubscriptionNextResponse
|
|
31
32
|
} from "../models";
|
|
@@ -62,19 +63,33 @@ export class CustomAssessmentAutomationsImpl
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
70
|
+
return this.listByResourceGroupPagingPage(
|
|
71
|
+
resourceGroupName,
|
|
72
|
+
options,
|
|
73
|
+
settings
|
|
74
|
+
);
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
private async *listByResourceGroupPagingPage(
|
|
72
80
|
resourceGroupName: string,
|
|
73
|
-
options?: CustomAssessmentAutomationsListByResourceGroupOptionalParams
|
|
81
|
+
options?: CustomAssessmentAutomationsListByResourceGroupOptionalParams,
|
|
82
|
+
settings?: PageSettings
|
|
74
83
|
): AsyncIterableIterator<CustomAssessmentAutomation[]> {
|
|
75
|
-
let result
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
let result: CustomAssessmentAutomationsListByResourceGroupResponse;
|
|
85
|
+
let continuationToken = settings?.continuationToken;
|
|
86
|
+
if (!continuationToken) {
|
|
87
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
continuationToken = result.nextLink;
|
|
90
|
+
setContinuationToken(page, continuationToken);
|
|
91
|
+
yield page;
|
|
92
|
+
}
|
|
78
93
|
while (continuationToken) {
|
|
79
94
|
result = await this._listByResourceGroupNext(
|
|
80
95
|
resourceGroupName,
|
|
@@ -82,7 +97,9 @@ export class CustomAssessmentAutomationsImpl
|
|
|
82
97
|
options
|
|
83
98
|
);
|
|
84
99
|
continuationToken = result.nextLink;
|
|
85
|
-
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
86
103
|
}
|
|
87
104
|
}
|
|
88
105
|
|
|
@@ -113,22 +130,34 @@ export class CustomAssessmentAutomationsImpl
|
|
|
113
130
|
[Symbol.asyncIterator]() {
|
|
114
131
|
return this;
|
|
115
132
|
},
|
|
116
|
-
byPage: () => {
|
|
117
|
-
|
|
133
|
+
byPage: (settings?: PageSettings) => {
|
|
134
|
+
if (settings?.maxPageSize) {
|
|
135
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
136
|
+
}
|
|
137
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
118
138
|
}
|
|
119
139
|
};
|
|
120
140
|
}
|
|
121
141
|
|
|
122
142
|
private async *listBySubscriptionPagingPage(
|
|
123
|
-
options?: CustomAssessmentAutomationsListBySubscriptionOptionalParams
|
|
143
|
+
options?: CustomAssessmentAutomationsListBySubscriptionOptionalParams,
|
|
144
|
+
settings?: PageSettings
|
|
124
145
|
): AsyncIterableIterator<CustomAssessmentAutomation[]> {
|
|
125
|
-
let result
|
|
126
|
-
|
|
127
|
-
|
|
146
|
+
let result: CustomAssessmentAutomationsListBySubscriptionResponse;
|
|
147
|
+
let continuationToken = settings?.continuationToken;
|
|
148
|
+
if (!continuationToken) {
|
|
149
|
+
result = await this._listBySubscription(options);
|
|
150
|
+
let page = result.value || [];
|
|
151
|
+
continuationToken = result.nextLink;
|
|
152
|
+
setContinuationToken(page, continuationToken);
|
|
153
|
+
yield page;
|
|
154
|
+
}
|
|
128
155
|
while (continuationToken) {
|
|
129
156
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
130
157
|
continuationToken = result.nextLink;
|
|
131
|
-
|
|
158
|
+
let page = result.value || [];
|
|
159
|
+
setContinuationToken(page, continuationToken);
|
|
160
|
+
yield page;
|
|
132
161
|
}
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -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 { CustomEntityStoreAssignments } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,16 +17,16 @@ import {
|
|
|
16
17
|
CustomEntityStoreAssignment,
|
|
17
18
|
CustomEntityStoreAssignmentsListByResourceGroupNextOptionalParams,
|
|
18
19
|
CustomEntityStoreAssignmentsListByResourceGroupOptionalParams,
|
|
20
|
+
CustomEntityStoreAssignmentsListByResourceGroupResponse,
|
|
19
21
|
CustomEntityStoreAssignmentsListBySubscriptionNextOptionalParams,
|
|
20
22
|
CustomEntityStoreAssignmentsListBySubscriptionOptionalParams,
|
|
23
|
+
CustomEntityStoreAssignmentsListBySubscriptionResponse,
|
|
21
24
|
CustomEntityStoreAssignmentsGetOptionalParams,
|
|
22
25
|
CustomEntityStoreAssignmentsGetResponse,
|
|
23
26
|
CustomEntityStoreAssignmentRequest,
|
|
24
27
|
CustomEntityStoreAssignmentsCreateOptionalParams,
|
|
25
28
|
CustomEntityStoreAssignmentsCreateResponse,
|
|
26
29
|
CustomEntityStoreAssignmentsDeleteOptionalParams,
|
|
27
|
-
CustomEntityStoreAssignmentsListByResourceGroupResponse,
|
|
28
|
-
CustomEntityStoreAssignmentsListBySubscriptionResponse,
|
|
29
30
|
CustomEntityStoreAssignmentsListByResourceGroupNextResponse,
|
|
30
31
|
CustomEntityStoreAssignmentsListBySubscriptionNextResponse
|
|
31
32
|
} from "../models";
|
|
@@ -62,19 +63,33 @@ export class CustomEntityStoreAssignmentsImpl
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
70
|
+
return this.listByResourceGroupPagingPage(
|
|
71
|
+
resourceGroupName,
|
|
72
|
+
options,
|
|
73
|
+
settings
|
|
74
|
+
);
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
private async *listByResourceGroupPagingPage(
|
|
72
80
|
resourceGroupName: string,
|
|
73
|
-
options?: CustomEntityStoreAssignmentsListByResourceGroupOptionalParams
|
|
81
|
+
options?: CustomEntityStoreAssignmentsListByResourceGroupOptionalParams,
|
|
82
|
+
settings?: PageSettings
|
|
74
83
|
): AsyncIterableIterator<CustomEntityStoreAssignment[]> {
|
|
75
|
-
let result
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
let result: CustomEntityStoreAssignmentsListByResourceGroupResponse;
|
|
85
|
+
let continuationToken = settings?.continuationToken;
|
|
86
|
+
if (!continuationToken) {
|
|
87
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
continuationToken = result.nextLink;
|
|
90
|
+
setContinuationToken(page, continuationToken);
|
|
91
|
+
yield page;
|
|
92
|
+
}
|
|
78
93
|
while (continuationToken) {
|
|
79
94
|
result = await this._listByResourceGroupNext(
|
|
80
95
|
resourceGroupName,
|
|
@@ -82,7 +97,9 @@ export class CustomEntityStoreAssignmentsImpl
|
|
|
82
97
|
options
|
|
83
98
|
);
|
|
84
99
|
continuationToken = result.nextLink;
|
|
85
|
-
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
86
103
|
}
|
|
87
104
|
}
|
|
88
105
|
|
|
@@ -113,22 +130,34 @@ export class CustomEntityStoreAssignmentsImpl
|
|
|
113
130
|
[Symbol.asyncIterator]() {
|
|
114
131
|
return this;
|
|
115
132
|
},
|
|
116
|
-
byPage: () => {
|
|
117
|
-
|
|
133
|
+
byPage: (settings?: PageSettings) => {
|
|
134
|
+
if (settings?.maxPageSize) {
|
|
135
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
136
|
+
}
|
|
137
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
118
138
|
}
|
|
119
139
|
};
|
|
120
140
|
}
|
|
121
141
|
|
|
122
142
|
private async *listBySubscriptionPagingPage(
|
|
123
|
-
options?: CustomEntityStoreAssignmentsListBySubscriptionOptionalParams
|
|
143
|
+
options?: CustomEntityStoreAssignmentsListBySubscriptionOptionalParams,
|
|
144
|
+
settings?: PageSettings
|
|
124
145
|
): AsyncIterableIterator<CustomEntityStoreAssignment[]> {
|
|
125
|
-
let result
|
|
126
|
-
|
|
127
|
-
|
|
146
|
+
let result: CustomEntityStoreAssignmentsListBySubscriptionResponse;
|
|
147
|
+
let continuationToken = settings?.continuationToken;
|
|
148
|
+
if (!continuationToken) {
|
|
149
|
+
result = await this._listBySubscription(options);
|
|
150
|
+
let page = result.value || [];
|
|
151
|
+
continuationToken = result.nextLink;
|
|
152
|
+
setContinuationToken(page, continuationToken);
|
|
153
|
+
yield page;
|
|
154
|
+
}
|
|
128
155
|
while (continuationToken) {
|
|
129
156
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
130
157
|
continuationToken = result.nextLink;
|
|
131
|
-
|
|
158
|
+
let page = result.value || [];
|
|
159
|
+
setContinuationToken(page, continuationToken);
|
|
160
|
+
yield page;
|
|
132
161
|
}
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -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 { DeviceSecurityGroups } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -55,23 +56,35 @@ export class DeviceSecurityGroupsImpl implements DeviceSecurityGroups {
|
|
|
55
56
|
[Symbol.asyncIterator]() {
|
|
56
57
|
return this;
|
|
57
58
|
},
|
|
58
|
-
byPage: () => {
|
|
59
|
-
|
|
59
|
+
byPage: (settings?: PageSettings) => {
|
|
60
|
+
if (settings?.maxPageSize) {
|
|
61
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
62
|
+
}
|
|
63
|
+
return this.listPagingPage(resourceId, options, settings);
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
private async *listPagingPage(
|
|
65
69
|
resourceId: string,
|
|
66
|
-
options?: DeviceSecurityGroupsListOptionalParams
|
|
70
|
+
options?: DeviceSecurityGroupsListOptionalParams,
|
|
71
|
+
settings?: PageSettings
|
|
67
72
|
): AsyncIterableIterator<DeviceSecurityGroup[]> {
|
|
68
|
-
let result
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
let result: DeviceSecurityGroupsListResponse;
|
|
74
|
+
let continuationToken = settings?.continuationToken;
|
|
75
|
+
if (!continuationToken) {
|
|
76
|
+
result = await this._list(resourceId, options);
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
continuationToken = result.nextLink;
|
|
79
|
+
setContinuationToken(page, continuationToken);
|
|
80
|
+
yield page;
|
|
81
|
+
}
|
|
71
82
|
while (continuationToken) {
|
|
72
83
|
result = await this._listNext(resourceId, continuationToken, options);
|
|
73
84
|
continuationToken = result.nextLink;
|
|
74
|
-
|
|
85
|
+
let page = result.value || [];
|
|
86
|
+
setContinuationToken(page, continuationToken);
|
|
87
|
+
yield page;
|
|
75
88
|
}
|
|
76
89
|
}
|
|
77
90
|
|
|
@@ -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 { DiscoveredSecuritySolutions } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,9 +17,9 @@ import {
|
|
|
16
17
|
DiscoveredSecuritySolution,
|
|
17
18
|
DiscoveredSecuritySolutionsListNextOptionalParams,
|
|
18
19
|
DiscoveredSecuritySolutionsListOptionalParams,
|
|
20
|
+
DiscoveredSecuritySolutionsListResponse,
|
|
19
21
|
DiscoveredSecuritySolutionsListByHomeRegionNextOptionalParams,
|
|
20
22
|
DiscoveredSecuritySolutionsListByHomeRegionOptionalParams,
|
|
21
|
-
DiscoveredSecuritySolutionsListResponse,
|
|
22
23
|
DiscoveredSecuritySolutionsListByHomeRegionResponse,
|
|
23
24
|
DiscoveredSecuritySolutionsGetOptionalParams,
|
|
24
25
|
DiscoveredSecuritySolutionsGetResponse,
|
|
@@ -55,22 +56,34 @@ export class DiscoveredSecuritySolutionsImpl
|
|
|
55
56
|
[Symbol.asyncIterator]() {
|
|
56
57
|
return this;
|
|
57
58
|
},
|
|
58
|
-
byPage: () => {
|
|
59
|
-
|
|
59
|
+
byPage: (settings?: PageSettings) => {
|
|
60
|
+
if (settings?.maxPageSize) {
|
|
61
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
62
|
+
}
|
|
63
|
+
return this.listPagingPage(options, settings);
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
private async *listPagingPage(
|
|
65
|
-
options?: DiscoveredSecuritySolutionsListOptionalParams
|
|
69
|
+
options?: DiscoveredSecuritySolutionsListOptionalParams,
|
|
70
|
+
settings?: PageSettings
|
|
66
71
|
): AsyncIterableIterator<DiscoveredSecuritySolution[]> {
|
|
67
|
-
let result
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
let result: DiscoveredSecuritySolutionsListResponse;
|
|
73
|
+
let continuationToken = settings?.continuationToken;
|
|
74
|
+
if (!continuationToken) {
|
|
75
|
+
result = await this._list(options);
|
|
76
|
+
let page = result.value || [];
|
|
77
|
+
continuationToken = result.nextLink;
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
70
81
|
while (continuationToken) {
|
|
71
82
|
result = await this._listNext(continuationToken, options);
|
|
72
83
|
continuationToken = result.nextLink;
|
|
73
|
-
|
|
84
|
+
let page = result.value || [];
|
|
85
|
+
setContinuationToken(page, continuationToken);
|
|
86
|
+
yield page;
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
|
|
@@ -100,19 +113,29 @@ export class DiscoveredSecuritySolutionsImpl
|
|
|
100
113
|
[Symbol.asyncIterator]() {
|
|
101
114
|
return this;
|
|
102
115
|
},
|
|
103
|
-
byPage: () => {
|
|
104
|
-
|
|
116
|
+
byPage: (settings?: PageSettings) => {
|
|
117
|
+
if (settings?.maxPageSize) {
|
|
118
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
119
|
+
}
|
|
120
|
+
return this.listByHomeRegionPagingPage(ascLocation, options, settings);
|
|
105
121
|
}
|
|
106
122
|
};
|
|
107
123
|
}
|
|
108
124
|
|
|
109
125
|
private async *listByHomeRegionPagingPage(
|
|
110
126
|
ascLocation: string,
|
|
111
|
-
options?: DiscoveredSecuritySolutionsListByHomeRegionOptionalParams
|
|
127
|
+
options?: DiscoveredSecuritySolutionsListByHomeRegionOptionalParams,
|
|
128
|
+
settings?: PageSettings
|
|
112
129
|
): AsyncIterableIterator<DiscoveredSecuritySolution[]> {
|
|
113
|
-
let result
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
let result: DiscoveredSecuritySolutionsListByHomeRegionResponse;
|
|
131
|
+
let continuationToken = settings?.continuationToken;
|
|
132
|
+
if (!continuationToken) {
|
|
133
|
+
result = await this._listByHomeRegion(ascLocation, options);
|
|
134
|
+
let page = result.value || [];
|
|
135
|
+
continuationToken = result.nextLink;
|
|
136
|
+
setContinuationToken(page, continuationToken);
|
|
137
|
+
yield page;
|
|
138
|
+
}
|
|
116
139
|
while (continuationToken) {
|
|
117
140
|
result = await this._listByHomeRegionNext(
|
|
118
141
|
ascLocation,
|
|
@@ -120,7 +143,9 @@ export class DiscoveredSecuritySolutionsImpl
|
|
|
120
143
|
options
|
|
121
144
|
);
|
|
122
145
|
continuationToken = result.nextLink;
|
|
123
|
-
|
|
146
|
+
let page = result.value || [];
|
|
147
|
+
setContinuationToken(page, continuationToken);
|
|
148
|
+
yield page;
|
|
124
149
|
}
|
|
125
150
|
}
|
|
126
151
|
|