@azure/arm-largeinstance 1.0.0-alpha.20240223.1

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 (139) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +2490 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/azureLargeInstanceGetSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/azureLargeInstanceGetSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/azureLargeInstanceGetSample.js +41 -0
  11. package/dist-esm/samples-dev/azureLargeInstanceGetSample.js.map +1 -0
  12. package/dist-esm/samples-dev/azureLargeInstanceListByResourceGroupSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/azureLargeInstanceListByResourceGroupSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/azureLargeInstanceListByResourceGroupSample.js +56 -0
  15. package/dist-esm/samples-dev/azureLargeInstanceListByResourceGroupSample.js.map +1 -0
  16. package/dist-esm/samples-dev/azureLargeInstanceListBySubscriptionSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/azureLargeInstanceListBySubscriptionSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/azureLargeInstanceListBySubscriptionSample.js +55 -0
  19. package/dist-esm/samples-dev/azureLargeInstanceListBySubscriptionSample.js.map +1 -0
  20. package/dist-esm/samples-dev/azureLargeInstanceRestartSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/azureLargeInstanceRestartSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/azureLargeInstanceRestartSample.js +39 -0
  23. package/dist-esm/samples-dev/azureLargeInstanceRestartSample.js.map +1 -0
  24. package/dist-esm/samples-dev/azureLargeInstanceShutdownSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/azureLargeInstanceShutdownSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/azureLargeInstanceShutdownSample.js +39 -0
  27. package/dist-esm/samples-dev/azureLargeInstanceShutdownSample.js.map +1 -0
  28. package/dist-esm/samples-dev/azureLargeInstanceStartSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/azureLargeInstanceStartSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/azureLargeInstanceStartSample.js +39 -0
  31. package/dist-esm/samples-dev/azureLargeInstanceStartSample.js.map +1 -0
  32. package/dist-esm/samples-dev/azureLargeInstanceUpdateSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/azureLargeInstanceUpdateSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/azureLargeInstanceUpdateSample.js +66 -0
  35. package/dist-esm/samples-dev/azureLargeInstanceUpdateSample.js.map +1 -0
  36. package/dist-esm/samples-dev/azureLargeStorageInstanceGetSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/azureLargeStorageInstanceGetSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/azureLargeStorageInstanceGetSample.js +41 -0
  39. package/dist-esm/samples-dev/azureLargeStorageInstanceGetSample.js.map +1 -0
  40. package/dist-esm/samples-dev/azureLargeStorageInstanceListByResourceGroupSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/azureLargeStorageInstanceListByResourceGroupSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/azureLargeStorageInstanceListByResourceGroupSample.js +58 -0
  43. package/dist-esm/samples-dev/azureLargeStorageInstanceListByResourceGroupSample.js.map +1 -0
  44. package/dist-esm/samples-dev/azureLargeStorageInstanceListBySubscriptionSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/azureLargeStorageInstanceListBySubscriptionSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/azureLargeStorageInstanceListBySubscriptionSample.js +55 -0
  47. package/dist-esm/samples-dev/azureLargeStorageInstanceListBySubscriptionSample.js.map +1 -0
  48. package/dist-esm/samples-dev/azureLargeStorageInstanceUpdateSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/azureLargeStorageInstanceUpdateSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/azureLargeStorageInstanceUpdateSample.js +66 -0
  51. package/dist-esm/samples-dev/azureLargeStorageInstanceUpdateSample.js.map +1 -0
  52. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/operationsListSample.js +53 -0
  55. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  56. package/dist-esm/src/index.d.ts +6 -0
  57. package/dist-esm/src/index.d.ts.map +1 -0
  58. package/dist-esm/src/index.js +13 -0
  59. package/dist-esm/src/index.js.map +1 -0
  60. package/dist-esm/src/largeInstanceManagementClient.d.ts +22 -0
  61. package/dist-esm/src/largeInstanceManagementClient.d.ts.map +1 -0
  62. package/dist-esm/src/largeInstanceManagementClient.js +103 -0
  63. package/dist-esm/src/largeInstanceManagementClient.js.map +1 -0
  64. package/dist-esm/src/lroImpl.d.ts +11 -0
  65. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  66. package/dist-esm/src/lroImpl.js +21 -0
  67. package/dist-esm/src/lroImpl.js.map +1 -0
  68. package/dist-esm/src/models/index.d.ts +858 -0
  69. package/dist-esm/src/models/index.d.ts.map +1 -0
  70. package/dist-esm/src/models/index.js +210 -0
  71. package/dist-esm/src/models/index.js.map +1 -0
  72. package/dist-esm/src/models/mappers.d.ts +33 -0
  73. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  74. package/dist-esm/src/models/mappers.js +902 -0
  75. package/dist-esm/src/models/mappers.js.map +1 -0
  76. package/dist-esm/src/models/parameters.d.ts +14 -0
  77. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  78. package/dist-esm/src/models/parameters.js +126 -0
  79. package/dist-esm/src/models/parameters.js.map +1 -0
  80. package/dist-esm/src/operations/azureLargeInstanceOperations.d.ts +117 -0
  81. package/dist-esm/src/operations/azureLargeInstanceOperations.d.ts.map +1 -0
  82. package/dist-esm/src/operations/azureLargeInstanceOperations.js +587 -0
  83. package/dist-esm/src/operations/azureLargeInstanceOperations.js.map +1 -0
  84. package/dist-esm/src/operations/azureLargeStorageInstanceOperations.d.ts +76 -0
  85. package/dist-esm/src/operations/azureLargeStorageInstanceOperations.d.ts.map +1 -0
  86. package/dist-esm/src/operations/azureLargeStorageInstanceOperations.js +332 -0
  87. package/dist-esm/src/operations/azureLargeStorageInstanceOperations.js.map +1 -0
  88. package/dist-esm/src/operations/index.d.ts +4 -0
  89. package/dist-esm/src/operations/index.d.ts.map +1 -0
  90. package/dist-esm/src/operations/index.js +11 -0
  91. package/dist-esm/src/operations/index.js.map +1 -0
  92. package/dist-esm/src/operations/operations.d.ts +32 -0
  93. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operations/operations.js +133 -0
  95. package/dist-esm/src/operations/operations.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/azureLargeInstanceOperations.d.ts +79 -0
  97. package/dist-esm/src/operationsInterfaces/azureLargeInstanceOperations.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/azureLargeInstanceOperations.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/azureLargeInstanceOperations.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/azureLargeStorageInstanceOperations.d.ts +37 -0
  101. package/dist-esm/src/operationsInterfaces/azureLargeStorageInstanceOperations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/azureLargeStorageInstanceOperations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/azureLargeStorageInstanceOperations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  105. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  107. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  109. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  112. package/dist-esm/src/pagingHelper.d.ts +13 -0
  113. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  114. package/dist-esm/src/pagingHelper.js +32 -0
  115. package/dist-esm/src/pagingHelper.js.map +1 -0
  116. package/dist-esm/test/largeinstance_operations_test.spec.d.ts +4 -0
  117. package/dist-esm/test/largeinstance_operations_test.spec.d.ts.map +1 -0
  118. package/dist-esm/test/largeinstance_operations_test.spec.js +73 -0
  119. package/dist-esm/test/largeinstance_operations_test.spec.js.map +1 -0
  120. package/package.json +118 -0
  121. package/review/arm-largeinstance.api.md +569 -0
  122. package/src/index.ts +13 -0
  123. package/src/largeInstanceManagementClient.ts +156 -0
  124. package/src/lroImpl.ts +42 -0
  125. package/src/models/index.ts +955 -0
  126. package/src/models/mappers.ts +944 -0
  127. package/src/models/parameters.ts +147 -0
  128. package/src/operations/azureLargeInstanceOperations.ts +768 -0
  129. package/src/operations/azureLargeStorageInstanceOperations.ts +401 -0
  130. package/src/operations/index.ts +11 -0
  131. package/src/operations/operations.ts +149 -0
  132. package/src/operationsInterfaces/azureLargeInstanceOperations.ts +156 -0
  133. package/src/operationsInterfaces/azureLargeStorageInstanceOperations.ts +69 -0
  134. package/src/operationsInterfaces/index.ts +11 -0
  135. package/src/operationsInterfaces/operations.ts +22 -0
  136. package/src/pagingHelper.ts +39 -0
  137. package/tsconfig.json +33 -0
  138. package/types/arm-largeinstance.d.ts +1096 -0
  139. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,401 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { AzureLargeStorageInstanceOperations } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { LargeInstanceManagementClient } from "../largeInstanceManagementClient";
