@azure/arm-elasticsan 1.0.0-beta.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1245 -374
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/elasticSansCreateSample.js +25 -17
  8. package/dist-esm/samples-dev/elasticSansCreateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/elasticSansDeleteSample.js +17 -10
  10. package/dist-esm/samples-dev/elasticSansDeleteSample.js.map +1 -1
  11. package/dist-esm/samples-dev/elasticSansGetSample.js +17 -10
  12. package/dist-esm/samples-dev/elasticSansGetSample.js.map +1 -1
  13. package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js +39 -18
  14. package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js.map +1 -1
  15. package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js +37 -16
  16. package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js.map +1 -1
  17. package/dist-esm/samples-dev/elasticSansUpdateSample.js +20 -13
  18. package/dist-esm/samples-dev/elasticSansUpdateSample.js.map +1 -1
  19. package/dist-esm/samples-dev/operationsListSample.js +39 -16
  20. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  21. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts +2 -0
  22. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts.map +1 -0
  23. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +74 -0
  24. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -0
  25. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  26. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  27. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +58 -0
  28. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  29. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  30. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  31. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +58 -0
  32. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  33. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  34. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +98 -0
  36. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  37. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts +2 -0
  38. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js +56 -0
  40. package/dist-esm/samples-dev/privateLinkResourcesListByElasticSanSample.js.map +1 -0
  41. package/dist-esm/samples-dev/skusListSample.js +38 -17
  42. package/dist-esm/samples-dev/skusListSample.js.map +1 -1
  43. package/dist-esm/samples-dev/volumeGroupsCreateSample.js +24 -15
  44. package/dist-esm/samples-dev/volumeGroupsCreateSample.js.map +1 -1
  45. package/dist-esm/samples-dev/volumeGroupsDeleteSample.js +19 -12
  46. package/dist-esm/samples-dev/volumeGroupsDeleteSample.js.map +1 -1
  47. package/dist-esm/samples-dev/volumeGroupsGetSample.js +19 -12
  48. package/dist-esm/samples-dev/volumeGroupsGetSample.js.map +1 -1
  49. package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js +41 -20
  50. package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js.map +1 -1
  51. package/dist-esm/samples-dev/volumeGroupsUpdateSample.js +24 -15
  52. package/dist-esm/samples-dev/volumeGroupsUpdateSample.js.map +1 -1
  53. package/dist-esm/samples-dev/volumesCreateSample.js +24 -18
  54. package/dist-esm/samples-dev/volumesCreateSample.js.map +1 -1
  55. package/dist-esm/samples-dev/volumesDeleteSample.js +21 -14
  56. package/dist-esm/samples-dev/volumesDeleteSample.js.map +1 -1
  57. package/dist-esm/samples-dev/volumesGetSample.js +21 -14
  58. package/dist-esm/samples-dev/volumesGetSample.js.map +1 -1
  59. package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js +43 -22
  60. package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js.map +1 -1
  61. package/dist-esm/samples-dev/volumesUpdateSample.js +22 -18
  62. package/dist-esm/samples-dev/volumesUpdateSample.js.map +1 -1
  63. package/dist-esm/src/elasticSanManagement.d.ts +3 -1
  64. package/dist-esm/src/elasticSanManagement.d.ts.map +1 -1
  65. package/dist-esm/src/elasticSanManagement.js +8 -9
  66. package/dist-esm/src/elasticSanManagement.js.map +1 -1
  67. package/dist-esm/src/index.d.ts +1 -0
  68. package/dist-esm/src/index.d.ts.map +1 -1
  69. package/dist-esm/src/index.js +1 -0
  70. package/dist-esm/src/index.js.map +1 -1
  71. package/dist-esm/src/lroImpl.d.ts +6 -11
  72. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  73. package/dist-esm/src/lroImpl.js +12 -20
  74. package/dist-esm/src/lroImpl.js.map +1 -1
  75. package/dist-esm/src/models/index.d.ts +331 -124
  76. package/dist-esm/src/models/index.d.ts.map +1 -1
  77. package/dist-esm/src/models/index.js +28 -0
  78. package/dist-esm/src/models/index.js.map +1 -1
  79. package/dist-esm/src/models/mappers.d.ts +20 -6
  80. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  81. package/dist-esm/src/models/mappers.js +400 -112
  82. package/dist-esm/src/models/mappers.js.map +1 -1
  83. package/dist-esm/src/models/parameters.d.ts +2 -0
  84. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  85. package/dist-esm/src/models/parameters.js +16 -3
  86. package/dist-esm/src/models/parameters.js.map +1 -1
  87. package/dist-esm/src/operations/elasticSans.d.ts +4 -4
  88. package/dist-esm/src/operations/elasticSans.d.ts.map +1 -1
  89. package/dist-esm/src/operations/elasticSans.js +98 -51
  90. package/dist-esm/src/operations/elasticSans.js.map +1 -1
  91. package/dist-esm/src/operations/index.d.ts +2 -0
  92. package/dist-esm/src/operations/index.d.ts.map +1 -1
  93. package/dist-esm/src/operations/index.js +2 -0
  94. package/dist-esm/src/operations/index.js.map +1 -1
  95. package/dist-esm/src/operations/operations.d.ts +2 -2
  96. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  97. package/dist-esm/src/operations/operations.js +22 -11
  98. package/dist-esm/src/operations/operations.js.map +1 -1
  99. package/dist-esm/src/operations/privateEndpointConnections.d.ts +73 -0
  100. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  101. package/dist-esm/src/operations/privateEndpointConnections.js +334 -0
  102. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  103. package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
  104. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  105. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  106. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  107. package/dist-esm/src/operations/skus.d.ts.map +1 -1
  108. package/dist-esm/src/operations/skus.js +21 -10
  109. package/dist-esm/src/operations/skus.js.map +1 -1
  110. package/dist-esm/src/operations/volumeGroups.d.ts +4 -4
  111. package/dist-esm/src/operations/volumeGroups.d.ts.map +1 -1
  112. package/dist-esm/src/operations/volumeGroups.js +78 -48
  113. package/dist-esm/src/operations/volumeGroups.js.map +1 -1
  114. package/dist-esm/src/operations/volumes.d.ts +4 -4
  115. package/dist-esm/src/operations/volumes.d.ts.map +1 -1
  116. package/dist-esm/src/operations/volumes.js +86 -56
  117. package/dist-esm/src/operations/volumes.js.map +1 -1
  118. package/dist-esm/src/operationsInterfaces/elasticSans.d.ts +4 -4
  119. package/dist-esm/src/operationsInterfaces/elasticSans.d.ts.map +1 -1
  120. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  121. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  122. package/dist-esm/src/operationsInterfaces/index.js +2 -0
  123. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  124. package/dist-esm/src/operationsInterfaces/operations.d.ts +2 -2
  125. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -1
  126. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  127. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  129. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
  131. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  133. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts +4 -4
  135. package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts.map +1 -1
  136. package/dist-esm/src/operationsInterfaces/volumes.d.ts +4 -4
  137. package/dist-esm/src/operationsInterfaces/volumes.d.ts.map +1 -1
  138. package/dist-esm/src/pagingHelper.d.ts +13 -0
  139. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  140. package/dist-esm/src/pagingHelper.js +32 -0
  141. package/dist-esm/src/pagingHelper.js.map +1 -0
  142. package/dist-esm/test/elasticsan_examples.spec.js +12 -5
  143. package/dist-esm/test/elasticsan_examples.spec.js.map +1 -1
  144. package/package.json +11 -10
  145. package/review/arm-elasticsan.api.md +229 -60
  146. package/src/elasticSanManagement.ts +16 -9
  147. package/src/index.ts +1 -0
  148. package/src/lroImpl.ts +31 -23
  149. package/src/models/index.ts +334 -93
  150. package/src/models/mappers.ts +429 -114
  151. package/src/models/parameters.ts +19 -3
  152. package/src/operations/elasticSans.ts +97 -60
  153. package/src/operations/index.ts +2 -0
  154. package/src/operations/operations.ts +16 -11
  155. package/src/operations/privateEndpointConnections.ts +450 -0
  156. package/src/operations/privateLinkResources.ts +72 -0
  157. package/src/operations/skus.ts +11 -6
  158. package/src/operations/volumeGroups.ts +76 -53
  159. package/src/operations/volumes.ts +82 -53
  160. package/src/operationsInterfaces/elasticSans.ts +6 -6
  161. package/src/operationsInterfaces/index.ts +2 -0
  162. package/src/operationsInterfaces/operations.ts +2 -2
  163. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  164. package/src/operationsInterfaces/privateLinkResources.ts +27 -0
  165. package/src/operationsInterfaces/volumeGroups.ts +6 -6
  166. package/src/operationsInterfaces/volumes.ts +10 -4
  167. package/src/pagingHelper.ts +39 -0
  168. package/types/arm-elasticsan.d.ts +409 -98
  169. package/types/tsdoc-metadata.json +1 -1
