@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
package/dist/index.js CHANGED
@@ -35,6 +35,54 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
35
35
  * Code generated by Microsoft (R) AutoRest Code Generator.
36
36
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
37
  */
38
+ const pageMap = new WeakMap();
39
+ /**
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
+ * that point later.
43
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
44
+ * @returns The continuation token that can be passed into byPage() during future calls.
45
+ */
46
+ function getContinuationToken(page) {
47
+ var _a;
48
+ if (typeof page !== "object" || page === null) {
49
+ return undefined;
50
+ }
51
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
52
+ }
53
+ function setContinuationToken(page, continuationToken) {
54
+ var _a;
55
+ if (typeof page !== "object" || page === null || !continuationToken) {
56
+ return;
57
+ }
58
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
59
+ pageInfo.continuationToken = continuationToken;
60
+ pageMap.set(page, pageInfo);
61
+ }
62
+
63
+ /*
64
+ * Copyright (c) Microsoft Corporation.
65
+ * Licensed under the MIT License.
66
+ *
67
+ * Code generated by Microsoft (R) AutoRest Code Generator.
68
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
69
+ */
70
+ /** Known values of {@link Origin} that the service accepts. */
71
+ exports.KnownOrigin = void 0;
72
+ (function (KnownOrigin) {
73
+ /** User */
74
+ KnownOrigin["User"] = "user";
75
+ /** System */
76
+ KnownOrigin["System"] = "system";
77
+ /** UserSystem */
78
+ KnownOrigin["UserSystem"] = "user,system";
79
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
80
+ /** Known values of {@link ActionType} that the service accepts. */
81
+ exports.KnownActionType = void 0;
82
+ (function (KnownActionType) {
83
+ /** Internal */
84
+ KnownActionType["Internal"] = "Internal";
85
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
38
86
  /** Known values of {@link SkuName} that the service accepts. */
39
87
  exports.KnownSkuName = void 0;
40
88
  (function (KnownSkuName) {
@@ -69,6 +117,18 @@ exports.KnownProvisioningStates = void 0;
69
117
  /** Deleting */
70
118
  KnownProvisioningStates["Deleting"] = "Deleting";
71
119
  })(exports.KnownProvisioningStates || (exports.KnownProvisioningStates = {}));
120
+ /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
121
+ exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
122
+ (function (KnownPrivateEndpointServiceConnectionStatus) {
123
+ /** Pending */
124
+ KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
125
+ /** Approved */
126
+ KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
127
+ /** Failed */
128
+ KnownPrivateEndpointServiceConnectionStatus["Failed"] = "Failed";
129
+ /** Rejected */
130
+ KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
131
+ })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
72
132
  /** Known values of {@link CreatedByType} that the service accepts. */
73
133
  exports.KnownCreatedByType = void 0;
74
134
  (function (KnownCreatedByType) {
@@ -123,26 +183,27 @@ exports.KnownOperationalStatus = void 0;
123
183
  * Code generated by Microsoft (R) AutoRest Code Generator.
124
184
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
125
185
  */
126
- const ElasticSanOperationListResult = {
186
+ const OperationListResult = {
127
187
  type: {
128
188
  name: "Composite",
129
- className: "ElasticSanOperationListResult",
189
+ className: "OperationListResult",
130
190
  modelProperties: {
131
191
  value: {
132
192
  serializedName: "value",
133
- required: true,
193
+ readOnly: true,
134
194
  type: {
135
195
  name: "Sequence",
136
196
  element: {
137
197
  type: {
138
198
  name: "Composite",
139
- className: "ElasticSanRPOperation"
199
+ className: "Operation"
140
200
  }
141
201
  }
142
202
  }
143
203
  },
144
204
  nextLink: {
145
205
  serializedName: "nextLink",
206
+ readOnly: true,
146
207
  type: {
147
208
  name: "String"
148
209
  }
@@ -150,14 +211,14 @@ const ElasticSanOperationListResult = {
150
211
  }
151
212
  }
152
213
  };
153
- const ElasticSanRPOperation = {
214
+ const Operation = {
154
215
  type: {
155
216
  name: "Composite",
156
- className: "ElasticSanRPOperation",
217
+ className: "Operation",
157
218
  modelProperties: {
158
219
  name: {
159
220
  serializedName: "name",
160
- required: true,
221
+ readOnly: true,
161
222
  type: {
162
223
  name: "String"
163
224
  }
@@ -173,41 +234,55 @@ const ElasticSanRPOperation = {
173
234
  serializedName: "display",
174
235
  type: {
175
236
  name: "Composite",
176
- className: "ElasticSanOperationDisplay"
237
+ className: "OperationDisplay"
238
+ }
239
+ },
240
+ origin: {
241
+ serializedName: "origin",
242
+ readOnly: true,
243
+ type: {
244
+ name: "String"
245
+ }
246
+ },
247
+ actionType: {
248
+ serializedName: "actionType",
249
+ readOnly: true,
250
+ type: {
251
+ name: "String"
177
252
  }
178
253
  }
179
254
  }
180
255
  }
181
256
  };
182
- const ElasticSanOperationDisplay = {
257
+ const OperationDisplay = {
183
258
  type: {
184
259
  name: "Composite",
185
- className: "ElasticSanOperationDisplay",
260
+ className: "OperationDisplay",
186
261
  modelProperties: {
187
262
  provider: {
188
263
  serializedName: "provider",
189
- required: true,
264
+ readOnly: true,
190
265
  type: {
191
266
  name: "String"
192
267
  }
193
268
  },
194
269
  resource: {
195
270
  serializedName: "resource",
196
- required: true,
271
+ readOnly: true,
197
272
  type: {
198
273
  name: "String"
199
274
  }
200
275
  },
201
276
  operation: {
202
277
  serializedName: "operation",
203
- required: true,
278
+ readOnly: true,
204
279
  type: {
205
280
  name: "String"
206
281
  }
207
282
  },
208
283
  description: {
209
284
  serializedName: "description",
210
- required: true,
285
+ readOnly: true,
211
286
  type: {
212
287
  name: "String"
213
288
  }
@@ -215,25 +290,25 @@ const ElasticSanOperationDisplay = {
215
290
  }
216
291
  }
217
292
  };
218
- const ErrorModel = {
293
+ const ErrorResponse = {
219
294
  type: {
220
295
  name: "Composite",
221
- className: "ErrorModel",
296
+ className: "ErrorResponse",
222
297
  modelProperties: {
223
298
  error: {
224
299
  serializedName: "error",
225
300
  type: {
226
301
  name: "Composite",
227
- className: "ErrorResponse"
302
+ className: "ErrorDetail"
228
303
  }
229
304
  }
230
305
  }
231
306
  }
232
307
  };
233
- const ErrorResponse = {
308
+ const ErrorDetail = {
234
309
  type: {
235
310
  name: "Composite",
236
- className: "ErrorResponse",
311
+ className: "ErrorDetail",
237
312
  modelProperties: {
238
313
  code: {
239
314
  serializedName: "code",
@@ -264,7 +339,7 @@ const ErrorResponse = {
264
339
  element: {
265
340
  type: {
266
341
  name: "Composite",
267
- className: "ErrorResponse"
342
+ className: "ErrorDetail"
268
343
  }
269
344
  }
270
345
  }
@@ -325,6 +400,13 @@ const SkuInformationList = {
325
400
  }
326
401
  }
327
402
  }
403
+ },
404
+ nextLink: {
405
+ serializedName: "nextLink",
406
+ readOnly: true,
407
+ type: {
408
+ name: "String"
409
+ }
328
410
  }
329
411
  }
330
412
  }
@@ -451,7 +533,6 @@ const ElasticSanList = {
451
533
  modelProperties: {
452
534
  value: {
453
535
  serializedName: "value",
454
- required: true,
455
536
  type: {
456
537
  name: "Sequence",
457
538
  element: {
@@ -493,46 +574,43 @@ const Sku = {
493
574
  }
494
575
  }
495
576
  };
496
- const SystemData = {
577
+ const PrivateEndpoint = {
497
578
  type: {
498
579
  name: "Composite",
499
- className: "SystemData",
580
+ className: "PrivateEndpoint",
500
581
  modelProperties: {
501
- createdBy: {
502
- serializedName: "createdBy",
582
+ id: {
583
+ serializedName: "id",
584
+ readOnly: true,
503
585
  type: {
504
586
  name: "String"
505
587
  }
506
- },
507
- createdByType: {
508
- serializedName: "createdByType",
588
+ }
589
+ }
590
+ }
591
+ };
592
+ const PrivateLinkServiceConnectionState = {
593
+ type: {
594
+ name: "Composite",
595
+ className: "PrivateLinkServiceConnectionState",
596
+ modelProperties: {
597
+ status: {
598
+ serializedName: "status",
509
599
  type: {
510
600
  name: "String"
511
601
  }
512
602
  },
513
- createdAt: {
514
- serializedName: "createdAt",
515
- type: {
516
- name: "DateTime"
517
- }
518
- },
519
- lastModifiedBy: {
520
- serializedName: "lastModifiedBy",
603
+ description: {
604
+ serializedName: "description",
521
605
  type: {
522
606
  name: "String"
523
607
  }
524
608
  },
525
- lastModifiedByType: {
526
- serializedName: "lastModifiedByType",
609
+ actionsRequired: {
610
+ serializedName: "actionsRequired",
527
611
  type: {
528
612
  name: "String"
529
613
  }
530
- },
531
- lastModifiedAt: {
532
- serializedName: "lastModifiedAt",
533
- type: {
534
- name: "DateTime"
535
- }
536
614
  }
537
615
  }
538
616
  }
@@ -563,11 +641,55 @@ const Resource = {
563
641
  name: "String"
564
642
  }
565
643
  },
566
- tags: {
567
- serializedName: "tags",
644
+ systemData: {
645
+ serializedName: "systemData",
568
646
  type: {
569
- name: "Dictionary",
570
- value: { type: { name: "String" } }
647
+ name: "Composite",
648
+ className: "SystemData"
649
+ }
650
+ }
651
+ }
652
+ }
653
+ };
654
+ const SystemData = {
655
+ type: {
656
+ name: "Composite",
657
+ className: "SystemData",
658
+ modelProperties: {
659
+ createdBy: {
660
+ serializedName: "createdBy",
661
+ type: {
662
+ name: "String"
663
+ }
664
+ },
665
+ createdByType: {
666
+ serializedName: "createdByType",
667
+ type: {
668
+ name: "String"
669
+ }
670
+ },
671
+ createdAt: {
672
+ serializedName: "createdAt",
673
+ type: {
674
+ name: "DateTime"
675
+ }
676
+ },
677
+ lastModifiedBy: {
678
+ serializedName: "lastModifiedBy",
679
+ type: {
680
+ name: "String"
681
+ }
682
+ },
683
+ lastModifiedByType: {
684
+ serializedName: "lastModifiedByType",
685
+ type: {
686
+ name: "String"
687
+ }
688
+ },
689
+ lastModifiedAt: {
690
+ serializedName: "lastModifiedAt",
691
+ type: {
692
+ name: "DateTime"
571
693
  }
572
694
  }
573
695
  }
@@ -607,7 +729,6 @@ const VolumeGroupList = {
607
729
  modelProperties: {
608
730
  value: {
609
731
  serializedName: "value",
610
- required: true,
611
732
  type: {
612
733
  name: "Sequence",
613
734
  element: {
@@ -690,13 +811,6 @@ const VolumeGroupUpdate = {
690
811
  name: "Composite",
691
812
  className: "VolumeGroupUpdate",
692
813
  modelProperties: {
693
- tags: {
694
- serializedName: "tags",
695
- type: {
696
- name: "Dictionary",
697
- value: { type: { name: "String" } }
698
- }
699
- },
700
814
  protocolType: {
701
815
  serializedName: "properties.protocolType",
702
816
  type: {
@@ -788,13 +902,6 @@ const VolumeUpdate = {
788
902
  name: "Composite",
789
903
  className: "VolumeUpdate",
790
904
  modelProperties: {
791
- tags: {
792
- serializedName: "tags",
793
- type: {
794
- name: "Dictionary",
795
- value: { type: { name: "String" } }
796
- }
797
- },
798
905
  sizeGiB: {
799
906
  serializedName: "properties.sizeGiB",
800
907
  type: {
@@ -811,7 +918,6 @@ const VolumeList = {
811
918
  modelProperties: {
812
919
  value: {
813
920
  serializedName: "value",
814
- required: true,
815
921
  type: {
816
922
  name: "Sequence",
817
923
  element: {
@@ -832,106 +938,166 @@ const VolumeList = {
832
938
  }
833
939
  }
834
940
  };
835
- const TrackedResource = {
941
+ const PrivateEndpointConnectionListResult = {
836
942
  type: {
837
943
  name: "Composite",
838
- className: "TrackedResource",
839
- modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { location: {
840
- serializedName: "location",
944
+ className: "PrivateEndpointConnectionListResult",
945
+ modelProperties: {
946
+ value: {
947
+ serializedName: "value",
948
+ type: {
949
+ name: "Sequence",
950
+ element: {
951
+ type: {
952
+ name: "Composite",
953
+ className: "PrivateEndpointConnection"
954
+ }
955
+ }
956
+ }
957
+ },
958
+ nextLink: {
959
+ serializedName: "nextLink",
960
+ readOnly: true,
841
961
  type: {
842
962
  name: "String"
843
963
  }
844
- } })
964
+ }
965
+ }
845
966
  }
846
967
  };
847
- const VolumeGroup = {
968
+ const PrivateLinkResourceListResult = {
848
969
  type: {
849
970
  name: "Composite",
850
- className: "VolumeGroup",
851
- modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
852
- serializedName: "systemData",
971
+ className: "PrivateLinkResourceListResult",
972
+ modelProperties: {
973
+ value: {
974
+ serializedName: "value",
853
975
  type: {
854
- name: "Composite",
855
- className: "SystemData"
976
+ name: "Sequence",
977
+ element: {
978
+ type: {
979
+ name: "Composite",
980
+ className: "PrivateLinkResource"
981
+ }
982
+ }
856
983
  }
857
- }, provisioningState: {
858
- serializedName: "properties.provisioningState",
984
+ },
985
+ nextLink: {
986
+ serializedName: "nextLink",
859
987
  readOnly: true,
860
988
  type: {
861
989
  name: "String"
862
990
  }
863
- }, protocolType: {
864
- serializedName: "properties.protocolType",
865
- type: {
866
- name: "String"
867
- }
868
- }, encryption: {
869
- serializedName: "properties.encryption",
870
- type: {
871
- name: "String"
872
- }
873
- }, networkAcls: {
874
- serializedName: "properties.networkAcls",
875
- type: {
876
- name: "Composite",
877
- className: "NetworkRuleSet"
878
- }
879
- } })
991
+ }
992
+ }
880
993
  }
881
994
  };
882
- const Volume = {
995
+ const PrivateEndpointConnection = {
883
996
  type: {
884
997
  name: "Composite",
885
- className: "Volume",
886
- modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
887
- serializedName: "systemData",
888
- type: {
889
- name: "Composite",
890
- className: "SystemData"
891
- }
892
- }, volumeId: {
893
- serializedName: "properties.volumeId",
998
+ className: "PrivateEndpointConnection",
999
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { provisioningState: {
1000
+ serializedName: "properties.provisioningState",
894
1001
  readOnly: true,
895
1002
  type: {
896
1003
  name: "String"
897
1004
  }
898
- }, creationData: {
899
- serializedName: "properties.creationData",
1005
+ }, privateEndpoint: {
1006
+ serializedName: "properties.privateEndpoint",
900
1007
  type: {
901
1008
  name: "Composite",
902
- className: "SourceCreationData"
1009
+ className: "PrivateEndpoint"
903
1010
  }
904
- }, sizeGiB: {
905
- serializedName: "properties.sizeGiB",
1011
+ }, privateLinkServiceConnectionState: {
1012
+ serializedName: "properties.privateLinkServiceConnectionState",
906
1013
  type: {
907
- name: "Number"
1014
+ name: "Composite",
1015
+ className: "PrivateLinkServiceConnectionState"
908
1016
  }
909
- }, storageTarget: {
910
- serializedName: "properties.storageTarget",
1017
+ }, groupIds: {
1018
+ serializedName: "properties.groupIds",
911
1019
  type: {
912
- name: "Composite",
913
- className: "IscsiTargetInfo"
1020
+ name: "Sequence",
1021
+ element: {
1022
+ type: {
1023
+ name: "String"
1024
+ }
1025
+ }
914
1026
  }
915
1027
  } })
916
1028
  }
917
1029
  };
918
- const ElasticSan = {
1030
+ const TrackedResource = {
919
1031
  type: {
920
1032
  name: "Composite",
921
- className: "ElasticSan",
922
- modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
923
- serializedName: "systemData",
1033
+ className: "TrackedResource",
1034
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1035
+ serializedName: "tags",
924
1036
  type: {
925
- name: "Composite",
926
- className: "SystemData"
1037
+ name: "Dictionary",
1038
+ value: { type: { name: "String" } }
927
1039
  }
928
- }, sku: {
929
- serializedName: "properties.sku",
1040
+ }, location: {
1041
+ serializedName: "location",
1042
+ required: true,
930
1043
  type: {
931
- name: "Composite",
932
- className: "Sku"
1044
+ name: "String"
933
1045
  }
934
- }, availabilityZones: {
1046
+ } })
1047
+ }
1048
+ };
1049
+ const ProxyResource = {
1050
+ type: {
1051
+ name: "Composite",
1052
+ className: "ProxyResource",
1053
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
1054
+ }
1055
+ };
1056
+ const PrivateLinkResource = {
1057
+ type: {
1058
+ name: "Composite",
1059
+ className: "PrivateLinkResource",
1060
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { groupId: {
1061
+ serializedName: "properties.groupId",
1062
+ readOnly: true,
1063
+ type: {
1064
+ name: "String"
1065
+ }
1066
+ }, requiredMembers: {
1067
+ serializedName: "properties.requiredMembers",
1068
+ readOnly: true,
1069
+ type: {
1070
+ name: "Sequence",
1071
+ element: {
1072
+ type: {
1073
+ name: "String"
1074
+ }
1075
+ }
1076
+ }
1077
+ }, requiredZoneNames: {
1078
+ serializedName: "properties.requiredZoneNames",
1079
+ type: {
1080
+ name: "Sequence",
1081
+ element: {
1082
+ type: {
1083
+ name: "String"
1084
+ }
1085
+ }
1086
+ }
1087
+ } })
1088
+ }
1089
+ };
1090
+ const ElasticSan = {
1091
+ type: {
1092
+ name: "Composite",
1093
+ className: "ElasticSan",
1094
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { sku: {
1095
+ serializedName: "properties.sku",
1096
+ type: {
1097
+ name: "Composite",
1098
+ className: "Sku"
1099
+ }
1100
+ }, availabilityZones: {
935
1101
  serializedName: "properties.availabilityZones",
936
1102
  type: {
937
1103
  name: "Sequence",
@@ -989,17 +1155,199 @@ const ElasticSan = {
989
1155
  type: {
990
1156
  name: "Number"
991
1157
  }
1158
+ }, privateEndpointConnections: {
1159
+ serializedName: "properties.privateEndpointConnections",
1160
+ readOnly: true,
1161
+ type: {
1162
+ name: "Sequence",
1163
+ element: {
1164
+ type: {
1165
+ name: "Composite",
1166
+ className: "PrivateEndpointConnection"
1167
+ }
1168
+ }
1169
+ }
1170
+ } })
1171
+ }
1172
+ };
1173
+ const VolumeGroup = {
1174
+ type: {
1175
+ name: "Composite",
1176
+ className: "VolumeGroup",
1177
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { provisioningState: {
1178
+ serializedName: "properties.provisioningState",
1179
+ readOnly: true,
1180
+ type: {
1181
+ name: "String"
1182
+ }
1183
+ }, protocolType: {
1184
+ serializedName: "properties.protocolType",
1185
+ type: {
1186
+ name: "String"
1187
+ }
1188
+ }, encryption: {
1189
+ serializedName: "properties.encryption",
1190
+ type: {
1191
+ name: "String"
1192
+ }
1193
+ }, networkAcls: {
1194
+ serializedName: "properties.networkAcls",
1195
+ type: {
1196
+ name: "Composite",
1197
+ className: "NetworkRuleSet"
1198
+ }
1199
+ }, privateEndpointConnections: {
1200
+ serializedName: "properties.privateEndpointConnections",
1201
+ readOnly: true,
1202
+ type: {
1203
+ name: "Sequence",
1204
+ element: {
1205
+ type: {
1206
+ name: "Composite",
1207
+ className: "PrivateEndpointConnection"
1208
+ }
1209
+ }
1210
+ }
1211
+ } })
1212
+ }
1213
+ };
1214
+ const Volume = {
1215
+ type: {
1216
+ name: "Composite",
1217
+ className: "Volume",
1218
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { volumeId: {
1219
+ serializedName: "properties.volumeId",
1220
+ readOnly: true,
1221
+ type: {
1222
+ name: "String"
1223
+ }
1224
+ }, creationData: {
1225
+ serializedName: "properties.creationData",
1226
+ type: {
1227
+ name: "Composite",
1228
+ className: "SourceCreationData"
1229
+ }
1230
+ }, sizeGiB: {
1231
+ serializedName: "properties.sizeGiB",
1232
+ required: true,
1233
+ type: {
1234
+ name: "Number"
1235
+ }
1236
+ }, storageTarget: {
1237
+ serializedName: "properties.storageTarget",
1238
+ type: {
1239
+ name: "Composite",
1240
+ className: "IscsiTargetInfo"
1241
+ }
992
1242
  } })
993
1243
  }
994
1244
  };
1245
+ const ElasticSansUpdateHeaders = {
1246
+ type: {
1247
+ name: "Composite",
1248
+ className: "ElasticSansUpdateHeaders",
1249
+ modelProperties: {
1250
+ location: {
1251
+ serializedName: "location",
1252
+ type: {
1253
+ name: "String"
1254
+ }
1255
+ }
1256
+ }
1257
+ }
1258
+ };
1259
+ const ElasticSansDeleteHeaders = {
1260
+ type: {
1261
+ name: "Composite",
1262
+ className: "ElasticSansDeleteHeaders",
1263
+ modelProperties: {
1264
+ location: {
1265
+ serializedName: "location",
1266
+ type: {
1267
+ name: "String"
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ };
1273
+ const VolumeGroupsUpdateHeaders = {
1274
+ type: {
1275
+ name: "Composite",
1276
+ className: "VolumeGroupsUpdateHeaders",
1277
+ modelProperties: {
1278
+ location: {
1279
+ serializedName: "location",
1280
+ type: {
1281
+ name: "String"
1282
+ }
1283
+ }
1284
+ }
1285
+ }
1286
+ };
1287
+ const VolumeGroupsDeleteHeaders = {
1288
+ type: {
1289
+ name: "Composite",
1290
+ className: "VolumeGroupsDeleteHeaders",
1291
+ modelProperties: {
1292
+ location: {
1293
+ serializedName: "location",
1294
+ type: {
1295
+ name: "String"
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ };
1301
+ const VolumesUpdateHeaders = {
1302
+ type: {
1303
+ name: "Composite",
1304
+ className: "VolumesUpdateHeaders",
1305
+ modelProperties: {
1306
+ location: {
1307
+ serializedName: "location",
1308
+ type: {
1309
+ name: "String"
1310
+ }
1311
+ }
1312
+ }
1313
+ }
1314
+ };
1315
+ const VolumesDeleteHeaders = {
1316
+ type: {
1317
+ name: "Composite",
1318
+ className: "VolumesDeleteHeaders",
1319
+ modelProperties: {
1320
+ location: {
1321
+ serializedName: "location",
1322
+ type: {
1323
+ name: "String"
1324
+ }
1325
+ }
1326
+ }
1327
+ }
1328
+ };
1329
+ const PrivateEndpointConnectionsDeleteHeaders = {
1330
+ type: {
1331
+ name: "Composite",
1332
+ className: "PrivateEndpointConnectionsDeleteHeaders",
1333
+ modelProperties: {
1334
+ location: {
1335
+ serializedName: "location",
1336
+ type: {
1337
+ name: "String"
1338
+ }
1339
+ }
1340
+ }
1341
+ }
1342
+ };
995
1343
 
996
1344
  var Mappers = /*#__PURE__*/Object.freeze({
997
1345
  __proto__: null,
998
- ElasticSanOperationListResult: ElasticSanOperationListResult,
999
- ElasticSanRPOperation: ElasticSanRPOperation,
1000
- ElasticSanOperationDisplay: ElasticSanOperationDisplay,
1001
- ErrorModel: ErrorModel,
1346
+ OperationListResult: OperationListResult,
1347
+ Operation: Operation,
1348
+ OperationDisplay: OperationDisplay,
1002
1349
  ErrorResponse: ErrorResponse,
1350
+ ErrorDetail: ErrorDetail,
1003
1351
  ErrorAdditionalInfo: ErrorAdditionalInfo,
1004
1352
  SkuInformationList: SkuInformationList,
1005
1353
  SkuInformation: SkuInformation,
@@ -1007,8 +1355,10 @@ var Mappers = /*#__PURE__*/Object.freeze({
1007
1355
  SKUCapability: SKUCapability,
1008
1356
  ElasticSanList: ElasticSanList,
1009
1357
  Sku: Sku,
1010
- SystemData: SystemData,
1358
+ PrivateEndpoint: PrivateEndpoint,
1359
+ PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
1011
1360
  Resource: Resource,
1361
+ SystemData: SystemData,
1012
1362
  ElasticSanUpdate: ElasticSanUpdate,
1013
1363
  VolumeGroupList: VolumeGroupList,
1014
1364
  NetworkRuleSet: NetworkRuleSet,
@@ -1018,10 +1368,22 @@ var Mappers = /*#__PURE__*/Object.freeze({
1018
1368
  IscsiTargetInfo: IscsiTargetInfo,
1019
1369
  VolumeUpdate: VolumeUpdate,
1020
1370
  VolumeList: VolumeList,
1371
+ PrivateEndpointConnectionListResult: PrivateEndpointConnectionListResult,
1372
+ PrivateLinkResourceListResult: PrivateLinkResourceListResult,
1373
+ PrivateEndpointConnection: PrivateEndpointConnection,
1021
1374
  TrackedResource: TrackedResource,
1375
+ ProxyResource: ProxyResource,
1376
+ PrivateLinkResource: PrivateLinkResource,
1377
+ ElasticSan: ElasticSan,
1022
1378
  VolumeGroup: VolumeGroup,
1023
1379
  Volume: Volume,
1024
- ElasticSan: ElasticSan
1380
+ ElasticSansUpdateHeaders: ElasticSansUpdateHeaders,
1381
+ ElasticSansDeleteHeaders: ElasticSansDeleteHeaders,
1382
+ VolumeGroupsUpdateHeaders: VolumeGroupsUpdateHeaders,
1383
+ VolumeGroupsDeleteHeaders: VolumeGroupsDeleteHeaders,
1384
+ VolumesUpdateHeaders: VolumesUpdateHeaders,
1385
+ VolumesDeleteHeaders: VolumesDeleteHeaders,
1386
+ PrivateEndpointConnectionsDeleteHeaders: PrivateEndpointConnectionsDeleteHeaders
1025
1387
  });
1026
1388
 
1027
1389
  /*
@@ -1056,7 +1418,7 @@ const $host = {
1056
1418
  const apiVersion = {
1057
1419
  parameterPath: "apiVersion",
1058
1420
  mapper: {
1059
- defaultValue: "2021-11-20-preview",
1421
+ defaultValue: "2022-12-01-preview",
1060
1422
  isConstant: true,
1061
1423
  serializedName: "api-version",
1062
1424
  type: {
@@ -1090,7 +1452,6 @@ const resourceGroupName = {
1090
1452
  parameterPath: "resourceGroupName",
1091
1453
  mapper: {
1092
1454
  constraints: {
1093
- Pattern: new RegExp("^[-\\w\\._]*[0-9A-Za-z]$"),
1094
1455
  MaxLength: 90,
1095
1456
  MinLength: 1
1096
1457
  },
@@ -1192,6 +1553,20 @@ const parameters5 = {
1192
1553
  parameterPath: "parameters",
1193
1554
  mapper: VolumeUpdate
1194
1555
  };
1556
+ const parameters6 = {
1557
+ parameterPath: "parameters",
1558
+ mapper: PrivateEndpointConnection
1559
+ };
1560
+ const privateEndpointConnectionName = {
1561
+ parameterPath: "privateEndpointConnectionName",
1562
+ mapper: {
1563
+ serializedName: "privateEndpointConnectionName",
1564
+ required: true,
1565
+ type: {
1566
+ name: "String"
1567
+ }
1568
+ }
1569
+ };
1195
1570
 
1196
1571
  /*
1197
1572
  * Copyright (c) Microsoft Corporation.
@@ -1223,30 +1598,41 @@ class OperationsImpl {
1223
1598
  [Symbol.asyncIterator]() {
1224
1599
  return this;
1225
1600
  },
1226
- byPage: () => {
1227
- return this.listPagingPage(options);
1601
+ byPage: (settings) => {
1602
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1603
+ throw new Error("maxPageSize is not supported by this operation.");
1604
+ }
1605
+ return this.listPagingPage(options, settings);
1228
1606
  }
1229
1607
  };
1230
1608
  }
1231
- listPagingPage(options) {
1609
+ listPagingPage(options, _settings) {
1232
1610
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1233
- let result = yield tslib.__await(this._list(options));
1611
+ let result;
1612
+ result = yield tslib.__await(this._list(options));
1234
1613
  yield yield tslib.__await(result.value || []);
1235
1614
  });
1236
1615
  }
1237
1616
  listPagingAll(options) {
1238
1617
  return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1239
- var e_1, _a;
1618
+ var _a, e_1, _b, _c;
1240
1619
  try {
1241
- for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1242
- const page = _c.value;
1243
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1620
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1621
+ _c = _f.value;
1622
+ _d = false;
1623
+ try {
1624
+ const page = _c;
1625
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1626
+ }
1627
+ finally {
1628
+ _d = true;
1629
+ }
1244
1630
  }
1245
1631
  }
1246
1632
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1247
1633
  finally {
1248
1634
  try {
1249
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1635
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1250
1636
  }
1251
1637
  finally { if (e_1) throw e_1.error; }
1252
1638
  }
@@ -1257,26 +1643,26 @@ class OperationsImpl {
1257
1643
  * @param options The options parameters.
1258
1644
  */
1259
1645
  _list(options) {
1260
- return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1646
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
1261
1647
  }
1262
1648
  }
1263
1649
  // Operation Specifications
1264
- const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1265
- const listOperationSpec$1 = {
1650
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1651
+ const listOperationSpec$2 = {
1266
1652
  path: "/providers/Microsoft.ElasticSan/operations",
1267
1653
  httpMethod: "GET",
1268
1654
  responses: {
1269
1655
  200: {
1270
- bodyMapper: ElasticSanOperationListResult
1656
+ bodyMapper: OperationListResult
1271
1657
  },
1272
1658
  default: {
1273
- bodyMapper: ErrorModel
1659
+ bodyMapper: ErrorResponse
1274
1660
  }
1275
1661
  },
1276
1662
  queryParameters: [apiVersion],
1277
1663
  urlParameters: [$host],
1278
1664
  headerParameters: [accept],
1279
- serializer: serializer$4
1665
+ serializer: serializer$6
1280
1666
  };
1281
1667
 
1282
1668
  /*
@@ -1309,30 +1695,41 @@ class SkusImpl {
1309
1695
  [Symbol.asyncIterator]() {
1310
1696
  return this;
1311
1697
  },
1312
- byPage: () => {
1313
- return this.listPagingPage(options);
1698
+ byPage: (settings) => {
1699
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1700
+ throw new Error("maxPageSize is not supported by this operation.");
1701
+ }
1702
+ return this.listPagingPage(options, settings);
1314
1703
  }
1315
1704
  };
1316
1705
  }
1317
- listPagingPage(options) {
1706
+ listPagingPage(options, _settings) {
1318
1707
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1319
- let result = yield tslib.__await(this._list(options));
1708
+ let result;
1709
+ result = yield tslib.__await(this._list(options));
1320
1710
  yield yield tslib.__await(result.value || []);
1321
1711
  });
1322
1712
  }
1323
1713
  listPagingAll(options) {
1324
1714
  return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1325
- var e_1, _a;
1715
+ var _a, e_1, _b, _c;
1326
1716
  try {
1327
- for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1328
- const page = _c.value;
1329
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1717
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1718
+ _c = _f.value;
1719
+ _d = false;
1720
+ try {
1721
+ const page = _c;
1722
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1723
+ }
1724
+ finally {
1725
+ _d = true;
1726
+ }
1330
1727
  }
1331
1728
  }
1332
1729
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1333
1730
  finally {
1334
1731
  try {
1335
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1732
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1336
1733
  }
1337
1734
  finally { if (e_1) throw e_1.error; }
1338
1735
  }
@@ -1343,12 +1740,12 @@ class SkusImpl {
1343
1740
  * @param options The options parameters.
1344
1741
  */
1345
1742
  _list(options) {
1346
- return this.client.sendOperationRequest({ options }, listOperationSpec);
1743
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1347
1744
  }
1348
1745
  }
1349
1746
  // Operation Specifications
1350
- const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1351
- const listOperationSpec = {
1747
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1748
+ const listOperationSpec$1 = {
1352
1749
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.ElasticSan/skus",
1353
1750
  httpMethod: "GET",
1354
1751
  responses: {
@@ -1356,13 +1753,13 @@ const listOperationSpec = {
1356
1753
  bodyMapper: SkuInformationList
1357
1754
  },
1358
1755
  default: {
1359
- bodyMapper: ErrorModel
1756
+ bodyMapper: ErrorResponse
1360
1757
  }
1361
1758
  },
1362
1759
  queryParameters: [apiVersion, filter],
1363
1760
  urlParameters: [$host, subscriptionId],
1364
1761
  headerParameters: [accept],
1365
- serializer: serializer$3
1762
+ serializer: serializer$5
1366
1763
  };
1367
1764
 
1368
1765
  /*
@@ -1372,25 +1769,17 @@ const listOperationSpec = {
1372
1769
  * Code generated by Microsoft (R) AutoRest Code Generator.
1373
1770
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1374
1771
  */
1375
- class LroImpl {
1376
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1377
- this.sendOperationFn = sendOperationFn;
1378
- this.args = args;
1379
- this.spec = spec;
1380
- this.requestPath = requestPath;
1381
- this.requestMethod = requestMethod;
1382
- }
1383
- sendInitialRequest() {
1384
- return tslib.__awaiter(this, void 0, void 0, function* () {
1385
- return this.sendOperationFn(this.args, this.spec);
1386
- });
1387
- }
1388
- sendPollRequest(path) {
1389
- return tslib.__awaiter(this, void 0, void 0, function* () {
1390
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1391
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1392
- });
1393
- }
1772
+ function createLroSpec(inputs) {
1773
+ const { args, spec, sendOperationFn } = inputs;
1774
+ return {
1775
+ requestMethod: spec.httpMethod,
1776
+ requestPath: spec.path,
1777
+ sendInitialRequest: () => sendOperationFn(args, spec),
1778
+ sendPollRequest: (path, options) => {
1779
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
1780
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
1781
+ }
1782
+ };
1394
1783
  }
1395
1784
 
1396
1785
  /*
@@ -1423,36 +1812,54 @@ class ElasticSansImpl {
1423
1812
  [Symbol.asyncIterator]() {
1424
1813
  return this;
1425
1814
  },
1426
- byPage: () => {
1427
- return this.listBySubscriptionPagingPage(options);
1815
+ byPage: (settings) => {
1816
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1817
+ throw new Error("maxPageSize is not supported by this operation.");
1818
+ }
1819
+ return this.listBySubscriptionPagingPage(options, settings);
1428
1820
  }
1429
1821
  };
1430
1822
  }
1431
- listBySubscriptionPagingPage(options) {
1823
+ listBySubscriptionPagingPage(options, settings) {
1432
1824
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1433
- let result = yield tslib.__await(this._listBySubscription(options));
1434
- yield yield tslib.__await(result.value || []);
1435
- let continuationToken = result.nextLink;
1825
+ let result;
1826
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1827
+ if (!continuationToken) {
1828
+ result = yield tslib.__await(this._listBySubscription(options));
1829
+ let page = result.value || [];
1830
+ continuationToken = result.nextLink;
1831
+ setContinuationToken(page, continuationToken);
1832
+ yield yield tslib.__await(page);
1833
+ }
1436
1834
  while (continuationToken) {
1437
1835
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1438
1836
  continuationToken = result.nextLink;
1439
- yield yield tslib.__await(result.value || []);
1837
+ let page = result.value || [];
1838
+ setContinuationToken(page, continuationToken);
1839
+ yield yield tslib.__await(page);
1440
1840
  }
1441
1841
  });
1442
1842
  }
1443
1843
  listBySubscriptionPagingAll(options) {
1444
1844
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1445
- var e_1, _a;
1845
+ var _a, e_1, _b, _c;
1446
1846
  try {
1447
- for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1448
- const page = _c.value;
1449
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1847
+ for (var _d = true, _e = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1848
+ _c = _f.value;
1849
+ _d = false;
1850
+ try {
1851
+ const page = _c;
1852
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1853
+ }
1854
+ finally {
1855
+ _d = true;
1856
+ }
1450
1857
  }
1451
1858
  }
1452
1859
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1453
1860
  finally {
1454
1861
  try {
1455
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1862
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1456
1863
  }
1457
1864
  finally { if (e_1) throw e_1.error; }
1458
1865
  }
@@ -1472,36 +1879,54 @@ class ElasticSansImpl {
1472
1879
  [Symbol.asyncIterator]() {
1473
1880
  return this;
1474
1881
  },
1475
- byPage: () => {
1476
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
1882
+ byPage: (settings) => {
1883
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1884
+ throw new Error("maxPageSize is not supported by this operation.");
1885
+ }
1886
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
1477
1887
  }
1478
1888
  };
1479
1889
  }
1480
- listByResourceGroupPagingPage(resourceGroupName, options) {
1890
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
1481
1891
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1482
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1483
- yield yield tslib.__await(result.value || []);
1484
- let continuationToken = result.nextLink;
1892
+ let result;
1893
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1894
+ if (!continuationToken) {
1895
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1896
+ let page = result.value || [];
1897
+ continuationToken = result.nextLink;
1898
+ setContinuationToken(page, continuationToken);
1899
+ yield yield tslib.__await(page);
1900
+ }
1485
1901
  while (continuationToken) {
1486
1902
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1487
1903
  continuationToken = result.nextLink;
1488
- yield yield tslib.__await(result.value || []);
1904
+ let page = result.value || [];
1905
+ setContinuationToken(page, continuationToken);
1906
+ yield yield tslib.__await(page);
1489
1907
  }
1490
1908
  });
1491
1909
  }
1492
1910
  listByResourceGroupPagingAll(resourceGroupName, options) {
1493
1911
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1494
- var e_2, _a;
1912
+ var _a, e_2, _b, _c;
1495
1913
  try {
1496
- for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1497
- const page = _c.value;
1498
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1914
+ for (var _d = true, _e = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1915
+ _c = _f.value;
1916
+ _d = false;
1917
+ try {
1918
+ const page = _c;
1919
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1920
+ }
1921
+ finally {
1922
+ _d = true;
1923
+ }
1499
1924
  }
1500
1925
  }
1501
1926
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
1502
1927
  finally {
1503
1928
  try {
1504
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1929
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1505
1930
  }
1506
1931
  finally { if (e_2) throw e_2.error; }
1507
1932
  }
@@ -1534,7 +1959,7 @@ class ElasticSansImpl {
1534
1959
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1535
1960
  return this.client.sendOperationRequest(args, spec);
1536
1961
  });
1537
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1962
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1538
1963
  var _a;
1539
1964
  let currentRawResponse = undefined;
1540
1965
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1553,11 +1978,15 @@ class ElasticSansImpl {
1553
1978
  }
1554
1979
  };
1555
1980
  });
1556
- const lro = new LroImpl(sendOperation, { resourceGroupName, elasticSanName, parameters, options }, createOperationSpec$2);
1557
- const poller = new coreLro.LroEngine(lro, {
1558
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1981
+ const lro = createLroSpec({
1982
+ sendOperationFn,
1983
+ args: { resourceGroupName, elasticSanName, parameters, options },
1984
+ spec: createOperationSpec$3
1985
+ });
1986
+ const poller = yield coreLro.createHttpPoller(lro, {
1987
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1559
1988
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1560
- lroResourceLocationConfig: "azure-async-operation"
1989
+ resourceLocationConfig: "location"
1561
1990
  });
1562
1991
  yield poller.poll();
1563
1992
  return poller;
@@ -1588,7 +2017,7 @@ class ElasticSansImpl {
1588
2017
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1589
2018
  return this.client.sendOperationRequest(args, spec);
1590
2019
  });
1591
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2020
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1592
2021
  var _a;
1593
2022
  let currentRawResponse = undefined;
1594
2023
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1607,11 +2036,15 @@ class ElasticSansImpl {
1607
2036
  }
1608
2037
  };
1609
2038
  });
1610
- const lro = new LroImpl(sendOperation, { resourceGroupName, elasticSanName, parameters, options }, updateOperationSpec$2);
1611
- const poller = new coreLro.LroEngine(lro, {
1612
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2039
+ const lro = createLroSpec({
2040
+ sendOperationFn,
2041
+ args: { resourceGroupName, elasticSanName, parameters, options },
2042
+ spec: updateOperationSpec$2
2043
+ });
2044
+ const poller = yield coreLro.createHttpPoller(lro, {
2045
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1613
2046
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1614
- lroResourceLocationConfig: "azure-async-operation"
2047
+ resourceLocationConfig: "location"
1615
2048
  });
1616
2049
  yield poller.poll();
1617
2050
  return poller;
@@ -1641,7 +2074,7 @@ class ElasticSansImpl {
1641
2074
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1642
2075
  return this.client.sendOperationRequest(args, spec);
1643
2076
  });
1644
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2077
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1645
2078
  var _a;
1646
2079
  let currentRawResponse = undefined;
1647
2080
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1660,11 +2093,15 @@ class ElasticSansImpl {
1660
2093
  }
1661
2094
  };
1662
2095
  });
1663
- const lro = new LroImpl(sendOperation, { resourceGroupName, elasticSanName, options }, deleteOperationSpec$2);
1664
- const poller = new coreLro.LroEngine(lro, {
1665
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2096
+ const lro = createLroSpec({
2097
+ sendOperationFn,
2098
+ args: { resourceGroupName, elasticSanName, options },
2099
+ spec: deleteOperationSpec$3
2100
+ });
2101
+ const poller = yield coreLro.createHttpPoller(lro, {
2102
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1666
2103
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1667
- lroResourceLocationConfig: "azure-async-operation"
2104
+ resourceLocationConfig: "location"
1668
2105
  });
1669
2106
  yield poller.poll();
1670
2107
  return poller;
@@ -1689,7 +2126,7 @@ class ElasticSansImpl {
1689
2126
  * @param options The options parameters.
1690
2127
  */
1691
2128
  get(resourceGroupName, elasticSanName, options) {
1692
- return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, getOperationSpec$2);
2129
+ return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, getOperationSpec$3);
1693
2130
  }
1694
2131
  /**
1695
2132
  * ListBySubscriptionNext
@@ -1710,7 +2147,7 @@ class ElasticSansImpl {
1710
2147
  }
1711
2148
  }
1712
2149
  // Operation Specifications
1713
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2150
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1714
2151
  const listBySubscriptionOperationSpec = {
1715
2152
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.ElasticSan/elasticSans",
1716
2153
  httpMethod: "GET",
@@ -1719,13 +2156,13 @@ const listBySubscriptionOperationSpec = {
1719
2156
  bodyMapper: ElasticSanList
1720
2157
  },
1721
2158
  default: {
1722
- bodyMapper: ErrorModel
2159
+ bodyMapper: ErrorResponse
1723
2160
  }
1724
2161
  },
1725
2162
  queryParameters: [apiVersion],
1726
2163
  urlParameters: [$host, subscriptionId],
1727
2164
  headerParameters: [accept],
1728
- serializer: serializer$2
2165
+ serializer: serializer$4
1729
2166
  };
1730
2167
  const listByResourceGroupOperationSpec = {
1731
2168
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans",
@@ -1735,7 +2172,7 @@ const listByResourceGroupOperationSpec = {
1735
2172
  bodyMapper: ElasticSanList
1736
2173
  },
1737
2174
  default: {
1738
- bodyMapper: ErrorModel
2175
+ bodyMapper: ErrorResponse
1739
2176
  }
1740
2177
  },
1741
2178
  queryParameters: [apiVersion],
@@ -1745,9 +2182,9 @@ const listByResourceGroupOperationSpec = {
1745
2182
  resourceGroupName
1746
2183
  ],
1747
2184
  headerParameters: [accept],
1748
- serializer: serializer$2
2185
+ serializer: serializer$4
1749
2186
  };
1750
- const createOperationSpec$2 = {
2187
+ const createOperationSpec$3 = {
1751
2188
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
1752
2189
  httpMethod: "PUT",
1753
2190
  responses: {
@@ -1764,7 +2201,7 @@ const createOperationSpec$2 = {
1764
2201
  bodyMapper: ElasticSan
1765
2202
  },
1766
2203
  default: {
1767
- bodyMapper: ErrorModel
2204
+ bodyMapper: ErrorResponse
1768
2205
  }
1769
2206
  },
1770
2207
  requestBody: parameters,
@@ -1777,7 +2214,7 @@ const createOperationSpec$2 = {
1777
2214
  ],
1778
2215
  headerParameters: [accept, contentType],
1779
2216
  mediaType: "json",
1780
- serializer: serializer$2
2217
+ serializer: serializer$4
1781
2218
  };
1782
2219
  const updateOperationSpec$2 = {
1783
2220
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
@@ -1796,7 +2233,7 @@ const updateOperationSpec$2 = {
1796
2233
  bodyMapper: ElasticSan
1797
2234
  },
1798
2235
  default: {
1799
- bodyMapper: ErrorModel
2236
+ bodyMapper: ErrorResponse
1800
2237
  }
1801
2238
  },
1802
2239
  requestBody: parameters1,
@@ -1809,9 +2246,9 @@ const updateOperationSpec$2 = {
1809
2246
  ],
1810
2247
  headerParameters: [accept, contentType],
1811
2248
  mediaType: "json",
1812
- serializer: serializer$2
2249
+ serializer: serializer$4
1813
2250
  };
1814
- const deleteOperationSpec$2 = {
2251
+ const deleteOperationSpec$3 = {
1815
2252
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
1816
2253
  httpMethod: "DELETE",
1817
2254
  responses: {
@@ -1820,7 +2257,7 @@ const deleteOperationSpec$2 = {
1820
2257
  202: {},
1821
2258
  204: {},
1822
2259
  default: {
1823
- bodyMapper: ErrorModel
2260
+ bodyMapper: ErrorResponse
1824
2261
  }
1825
2262
  },
1826
2263
  queryParameters: [apiVersion],
@@ -1831,9 +2268,9 @@ const deleteOperationSpec$2 = {
1831
2268
  elasticSanName
1832
2269
  ],
1833
2270
  headerParameters: [accept],
1834
- serializer: serializer$2
2271
+ serializer: serializer$4
1835
2272
  };
1836
- const getOperationSpec$2 = {
2273
+ const getOperationSpec$3 = {
1837
2274
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
1838
2275
  httpMethod: "GET",
1839
2276
  responses: {
@@ -1841,7 +2278,7 @@ const getOperationSpec$2 = {
1841
2278
  bodyMapper: ElasticSan
1842
2279
  },
1843
2280
  default: {
1844
- bodyMapper: ErrorModel
2281
+ bodyMapper: ErrorResponse
1845
2282
  }
1846
2283
  },
1847
2284
  queryParameters: [apiVersion],
@@ -1852,7 +2289,7 @@ const getOperationSpec$2 = {
1852
2289
  elasticSanName
1853
2290
  ],
1854
2291
  headerParameters: [accept],
1855
- serializer: serializer$2
2292
+ serializer: serializer$4
1856
2293
  };
1857
2294
  const listBySubscriptionNextOperationSpec = {
1858
2295
  path: "{nextLink}",
@@ -1862,17 +2299,16 @@ const listBySubscriptionNextOperationSpec = {
1862
2299
  bodyMapper: ElasticSanList
1863
2300
  },
1864
2301
  default: {
1865
- bodyMapper: ErrorModel
2302
+ bodyMapper: ErrorResponse
1866
2303
  }
1867
2304
  },
1868
- queryParameters: [apiVersion],
1869
2305
  urlParameters: [
1870
2306
  $host,
1871
2307
  subscriptionId,
1872
2308
  nextLink
1873
2309
  ],
1874
2310
  headerParameters: [accept],
1875
- serializer: serializer$2
2311
+ serializer: serializer$4
1876
2312
  };
1877
2313
  const listByResourceGroupNextOperationSpec = {
1878
2314
  path: "{nextLink}",
@@ -1882,10 +2318,9 @@ const listByResourceGroupNextOperationSpec = {
1882
2318
  bodyMapper: ElasticSanList
1883
2319
  },
1884
2320
  default: {
1885
- bodyMapper: ErrorModel
2321
+ bodyMapper: ErrorResponse
1886
2322
  }
1887
2323
  },
1888
- queryParameters: [apiVersion],
1889
2324
  urlParameters: [
1890
2325
  $host,
1891
2326
  subscriptionId,
@@ -1893,7 +2328,7 @@ const listByResourceGroupNextOperationSpec = {
1893
2328
  nextLink
1894
2329
  ],
1895
2330
  headerParameters: [accept],
1896
- serializer: serializer$2
2331
+ serializer: serializer$4
1897
2332
  };
1898
2333
 
1899
2334
  /*
@@ -1928,36 +2363,54 @@ class VolumeGroupsImpl {
1928
2363
  [Symbol.asyncIterator]() {
1929
2364
  return this;
1930
2365
  },
1931
- byPage: () => {
1932
- return this.listByElasticSanPagingPage(resourceGroupName, elasticSanName, options);
2366
+ byPage: (settings) => {
2367
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2368
+ throw new Error("maxPageSize is not supported by this operation.");
2369
+ }
2370
+ return this.listByElasticSanPagingPage(resourceGroupName, elasticSanName, options, settings);
1933
2371
  }
1934
2372
  };
1935
2373
  }
1936
- listByElasticSanPagingPage(resourceGroupName, elasticSanName, options) {
2374
+ listByElasticSanPagingPage(resourceGroupName, elasticSanName, options, settings) {
1937
2375
  return tslib.__asyncGenerator(this, arguments, function* listByElasticSanPagingPage_1() {
1938
- let result = yield tslib.__await(this._listByElasticSan(resourceGroupName, elasticSanName, options));
1939
- yield yield tslib.__await(result.value || []);
1940
- let continuationToken = result.nextLink;
2376
+ let result;
2377
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2378
+ if (!continuationToken) {
2379
+ result = yield tslib.__await(this._listByElasticSan(resourceGroupName, elasticSanName, options));
2380
+ let page = result.value || [];
2381
+ continuationToken = result.nextLink;
2382
+ setContinuationToken(page, continuationToken);
2383
+ yield yield tslib.__await(page);
2384
+ }
1941
2385
  while (continuationToken) {
1942
2386
  result = yield tslib.__await(this._listByElasticSanNext(resourceGroupName, elasticSanName, continuationToken, options));
1943
2387
  continuationToken = result.nextLink;
1944
- yield yield tslib.__await(result.value || []);
2388
+ let page = result.value || [];
2389
+ setContinuationToken(page, continuationToken);
2390
+ yield yield tslib.__await(page);
1945
2391
  }
1946
2392
  });
1947
2393
  }
1948
2394
  listByElasticSanPagingAll(resourceGroupName, elasticSanName, options) {
1949
2395
  return tslib.__asyncGenerator(this, arguments, function* listByElasticSanPagingAll_1() {
1950
- var e_1, _a;
2396
+ var _a, e_1, _b, _c;
1951
2397
  try {
1952
- for (var _b = tslib.__asyncValues(this.listByElasticSanPagingPage(resourceGroupName, elasticSanName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1953
- const page = _c.value;
1954
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2398
+ for (var _d = true, _e = tslib.__asyncValues(this.listByElasticSanPagingPage(resourceGroupName, elasticSanName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
2399
+ _c = _f.value;
2400
+ _d = false;
2401
+ try {
2402
+ const page = _c;
2403
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2404
+ }
2405
+ finally {
2406
+ _d = true;
2407
+ }
1955
2408
  }
1956
2409
  }
1957
2410
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1958
2411
  finally {
1959
2412
  try {
1960
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2413
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1961
2414
  }
1962
2415
  finally { if (e_1) throw e_1.error; }
1963
2416
  }
@@ -1970,7 +2423,7 @@ class VolumeGroupsImpl {
1970
2423
  * @param options The options parameters.
1971
2424
  */
1972
2425
  _listByElasticSan(resourceGroupName, elasticSanName, options) {
1973
- return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, listByElasticSanOperationSpec);
2426
+ return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, listByElasticSanOperationSpec$1);
1974
2427
  }
1975
2428
  /**
1976
2429
  * Create a Volume Group.
@@ -1985,7 +2438,7 @@ class VolumeGroupsImpl {
1985
2438
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1986
2439
  return this.client.sendOperationRequest(args, spec);
1987
2440
  });
1988
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2441
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1989
2442
  var _a;
1990
2443
  let currentRawResponse = undefined;
1991
2444
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2004,17 +2457,21 @@ class VolumeGroupsImpl {
2004
2457
  }
2005
2458
  };
2006
2459
  });
2007
- const lro = new LroImpl(sendOperation, {
2008
- resourceGroupName,
2009
- elasticSanName,
2010
- volumeGroupName,
2011
- parameters,
2012
- options
2013
- }, createOperationSpec$1);
2014
- const poller = new coreLro.LroEngine(lro, {
2015
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2460
+ const lro = createLroSpec({
2461
+ sendOperationFn,
2462
+ args: {
2463
+ resourceGroupName,
2464
+ elasticSanName,
2465
+ volumeGroupName,
2466
+ parameters,
2467
+ options
2468
+ },
2469
+ spec: createOperationSpec$2
2470
+ });
2471
+ const poller = yield coreLro.createHttpPoller(lro, {
2472
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2016
2473
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2017
- lroResourceLocationConfig: "azure-async-operation"
2474
+ resourceLocationConfig: "location"
2018
2475
  });
2019
2476
  yield poller.poll();
2020
2477
  return poller;
@@ -2047,7 +2504,7 @@ class VolumeGroupsImpl {
2047
2504
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2048
2505
  return this.client.sendOperationRequest(args, spec);
2049
2506
  });
2050
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2507
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2051
2508
  var _a;
2052
2509
  let currentRawResponse = undefined;
2053
2510
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2066,17 +2523,21 @@ class VolumeGroupsImpl {
2066
2523
  }
2067
2524
  };
2068
2525
  });
2069
- const lro = new LroImpl(sendOperation, {
2070
- resourceGroupName,
2071
- elasticSanName,
2072
- volumeGroupName,
2073
- parameters,
2074
- options
2075
- }, updateOperationSpec$1);
2076
- const poller = new coreLro.LroEngine(lro, {
2077
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2526
+ const lro = createLroSpec({
2527
+ sendOperationFn,
2528
+ args: {
2529
+ resourceGroupName,
2530
+ elasticSanName,
2531
+ volumeGroupName,
2532
+ parameters,
2533
+ options
2534
+ },
2535
+ spec: updateOperationSpec$1
2536
+ });
2537
+ const poller = yield coreLro.createHttpPoller(lro, {
2538
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2078
2539
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2079
- lroResourceLocationConfig: "azure-async-operation"
2540
+ resourceLocationConfig: "location"
2080
2541
  });
2081
2542
  yield poller.poll();
2082
2543
  return poller;
@@ -2108,7 +2569,7 @@ class VolumeGroupsImpl {
2108
2569
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2109
2570
  return this.client.sendOperationRequest(args, spec);
2110
2571
  });
2111
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2572
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2112
2573
  var _a;
2113
2574
  let currentRawResponse = undefined;
2114
2575
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2127,11 +2588,15 @@ class VolumeGroupsImpl {
2127
2588
  }
2128
2589
  };
2129
2590
  });
2130
- const lro = new LroImpl(sendOperation, { resourceGroupName, elasticSanName, volumeGroupName, options }, deleteOperationSpec$1);
2131
- const poller = new coreLro.LroEngine(lro, {
2132
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2591
+ const lro = createLroSpec({
2592
+ sendOperationFn,
2593
+ args: { resourceGroupName, elasticSanName, volumeGroupName, options },
2594
+ spec: deleteOperationSpec$2
2595
+ });
2596
+ const poller = yield coreLro.createHttpPoller(lro, {
2597
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2133
2598
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2134
- lroResourceLocationConfig: "azure-async-operation"
2599
+ resourceLocationConfig: "location"
2135
2600
  });
2136
2601
  yield poller.poll();
2137
2602
  return poller;
@@ -2158,7 +2623,7 @@ class VolumeGroupsImpl {
2158
2623
  * @param options The options parameters.
2159
2624
  */
2160
2625
  get(resourceGroupName, elasticSanName, volumeGroupName, options) {
2161
- return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, volumeGroupName, options }, getOperationSpec$1);
2626
+ return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, volumeGroupName, options }, getOperationSpec$2);
2162
2627
  }
2163
2628
  /**
2164
2629
  * ListByElasticSanNext
@@ -2172,8 +2637,8 @@ class VolumeGroupsImpl {
2172
2637
  }
2173
2638
  }
2174
2639
  // Operation Specifications
2175
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2176
- const listByElasticSanOperationSpec = {
2640
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2641
+ const listByElasticSanOperationSpec$1 = {
2177
2642
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumeGroups",
2178
2643
  httpMethod: "GET",
2179
2644
  responses: {
@@ -2181,7 +2646,7 @@ const listByElasticSanOperationSpec = {
2181
2646
  bodyMapper: VolumeGroupList
2182
2647
  },
2183
2648
  default: {
2184
- bodyMapper: ErrorModel
2649
+ bodyMapper: ErrorResponse
2185
2650
  }
2186
2651
  },
2187
2652
  queryParameters: [apiVersion],
@@ -2192,9 +2657,9 @@ const listByElasticSanOperationSpec = {
2192
2657
  elasticSanName
2193
2658
  ],
2194
2659
  headerParameters: [accept],
2195
- serializer: serializer$1
2660
+ serializer: serializer$3
2196
2661
  };
2197
- const createOperationSpec$1 = {
2662
+ const createOperationSpec$2 = {
2198
2663
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}",
2199
2664
  httpMethod: "PUT",
2200
2665
  responses: {
@@ -2211,7 +2676,7 @@ const createOperationSpec$1 = {
2211
2676
  bodyMapper: VolumeGroup
2212
2677
  },
2213
2678
  default: {
2214
- bodyMapper: ErrorModel
2679
+ bodyMapper: ErrorResponse
2215
2680
  }
2216
2681
  },
2217
2682
  requestBody: parameters2,
@@ -2225,7 +2690,7 @@ const createOperationSpec$1 = {
2225
2690
  ],
2226
2691
  headerParameters: [accept, contentType],
2227
2692
  mediaType: "json",
2228
- serializer: serializer$1
2693
+ serializer: serializer$3
2229
2694
  };
2230
2695
  const updateOperationSpec$1 = {
2231
2696
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}",
@@ -2244,7 +2709,7 @@ const updateOperationSpec$1 = {
2244
2709
  bodyMapper: VolumeGroup
2245
2710
  },
2246
2711
  default: {
2247
- bodyMapper: ErrorModel
2712
+ bodyMapper: ErrorResponse
2248
2713
  }
2249
2714
  },
2250
2715
  requestBody: parameters3,
@@ -2258,9 +2723,9 @@ const updateOperationSpec$1 = {
2258
2723
  ],
2259
2724
  headerParameters: [accept, contentType],
2260
2725
  mediaType: "json",
2261
- serializer: serializer$1
2726
+ serializer: serializer$3
2262
2727
  };
2263
- const deleteOperationSpec$1 = {
2728
+ const deleteOperationSpec$2 = {
2264
2729
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}",
2265
2730
  httpMethod: "DELETE",
2266
2731
  responses: {
@@ -2269,7 +2734,7 @@ const deleteOperationSpec$1 = {
2269
2734
  202: {},
2270
2735
  204: {},
2271
2736
  default: {
2272
- bodyMapper: ErrorModel
2737
+ bodyMapper: ErrorResponse
2273
2738
  }
2274
2739
  },
2275
2740
  queryParameters: [apiVersion],
@@ -2281,9 +2746,9 @@ const deleteOperationSpec$1 = {
2281
2746
  volumeGroupName
2282
2747
  ],
2283
2748
  headerParameters: [accept],
2284
- serializer: serializer$1
2749
+ serializer: serializer$3
2285
2750
  };
2286
- const getOperationSpec$1 = {
2751
+ const getOperationSpec$2 = {
2287
2752
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}",
2288
2753
  httpMethod: "GET",
2289
2754
  responses: {
@@ -2291,7 +2756,7 @@ const getOperationSpec$1 = {
2291
2756
  bodyMapper: VolumeGroup
2292
2757
  },
2293
2758
  default: {
2294
- bodyMapper: ErrorModel
2759
+ bodyMapper: ErrorResponse
2295
2760
  }
2296
2761
  },
2297
2762
  queryParameters: [apiVersion],
@@ -2303,7 +2768,7 @@ const getOperationSpec$1 = {
2303
2768
  volumeGroupName
2304
2769
  ],
2305
2770
  headerParameters: [accept],
2306
- serializer: serializer$1
2771
+ serializer: serializer$3
2307
2772
  };
2308
2773
  const listByElasticSanNextOperationSpec = {
2309
2774
  path: "{nextLink}",
@@ -2313,10 +2778,9 @@ const listByElasticSanNextOperationSpec = {
2313
2778
  bodyMapper: VolumeGroupList
2314
2779
  },
2315
2780
  default: {
2316
- bodyMapper: ErrorModel
2781
+ bodyMapper: ErrorResponse
2317
2782
  }
2318
2783
  },
2319
- queryParameters: [apiVersion],
2320
2784
  urlParameters: [
2321
2785
  $host,
2322
2786
  subscriptionId,
@@ -2325,7 +2789,7 @@ const listByElasticSanNextOperationSpec = {
2325
2789
  nextLink
2326
2790
  ],
2327
2791
  headerParameters: [accept],
2328
- serializer: serializer$1
2792
+ serializer: serializer$3
2329
2793
  };
2330
2794
 
2331
2795
  /*
@@ -2361,36 +2825,54 @@ class VolumesImpl {
2361
2825
  [Symbol.asyncIterator]() {
2362
2826
  return this;
2363
2827
  },
2364
- byPage: () => {
2365
- return this.listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options);
2828
+ byPage: (settings) => {
2829
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2830
+ throw new Error("maxPageSize is not supported by this operation.");
2831
+ }
2832
+ return this.listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options, settings);
2366
2833
  }
2367
2834
  };
2368
2835
  }
2369
- listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options) {
2836
+ listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options, settings) {
2370
2837
  return tslib.__asyncGenerator(this, arguments, function* listByVolumeGroupPagingPage_1() {
2371
- let result = yield tslib.__await(this._listByVolumeGroup(resourceGroupName, elasticSanName, volumeGroupName, options));
2372
- yield yield tslib.__await(result.value || []);
2373
- let continuationToken = result.nextLink;
2838
+ let result;
2839
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2840
+ if (!continuationToken) {
2841
+ result = yield tslib.__await(this._listByVolumeGroup(resourceGroupName, elasticSanName, volumeGroupName, options));
2842
+ let page = result.value || [];
2843
+ continuationToken = result.nextLink;
2844
+ setContinuationToken(page, continuationToken);
2845
+ yield yield tslib.__await(page);
2846
+ }
2374
2847
  while (continuationToken) {
2375
2848
  result = yield tslib.__await(this._listByVolumeGroupNext(resourceGroupName, elasticSanName, volumeGroupName, continuationToken, options));
2376
2849
  continuationToken = result.nextLink;
2377
- yield yield tslib.__await(result.value || []);
2850
+ let page = result.value || [];
2851
+ setContinuationToken(page, continuationToken);
2852
+ yield yield tslib.__await(page);
2378
2853
  }
2379
2854
  });
2380
2855
  }
2381
2856
  listByVolumeGroupPagingAll(resourceGroupName, elasticSanName, volumeGroupName, options) {
2382
2857
  return tslib.__asyncGenerator(this, arguments, function* listByVolumeGroupPagingAll_1() {
2383
- var e_1, _a;
2858
+ var _a, e_1, _b, _c;
2384
2859
  try {
2385
- for (var _b = tslib.__asyncValues(this.listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2386
- const page = _c.value;
2387
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2860
+ for (var _d = true, _e = tslib.__asyncValues(this.listByVolumeGroupPagingPage(resourceGroupName, elasticSanName, volumeGroupName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
2861
+ _c = _f.value;
2862
+ _d = false;
2863
+ try {
2864
+ const page = _c;
2865
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2866
+ }
2867
+ finally {
2868
+ _d = true;
2869
+ }
2388
2870
  }
2389
2871
  }
2390
2872
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
2391
2873
  finally {
2392
2874
  try {
2393
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2875
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2394
2876
  }
2395
2877
  finally { if (e_1) throw e_1.error; }
2396
2878
  }
@@ -2410,7 +2892,7 @@ class VolumesImpl {
2410
2892
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2411
2893
  return this.client.sendOperationRequest(args, spec);
2412
2894
  });
2413
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2895
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2414
2896
  var _a;
2415
2897
  let currentRawResponse = undefined;
2416
2898
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2429,18 +2911,22 @@ class VolumesImpl {
2429
2911
  }
2430
2912
  };
2431
2913
  });
2432
- const lro = new LroImpl(sendOperation, {
2433
- resourceGroupName,
2434
- elasticSanName,
2435
- volumeGroupName,
2436
- volumeName,
2437
- parameters,
2438
- options
2439
- }, createOperationSpec);
2440
- const poller = new coreLro.LroEngine(lro, {
2441
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2914
+ const lro = createLroSpec({
2915
+ sendOperationFn,
2916
+ args: {
2917
+ resourceGroupName,
2918
+ elasticSanName,
2919
+ volumeGroupName,
2920
+ volumeName,
2921
+ parameters,
2922
+ options
2923
+ },
2924
+ spec: createOperationSpec$1
2925
+ });
2926
+ const poller = yield coreLro.createHttpPoller(lro, {
2927
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2442
2928
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2443
- lroResourceLocationConfig: "azure-async-operation"
2929
+ resourceLocationConfig: "location"
2444
2930
  });
2445
2931
  yield poller.poll();
2446
2932
  return poller;
@@ -2475,7 +2961,7 @@ class VolumesImpl {
2475
2961
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2476
2962
  return this.client.sendOperationRequest(args, spec);
2477
2963
  });
2478
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2964
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2479
2965
  var _a;
2480
2966
  let currentRawResponse = undefined;
2481
2967
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2494,18 +2980,22 @@ class VolumesImpl {
2494
2980
  }
2495
2981
  };
2496
2982
  });
2497
- const lro = new LroImpl(sendOperation, {
2498
- resourceGroupName,
2499
- elasticSanName,
2500
- volumeGroupName,
2501
- volumeName,
2502
- parameters,
2503
- options
2504
- }, updateOperationSpec);
2505
- const poller = new coreLro.LroEngine(lro, {
2506
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2983
+ const lro = createLroSpec({
2984
+ sendOperationFn,
2985
+ args: {
2986
+ resourceGroupName,
2987
+ elasticSanName,
2988
+ volumeGroupName,
2989
+ volumeName,
2990
+ parameters,
2991
+ options
2992
+ },
2993
+ spec: updateOperationSpec
2994
+ });
2995
+ const poller = yield coreLro.createHttpPoller(lro, {
2996
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2507
2997
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2508
- lroResourceLocationConfig: "azure-async-operation"
2998
+ resourceLocationConfig: "location"
2509
2999
  });
2510
3000
  yield poller.poll();
2511
3001
  return poller;
@@ -2539,7 +3029,7 @@ class VolumesImpl {
2539
3029
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2540
3030
  return this.client.sendOperationRequest(args, spec);
2541
3031
  });
2542
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3032
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2543
3033
  var _a;
2544
3034
  let currentRawResponse = undefined;
2545
3035
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2558,17 +3048,21 @@ class VolumesImpl {
2558
3048
  }
2559
3049
  };
2560
3050
  });
2561
- const lro = new LroImpl(sendOperation, {
2562
- resourceGroupName,
2563
- elasticSanName,
2564
- volumeGroupName,
2565
- volumeName,
2566
- options
2567
- }, deleteOperationSpec);
2568
- const poller = new coreLro.LroEngine(lro, {
2569
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3051
+ const lro = createLroSpec({
3052
+ sendOperationFn,
3053
+ args: {
3054
+ resourceGroupName,
3055
+ elasticSanName,
3056
+ volumeGroupName,
3057
+ volumeName,
3058
+ options
3059
+ },
3060
+ spec: deleteOperationSpec$1
3061
+ });
3062
+ const poller = yield coreLro.createHttpPoller(lro, {
3063
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2570
3064
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2571
- lroResourceLocationConfig: "azure-async-operation"
3065
+ resourceLocationConfig: "location"
2572
3066
  });
2573
3067
  yield poller.poll();
2574
3068
  return poller;
@@ -2603,7 +3097,7 @@ class VolumesImpl {
2603
3097
  volumeGroupName,
2604
3098
  volumeName,
2605
3099
  options
2606
- }, getOperationSpec);
3100
+ }, getOperationSpec$1);
2607
3101
  }
2608
3102
  /**
2609
3103
  * List Volumes in a VolumeGroup.
@@ -2628,8 +3122,8 @@ class VolumesImpl {
2628
3122
  }
2629
3123
  }
2630
3124
  // Operation Specifications
2631
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2632
- const createOperationSpec = {
3125
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3126
+ const createOperationSpec$1 = {
2633
3127
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
2634
3128
  httpMethod: "PUT",
2635
3129
  responses: {
@@ -2646,7 +3140,7 @@ const createOperationSpec = {
2646
3140
  bodyMapper: Volume
2647
3141
  },
2648
3142
  default: {
2649
- bodyMapper: ErrorModel
3143
+ bodyMapper: ErrorResponse
2650
3144
  }
2651
3145
  },
2652
3146
  requestBody: parameters4,
@@ -2661,7 +3155,7 @@ const createOperationSpec = {
2661
3155
  ],
2662
3156
  headerParameters: [accept, contentType],
2663
3157
  mediaType: "json",
2664
- serializer
3158
+ serializer: serializer$2
2665
3159
  };
2666
3160
  const updateOperationSpec = {
2667
3161
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
@@ -2680,7 +3174,7 @@ const updateOperationSpec = {
2680
3174
  bodyMapper: Volume
2681
3175
  },
2682
3176
  default: {
2683
- bodyMapper: ErrorModel
3177
+ bodyMapper: ErrorResponse
2684
3178
  }
2685
3179
  },
2686
3180
  requestBody: parameters5,
@@ -2695,9 +3189,9 @@ const updateOperationSpec = {
2695
3189
  ],
2696
3190
  headerParameters: [accept, contentType],
2697
3191
  mediaType: "json",
2698
- serializer
3192
+ serializer: serializer$2
2699
3193
  };
2700
- const deleteOperationSpec = {
3194
+ const deleteOperationSpec$1 = {
2701
3195
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
2702
3196
  httpMethod: "DELETE",
2703
3197
  responses: {
@@ -2706,7 +3200,7 @@ const deleteOperationSpec = {
2706
3200
  202: {},
2707
3201
  204: {},
2708
3202
  default: {
2709
- bodyMapper: ErrorModel
3203
+ bodyMapper: ErrorResponse
2710
3204
  }
2711
3205
  },
2712
3206
  queryParameters: [apiVersion],
@@ -2719,9 +3213,9 @@ const deleteOperationSpec = {
2719
3213
  volumeName
2720
3214
  ],
2721
3215
  headerParameters: [accept],
2722
- serializer
3216
+ serializer: serializer$2
2723
3217
  };
2724
- const getOperationSpec = {
3218
+ const getOperationSpec$1 = {
2725
3219
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
2726
3220
  httpMethod: "GET",
2727
3221
  responses: {
@@ -2729,7 +3223,7 @@ const getOperationSpec = {
2729
3223
  bodyMapper: Volume
2730
3224
  },
2731
3225
  default: {
2732
- bodyMapper: ErrorModel
3226
+ bodyMapper: ErrorResponse
2733
3227
  }
2734
3228
  },
2735
3229
  queryParameters: [apiVersion],
@@ -2742,7 +3236,7 @@ const getOperationSpec = {
2742
3236
  volumeName
2743
3237
  ],
2744
3238
  headerParameters: [accept],
2745
- serializer
3239
+ serializer: serializer$2
2746
3240
  };
2747
3241
  const listByVolumeGroupOperationSpec = {
2748
3242
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes",
@@ -2752,7 +3246,7 @@ const listByVolumeGroupOperationSpec = {
2752
3246
  bodyMapper: VolumeList
2753
3247
  },
2754
3248
  default: {
2755
- bodyMapper: ErrorModel
3249
+ bodyMapper: ErrorResponse
2756
3250
  }
2757
3251
  },
2758
3252
  queryParameters: [apiVersion],
@@ -2764,7 +3258,7 @@ const listByVolumeGroupOperationSpec = {
2764
3258
  volumeGroupName
2765
3259
  ],
2766
3260
  headerParameters: [accept],
2767
- serializer
3261
+ serializer: serializer$2
2768
3262
  };
2769
3263
  const listByVolumeGroupNextOperationSpec = {
2770
3264
  path: "{nextLink}",
@@ -2774,10 +3268,9 @@ const listByVolumeGroupNextOperationSpec = {
2774
3268
  bodyMapper: VolumeList
2775
3269
  },
2776
3270
  default: {
2777
- bodyMapper: ErrorModel
3271
+ bodyMapper: ErrorResponse
2778
3272
  }
2779
3273
  },
2780
- queryParameters: [apiVersion],
2781
3274
  urlParameters: [
2782
3275
  $host,
2783
3276
  subscriptionId,
@@ -2787,6 +3280,384 @@ const listByVolumeGroupNextOperationSpec = {
2787
3280
  volumeGroupName
2788
3281
  ],
2789
3282
  headerParameters: [accept],
3283
+ serializer: serializer$2
3284
+ };
3285
+
3286
+ /*
3287
+ * Copyright (c) Microsoft Corporation.
3288
+ * Licensed under the MIT License.
3289
+ *
3290
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3291
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3292
+ */
3293
+ /// <reference lib="esnext.asynciterable" />
3294
+ /** Class containing PrivateEndpointConnections operations. */
3295
+ class PrivateEndpointConnectionsImpl {
3296
+ /**
3297
+ * Initialize a new instance of the class PrivateEndpointConnections class.
3298
+ * @param client Reference to the service client
3299
+ */
3300
+ constructor(client) {
3301
+ this.client = client;
3302
+ }
3303
+ /**
3304
+ * List all Private Endpoint Connections associated with the Elastic San.
3305
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3306
+ * @param elasticSanName The name of the ElasticSan.
3307
+ * @param options The options parameters.
3308
+ */
3309
+ list(resourceGroupName, elasticSanName, options) {
3310
+ const iter = this.listPagingAll(resourceGroupName, elasticSanName, options);
3311
+ return {
3312
+ next() {
3313
+ return iter.next();
3314
+ },
3315
+ [Symbol.asyncIterator]() {
3316
+ return this;
3317
+ },
3318
+ byPage: (settings) => {
3319
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3320
+ throw new Error("maxPageSize is not supported by this operation.");
3321
+ }
3322
+ return this.listPagingPage(resourceGroupName, elasticSanName, options, settings);
3323
+ }
3324
+ };
3325
+ }
3326
+ listPagingPage(resourceGroupName, elasticSanName, options, _settings) {
3327
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3328
+ let result;
3329
+ result = yield tslib.__await(this._list(resourceGroupName, elasticSanName, options));
3330
+ yield yield tslib.__await(result.value || []);
3331
+ });
3332
+ }
3333
+ listPagingAll(resourceGroupName, elasticSanName, options) {
3334
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3335
+ var _a, e_1, _b, _c;
3336
+ try {
3337
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(resourceGroupName, elasticSanName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
3338
+ _c = _f.value;
3339
+ _d = false;
3340
+ try {
3341
+ const page = _c;
3342
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3343
+ }
3344
+ finally {
3345
+ _d = true;
3346
+ }
3347
+ }
3348
+ }
3349
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3350
+ finally {
3351
+ try {
3352
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
3353
+ }
3354
+ finally { if (e_1) throw e_1.error; }
3355
+ }
3356
+ });
3357
+ }
3358
+ /**
3359
+ * Update the state of specified private endpoint connection associated with the Elastic San
3360
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3361
+ * @param elasticSanName The name of the ElasticSan.
3362
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
3363
+ * @param parameters Private Endpoint Connection Approval object.
3364
+ * @param options The options parameters.
3365
+ */
3366
+ beginCreate(resourceGroupName, elasticSanName, privateEndpointConnectionName, parameters, options) {
3367
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3368
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3369
+ return this.client.sendOperationRequest(args, spec);
3370
+ });
3371
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3372
+ var _a;
3373
+ let currentRawResponse = undefined;
3374
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3375
+ const callback = (rawResponse, flatResponse) => {
3376
+ currentRawResponse = rawResponse;
3377
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3378
+ };
3379
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3380
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3381
+ return {
3382
+ flatResponse,
3383
+ rawResponse: {
3384
+ statusCode: currentRawResponse.status,
3385
+ body: currentRawResponse.parsedBody,
3386
+ headers: currentRawResponse.headers.toJSON()
3387
+ }
3388
+ };
3389
+ });
3390
+ const lro = createLroSpec({
3391
+ sendOperationFn,
3392
+ args: {
3393
+ resourceGroupName,
3394
+ elasticSanName,
3395
+ privateEndpointConnectionName,
3396
+ parameters,
3397
+ options
3398
+ },
3399
+ spec: createOperationSpec
3400
+ });
3401
+ const poller = yield coreLro.createHttpPoller(lro, {
3402
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3403
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3404
+ resourceLocationConfig: "location"
3405
+ });
3406
+ yield poller.poll();
3407
+ return poller;
3408
+ });
3409
+ }
3410
+ /**
3411
+ * Update the state of specified private endpoint connection associated with the Elastic San
3412
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3413
+ * @param elasticSanName The name of the ElasticSan.
3414
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
3415
+ * @param parameters Private Endpoint Connection Approval object.
3416
+ * @param options The options parameters.
3417
+ */
3418
+ beginCreateAndWait(resourceGroupName, elasticSanName, privateEndpointConnectionName, parameters, options) {
3419
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3420
+ const poller = yield this.beginCreate(resourceGroupName, elasticSanName, privateEndpointConnectionName, parameters, options);
3421
+ return poller.pollUntilDone();
3422
+ });
3423
+ }
3424
+ /**
3425
+ * Gets the specified private endpoint connection associated with the Elastic San
3426
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3427
+ * @param elasticSanName The name of the ElasticSan.
3428
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
3429
+ * @param options The options parameters.
3430
+ */
3431
+ get(resourceGroupName, elasticSanName, privateEndpointConnectionName, options) {
3432
+ return this.client.sendOperationRequest({
3433
+ resourceGroupName,
3434
+ elasticSanName,
3435
+ privateEndpointConnectionName,
3436
+ options
3437
+ }, getOperationSpec);
3438
+ }
3439
+ /**
3440
+ * Deletes the specified private endpoint connection associated with the Elastic San
3441
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3442
+ * @param elasticSanName The name of the ElasticSan.
3443
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
3444
+ * @param options The options parameters.
3445
+ */
3446
+ beginDelete(resourceGroupName, elasticSanName, privateEndpointConnectionName, options) {
3447
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3448
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3449
+ return this.client.sendOperationRequest(args, spec);
3450
+ });
3451
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3452
+ var _a;
3453
+ let currentRawResponse = undefined;
3454
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3455
+ const callback = (rawResponse, flatResponse) => {
3456
+ currentRawResponse = rawResponse;
3457
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3458
+ };
3459
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3460
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3461
+ return {
3462
+ flatResponse,
3463
+ rawResponse: {
3464
+ statusCode: currentRawResponse.status,
3465
+ body: currentRawResponse.parsedBody,
3466
+ headers: currentRawResponse.headers.toJSON()
3467
+ }
3468
+ };
3469
+ });
3470
+ const lro = createLroSpec({
3471
+ sendOperationFn,
3472
+ args: {
3473
+ resourceGroupName,
3474
+ elasticSanName,
3475
+ privateEndpointConnectionName,
3476
+ options
3477
+ },
3478
+ spec: deleteOperationSpec
3479
+ });
3480
+ const poller = yield coreLro.createHttpPoller(lro, {
3481
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3482
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3483
+ resourceLocationConfig: "location"
3484
+ });
3485
+ yield poller.poll();
3486
+ return poller;
3487
+ });
3488
+ }
3489
+ /**
3490
+ * Deletes the specified private endpoint connection associated with the Elastic San
3491
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3492
+ * @param elasticSanName The name of the ElasticSan.
3493
+ * @param privateEndpointConnectionName The name of the Private Endpoint connection.
3494
+ * @param options The options parameters.
3495
+ */
3496
+ beginDeleteAndWait(resourceGroupName, elasticSanName, privateEndpointConnectionName, options) {
3497
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3498
+ const poller = yield this.beginDelete(resourceGroupName, elasticSanName, privateEndpointConnectionName, options);
3499
+ return poller.pollUntilDone();
3500
+ });
3501
+ }
3502
+ /**
3503
+ * List all Private Endpoint Connections associated with the Elastic San.
3504
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3505
+ * @param elasticSanName The name of the ElasticSan.
3506
+ * @param options The options parameters.
3507
+ */
3508
+ _list(resourceGroupName, elasticSanName, options) {
3509
+ return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, listOperationSpec);
3510
+ }
3511
+ }
3512
+ // Operation Specifications
3513
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3514
+ const createOperationSpec = {
3515
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
3516
+ httpMethod: "PUT",
3517
+ responses: {
3518
+ 200: {
3519
+ bodyMapper: PrivateEndpointConnection
3520
+ },
3521
+ 201: {
3522
+ bodyMapper: PrivateEndpointConnection
3523
+ },
3524
+ 202: {
3525
+ bodyMapper: PrivateEndpointConnection
3526
+ },
3527
+ 204: {
3528
+ bodyMapper: PrivateEndpointConnection
3529
+ },
3530
+ default: {
3531
+ bodyMapper: ErrorResponse
3532
+ }
3533
+ },
3534
+ requestBody: parameters6,
3535
+ queryParameters: [apiVersion],
3536
+ urlParameters: [
3537
+ $host,
3538
+ subscriptionId,
3539
+ resourceGroupName,
3540
+ elasticSanName,
3541
+ privateEndpointConnectionName
3542
+ ],
3543
+ headerParameters: [accept, contentType],
3544
+ mediaType: "json",
3545
+ serializer: serializer$1
3546
+ };
3547
+ const getOperationSpec = {
3548
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
3549
+ httpMethod: "GET",
3550
+ responses: {
3551
+ 200: {
3552
+ bodyMapper: PrivateEndpointConnection
3553
+ },
3554
+ default: {
3555
+ bodyMapper: ErrorResponse
3556
+ }
3557
+ },
3558
+ queryParameters: [apiVersion],
3559
+ urlParameters: [
3560
+ $host,
3561
+ subscriptionId,
3562
+ resourceGroupName,
3563
+ elasticSanName,
3564
+ privateEndpointConnectionName
3565
+ ],
3566
+ headerParameters: [accept],
3567
+ serializer: serializer$1
3568
+ };
3569
+ const deleteOperationSpec = {
3570
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}",
3571
+ httpMethod: "DELETE",
3572
+ responses: {
3573
+ 200: {},
3574
+ 201: {},
3575
+ 202: {},
3576
+ 204: {},
3577
+ default: {
3578
+ bodyMapper: ErrorResponse
3579
+ }
3580
+ },
3581
+ queryParameters: [apiVersion],
3582
+ urlParameters: [
3583
+ $host,
3584
+ subscriptionId,
3585
+ resourceGroupName,
3586
+ elasticSanName,
3587
+ privateEndpointConnectionName
3588
+ ],
3589
+ headerParameters: [accept],
3590
+ serializer: serializer$1
3591
+ };
3592
+ const listOperationSpec = {
3593
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections",
3594
+ httpMethod: "GET",
3595
+ responses: {
3596
+ 200: {
3597
+ bodyMapper: PrivateEndpointConnectionListResult
3598
+ },
3599
+ default: {
3600
+ bodyMapper: ErrorResponse
3601
+ }
3602
+ },
3603
+ queryParameters: [apiVersion],
3604
+ urlParameters: [
3605
+ $host,
3606
+ subscriptionId,
3607
+ resourceGroupName,
3608
+ elasticSanName
3609
+ ],
3610
+ headerParameters: [accept],
3611
+ serializer: serializer$1
3612
+ };
3613
+
3614
+ /*
3615
+ * Copyright (c) Microsoft Corporation.
3616
+ * Licensed under the MIT License.
3617
+ *
3618
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3619
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3620
+ */
3621
+ /** Class containing PrivateLinkResources operations. */
3622
+ class PrivateLinkResourcesImpl {
3623
+ /**
3624
+ * Initialize a new instance of the class PrivateLinkResources class.
3625
+ * @param client Reference to the service client
3626
+ */
3627
+ constructor(client) {
3628
+ this.client = client;
3629
+ }
3630
+ /**
3631
+ * Gets the private link resources that need to be created for a elastic San.
3632
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3633
+ * @param elasticSanName The name of the ElasticSan.
3634
+ * @param options The options parameters.
3635
+ */
3636
+ listByElasticSan(resourceGroupName, elasticSanName, options) {
3637
+ return this.client.sendOperationRequest({ resourceGroupName, elasticSanName, options }, listByElasticSanOperationSpec);
3638
+ }
3639
+ }
3640
+ // Operation Specifications
3641
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3642
+ const listByElasticSanOperationSpec = {
3643
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateLinkResources",
3644
+ httpMethod: "GET",
3645
+ responses: {
3646
+ 200: {
3647
+ bodyMapper: PrivateLinkResourceListResult
3648
+ },
3649
+ default: {
3650
+ bodyMapper: ErrorResponse
3651
+ }
3652
+ },
3653
+ queryParameters: [apiVersion],
3654
+ urlParameters: [
3655
+ $host,
3656
+ subscriptionId,
3657
+ resourceGroupName,
3658
+ elasticSanName
3659
+ ],
3660
+ headerParameters: [accept],
2790
3661
  serializer
2791
3662
  };
2792
3663
 
@@ -2805,7 +3676,7 @@ class ElasticSanManagement extends coreClient__namespace.ServiceClient {
2805
3676
  * @param options The parameter options
2806
3677
  */
2807
3678
  constructor(credentials, subscriptionId, options) {
2808
- var _a, _b;
3679
+ var _a, _b, _c;
2809
3680
  if (credentials === undefined) {
2810
3681
  throw new Error("'credentials' cannot be null");
2811
3682
  }
@@ -2820,16 +3691,13 @@ class ElasticSanManagement extends coreClient__namespace.ServiceClient {
2820
3691
  requestContentType: "application/json; charset=utf-8",
2821
3692
  credential: credentials
2822
3693
  };
2823
- const packageDetails = `azsdk-js-arm-elasticsan/1.0.0-beta.1`;
3694
+ const packageDetails = `azsdk-js-arm-elasticsan/1.0.0-beta.2`;
2824
3695
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2825
3696
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2826
3697
  : `${packageDetails}`;
2827
- if (!options.credentialScopes) {
2828
- options.credentialScopes = ["https://management.azure.com/.default"];
2829
- }
2830
3698
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2831
3699
  userAgentPrefix
2832
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3700
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2833
3701
  super(optionsWithDefaults);
2834
3702
  let bearerTokenAuthenticationPolicyFound = false;
2835
3703
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
@@ -2846,7 +3714,7 @@ class ElasticSanManagement extends coreClient__namespace.ServiceClient {
2846
3714
  });
2847
3715
  this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
2848
3716
  credential: credentials,
2849
- scopes: `${optionsWithDefaults.credentialScopes}`,
3717
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
2850
3718
  challengeCallbacks: {
2851
3719
  authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
2852
3720
  }
@@ -2856,12 +3724,14 @@ class ElasticSanManagement extends coreClient__namespace.ServiceClient {
2856
3724
  this.subscriptionId = subscriptionId;
2857
3725
  // Assigning values to Constant parameters
2858
3726
  this.$host = options.$host || "https://management.azure.com";
2859
- this.apiVersion = options.apiVersion || "2021-11-20-preview";
3727
+ this.apiVersion = options.apiVersion || "2022-12-01-preview";
2860
3728
  this.operations = new OperationsImpl(this);
2861
3729
  this.skus = new SkusImpl(this);
2862
3730
  this.elasticSans = new ElasticSansImpl(this);
2863
3731
  this.volumeGroups = new VolumeGroupsImpl(this);
2864
3732
  this.volumes = new VolumesImpl(this);
3733
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
3734
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
2865
3735
  this.addCustomApiVersionPolicy(options.apiVersion);
2866
3736
  }
2867
3737
  /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
@@ -2894,4 +3764,5 @@ class ElasticSanManagement extends coreClient__namespace.ServiceClient {
2894
3764
  }
2895
3765
 
2896
3766
  exports.ElasticSanManagement = ElasticSanManagement;
3767
+ exports.getContinuationToken = getContinuationToken;
2897
3768
  //# sourceMappingURL=index.js.map