16
+ import {
17
+ AzureLargeStorageInstance,
18
+ AzureLargeStorageInstanceListBySubscriptionNextOptionalParams,
19
+ AzureLargeStorageInstanceListBySubscriptionOptionalParams,
20
+ AzureLargeStorageInstanceListBySubscriptionResponse,
21
+ AzureLargeStorageInstanceListByResourceGroupNextOptionalParams,
22
+ AzureLargeStorageInstanceListByResourceGroupOptionalParams,
23
+ AzureLargeStorageInstanceListByResourceGroupResponse,
24
+ AzureLargeStorageInstanceGetOptionalParams,
25
+ AzureLargeStorageInstanceGetResponse,
26
+ AzureLargeStorageInstanceTagsUpdate,
27
+ AzureLargeStorageInstanceUpdateOptionalParams,
28
+ AzureLargeStorageInstanceUpdateResponse,
29
+ AzureLargeStorageInstanceListBySubscriptionNextResponse,
30
+ AzureLargeStorageInstanceListByResourceGroupNextResponse,
31
+ } from "../models";
32
+
33
+ /// <reference lib="esnext.asynciterable" />
34
+ /** Class containing AzureLargeStorageInstanceOperations operations. */
35
+ export class AzureLargeStorageInstanceOperationsImpl
36
+ implements AzureLargeStorageInstanceOperations
37
+ {
38
+ private readonly client: LargeInstanceManagementClient;
39
+
40
+ /**
41
+ * Initialize a new instance of the class AzureLargeStorageInstanceOperations class.
42
+ * @param client Reference to the service client
43
+ */
44
+ constructor(client: LargeInstanceManagementClient) {
45
+ this.client = client;
46
+ }
47
+
48
+ /**
49
+ * Gets a list of AzureLargeStorageInstances in the specified subscription. The
50
+ * operations returns various properties of each Azure LargeStorage instance.
51
+ * @param options The options parameters.
52
+ */
53
+ public listBySubscription(
54
+ options?: AzureLargeStorageInstanceListBySubscriptionOptionalParams,
55
+ ): PagedAsyncIterableIterator<AzureLargeStorageInstance> {
56
+ const iter = this.listBySubscriptionPagingAll(options);
57
+ return {
58
+ next() {
59
+ return iter.next();
60
+ },
61
+ [Symbol.asyncIterator]() {
62
+ return this;
63
+ },
64
+ byPage: (settings?: PageSettings) => {
65
+ if (settings?.maxPageSize) {
66
+ throw new Error("maxPageSize is not supported by this operation.");
67
+ }
68
+ return this.listBySubscriptionPagingPage(options, settings);
69
+ },
70
+ };
71
+ }
72
+
73
+ private async *listBySubscriptionPagingPage(
74
+ options?: AzureLargeStorageInstanceListBySubscriptionOptionalParams,
75
+ settings?: PageSettings,
76
+ ): AsyncIterableIterator<AzureLargeStorageInstance[]> {
77
+ let result: AzureLargeStorageInstanceListBySubscriptionResponse;
78
+ let continuationToken = settings?.continuationToken;
79
+ if (!continuationToken) {
80
+ result = await this._listBySubscription(options);
81
+ let page = result.value || [];
82
+ continuationToken = result.nextLink;
83
+ setContinuationToken(page, continuationToken);
84
+ yield page;
85
+ }
86
+ while (continuationToken) {
87
+ result = await this._listBySubscriptionNext(continuationToken, options);
88
+ continuationToken = result.nextLink;
89
+ let page = result.value || [];
90
+ setContinuationToken(page, continuationToken);
91
+ yield page;
92
+ }
93
+ }
94
+
95
+ private async *listBySubscriptionPagingAll(
96
+ options?: AzureLargeStorageInstanceListBySubscriptionOptionalParams,
97
+ ): AsyncIterableIterator<AzureLargeStorageInstance> {
98
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
99
+ yield* page;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Gets a list of AzureLargeStorageInstances in the specified subscription and
105
+ * resource group. The operations returns various properties of each Azure
106
+ * LargeStorage instance.
107
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
108
+ * @param options The options parameters.
109
+ */
110
+ public listByResourceGroup(
111
+ resourceGroupName: string,
112
+ options?: AzureLargeStorageInstanceListByResourceGroupOptionalParams,
113
+ ): PagedAsyncIterableIterator<AzureLargeStorageInstance> {
114
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
115
+ return {
116
+ next() {
117
+ return iter.next();
118
+ },
119
+ [Symbol.asyncIterator]() {
120
+ return this;
121
+ },
122
+ byPage: (settings?: PageSettings) => {
123
+ if (settings?.maxPageSize) {
124
+ throw new Error("maxPageSize is not supported by this operation.");
125
+ }
126
+ return this.listByResourceGroupPagingPage(
127
+ resourceGroupName,
128
+ options,
129
+ settings,
130
+ );
131
+ },
132
+ };
133
+ }
134
+
135
+ private async *listByResourceGroupPagingPage(
136
+ resourceGroupName: string,
137
+ options?: AzureLargeStorageInstanceListByResourceGroupOptionalParams,
138
+ settings?: PageSettings,
139
+ ): AsyncIterableIterator<AzureLargeStorageInstance[]> {
140
+ let result: AzureLargeStorageInstanceListByResourceGroupResponse;
141
+ let continuationToken = settings?.continuationToken;
142
+ if (!continuationToken) {
143
+ result = await this._listByResourceGroup(resourceGroupName, options);
144
+ let page = result.value || [];
145
+ continuationToken = result.nextLink;
146
+ setContinuationToken(page, continuationToken);
147
+ yield page;
148
+ }
149
+ while (continuationToken) {
150
+ result = await this._listByResourceGroupNext(
151
+ resourceGroupName,
152
+ continuationToken,
153
+ options,
154
+ );
155
+ continuationToken = result.nextLink;
156
+ let page = result.value || [];
157
+ setContinuationToken(page, continuationToken);
158
+ yield page;
159
+ }
160
+ }
161
+
162
+ private async *listByResourceGroupPagingAll(
163
+ resourceGroupName: string,
164
+ options?: AzureLargeStorageInstanceListByResourceGroupOptionalParams,
165
+ ): AsyncIterableIterator<AzureLargeStorageInstance> {
166
+ for await (const page of this.listByResourceGroupPagingPage(
167
+ resourceGroupName,
168
+ options,
169
+ )) {
170
+ yield* page;
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Gets a list of AzureLargeStorageInstances in the specified subscription. The
176
+ * operations returns various properties of each Azure LargeStorage instance.
177
+ * @param options The options parameters.
178
+ */
179
+ private _listBySubscription(
180
+ options?: AzureLargeStorageInstanceListBySubscriptionOptionalParams,
181
+ ): Promise<AzureLargeStorageInstanceListBySubscriptionResponse> {
182
+ return this.client.sendOperationRequest(
183
+ { options },
184
+ listBySubscriptionOperationSpec,
185
+ );
186
+ }
187
+
188
+ /**
189
+ * Gets a list of AzureLargeStorageInstances in the specified subscription and
190
+ * resource group. The operations returns various properties of each Azure
191
+ * LargeStorage instance.
192
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
193
+ * @param options The options parameters.
194
+ */
195
+ private _listByResourceGroup(
196
+ resourceGroupName: string,
197
+ options?: AzureLargeStorageInstanceListByResourceGroupOptionalParams,
198
+ ): Promise<AzureLargeStorageInstanceListByResourceGroupResponse> {
199
+ return this.client.sendOperationRequest(
200
+ { resourceGroupName, options },
201
+ listByResourceGroupOperationSpec,
202
+ );
203
+ }
204
+
205
+ /**
206
+ * Gets an Azure Large Storage instance for the specified subscription, resource
207
+ * group, and instance name.
208
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
209
+ * @param azureLargeStorageInstanceName Name of the AzureLargeStorageInstance.
210
+ * @param options The options parameters.
211
+ */
212
+ get(
213
+ resourceGroupName: string,
214
+ azureLargeStorageInstanceName: string,
215
+ options?: AzureLargeStorageInstanceGetOptionalParams,
216
+ ): Promise<AzureLargeStorageInstanceGetResponse> {
217
+ return this.client.sendOperationRequest(
218
+ { resourceGroupName, azureLargeStorageInstanceName, options },
219
+ getOperationSpec,
220
+ );
221
+ }
222
+
223
+ /**
224
+ * Patches the Tags field of a Azure Large Storage Instance for the specified
225
+ * subscription, resource group, and instance name.
226
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
227
+ * @param azureLargeStorageInstanceName Name of the AzureLargeStorageInstance.
228
+ * @param tagsParameter The resource properties to be updated.
229
+ * @param options The options parameters.
230
+ */
231
+ update(
232
+ resourceGroupName: string,
233
+ azureLargeStorageInstanceName: string,
234
+ tagsParameter: AzureLargeStorageInstanceTagsUpdate,
235
+ options?: AzureLargeStorageInstanceUpdateOptionalParams,
236
+ ): Promise<AzureLargeStorageInstanceUpdateResponse> {
237
+ return this.client.sendOperationRequest(
238
+ {
239
+ resourceGroupName,
240
+ azureLargeStorageInstanceName,
241
+ tagsParameter,
242
+ options,
243
+ },
244
+ updateOperationSpec,
245
+ );
246
+ }
247
+
248
+ /**
249
+ * ListBySubscriptionNext
250
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
251
+ * @param options The options parameters.
252
+ */
253
+ private _listBySubscriptionNext(
254
+ nextLink: string,
255
+ options?: AzureLargeStorageInstanceListBySubscriptionNextOptionalParams,
256
+ ): Promise<AzureLargeStorageInstanceListBySubscriptionNextResponse> {
257
+ return this.client.sendOperationRequest(
258
+ { nextLink, options },
259
+ listBySubscriptionNextOperationSpec,
260
+ );
261
+ }
262
+
263
+ /**
264
+ * ListByResourceGroupNext
265
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
266
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
267
+ * @param options The options parameters.
268
+ */
269
+ private _listByResourceGroupNext(
270
+ resourceGroupName: string,
271
+ nextLink: string,
272
+ options?: AzureLargeStorageInstanceListByResourceGroupNextOptionalParams,
273
+ ): Promise<AzureLargeStorageInstanceListByResourceGroupNextResponse> {
274
+ return this.client.sendOperationRequest(
275
+ { resourceGroupName, nextLink, options },
276
+ listByResourceGroupNextOperationSpec,
277
+ );
278
+ }
279
+ }
280
+ // Operation Specifications
281
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
282
+
283
+ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
284
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.AzureLargeInstance/azureLargeStorageInstances",
285
+ httpMethod: "GET",
286
+ responses: {
287
+ 200: {
288
+ bodyMapper: Mappers.AzureLargeStorageInstanceListResult,
289
+ },
290
+ default: {
291
+ bodyMapper: Mappers.ErrorResponse,
292
+ },
293
+ },
294
+ queryParameters: [Parameters.apiVersion],
295
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
296
+ headerParameters: [Parameters.accept],
297
+ serializer,
298
+ };
299
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
300
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureLargeInstance/azureLargeStorageInstances",
301
+ httpMethod: "GET",
302
+ responses: {
303
+ 200: {
304
+ bodyMapper: Mappers.AzureLargeStorageInstanceListResult,
305
+ },
306
+ default: {
307
+ bodyMapper: Mappers.ErrorResponse,
308
+ },
309
+ },
310
+ queryParameters: [Parameters.apiVersion],
311
+ urlParameters: [
312
+ Parameters.$host,
313
+ Parameters.subscriptionId,
314
+ Parameters.resourceGroupName,
315
+ ],
316
+ headerParameters: [Parameters.accept],
317
+ serializer,
318
+ };
319
+ const getOperationSpec: coreClient.OperationSpec = {
320
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureLargeInstance/azureLargeStorageInstances/{azureLargeStorageInstanceName}",
321
+ httpMethod: "GET",
322
+ responses: {
323
+ 200: {
324
+ bodyMapper: Mappers.AzureLargeStorageInstance,
325
+ },
326
+ default: {
327
+ bodyMapper: Mappers.ErrorResponse,
328
+ },
329
+ },
330
+ queryParameters: [Parameters.apiVersion],
331
+ urlParameters: [
332
+ Parameters.$host,
333
+ Parameters.subscriptionId,
334
+ Parameters.resourceGroupName,
335
+ Parameters.azureLargeStorageInstanceName,
336
+ ],
337
+ headerParameters: [Parameters.accept],
338
+ serializer,
339
+ };
340
+ const updateOperationSpec: coreClient.OperationSpec = {
341
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureLargeInstance/azureLargeStorageInstances/{azureLargeStorageInstanceName}",
342
+ httpMethod: "PATCH",
343
+ responses: {
344
+ 200: {
345
+ bodyMapper: Mappers.AzureLargeStorageInstance,
346
+ },
347
+ default: {
348
+ bodyMapper: Mappers.ErrorResponse,
349
+ },
350
+ },
351
+ requestBody: Parameters.tagsParameter1,
352
+ queryParameters: [Parameters.apiVersion],
353
+ urlParameters: [
354
+ Parameters.$host,
355
+ Parameters.subscriptionId,
356
+ Parameters.resourceGroupName,
357
+ Parameters.azureLargeStorageInstanceName,
358
+ ],
359
+ headerParameters: [Parameters.accept, Parameters.contentType],
360
+ mediaType: "json",
361
+ serializer,
362
+ };
363
+ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
364
+ path: "{nextLink}",
365
+ httpMethod: "GET",
366
+ responses: {
367
+ 200: {
368
+ bodyMapper: Mappers.AzureLargeStorageInstanceListResult,
369
+ },
370
+ default: {
371
+ bodyMapper: Mappers.ErrorResponse,
372
+ },
373
+ },
374
+ urlParameters: [
375
+ Parameters.$host,
376
+ Parameters.nextLink,
377
+ Parameters.subscriptionId,
378
+ ],
379
+ headerParameters: [Parameters.accept],
380
+ serializer,
381
+ };
382
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
383
+ path: "{nextLink}",
384
+ httpMethod: "GET",
385
+ responses: {
386
+ 200: {
387
+ bodyMapper: Mappers.AzureLargeStorageInstanceListResult,
388
+ },
389
+ default: {
390
+ bodyMapper: Mappers.ErrorResponse,
391
+ },
392
+ },
393
+ urlParameters: [
394
+ Parameters.$host,
395
+ Parameters.nextLink,
396
+ Parameters.subscriptionId,
397
+ Parameters.resourceGroupName,
398
+ ],
399
+ headerParameters: [Parameters.accept],
400
+ serializer,
401
+ };
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export * from "./operations";
10
+ export * from "./azureLargeInstanceOperations";
11
+ export * from "./azureLargeStorageInstanceOperations";
@@ -0,0 +1,149 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { Operations } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { LargeInstanceManagementClient } from "../largeInstanceManagementClient";
16
+ import {
17
+ Operation,
18
+ OperationsListNextOptionalParams,
19
+ OperationsListOptionalParams,
20
+ OperationsListResponse,
21
+ OperationsListNextResponse,
22
+ } from "../models";
23
+
24
+ /// <reference lib="esnext.asynciterable" />
25
+ /** Class containing Operations operations. */
26
+ export class OperationsImpl implements Operations {
27
+ private readonly client: LargeInstanceManagementClient;
28
+
29
+ /**
30
+ * Initialize a new instance of the class Operations class.
31
+ * @param client Reference to the service client
32
+ */
33
+ constructor(client: LargeInstanceManagementClient) {
34
+ this.client = client;
35
+ }
36
+
37
+ /**
38
+ * List the operations for the provider
39
+ * @param options The options parameters.
40
+ */
41
+ public list(
42
+ options?: OperationsListOptionalParams,
43
+ ): PagedAsyncIterableIterator<Operation> {
44
+ const iter = this.listPagingAll(options);
45
+ return {
46
+ next() {
47
+ return iter.next();
48
+ },
49
+ [Symbol.asyncIterator]() {
50
+ return this;
51
+ },
52
+ byPage: (settings?: PageSettings) => {
53
+ if (settings?.maxPageSize) {
54
+ throw new Error("maxPageSize is not supported by this operation.");
55
+ }
56
+ return this.listPagingPage(options, settings);
57
+ },
58
+ };
59
+ }
60
+
61
+ private async *listPagingPage(
62
+ options?: OperationsListOptionalParams,
63
+ settings?: PageSettings,
64
+ ): AsyncIterableIterator<Operation[]> {
65
+ let result: OperationsListResponse;
66
+ let continuationToken = settings?.continuationToken;
67
+ if (!continuationToken) {
68
+ result = await this._list(options);
69
+ let page = result.value || [];
70
+ continuationToken = result.nextLink;
71
+ setContinuationToken(page, continuationToken);
72
+ yield page;
73
+ }
74
+ while (continuationToken) {
75
+ result = await this._listNext(continuationToken, options);
76
+ continuationToken = result.nextLink;
77
+ let page = result.value || [];
78
+ setContinuationToken(page, continuationToken);
79
+ yield page;
80
+ }
81
+ }
82
+
83
+ private async *listPagingAll(
84
+ options?: OperationsListOptionalParams,
85
+ ): AsyncIterableIterator<Operation> {
86
+ for await (const page of this.listPagingPage(options)) {
87
+ yield* page;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * List the operations for the provider
93
+ * @param options The options parameters.
94
+ */
95
+ private _list(
96
+ options?: OperationsListOptionalParams,
97
+ ): Promise<OperationsListResponse> {
98
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
99
+ }
100
+
101
+ /**
102
+ * ListNext
103
+ * @param nextLink The nextLink from the previous successful call to the List method.
104
+ * @param options The options parameters.
105
+ */
106
+ private _listNext(
107
+ nextLink: string,
108
+ options?: OperationsListNextOptionalParams,
109
+ ): Promise<OperationsListNextResponse> {
110
+ return this.client.sendOperationRequest(
111
+ { nextLink, options },
112
+ listNextOperationSpec,
113
+ );
114
+ }
115
+ }
116
+ // Operation Specifications
117
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
118
+
119
+ const listOperationSpec: coreClient.OperationSpec = {
120
+ path: "/providers/Microsoft.AzureLargeInstance/operations",
121
+ httpMethod: "GET",
122
+ responses: {
123
+ 200: {
124
+ bodyMapper: Mappers.OperationListResult,
125
+ },
126
+ default: {
127
+ bodyMapper: Mappers.ErrorResponse,
128
+ },
129
+ },
130
+ queryParameters: [Parameters.apiVersion],
131
+ urlParameters: [Parameters.$host],
132
+ headerParameters: [Parameters.accept],
133
+ serializer,
134
+ };
135
+ const listNextOperationSpec: coreClient.OperationSpec = {
136
+ path: "{nextLink}",
137
+ httpMethod: "GET",
138
+ responses: {
139
+ 200: {
140
+ bodyMapper: Mappers.OperationListResult,
141
+ },
142
+ default: {
143
+ bodyMapper: Mappers.ErrorResponse,
144
+ },
145
+ },
146
+ urlParameters: [Parameters.$host, Parameters.nextLink],
147
+ headerParameters: [Parameters.accept],
148
+ serializer,
149
+ };