@@ -17,7 +17,8 @@ import {
17
17
  VolumeGroup as VolumeGroupMapper,
18
18
  VolumeGroupUpdate as VolumeGroupUpdateMapper,
19
19
  Volume as VolumeMapper,
20
- VolumeUpdate as VolumeUpdateMapper
20
+ VolumeUpdate as VolumeUpdateMapper,
21
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper
21
22
  } from "../models/mappers";
22
23
 
23
24
  export const accept: OperationParameter = {
@@ -47,7 +48,7 @@ export const $host: OperationURLParameter = {
47
48
  export const apiVersion: OperationQueryParameter = {
48
49
  parameterPath: "apiVersion",
49
50
  mapper: {
50
- defaultValue: "2021-11-20-preview",
51
+ defaultValue: "2022-12-01-preview",
51
52
  isConstant: true,
52
53
  serializedName: "api-version",
53
54
  type: {
@@ -84,7 +85,6 @@ export const resourceGroupName: OperationURLParameter = {
84
85
  parameterPath: "resourceGroupName",
85
86
  mapper: {
86
87
  constraints: {
87
- Pattern: new RegExp("^[-\\w\\._]*[0-9A-Za-z]$"),
88
88
  MaxLength: 90,
89
89
  MinLength: 1
90
90
  },
@@ -197,3 +197,19 @@ export const parameters5: OperationParameter = {
197
197
  parameterPath: "parameters",
198
198
  mapper: VolumeUpdateMapper
199
199
  };
200
+
201
+ export const parameters6: OperationParameter = {
202
+ parameterPath: "parameters",
203
+ mapper: PrivateEndpointConnectionMapper
204
+ };
205
+
206
+ export const privateEndpointConnectionName: OperationURLParameter = {
207
+ parameterPath: "privateEndpointConnectionName",
208
+ mapper: {
209
+ serializedName: "privateEndpointConnectionName",
210
+ required: true,
211
+ type: {
212
+ name: "String"
213
+ }
214
+ }
215
+ };
@@ -6,21 +6,26 @@
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 { ElasticSans } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
13
14
  import * as Parameters from "../models/parameters";
14
15
  import { ElasticSanManagement } from "../elasticSanManagement";
15
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
17
22
  import {
18
23
  ElasticSan,
19
24
  ElasticSansListBySubscriptionNextOptionalParams,
20
25
  ElasticSansListBySubscriptionOptionalParams,
26
+ ElasticSansListBySubscriptionResponse,
21
27
  ElasticSansListByResourceGroupNextOptionalParams,
22
28
  ElasticSansListByResourceGroupOptionalParams,
23
- ElasticSansListBySubscriptionResponse,
24
29
  ElasticSansListByResourceGroupResponse,
25
30
  ElasticSansCreateOptionalParams,
26
31
  ElasticSansCreateResponse,
@@ -62,22 +67,34 @@ export class ElasticSansImpl implements ElasticSans {
62
67
  [Symbol.asyncIterator]() {
63
68
  return this;
64
69
  },
65
- byPage: () => {
66
- return this.listBySubscriptionPagingPage(options);
70
+ byPage: (settings?: PageSettings) => {
71
+ if (settings?.maxPageSize) {
72
+ throw new Error("maxPageSize is not supported by this operation.");
73
+ }
74
+ return this.listBySubscriptionPagingPage(options, settings);
67
75
  }
68
76
  };
69
77
  }
70
78
 
71
79
  private async *listBySubscriptionPagingPage(
72
- options?: ElasticSansListBySubscriptionOptionalParams
80
+ options?: ElasticSansListBySubscriptionOptionalParams,
81
+ settings?: PageSettings
73
82
  ): AsyncIterableIterator<ElasticSan[]> {
74
- let result = await this._listBySubscription(options);
75
- yield result.value || [];
76
- let continuationToken = result.nextLink;
83
+ let result: ElasticSansListBySubscriptionResponse;
84
+ let continuationToken = settings?.continuationToken;
85
+ if (!continuationToken) {
86
+ result = await this._listBySubscription(options);
87
+ let page = result.value || [];
88
+ continuationToken = result.nextLink;
89
+ setContinuationToken(page, continuationToken);
90
+ yield page;
91
+ }
77
92
  while (continuationToken) {
78
93
  result = await this._listBySubscriptionNext(continuationToken, options);
79
94
  continuationToken = result.nextLink;
80
- yield result.value || [];
95
+ let page = result.value || [];
96
+ setContinuationToken(page, continuationToken);
97
+ yield page;
81
98
  }
82
99
  }
83
100
 
@@ -106,19 +123,33 @@ export class ElasticSansImpl implements ElasticSans {
106
123
  [Symbol.asyncIterator]() {
107
124
  return this;
108
125
  },
109
- byPage: () => {
110
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
126
+ byPage: (settings?: PageSettings) => {
127
+ if (settings?.maxPageSize) {
128
+ throw new Error("maxPageSize is not supported by this operation.");
129
+ }
130
+ return this.listByResourceGroupPagingPage(
131
+ resourceGroupName,
132
+ options,
133
+ settings
134
+ );
111
135
  }
112
136
  };
113
137
  }
114
138
 
115
139
  private async *listByResourceGroupPagingPage(
116
140
  resourceGroupName: string,
117
- options?: ElasticSansListByResourceGroupOptionalParams
141
+ options?: ElasticSansListByResourceGroupOptionalParams,
142
+ settings?: PageSettings
118
143
  ): AsyncIterableIterator<ElasticSan[]> {
119
- let result = await this._listByResourceGroup(resourceGroupName, options);
120
- yield result.value || [];
121
- let continuationToken = result.nextLink;
144
+ let result: ElasticSansListByResourceGroupResponse;
145
+ let continuationToken = settings?.continuationToken;
146
+ if (!continuationToken) {
147
+ result = await this._listByResourceGroup(resourceGroupName, options);
148
+ let page = result.value || [];
149
+ continuationToken = result.nextLink;
150
+ setContinuationToken(page, continuationToken);
151
+ yield page;
152
+ }
122
153
  while (continuationToken) {
123
154
  result = await this._listByResourceGroupNext(
124
155
  resourceGroupName,
@@ -126,7 +157,9 @@ export class ElasticSansImpl implements ElasticSans {
126
157
  options
127
158
  );
128
159
  continuationToken = result.nextLink;
129
- yield result.value || [];
160
+ let page = result.value || [];
161
+ setContinuationToken(page, continuationToken);
162
+ yield page;
130
163
  }
131
164
  }
132
165
 
@@ -183,8 +216,8 @@ export class ElasticSansImpl implements ElasticSans {
183
216
  parameters: ElasticSan,
184
217
  options?: ElasticSansCreateOptionalParams
185
218
  ): Promise<
186
- PollerLike<
187
- PollOperationState<ElasticSansCreateResponse>,
219
+ SimplePollerLike<
220
+ OperationState<ElasticSansCreateResponse>,
188
221
  ElasticSansCreateResponse
189
222
  >
190
223
  > {
@@ -194,7 +227,7 @@ export class ElasticSansImpl implements ElasticSans {
194
227
  ): Promise<ElasticSansCreateResponse> => {
195
228
  return this.client.sendOperationRequest(args, spec);
196
229
  };
197
- const sendOperation = async (
230
+ const sendOperationFn = async (
198
231
  args: coreClient.OperationArguments,
199
232
  spec: coreClient.OperationSpec
200
233
  ) => {
@@ -227,15 +260,18 @@ export class ElasticSansImpl implements ElasticSans {
227
260
  };
228
261
  };
229
262
 
230
- const lro = new LroImpl(
231
- sendOperation,
232
- { resourceGroupName, elasticSanName, parameters, options },
233
- createOperationSpec
234
- );
235
- const poller = new LroEngine(lro, {
236
- resumeFrom: options?.resumeFrom,
263
+ const lro = createLroSpec({
264
+ sendOperationFn,
265
+ args: { resourceGroupName, elasticSanName, parameters, options },
266
+ spec: createOperationSpec
267
+ });
268
+ const poller = await createHttpPoller<
269
+ ElasticSansCreateResponse,
270
+ OperationState<ElasticSansCreateResponse>
271
+ >(lro, {
272
+ restoreFrom: options?.resumeFrom,
237
273
  intervalInMs: options?.updateIntervalInMs,
238
- lroResourceLocationConfig: "azure-async-operation"
274
+ resourceLocationConfig: "location"
239
275
  });
240
276
  await poller.poll();
241
277
  return poller;
@@ -276,8 +312,8 @@ export class ElasticSansImpl implements ElasticSans {
276
312
  parameters: ElasticSanUpdate,
277
313
  options?: ElasticSansUpdateOptionalParams
278
314
  ): Promise<
279
- PollerLike<
280
- PollOperationState<ElasticSansUpdateResponse>,
315
+ SimplePollerLike<
316
+ OperationState<ElasticSansUpdateResponse>,
281
317
  ElasticSansUpdateResponse
282
318
  >
283
319
  > {
@@ -287,7 +323,7 @@ export class ElasticSansImpl implements ElasticSans {
287
323
  ): Promise<ElasticSansUpdateResponse> => {
288
324
  return this.client.sendOperationRequest(args, spec);
289
325
  };
290
- const sendOperation = async (
326
+ const sendOperationFn = async (
291
327
  args: coreClient.OperationArguments,
292
328
  spec: coreClient.OperationSpec
293
329
  ) => {
@@ -320,15 +356,18 @@ export class ElasticSansImpl implements ElasticSans {
320
356
  };
321
357
  };
322
358
 
323
- const lro = new LroImpl(
324
- sendOperation,
325
- { resourceGroupName, elasticSanName, parameters, options },
326
- updateOperationSpec
327
- );
328
- const poller = new LroEngine(lro, {
329
- resumeFrom: options?.resumeFrom,
359
+ const lro = createLroSpec({
360
+ sendOperationFn,
361
+ args: { resourceGroupName, elasticSanName, parameters, options },
362
+ spec: updateOperationSpec
363
+ });
364
+ const poller = await createHttpPoller<
365
+ ElasticSansUpdateResponse,
366
+ OperationState<ElasticSansUpdateResponse>
367
+ >(lro, {
368
+ restoreFrom: options?.resumeFrom,
330
369
  intervalInMs: options?.updateIntervalInMs,
331
- lroResourceLocationConfig: "azure-async-operation"
370
+ resourceLocationConfig: "location"
332
371
  });
333
372
  await poller.poll();
334
373
  return poller;
@@ -366,14 +405,14 @@ export class ElasticSansImpl implements ElasticSans {
366
405
  resourceGroupName: string,
367
406
  elasticSanName: string,
368
407
  options?: ElasticSansDeleteOptionalParams
369
- ): Promise<PollerLike<PollOperationState<void>, void>> {
408
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
370
409
  const directSendOperation = async (
371
410
  args: coreClient.OperationArguments,
372
411
  spec: coreClient.OperationSpec
373
412
  ): Promise<void> => {
374
413
  return this.client.sendOperationRequest(args, spec);
375
414
  };
376
- const sendOperation = async (
415
+ const sendOperationFn = async (
377
416
  args: coreClient.OperationArguments,
378
417
  spec: coreClient.OperationSpec
379
418
  ) => {
@@ -406,15 +445,15 @@ export class ElasticSansImpl implements ElasticSans {
406
445
  };
407
446
  };
408
447
 
409
- const lro = new LroImpl(
410
- sendOperation,
411
- { resourceGroupName, elasticSanName, options },
412
- deleteOperationSpec
413
- );
414
- const poller = new LroEngine(lro, {
415
- resumeFrom: options?.resumeFrom,
448
+ const lro = createLroSpec({
449
+ sendOperationFn,
450
+ args: { resourceGroupName, elasticSanName, options },
451
+ spec: deleteOperationSpec
452
+ });
453
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
454
+ restoreFrom: options?.resumeFrom,
416
455
  intervalInMs: options?.updateIntervalInMs,
417
- lroResourceLocationConfig: "azure-async-operation"
456
+ resourceLocationConfig: "location"
418
457
  });
419
458
  await poller.poll();
420
459
  return poller;
@@ -500,7 +539,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
500
539
  bodyMapper: Mappers.ElasticSanList
501
540
  },
502
541
  default: {
503
- bodyMapper: Mappers.ErrorModel
542
+ bodyMapper: Mappers.ErrorResponse
504
543
  }
505
544
  },
506
545
  queryParameters: [Parameters.apiVersion],
@@ -517,7 +556,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
517
556
  bodyMapper: Mappers.ElasticSanList
518
557
  },
519
558
  default: {
520
- bodyMapper: Mappers.ErrorModel
559
+ bodyMapper: Mappers.ErrorResponse
521
560
  }
522
561
  },
523
562
  queryParameters: [Parameters.apiVersion],
@@ -547,7 +586,7 @@ const createOperationSpec: coreClient.OperationSpec = {
547
586
  bodyMapper: Mappers.ElasticSan
548
587
  },
549
588
  default: {
550
- bodyMapper: Mappers.ErrorModel
589
+ bodyMapper: Mappers.ErrorResponse
551
590
  }
552
591
  },
553
592
  requestBody: Parameters.parameters,
@@ -580,7 +619,7 @@ const updateOperationSpec: coreClient.OperationSpec = {
580
619
  bodyMapper: Mappers.ElasticSan
581
620
  },
582
621
  default: {
583
- bodyMapper: Mappers.ErrorModel
622
+ bodyMapper: Mappers.ErrorResponse
584
623
  }
585
624
  },
586
625
  requestBody: Parameters.parameters1,
@@ -605,7 +644,7 @@ const deleteOperationSpec: coreClient.OperationSpec = {
605
644
  202: {},
606
645
  204: {},
607
646
  default: {
608
- bodyMapper: Mappers.ErrorModel
647
+ bodyMapper: Mappers.ErrorResponse
609
648
  }
610
649
  },
611
650
  queryParameters: [Parameters.apiVersion],
@@ -627,7 +666,7 @@ const getOperationSpec: coreClient.OperationSpec = {
627
666
  bodyMapper: Mappers.ElasticSan
628
667
  },
629
668
  default: {
630
- bodyMapper: Mappers.ErrorModel
669
+ bodyMapper: Mappers.ErrorResponse
631
670
  }
632
671
  },
633
672
  queryParameters: [Parameters.apiVersion],
@@ -648,10 +687,9 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
648
687
  bodyMapper: Mappers.ElasticSanList
649
688
  },
650
689
  default: {
651
- bodyMapper: Mappers.ErrorModel
690
+ bodyMapper: Mappers.ErrorResponse
652
691
  }
653
692
  },
654
- queryParameters: [Parameters.apiVersion],
655
693
  urlParameters: [
656
694
  Parameters.$host,
657
695
  Parameters.subscriptionId,
@@ -668,10 +706,9 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
668
706
  bodyMapper: Mappers.ElasticSanList
669
707
  },
670
708
  default: {
671
- bodyMapper: Mappers.ErrorModel
709
+ bodyMapper: Mappers.ErrorResponse
672
710
  }
673
711
  },
674
- queryParameters: [Parameters.apiVersion],
675
712
  urlParameters: [
676
713
  Parameters.$host,
677
714
  Parameters.subscriptionId,
@@ -11,3 +11,5 @@ export * from "./skus";
11
11
  export * from "./elasticSans";
12
12
  export * from "./volumeGroups";
13
13
  export * from "./volumes";
14
+ export * from "./privateEndpointConnections";
15
+ export * from "./privateLinkResources";
@@ -6,14 +6,14 @@
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
10
  import { Operations } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
14
  import { ElasticSanManagement } from "../elasticSanManagement";
15
15
  import {
16
- ElasticSanRPOperation,
16
+ Operation,
17
17
  OperationsListOptionalParams,
18
18
  OperationsListResponse
19
19
  } from "../models";
@@ -37,7 +37,7 @@ export class OperationsImpl implements Operations {
37
37
  */
38
38
  public list(
39
39
  options?: OperationsListOptionalParams
40
- ): PagedAsyncIterableIterator<ElasticSanRPOperation> {
40
+ ): PagedAsyncIterableIterator<Operation> {
41
41
  const iter = this.listPagingAll(options);
42
42
  return {
43
43
  next() {
@@ -46,22 +46,27 @@ export class OperationsImpl implements Operations {
46
46
  [Symbol.asyncIterator]() {
47
47
  return this;
48
48
  },
49
- byPage: () => {
50
- return this.listPagingPage(options);
49
+ byPage: (settings?: PageSettings) => {
50
+ if (settings?.maxPageSize) {
51
+ throw new Error("maxPageSize is not supported by this operation.");
52
+ }
53
+ return this.listPagingPage(options, settings);
51
54
  }
52
55
  };
53
56
  }
54
57
 
55
58
  private async *listPagingPage(
56
- options?: OperationsListOptionalParams
57
- ): AsyncIterableIterator<ElasticSanRPOperation[]> {
58
- let result = await this._list(options);
59
+ options?: OperationsListOptionalParams,
60
+ _settings?: PageSettings
61
+ ): AsyncIterableIterator<Operation[]> {
62
+ let result: OperationsListResponse;
63
+ result = await this._list(options);
59
64
  yield result.value || [];
60
65
  }
61
66
 
62
67
  private async *listPagingAll(
63
68
  options?: OperationsListOptionalParams
64
- ): AsyncIterableIterator<ElasticSanRPOperation> {
69
+ ): AsyncIterableIterator<Operation> {
65
70
  for await (const page of this.listPagingPage(options)) {
66
71
  yield* page;
67
72
  }
@@ -85,10 +90,10 @@ const listOperationSpec: coreClient.OperationSpec = {
85
90
  httpMethod: "GET",
86
91
  responses: {
87
92
  200: {
88
- bodyMapper: Mappers.ElasticSanOperationListResult
93
+ bodyMapper: Mappers.OperationListResult
89
94
  },
90
95
  default: {
91
- bodyMapper: Mappers.ErrorModel
96
+ bodyMapper: Mappers.ErrorResponse
92
97
  }
93
98
  },
94
99
  queryParameters: [Parameters.apiVersion],