@azure/arm-machinelearning 2.1.0 → 2.1.1-alpha.20221202.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/index.js +521 -197
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/azureMachineLearningWorkspaces.d.ts.map +1 -1
  7. package/dist-esm/src/azureMachineLearningWorkspaces.js +4 -7
  8. package/dist-esm/src/azureMachineLearningWorkspaces.js.map +1 -1
  9. package/dist-esm/src/index.d.ts +1 -0
  10. package/dist-esm/src/index.d.ts.map +1 -1
  11. package/dist-esm/src/index.js +1 -0
  12. package/dist-esm/src/index.js.map +1 -1
  13. package/dist-esm/src/models/index.d.ts.map +1 -1
  14. package/dist-esm/src/operations/batchDeployments.d.ts.map +1 -1
  15. package/dist-esm/src/operations/batchDeployments.js +19 -7
  16. package/dist-esm/src/operations/batchDeployments.js.map +1 -1
  17. package/dist-esm/src/operations/batchEndpoints.d.ts.map +1 -1
  18. package/dist-esm/src/operations/batchEndpoints.js +19 -7
  19. package/dist-esm/src/operations/batchEndpoints.js.map +1 -1
  20. package/dist-esm/src/operations/codeContainers.d.ts.map +1 -1
  21. package/dist-esm/src/operations/codeContainers.js +19 -7
  22. package/dist-esm/src/operations/codeContainers.js.map +1 -1
  23. package/dist-esm/src/operations/codeVersions.d.ts.map +1 -1
  24. package/dist-esm/src/operations/codeVersions.js +19 -7
  25. package/dist-esm/src/operations/codeVersions.js.map +1 -1
  26. package/dist-esm/src/operations/componentContainers.d.ts.map +1 -1
  27. package/dist-esm/src/operations/componentContainers.js +19 -7
  28. package/dist-esm/src/operations/componentContainers.js.map +1 -1
  29. package/dist-esm/src/operations/componentVersions.d.ts.map +1 -1
  30. package/dist-esm/src/operations/componentVersions.js +19 -7
  31. package/dist-esm/src/operations/componentVersions.js.map +1 -1
  32. package/dist-esm/src/operations/computeOperations.d.ts.map +1 -1
  33. package/dist-esm/src/operations/computeOperations.js +37 -14
  34. package/dist-esm/src/operations/computeOperations.js.map +1 -1
  35. package/dist-esm/src/operations/dataContainers.d.ts.map +1 -1
  36. package/dist-esm/src/operations/dataContainers.js +19 -7
  37. package/dist-esm/src/operations/dataContainers.js.map +1 -1
  38. package/dist-esm/src/operations/dataVersions.d.ts.map +1 -1
  39. package/dist-esm/src/operations/dataVersions.js +19 -7
  40. package/dist-esm/src/operations/dataVersions.js.map +1 -1
  41. package/dist-esm/src/operations/datastores.d.ts.map +1 -1
  42. package/dist-esm/src/operations/datastores.js +19 -7
  43. package/dist-esm/src/operations/datastores.js.map +1 -1
  44. package/dist-esm/src/operations/environmentContainers.d.ts.map +1 -1
  45. package/dist-esm/src/operations/environmentContainers.js +19 -7
  46. package/dist-esm/src/operations/environmentContainers.js.map +1 -1
  47. package/dist-esm/src/operations/environmentVersions.d.ts.map +1 -1
  48. package/dist-esm/src/operations/environmentVersions.js +19 -7
  49. package/dist-esm/src/operations/environmentVersions.js.map +1 -1
  50. package/dist-esm/src/operations/jobs.d.ts.map +1 -1
  51. package/dist-esm/src/operations/jobs.js +19 -7
  52. package/dist-esm/src/operations/jobs.js.map +1 -1
  53. package/dist-esm/src/operations/modelContainers.d.ts.map +1 -1
  54. package/dist-esm/src/operations/modelContainers.js +19 -7
  55. package/dist-esm/src/operations/modelContainers.js.map +1 -1
  56. package/dist-esm/src/operations/modelVersions.d.ts.map +1 -1
  57. package/dist-esm/src/operations/modelVersions.js +19 -7
  58. package/dist-esm/src/operations/modelVersions.js.map +1 -1
  59. package/dist-esm/src/operations/onlineDeployments.d.ts.map +1 -1
  60. package/dist-esm/src/operations/onlineDeployments.js +37 -14
  61. package/dist-esm/src/operations/onlineDeployments.js.map +1 -1
  62. package/dist-esm/src/operations/onlineEndpoints.d.ts.map +1 -1
  63. package/dist-esm/src/operations/onlineEndpoints.js +19 -7
  64. package/dist-esm/src/operations/onlineEndpoints.js.map +1 -1
  65. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  66. package/dist-esm/src/operations/operations.js +8 -4
  67. package/dist-esm/src/operations/operations.js.map +1 -1
  68. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  69. package/dist-esm/src/operations/privateEndpointConnections.js +8 -4
  70. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  71. package/dist-esm/src/operations/quotas.d.ts.map +1 -1
  72. package/dist-esm/src/operations/quotas.js +19 -7
  73. package/dist-esm/src/operations/quotas.js.map +1 -1
  74. package/dist-esm/src/operations/schedules.d.ts.map +1 -1
  75. package/dist-esm/src/operations/schedules.js +19 -7
  76. package/dist-esm/src/operations/schedules.js.map +1 -1
  77. package/dist-esm/src/operations/usages.d.ts.map +1 -1
  78. package/dist-esm/src/operations/usages.js +19 -7
  79. package/dist-esm/src/operations/usages.js.map +1 -1
  80. package/dist-esm/src/operations/workspaceConnections.d.ts.map +1 -1
  81. package/dist-esm/src/operations/workspaceConnections.js +19 -7
  82. package/dist-esm/src/operations/workspaceConnections.js.map +1 -1
  83. package/dist-esm/src/operations/workspaceFeatures.d.ts.map +1 -1
  84. package/dist-esm/src/operations/workspaceFeatures.js +19 -7
  85. package/dist-esm/src/operations/workspaceFeatures.js.map +1 -1
  86. package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
  87. package/dist-esm/src/operations/workspaces.js +37 -14
  88. package/dist-esm/src/operations/workspaces.js.map +1 -1
  89. package/dist-esm/src/pagingHelper.d.ts +13 -0
  90. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  91. package/dist-esm/src/pagingHelper.js +32 -0
  92. package/dist-esm/src/pagingHelper.js.map +1 -0
  93. package/package.json +5 -5
  94. package/review/arm-machinelearning.api.md +3 -0
  95. package/src/azureMachineLearningWorkspaces.ts +5 -6
  96. package/src/index.ts +1 -0
  97. package/src/models/index.ts +135 -135
  98. package/src/operations/batchDeployments.ts +27 -13
  99. package/src/operations/batchEndpoints.ts +26 -8
  100. package/src/operations/codeContainers.ts +26 -8
  101. package/src/operations/codeVersions.ts +27 -13
  102. package/src/operations/componentContainers.ts +26 -8
  103. package/src/operations/componentVersions.ts +27 -13
  104. package/src/operations/computeOperations.ts +53 -22
  105. package/src/operations/dataContainers.ts +26 -8
  106. package/src/operations/dataVersions.ts +27 -13
  107. package/src/operations/datastores.ts +26 -8
  108. package/src/operations/environmentContainers.ts +26 -8
  109. package/src/operations/environmentVersions.ts +27 -13
  110. package/src/operations/jobs.ts +26 -8
  111. package/src/operations/modelContainers.ts +26 -8
  112. package/src/operations/modelVersions.ts +27 -13
  113. package/src/operations/onlineDeployments.ts +55 -28
  114. package/src/operations/onlineEndpoints.ts +26 -8
  115. package/src/operations/operations.ts +10 -5
  116. package/src/operations/privateEndpointConnections.ts +15 -5
  117. package/src/operations/quotas.ts +22 -9
  118. package/src/operations/schedules.ts +26 -8
  119. package/src/operations/usages.ts +21 -8
  120. package/src/operations/workspaceConnections.ts +27 -9
  121. package/src/operations/workspaceFeatures.ts +26 -8
  122. package/src/operations/workspaces.ts +46 -17
  123. package/src/pagingHelper.ts +39 -0
  124. package/types/arm-machinelearning.d.ts +9 -0
  125. 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 { BatchDeployments } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -69,12 +70,16 @@ export class BatchDeploymentsImpl implements BatchDeployments {
69
70
  [Symbol.asyncIterator]() {
70
71
  return this;
71
72
  },
72
- byPage: () => {
73
+ byPage: (settings?: PageSettings) => {
74
+ if (settings?.maxPageSize) {
75
+ throw new Error("maxPageSize is not supported by this operation.");
76
+ }
73
77
  return this.listPagingPage(
74
78
  resourceGroupName,
75
79
  workspaceName,
76
80
  endpointName,
77
- options
81
+ options,
82
+ settings
78
83
  );
79
84
  }
80
85
  };
@@ -84,16 +89,23 @@ export class BatchDeploymentsImpl implements BatchDeployments {
84
89
  resourceGroupName: string,
85
90
  workspaceName: string,
86
91
  endpointName: string,
87
- options?: BatchDeploymentsListOptionalParams
92
+ options?: BatchDeploymentsListOptionalParams,
93
+ settings?: PageSettings
88
94
  ): AsyncIterableIterator<BatchDeployment[]> {
89
- let result = await this._list(
90
- resourceGroupName,
91
- workspaceName,
92
- endpointName,
93
- options
94
- );
95
- yield result.value || [];
96
- let continuationToken = result.nextLink;
95
+ let result: BatchDeploymentsListResponse;
96
+ let continuationToken = settings?.continuationToken;
97
+ if (!continuationToken) {
98
+ result = await this._list(
99
+ resourceGroupName,
100
+ workspaceName,
101
+ endpointName,
102
+ options
103
+ );
104
+ let page = result.value || [];
105
+ continuationToken = result.nextLink;
106
+ setContinuationToken(page, continuationToken);
107
+ yield page;
108
+ }
97
109
  while (continuationToken) {
98
110
  result = await this._listNext(
99
111
  resourceGroupName,
@@ -103,7 +115,9 @@ export class BatchDeploymentsImpl implements BatchDeployments {
103
115
  options
104
116
  );
105
117
  continuationToken = result.nextLink;
106
- yield result.value || [];
118
+ let page = result.value || [];
119
+ setContinuationToken(page, continuationToken);
120
+ yield page;
107
121
  }
108
122
  }
109
123
 
@@ -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 { BatchEndpoints } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -64,8 +65,16 @@ export class BatchEndpointsImpl implements BatchEndpoints {
64
65
  [Symbol.asyncIterator]() {
65
66
  return this;
66
67
  },
67
- byPage: () => {
68
- return this.listPagingPage(resourceGroupName, workspaceName, options);
68
+ byPage: (settings?: PageSettings) => {
69
+ if (settings?.maxPageSize) {
70
+ throw new Error("maxPageSize is not supported by this operation.");
71
+ }
72
+ return this.listPagingPage(
73
+ resourceGroupName,
74
+ workspaceName,
75
+ options,
76
+ settings
77
+ );
69
78
  }
70
79
  };
71
80
  }
@@ -73,11 +82,18 @@ export class BatchEndpointsImpl implements BatchEndpoints {
73
82
  private async *listPagingPage(
74
83
  resourceGroupName: string,
75
84
  workspaceName: string,
76
- options?: BatchEndpointsListOptionalParams
85
+ options?: BatchEndpointsListOptionalParams,
86
+ settings?: PageSettings
77
87
  ): AsyncIterableIterator<BatchEndpoint[]> {
78
- let result = await this._list(resourceGroupName, workspaceName, options);
79
- yield result.value || [];
80
- let continuationToken = result.nextLink;
88
+ let result: BatchEndpointsListResponse;
89
+ let continuationToken = settings?.continuationToken;
90
+ if (!continuationToken) {
91
+ result = await this._list(resourceGroupName, workspaceName, options);
92
+ let page = result.value || [];
93
+ continuationToken = result.nextLink;
94
+ setContinuationToken(page, continuationToken);
95
+ yield page;
96
+ }
81
97
  while (continuationToken) {
82
98
  result = await this._listNext(
83
99
  resourceGroupName,
@@ -86,7 +102,9 @@ export class BatchEndpointsImpl implements BatchEndpoints {
86
102
  options
87
103
  );
88
104
  continuationToken = result.nextLink;
89
- yield result.value || [];
105
+ let page = result.value || [];
106
+ setContinuationToken(page, continuationToken);
107
+ yield page;
90
108
  }
91
109
  }
92
110
 
@@ -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 { CodeContainers } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -57,8 +58,16 @@ export class CodeContainersImpl implements CodeContainers {
57
58
  [Symbol.asyncIterator]() {
58
59
  return this;
59
60
  },
60
- byPage: () => {
61
- return this.listPagingPage(resourceGroupName, workspaceName, options);
61
+ byPage: (settings?: PageSettings) => {
62
+ if (settings?.maxPageSize) {
63
+ throw new Error("maxPageSize is not supported by this operation.");
64
+ }
65
+ return this.listPagingPage(
66
+ resourceGroupName,
67
+ workspaceName,
68
+ options,
69
+ settings
70
+ );
62
71
  }
63
72
  };
64
73
  }
@@ -66,11 +75,18 @@ export class CodeContainersImpl implements CodeContainers {
66
75
  private async *listPagingPage(
67
76
  resourceGroupName: string,
68
77
  workspaceName: string,
69
- options?: CodeContainersListOptionalParams
78
+ options?: CodeContainersListOptionalParams,
79
+ settings?: PageSettings
70
80
  ): AsyncIterableIterator<CodeContainer[]> {
71
- let result = await this._list(resourceGroupName, workspaceName, options);
72
- yield result.value || [];
73
- let continuationToken = result.nextLink;
81
+ let result: CodeContainersListResponse;
82
+ let continuationToken = settings?.continuationToken;
83
+ if (!continuationToken) {
84
+ result = await this._list(resourceGroupName, workspaceName, options);
85
+ let page = result.value || [];
86
+ continuationToken = result.nextLink;
87
+ setContinuationToken(page, continuationToken);
88
+ yield page;
89
+ }
74
90
  while (continuationToken) {
75
91
  result = await this._listNext(
76
92
  resourceGroupName,
@@ -79,7 +95,9 @@ export class CodeContainersImpl implements CodeContainers {
79
95
  options
80
96
  );
81
97
  continuationToken = result.nextLink;
82
- yield result.value || [];
98
+ let page = result.value || [];
99
+ setContinuationToken(page, continuationToken);
100
+ yield page;
83
101
  }
84
102
  }
85
103
 
@@ -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 { CodeVersions } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -64,12 +65,16 @@ export class CodeVersionsImpl implements CodeVersions {
64
65
  [Symbol.asyncIterator]() {
65
66
  return this;
66
67
  },
67
- byPage: () => {
68
+ byPage: (settings?: PageSettings) => {
69
+ if (settings?.maxPageSize) {
70
+ throw new Error("maxPageSize is not supported by this operation.");
71
+ }
68
72
  return this.listPagingPage(
69
73
  resourceGroupName,
70
74
  workspaceName,
71
75
  name,
72
- options
76
+ options,
77
+ settings
73
78
  );
74
79
  }
75
80
  };
@@ -79,16 +84,23 @@ export class CodeVersionsImpl implements CodeVersions {
79
84
  resourceGroupName: string,
80
85
  workspaceName: string,
81
86
  name: string,
82
- options?: CodeVersionsListOptionalParams
87
+ options?: CodeVersionsListOptionalParams,
88
+ settings?: PageSettings
83
89
  ): AsyncIterableIterator<CodeVersion[]> {
84
- let result = await this._list(
85
- resourceGroupName,
86
- workspaceName,
87
- name,
88
- options
89
- );
90
- yield result.value || [];
91
- let continuationToken = result.nextLink;
90
+ let result: CodeVersionsListResponse;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._list(
94
+ resourceGroupName,
95
+ workspaceName,
96
+ name,
97
+ options
98
+ );
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
92
104
  while (continuationToken) {
93
105
  result = await this._listNext(
94
106
  resourceGroupName,
@@ -98,7 +110,9 @@ export class CodeVersionsImpl implements CodeVersions {
98
110
  options
99
111
  );
100
112
  continuationToken = result.nextLink;
101
- yield result.value || [];
113
+ let page = result.value || [];
114
+ setContinuationToken(page, continuationToken);
115
+ yield page;
102
116
  }
103
117
  }
104
118
 
@@ -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 { ComponentContainers } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -57,8 +58,16 @@ export class ComponentContainersImpl implements ComponentContainers {
57
58
  [Symbol.asyncIterator]() {
58
59
  return this;
59
60
  },
60
- byPage: () => {
61
- return this.listPagingPage(resourceGroupName, workspaceName, options);
61
+ byPage: (settings?: PageSettings) => {
62
+ if (settings?.maxPageSize) {
63
+ throw new Error("maxPageSize is not supported by this operation.");
64
+ }
65
+ return this.listPagingPage(
66
+ resourceGroupName,
67
+ workspaceName,
68
+ options,
69
+ settings
70
+ );
62
71
  }
63
72
  };
64
73
  }
@@ -66,11 +75,18 @@ export class ComponentContainersImpl implements ComponentContainers {
66
75
  private async *listPagingPage(
67
76
  resourceGroupName: string,
68
77
  workspaceName: string,
69
- options?: ComponentContainersListOptionalParams
78
+ options?: ComponentContainersListOptionalParams,
79
+ settings?: PageSettings
70
80
  ): AsyncIterableIterator<ComponentContainer[]> {
71
- let result = await this._list(resourceGroupName, workspaceName, options);
72
- yield result.value || [];
73
- let continuationToken = result.nextLink;
81
+ let result: ComponentContainersListResponse;
82
+ let continuationToken = settings?.continuationToken;
83
+ if (!continuationToken) {
84
+ result = await this._list(resourceGroupName, workspaceName, options);
85
+ let page = result.value || [];
86
+ continuationToken = result.nextLink;
87
+ setContinuationToken(page, continuationToken);
88
+ yield page;
89
+ }
74
90
  while (continuationToken) {
75
91
  result = await this._listNext(
76
92
  resourceGroupName,
@@ -79,7 +95,9 @@ export class ComponentContainersImpl implements ComponentContainers {
79
95
  options
80
96
  );
81
97
  continuationToken = result.nextLink;
82
- yield result.value || [];
98
+ let page = result.value || [];
99
+ setContinuationToken(page, continuationToken);
100
+ yield page;
83
101
  }
84
102
  }
85
103
 
@@ -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 { ComponentVersions } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -64,12 +65,16 @@ export class ComponentVersionsImpl implements ComponentVersions {
64
65
  [Symbol.asyncIterator]() {
65
66
  return this;
66
67
  },
67
- byPage: () => {
68
+ byPage: (settings?: PageSettings) => {
69
+ if (settings?.maxPageSize) {
70
+ throw new Error("maxPageSize is not supported by this operation.");
71
+ }
68
72
  return this.listPagingPage(
69
73
  resourceGroupName,
70
74
  workspaceName,
71
75
  name,
72
- options
76
+ options,
77
+ settings
73
78
  );
74
79
  }
75
80
  };
@@ -79,16 +84,23 @@ export class ComponentVersionsImpl implements ComponentVersions {
79
84
  resourceGroupName: string,
80
85
  workspaceName: string,
81
86
  name: string,
82
- options?: ComponentVersionsListOptionalParams
87
+ options?: ComponentVersionsListOptionalParams,
88
+ settings?: PageSettings
83
89
  ): AsyncIterableIterator<ComponentVersion[]> {
84
- let result = await this._list(
85
- resourceGroupName,
86
- workspaceName,
87
- name,
88
- options
89
- );
90
- yield result.value || [];
91
- let continuationToken = result.nextLink;
90
+ let result: ComponentVersionsListResponse;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._list(
94
+ resourceGroupName,
95
+ workspaceName,
96
+ name,
97
+ options
98
+ );
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
92
104
  while (continuationToken) {
93
105
  result = await this._listNext(
94
106
  resourceGroupName,
@@ -98,7 +110,9 @@ export class ComponentVersionsImpl implements ComponentVersions {
98
110
  options
99
111
  );
100
112
  continuationToken = result.nextLink;
101
- yield result.value || [];
113
+ let page = result.value || [];
114
+ setContinuationToken(page, continuationToken);
115
+ yield page;
102
116
  }
103
117
  }
104
118
 
@@ -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 { ComputeOperations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,10 +19,11 @@ import {
18
19
  ComputeResource,
19
20
  ComputeListNextOptionalParams,
20
21
  ComputeListOptionalParams,
22
+ ComputeListResponse,
21
23
  AmlComputeNodeInformation,
22
24
  ComputeListNodesNextOptionalParams,
23
25
  ComputeListNodesOptionalParams,
24
- ComputeListResponse,
26
+ ComputeListNodesResponse,
25
27
  ComputeGetOptionalParams,
26
28
  ComputeGetResponse,
27
29
  ComputeCreateOrUpdateOptionalParams,
@@ -31,7 +33,6 @@ import {
31
33
  ComputeUpdateResponse,
32
34
  UnderlyingResourceAction,
33
35
  ComputeDeleteOptionalParams,
34
- ComputeListNodesResponse,
35
36
  ComputeListKeysOptionalParams,
36
37
  ComputeListKeysResponse,
37
38
  ComputeStartOptionalParams,
@@ -73,8 +74,16 @@ export class ComputeOperationsImpl implements ComputeOperations {
73
74
  [Symbol.asyncIterator]() {
74
75
  return this;
75
76
  },
76
- byPage: () => {
77
- return this.listPagingPage(resourceGroupName, workspaceName, options);
77
+ byPage: (settings?: PageSettings) => {
78
+ if (settings?.maxPageSize) {
79
+ throw new Error("maxPageSize is not supported by this operation.");
80
+ }
81
+ return this.listPagingPage(
82
+ resourceGroupName,
83
+ workspaceName,
84
+ options,
85
+ settings
86
+ );
78
87
  }
79
88
  };
80
89
  }
@@ -82,11 +91,18 @@ export class ComputeOperationsImpl implements ComputeOperations {
82
91
  private async *listPagingPage(
83
92
  resourceGroupName: string,
84
93
  workspaceName: string,
85
- options?: ComputeListOptionalParams
94
+ options?: ComputeListOptionalParams,
95
+ settings?: PageSettings
86
96
  ): AsyncIterableIterator<ComputeResource[]> {
87
- let result = await this._list(resourceGroupName, workspaceName, options);
88
- yield result.value || [];
89
- let continuationToken = result.nextLink;
97
+ let result: ComputeListResponse;
98
+ let continuationToken = settings?.continuationToken;
99
+ if (!continuationToken) {
100
+ result = await this._list(resourceGroupName, workspaceName, options);
101
+ let page = result.value || [];
102
+ continuationToken = result.nextLink;
103
+ setContinuationToken(page, continuationToken);
104
+ yield page;
105
+ }
90
106
  while (continuationToken) {
91
107
  result = await this._listNext(
92
108
  resourceGroupName,
@@ -95,7 +111,9 @@ export class ComputeOperationsImpl implements ComputeOperations {
95
111
  options
96
112
  );
97
113
  continuationToken = result.nextLink;
98
- yield result.value || [];
114
+ let page = result.value || [];
115
+ setContinuationToken(page, continuationToken);
116
+ yield page;
99
117
  }
100
118
  }
101
119
 
@@ -139,12 +157,16 @@ export class ComputeOperationsImpl implements ComputeOperations {
139
157
  [Symbol.asyncIterator]() {
140
158
  return this;
141
159
  },
142
- byPage: () => {
160
+ byPage: (settings?: PageSettings) => {
161
+ if (settings?.maxPageSize) {
162
+ throw new Error("maxPageSize is not supported by this operation.");
163
+ }
143
164
  return this.listNodesPagingPage(
144
165
  resourceGroupName,
145
166
  workspaceName,
146
167
  computeName,
147
- options
168
+ options,
169
+ settings
148
170
  );
149
171
  }
150
172
  };
@@ -154,16 +176,23 @@ export class ComputeOperationsImpl implements ComputeOperations {
154
176
  resourceGroupName: string,
155
177
  workspaceName: string,
156
178
  computeName: string,
157
- options?: ComputeListNodesOptionalParams
179
+ options?: ComputeListNodesOptionalParams,
180
+ settings?: PageSettings
158
181
  ): AsyncIterableIterator<AmlComputeNodeInformation[]> {
159
- let result = await this._listNodes(
160
- resourceGroupName,
161
- workspaceName,
162
- computeName,
163
- options
164
- );
165
- yield result.nodes || [];
166
- let continuationToken = result.nextLink;
182
+ let result: ComputeListNodesResponse;
183
+ let continuationToken = settings?.continuationToken;
184
+ if (!continuationToken) {
185
+ result = await this._listNodes(
186
+ resourceGroupName,
187
+ workspaceName,
188
+ computeName,
189
+ options
190
+ );
191
+ let page = result.nodes || [];
192
+ continuationToken = result.nextLink;
193
+ setContinuationToken(page, continuationToken);
194
+ yield page;
195
+ }
167
196
  while (continuationToken) {
168
197
  result = await this._listNodesNext(
169
198
  resourceGroupName,
@@ -173,7 +202,9 @@ export class ComputeOperationsImpl implements ComputeOperations {
173
202
  options
174
203
  );
175
204
  continuationToken = result.nextLink;
176
- yield result.nodes || [];
205
+ let page = result.nodes || [];
206
+ setContinuationToken(page, continuationToken);
207
+ yield page;
177
208
  }
178
209
  }
179
210
 
@@ -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 { DataContainers } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -57,8 +58,16 @@ export class DataContainersImpl implements DataContainers {
57
58
  [Symbol.asyncIterator]() {
58
59
  return this;
59
60
  },
60
- byPage: () => {
61
- return this.listPagingPage(resourceGroupName, workspaceName, options);
61
+ byPage: (settings?: PageSettings) => {
62
+ if (settings?.maxPageSize) {
63
+ throw new Error("maxPageSize is not supported by this operation.");
64
+ }
65
+ return this.listPagingPage(
66
+ resourceGroupName,
67
+ workspaceName,
68
+ options,
69
+ settings
70
+ );
62
71
  }
63
72
  };
64
73
  }
@@ -66,11 +75,18 @@ export class DataContainersImpl implements DataContainers {
66
75
  private async *listPagingPage(
67
76
  resourceGroupName: string,
68
77
  workspaceName: string,
69
- options?: DataContainersListOptionalParams
78
+ options?: DataContainersListOptionalParams,
79
+ settings?: PageSettings
70
80
  ): AsyncIterableIterator<DataContainer[]> {
71
- let result = await this._list(resourceGroupName, workspaceName, options);
72
- yield result.value || [];
73
- let continuationToken = result.nextLink;
81
+ let result: DataContainersListResponse;
82
+ let continuationToken = settings?.continuationToken;
83
+ if (!continuationToken) {
84
+ result = await this._list(resourceGroupName, workspaceName, options);
85
+ let page = result.value || [];
86
+ continuationToken = result.nextLink;
87
+ setContinuationToken(page, continuationToken);
88
+ yield page;
89
+ }
74
90
  while (continuationToken) {
75
91
  result = await this._listNext(
76
92
  resourceGroupName,
@@ -79,7 +95,9 @@ export class DataContainersImpl implements DataContainers {
79
95
  options
80
96
  );
81
97
  continuationToken = result.nextLink;
82
- yield result.value || [];
98
+ let page = result.value || [];
99
+ setContinuationToken(page, continuationToken);
100
+ yield page;
83
101
  }
84
102
  }
85
103
 
@@ -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 { DataVersions } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -64,12 +65,16 @@ export class DataVersionsImpl implements DataVersions {
64
65
  [Symbol.asyncIterator]() {
65
66
  return this;
66
67
  },
67
- byPage: () => {
68
+ byPage: (settings?: PageSettings) => {
69
+ if (settings?.maxPageSize) {
70
+ throw new Error("maxPageSize is not supported by this operation.");
71
+ }
68
72
  return this.listPagingPage(
69
73
  resourceGroupName,
70
74
  workspaceName,
71
75
  name,
72
- options
76
+ options,
77
+ settings
73
78
  );
74
79
  }
75
80
  };
@@ -79,16 +84,23 @@ export class DataVersionsImpl implements DataVersions {
79
84
  resourceGroupName: string,
80
85
  workspaceName: string,
81
86
  name: string,
82
- options?: DataVersionsListOptionalParams
87
+ options?: DataVersionsListOptionalParams,
88
+ settings?: PageSettings
83
89
  ): AsyncIterableIterator<DataVersionBase[]> {
84
- let result = await this._list(
85
- resourceGroupName,
86
- workspaceName,
87
- name,
88
- options
89
- );
90
- yield result.value || [];
91
- let continuationToken = result.nextLink;
90
+ let result: DataVersionsListResponse;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._list(
94
+ resourceGroupName,
95
+ workspaceName,
96
+ name,
97
+ options
98
+ );
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
92
104
  while (continuationToken) {
93
105
  result = await this._listNext(
94
106
  resourceGroupName,
@@ -98,7 +110,9 @@ export class DataVersionsImpl implements DataVersions {
98
110
  options
99
111
  );
100
112
  continuationToken = result.nextLink;
101
- yield result.value || [];
113
+ let page = result.value || [];
114
+ setContinuationToken(page, continuationToken);
115
+ yield page;
102
116
  }
103
117
  }
104
118