@azure/arm-sphere 1.0.0-beta.1 → 1.0.0

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 (149) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +1517 -1338
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/catalogsCountDevicesSample.js +1 -1
  9. package/dist-esm/samples-dev/catalogsCreateOrUpdateSample.js +1 -1
  10. package/dist-esm/samples-dev/catalogsDeleteSample.js +1 -1
  11. package/dist-esm/samples-dev/catalogsGetSample.js +1 -1
  12. package/dist-esm/samples-dev/catalogsListByResourceGroupSample.js +4 -9
  13. package/dist-esm/samples-dev/catalogsListByResourceGroupSample.js.map +1 -1
  14. package/dist-esm/samples-dev/catalogsListBySubscriptionSample.js +4 -9
  15. package/dist-esm/samples-dev/catalogsListBySubscriptionSample.js.map +1 -1
  16. package/dist-esm/samples-dev/catalogsListDeploymentsSample.js +4 -9
  17. package/dist-esm/samples-dev/catalogsListDeploymentsSample.js.map +1 -1
  18. package/dist-esm/samples-dev/catalogsListDeviceGroupsSample.js +6 -11
  19. package/dist-esm/samples-dev/catalogsListDeviceGroupsSample.js.map +1 -1
  20. package/dist-esm/samples-dev/catalogsListDeviceInsightsSample.js +6 -11
  21. package/dist-esm/samples-dev/catalogsListDeviceInsightsSample.js.map +1 -1
  22. package/dist-esm/samples-dev/catalogsListDevicesSample.js +4 -9
  23. package/dist-esm/samples-dev/catalogsListDevicesSample.js.map +1 -1
  24. package/dist-esm/samples-dev/catalogsUpdateSample.js +1 -1
  25. package/dist-esm/samples-dev/catalogsUploadImageSample.d.ts +2 -0
  26. package/dist-esm/samples-dev/catalogsUploadImageSample.d.ts.map +1 -0
  27. package/dist-esm/samples-dev/catalogsUploadImageSample.js +42 -0
  28. package/dist-esm/samples-dev/catalogsUploadImageSample.js.map +1 -0
  29. package/dist-esm/samples-dev/certificatesGetSample.js +1 -1
  30. package/dist-esm/samples-dev/certificatesListByCatalogSample.js +4 -9
  31. package/dist-esm/samples-dev/certificatesListByCatalogSample.js.map +1 -1
  32. package/dist-esm/samples-dev/certificatesRetrieveCertChainSample.js +1 -1
  33. package/dist-esm/samples-dev/certificatesRetrieveProofOfPossessionNonceSample.js +3 -3
  34. package/dist-esm/samples-dev/certificatesRetrieveProofOfPossessionNonceSample.js.map +1 -1
  35. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +1 -1
  36. package/dist-esm/samples-dev/deploymentsDeleteSample.js +1 -1
  37. package/dist-esm/samples-dev/deploymentsGetSample.js +1 -1
  38. package/dist-esm/samples-dev/deploymentsListByDeviceGroupSample.js +4 -9
  39. package/dist-esm/samples-dev/deploymentsListByDeviceGroupSample.js.map +1 -1
  40. package/dist-esm/samples-dev/deviceGroupsClaimDevicesSample.js +4 -4
  41. package/dist-esm/samples-dev/deviceGroupsClaimDevicesSample.js.map +1 -1
  42. package/dist-esm/samples-dev/deviceGroupsCountDevicesSample.js +1 -1
  43. package/dist-esm/samples-dev/deviceGroupsCreateOrUpdateSample.js +6 -4
  44. package/dist-esm/samples-dev/deviceGroupsCreateOrUpdateSample.js.map +1 -1
  45. package/dist-esm/samples-dev/deviceGroupsDeleteSample.js +1 -1
  46. package/dist-esm/samples-dev/deviceGroupsGetSample.js +1 -1
  47. package/dist-esm/samples-dev/deviceGroupsListByProductSample.js +4 -9
  48. package/dist-esm/samples-dev/deviceGroupsListByProductSample.js.map +1 -1
  49. package/dist-esm/samples-dev/deviceGroupsUpdateSample.js +2 -2
  50. package/dist-esm/samples-dev/deviceGroupsUpdateSample.js.map +1 -1
  51. package/dist-esm/samples-dev/devicesCreateOrUpdateSample.js +1 -1
  52. package/dist-esm/samples-dev/devicesDeleteSample.js +1 -1
  53. package/dist-esm/samples-dev/devicesGenerateCapabilityImageSample.js +3 -3
  54. package/dist-esm/samples-dev/devicesGenerateCapabilityImageSample.js.map +1 -1
  55. package/dist-esm/samples-dev/devicesGetSample.js +1 -1
  56. package/dist-esm/samples-dev/devicesListByDeviceGroupSample.js +4 -9
  57. package/dist-esm/samples-dev/devicesListByDeviceGroupSample.js.map +1 -1
  58. package/dist-esm/samples-dev/devicesUpdateSample.js +1 -1
  59. package/dist-esm/samples-dev/imagesCreateOrUpdateSample.js +3 -3
  60. package/dist-esm/samples-dev/imagesCreateOrUpdateSample.js.map +1 -1
  61. package/dist-esm/samples-dev/imagesDeleteSample.js +2 -2
  62. package/dist-esm/samples-dev/imagesDeleteSample.js.map +1 -1
  63. package/dist-esm/samples-dev/imagesGetSample.js +2 -2
  64. package/dist-esm/samples-dev/imagesGetSample.js.map +1 -1
  65. package/dist-esm/samples-dev/imagesListByCatalogSample.js +4 -9
  66. package/dist-esm/samples-dev/imagesListByCatalogSample.js.map +1 -1
  67. package/dist-esm/samples-dev/operationsListSample.js +4 -9
  68. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  69. package/dist-esm/samples-dev/productsCountDevicesSample.js +1 -1
  70. package/dist-esm/samples-dev/productsCreateOrUpdateSample.js +1 -1
  71. package/dist-esm/samples-dev/productsDeleteSample.js +1 -1
  72. package/dist-esm/samples-dev/productsGenerateDefaultDeviceGroupsSample.js +4 -9
  73. package/dist-esm/samples-dev/productsGenerateDefaultDeviceGroupsSample.js.map +1 -1
  74. package/dist-esm/samples-dev/productsGetSample.js +1 -1
  75. package/dist-esm/samples-dev/productsListByCatalogSample.js +4 -9
  76. package/dist-esm/samples-dev/productsListByCatalogSample.js.map +1 -1
  77. package/dist-esm/samples-dev/productsUpdateSample.js +1 -1
  78. package/dist-esm/src/azureSphereManagementClient.d.ts.map +1 -1
  79. package/dist-esm/src/azureSphereManagementClient.js +9 -9
  80. package/dist-esm/src/azureSphereManagementClient.js.map +1 -1
  81. package/dist-esm/src/lroImpl.js +1 -1
  82. package/dist-esm/src/models/index.d.ts +232 -178
  83. package/dist-esm/src/models/index.d.ts.map +1 -1
  84. package/dist-esm/src/models/index.js.map +1 -1
  85. package/dist-esm/src/models/mappers.d.ts +11 -2
  86. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  87. package/dist-esm/src/models/mappers.js +783 -636
  88. package/dist-esm/src/models/mappers.js.map +1 -1
  89. package/dist-esm/src/models/parameters.d.ts +1 -0
  90. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  91. package/dist-esm/src/models/parameters.js +80 -76
  92. package/dist-esm/src/models/parameters.js.map +1 -1
  93. package/dist-esm/src/operations/catalogs.d.ts +17 -1
  94. package/dist-esm/src/operations/catalogs.d.ts.map +1 -1
  95. package/dist-esm/src/operations/catalogs.js +214 -154
  96. package/dist-esm/src/operations/catalogs.js.map +1 -1
  97. package/dist-esm/src/operations/certificates.js +31 -36
  98. package/dist-esm/src/operations/certificates.js.map +1 -1
  99. package/dist-esm/src/operations/deployments.d.ts.map +1 -1
  100. package/dist-esm/src/operations/deployments.js +45 -50
  101. package/dist-esm/src/operations/deployments.js.map +1 -1
  102. package/dist-esm/src/operations/deviceGroups.d.ts.map +1 -1
  103. package/dist-esm/src/operations/deviceGroups.js +74 -79
  104. package/dist-esm/src/operations/deviceGroups.js.map +1 -1
  105. package/dist-esm/src/operations/devices.d.ts.map +1 -1
  106. package/dist-esm/src/operations/devices.js +70 -75
  107. package/dist-esm/src/operations/devices.js.map +1 -1
  108. package/dist-esm/src/operations/images.d.ts +5 -5
  109. package/dist-esm/src/operations/images.d.ts.map +1 -1
  110. package/dist-esm/src/operations/images.js +46 -51
  111. package/dist-esm/src/operations/images.js.map +1 -1
  112. package/dist-esm/src/operations/operations.js +12 -17
  113. package/dist-esm/src/operations/operations.js.map +1 -1
  114. package/dist-esm/src/operations/products.d.ts.map +1 -1
  115. package/dist-esm/src/operations/products.js +72 -82
  116. package/dist-esm/src/operations/products.js.map +1 -1
  117. package/dist-esm/src/operationsInterfaces/catalogs.d.ts +17 -1
  118. package/dist-esm/src/operationsInterfaces/catalogs.d.ts.map +1 -1
  119. package/dist-esm/src/operationsInterfaces/images.d.ts +5 -5
  120. package/dist-esm/src/pagingHelper.js.map +1 -1
  121. package/dist-esm/test/sphere_operations_test.spec.js +12 -27
  122. package/dist-esm/test/sphere_operations_test.spec.js.map +1 -1
  123. package/package.json +16 -21
  124. package/review/arm-sphere.api.md +103 -51
  125. package/src/azureSphereManagementClient.ts +18 -17
  126. package/src/lroImpl.ts +3 -3
  127. package/src/models/index.ts +262 -194
  128. package/src/models/mappers.ts +811 -682
  129. package/src/models/parameters.ts +85 -80
  130. package/src/operations/catalogs.ts +338 -221
  131. package/src/operations/certificates.ts +51 -55
  132. package/src/operations/deployments.ts +81 -87
  133. package/src/operations/deviceGroups.ts +135 -146
  134. package/src/operations/devices.ts +128 -138
  135. package/src/operations/images.ts +82 -88
  136. package/src/operations/operations.ts +16 -16
  137. package/src/operations/products.ts +132 -142
  138. package/src/operationsInterfaces/catalogs.ts +48 -14
  139. package/src/operationsInterfaces/certificates.ts +5 -5
  140. package/src/operationsInterfaces/deployments.ts +7 -7
  141. package/src/operationsInterfaces/deviceGroups.ts +12 -12
  142. package/src/operationsInterfaces/devices.ts +11 -11
  143. package/src/operationsInterfaces/images.ts +12 -12
  144. package/src/operationsInterfaces/operations.ts +1 -1
  145. package/src/operationsInterfaces/products.ts +11 -11
  146. package/src/pagingHelper.ts +1 -1
  147. package/types/arm-sphere.d.ts +212 -131
  148. package/types/tsdoc-metadata.json +1 -1
  149. package/rollup.config.js +0 -122
@@ -16,7 +16,7 @@ import { AzureSphereManagementClient } from "../azureSphereManagementClient";
16
16
  import {
17
17
  SimplePollerLike,
18
18
  OperationState,
19
- createHttpPoller
19
+ createHttpPoller,
20
20
  } from "@azure/core-lro";
21
21
  import { createLroSpec } from "../lroImpl";
22
22
  import {
@@ -37,7 +37,7 @@ import {
37
37
  DeviceGroupsClaimDevicesResponse,
38
38
  DeviceGroupsCountDevicesOptionalParams,
39
39
  DeviceGroupsCountDevicesResponse,
40
- DeviceGroupsListByProductNextResponse
40
+ DeviceGroupsListByProductNextResponse,
41
41
  } from "../models";
42
42
 
43
43
  /// <reference lib="esnext.asynciterable" />
@@ -65,13 +65,13 @@ export class DeviceGroupsImpl implements DeviceGroups {
65
65
  resourceGroupName: string,
66
66
  catalogName: string,
67
67
  productName: string,
68
- options?: DeviceGroupsListByProductOptionalParams
68
+ options?: DeviceGroupsListByProductOptionalParams,
69
69
  ): PagedAsyncIterableIterator<DeviceGroup> {
70
70
  const iter = this.listByProductPagingAll(
71
71
  resourceGroupName,
72
72
  catalogName,
73
73
  productName,
74
- options
74
+ options,
75
75
  );
76
76
  return {
77
77
  next() {
@@ -89,9 +89,9 @@ export class DeviceGroupsImpl implements DeviceGroups {
89
89
  catalogName,
90
90
  productName,
91
91
  options,
92
- settings
92
+ settings,
93
93
  );
94
- }
94
+ },
95
95
  };
96
96
  }
97
97
 
@@ -100,7 +100,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
100
100
  catalogName: string,
101
101
  productName: string,
102
102
  options?: DeviceGroupsListByProductOptionalParams,
103
- settings?: PageSettings
103
+ settings?: PageSettings,
104
104
  ): AsyncIterableIterator<DeviceGroup[]> {
105
105
  let result: DeviceGroupsListByProductResponse;
106
106
  let continuationToken = settings?.continuationToken;
@@ -109,7 +109,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
109
109
  resourceGroupName,
110
110
  catalogName,
111
111
  productName,
112
- options
112
+ options,
113
113
  );
114
114
  let page = result.value || [];
115
115
  continuationToken = result.nextLink;
@@ -122,7 +122,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
122
122
  catalogName,
123
123
  productName,
124
124
  continuationToken,
125
- options
125
+ options,
126
126
  );
127
127
  continuationToken = result.nextLink;
128
128
  let page = result.value || [];
@@ -135,13 +135,13 @@ export class DeviceGroupsImpl implements DeviceGroups {
135
135
  resourceGroupName: string,
136
136
  catalogName: string,
137
137
  productName: string,
138
- options?: DeviceGroupsListByProductOptionalParams
138
+ options?: DeviceGroupsListByProductOptionalParams,
139
139
  ): AsyncIterableIterator<DeviceGroup> {
140
140
  for await (const page of this.listByProductPagingPage(
141
141
  resourceGroupName,
142
142
  catalogName,
143
143
  productName,
144
- options
144
+ options,
145
145
  )) {
146
146
  yield* page;
147
147
  }
@@ -159,11 +159,11 @@ export class DeviceGroupsImpl implements DeviceGroups {
159
159
  resourceGroupName: string,
160
160
  catalogName: string,
161
161
  productName: string,
162
- options?: DeviceGroupsListByProductOptionalParams
162
+ options?: DeviceGroupsListByProductOptionalParams,
163
163
  ): Promise<DeviceGroupsListByProductResponse> {
164
164
  return this.client.sendOperationRequest(
165
165
  { resourceGroupName, catalogName, productName, options },
166
- listByProductOperationSpec
166
+ listByProductOperationSpec,
167
167
  );
168
168
  }
169
169
 
@@ -181,11 +181,11 @@ export class DeviceGroupsImpl implements DeviceGroups {
181
181
  catalogName: string,
182
182
  productName: string,
183
183
  deviceGroupName: string,
184
- options?: DeviceGroupsGetOptionalParams
184
+ options?: DeviceGroupsGetOptionalParams,
185
185
  ): Promise<DeviceGroupsGetResponse> {
186
186
  return this.client.sendOperationRequest(
187
187
  { resourceGroupName, catalogName, productName, deviceGroupName, options },
188
- getOperationSpec
188
+ getOperationSpec,
189
189
  );
190
190
  }
191
191
 
@@ -205,7 +205,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
205
205
  productName: string,
206
206
  deviceGroupName: string,
207
207
  resource: DeviceGroup,
208
- options?: DeviceGroupsCreateOrUpdateOptionalParams
208
+ options?: DeviceGroupsCreateOrUpdateOptionalParams,
209
209
  ): Promise<
210
210
  SimplePollerLike<
211
211
  OperationState<DeviceGroupsCreateOrUpdateResponse>,
@@ -214,21 +214,20 @@ export class DeviceGroupsImpl implements DeviceGroups {
214
214
  > {
215
215
  const directSendOperation = async (
216
216
  args: coreClient.OperationArguments,
217
- spec: coreClient.OperationSpec
217
+ spec: coreClient.OperationSpec,
218
218
  ): Promise<DeviceGroupsCreateOrUpdateResponse> => {
219
219
  return this.client.sendOperationRequest(args, spec);
220
220
  };
221
221
  const sendOperationFn = async (
222
222
  args: coreClient.OperationArguments,
223
- spec: coreClient.OperationSpec
223
+ spec: coreClient.OperationSpec,
224
224
  ) => {
225
- let currentRawResponse:
226
- | coreClient.FullOperationResponse
227
- | undefined = undefined;
225
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
226
+ undefined;
228
227
  const providedCallback = args.options?.onResponse;
229
228
  const callback: coreClient.RawResponseCallback = (
230
229
  rawResponse: coreClient.FullOperationResponse,
231
- flatResponse: unknown
230
+ flatResponse: unknown,
232
231
  ) => {
233
232
  currentRawResponse = rawResponse;
234
233
  providedCallback?.(rawResponse, flatResponse);
@@ -237,8 +236,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
237
236
  ...args,
238
237
  options: {
239
238
  ...args.options,
240
- onResponse: callback
241
- }
239
+ onResponse: callback,
240
+ },
242
241
  };
243
242
  const flatResponse = await directSendOperation(updatedArgs, spec);
244
243
  return {
@@ -246,8 +245,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
246
245
  rawResponse: {
247
246
  statusCode: currentRawResponse!.status,
248
247
  body: currentRawResponse!.parsedBody,
249
- headers: currentRawResponse!.headers.toJSON()
250
- }
248
+ headers: currentRawResponse!.headers.toJSON(),
249
+ },
251
250
  };
252
251
  };
253
252
 
@@ -259,9 +258,9 @@ export class DeviceGroupsImpl implements DeviceGroups {
259
258
  productName,
260
259
  deviceGroupName,
261
260
  resource,
262
- options
261
+ options,
263
262
  },
264
- spec: createOrUpdateOperationSpec
263
+ spec: createOrUpdateOperationSpec,
265
264
  });
266
265
  const poller = await createHttpPoller<
267
266
  DeviceGroupsCreateOrUpdateResponse,
@@ -269,7 +268,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
269
268
  >(lro, {
270
269
  restoreFrom: options?.resumeFrom,
271
270
  intervalInMs: options?.updateIntervalInMs,
272
- resourceLocationConfig: "azure-async-operation"
271
+ resourceLocationConfig: "azure-async-operation",
273
272
  });
274
273
  await poller.poll();
275
274
  return poller;
@@ -291,7 +290,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
291
290
  productName: string,
292
291
  deviceGroupName: string,
293
292
  resource: DeviceGroup,
294
- options?: DeviceGroupsCreateOrUpdateOptionalParams
293
+ options?: DeviceGroupsCreateOrUpdateOptionalParams,
295
294
  ): Promise<DeviceGroupsCreateOrUpdateResponse> {
296
295
  const poller = await this.beginCreateOrUpdate(
297
296
  resourceGroupName,
@@ -299,7 +298,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
299
298
  productName,
300
299
  deviceGroupName,
301
300
  resource,
302
- options
301
+ options,
303
302
  );
304
303
  return poller.pollUntilDone();
305
304
  }
@@ -320,7 +319,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
320
319
  productName: string,
321
320
  deviceGroupName: string,
322
321
  properties: DeviceGroupUpdate,
323
- options?: DeviceGroupsUpdateOptionalParams
322
+ options?: DeviceGroupsUpdateOptionalParams,
324
323
  ): Promise<
325
324
  SimplePollerLike<
326
325
  OperationState<DeviceGroupsUpdateResponse>,
@@ -329,21 +328,20 @@ export class DeviceGroupsImpl implements DeviceGroups {
329
328
  > {
330
329
  const directSendOperation = async (
331
330
  args: coreClient.OperationArguments,
332
- spec: coreClient.OperationSpec
331
+ spec: coreClient.OperationSpec,
333
332
  ): Promise<DeviceGroupsUpdateResponse> => {
334
333
  return this.client.sendOperationRequest(args, spec);
335
334
  };
336
335
  const sendOperationFn = async (
337
336
  args: coreClient.OperationArguments,
338
- spec: coreClient.OperationSpec
337
+ spec: coreClient.OperationSpec,
339
338
  ) => {
340
- let currentRawResponse:
341
- | coreClient.FullOperationResponse
342
- | undefined = undefined;
339
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
340
+ undefined;
343
341
  const providedCallback = args.options?.onResponse;
344
342
  const callback: coreClient.RawResponseCallback = (
345
343
  rawResponse: coreClient.FullOperationResponse,
346
- flatResponse: unknown
344
+ flatResponse: unknown,
347
345
  ) => {
348
346
  currentRawResponse = rawResponse;
349
347
  providedCallback?.(rawResponse, flatResponse);
@@ -352,8 +350,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
352
350
  ...args,
353
351
  options: {
354
352
  ...args.options,
355
- onResponse: callback
356
- }
353
+ onResponse: callback,
354
+ },
357
355
  };
358
356
  const flatResponse = await directSendOperation(updatedArgs, spec);
359
357
  return {
@@ -361,8 +359,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
361
359
  rawResponse: {
362
360
  statusCode: currentRawResponse!.status,
363
361
  body: currentRawResponse!.parsedBody,
364
- headers: currentRawResponse!.headers.toJSON()
365
- }
362
+ headers: currentRawResponse!.headers.toJSON(),
363
+ },
366
364
  };
367
365
  };
368
366
 
@@ -374,9 +372,9 @@ export class DeviceGroupsImpl implements DeviceGroups {
374
372
  productName,
375
373
  deviceGroupName,
376
374
  properties,
377
- options
375
+ options,
378
376
  },
379
- spec: updateOperationSpec
377
+ spec: updateOperationSpec,
380
378
  });
381
379
  const poller = await createHttpPoller<
382
380
  DeviceGroupsUpdateResponse,
@@ -384,7 +382,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
384
382
  >(lro, {
385
383
  restoreFrom: options?.resumeFrom,
386
384
  intervalInMs: options?.updateIntervalInMs,
387
- resourceLocationConfig: "location"
385
+ resourceLocationConfig: "location",
388
386
  });
389
387
  await poller.poll();
390
388
  return poller;
@@ -406,7 +404,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
406
404
  productName: string,
407
405
  deviceGroupName: string,
408
406
  properties: DeviceGroupUpdate,
409
- options?: DeviceGroupsUpdateOptionalParams
407
+ options?: DeviceGroupsUpdateOptionalParams,
410
408
  ): Promise<DeviceGroupsUpdateResponse> {
411
409
  const poller = await this.beginUpdate(
412
410
  resourceGroupName,
@@ -414,7 +412,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
414
412
  productName,
415
413
  deviceGroupName,
416
414
  properties,
417
- options
415
+ options,
418
416
  );
419
417
  return poller.pollUntilDone();
420
418
  }
@@ -433,25 +431,24 @@ export class DeviceGroupsImpl implements DeviceGroups {
433
431
  catalogName: string,
434
432
  productName: string,
435
433
  deviceGroupName: string,
436
- options?: DeviceGroupsDeleteOptionalParams
434
+ options?: DeviceGroupsDeleteOptionalParams,
437
435
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
438
436
  const directSendOperation = async (
439
437
  args: coreClient.OperationArguments,
440
- spec: coreClient.OperationSpec
438
+ spec: coreClient.OperationSpec,
441
439
  ): Promise<void> => {
442
440
  return this.client.sendOperationRequest(args, spec);
443
441
  };
444
442
  const sendOperationFn = async (
445
443
  args: coreClient.OperationArguments,
446
- spec: coreClient.OperationSpec
444
+ spec: coreClient.OperationSpec,
447
445
  ) => {
448
- let currentRawResponse:
449
- | coreClient.FullOperationResponse
450
- | undefined = undefined;
446
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
447
+ undefined;
451
448
  const providedCallback = args.options?.onResponse;
452
449
  const callback: coreClient.RawResponseCallback = (
453
450
  rawResponse: coreClient.FullOperationResponse,
454
- flatResponse: unknown
451
+ flatResponse: unknown,
455
452
  ) => {
456
453
  currentRawResponse = rawResponse;
457
454
  providedCallback?.(rawResponse, flatResponse);
@@ -460,8 +457,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
460
457
  ...args,
461
458
  options: {
462
459
  ...args.options,
463
- onResponse: callback
464
- }
460
+ onResponse: callback,
461
+ },
465
462
  };
466
463
  const flatResponse = await directSendOperation(updatedArgs, spec);
467
464
  return {
@@ -469,8 +466,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
469
466
  rawResponse: {
470
467
  statusCode: currentRawResponse!.status,
471
468
  body: currentRawResponse!.parsedBody,
472
- headers: currentRawResponse!.headers.toJSON()
473
- }
469
+ headers: currentRawResponse!.headers.toJSON(),
470
+ },
474
471
  };
475
472
  };
476
473
 
@@ -481,14 +478,14 @@ export class DeviceGroupsImpl implements DeviceGroups {
481
478
  catalogName,
482
479
  productName,
483
480
  deviceGroupName,
484
- options
481
+ options,
485
482
  },
486
- spec: deleteOperationSpec
483
+ spec: deleteOperationSpec,
487
484
  });
488
485
  const poller = await createHttpPoller<void, OperationState<void>>(lro, {
489
486
  restoreFrom: options?.resumeFrom,
490
487
  intervalInMs: options?.updateIntervalInMs,
491
- resourceLocationConfig: "location"
488
+ resourceLocationConfig: "location",
492
489
  });
493
490
  await poller.poll();
494
491
  return poller;
@@ -508,14 +505,14 @@ export class DeviceGroupsImpl implements DeviceGroups {
508
505
  catalogName: string,
509
506
  productName: string,
510
507
  deviceGroupName: string,
511
- options?: DeviceGroupsDeleteOptionalParams
508
+ options?: DeviceGroupsDeleteOptionalParams,
512
509
  ): Promise<void> {
513
510
  const poller = await this.beginDelete(
514
511
  resourceGroupName,
515
512
  catalogName,
516
513
  productName,
517
514
  deviceGroupName,
518
- options
515
+ options,
519
516
  );
520
517
  return poller.pollUntilDone();
521
518
  }
@@ -536,7 +533,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
536
533
  productName: string,
537
534
  deviceGroupName: string,
538
535
  claimDevicesRequest: ClaimDevicesRequest,
539
- options?: DeviceGroupsClaimDevicesOptionalParams
536
+ options?: DeviceGroupsClaimDevicesOptionalParams,
540
537
  ): Promise<
541
538
  SimplePollerLike<
542
539
  OperationState<DeviceGroupsClaimDevicesResponse>,
@@ -545,21 +542,20 @@ export class DeviceGroupsImpl implements DeviceGroups {
545
542
  > {
546
543
  const directSendOperation = async (
547
544
  args: coreClient.OperationArguments,
548
- spec: coreClient.OperationSpec
545
+ spec: coreClient.OperationSpec,
549
546
  ): Promise<DeviceGroupsClaimDevicesResponse> => {
550
547
  return this.client.sendOperationRequest(args, spec);
551
548
  };
552
549
  const sendOperationFn = async (
553
550
  args: coreClient.OperationArguments,
554
- spec: coreClient.OperationSpec
551
+ spec: coreClient.OperationSpec,
555
552
  ) => {
556
- let currentRawResponse:
557
- | coreClient.FullOperationResponse
558
- | undefined = undefined;
553
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
554
+ undefined;
559
555
  const providedCallback = args.options?.onResponse;
560
556
  const callback: coreClient.RawResponseCallback = (
561
557
  rawResponse: coreClient.FullOperationResponse,
562
- flatResponse: unknown
558
+ flatResponse: unknown,
563
559
  ) => {
564
560
  currentRawResponse = rawResponse;
565
561
  providedCallback?.(rawResponse, flatResponse);
@@ -568,8 +564,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
568
564
  ...args,
569
565
  options: {
570
566
  ...args.options,
571
- onResponse: callback
572
- }
567
+ onResponse: callback,
568
+ },
573
569
  };
574
570
  const flatResponse = await directSendOperation(updatedArgs, spec);
575
571
  return {
@@ -577,8 +573,8 @@ export class DeviceGroupsImpl implements DeviceGroups {
577
573
  rawResponse: {
578
574
  statusCode: currentRawResponse!.status,
579
575
  body: currentRawResponse!.parsedBody,
580
- headers: currentRawResponse!.headers.toJSON()
581
- }
576
+ headers: currentRawResponse!.headers.toJSON(),
577
+ },
582
578
  };
583
579
  };
584
580
 
@@ -590,9 +586,9 @@ export class DeviceGroupsImpl implements DeviceGroups {
590
586
  productName,
591
587
  deviceGroupName,
592
588
  claimDevicesRequest,
593
- options
589
+ options,
594
590
  },
595
- spec: claimDevicesOperationSpec
591
+ spec: claimDevicesOperationSpec,
596
592
  });
597
593
  const poller = await createHttpPoller<
598
594
  DeviceGroupsClaimDevicesResponse,
@@ -600,7 +596,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
600
596
  >(lro, {
601
597
  restoreFrom: options?.resumeFrom,
602
598
  intervalInMs: options?.updateIntervalInMs,
603
- resourceLocationConfig: "location"
599
+ resourceLocationConfig: "location",
604
600
  });
605
601
  await poller.poll();
606
602
  return poller;
@@ -622,7 +618,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
622
618
  productName: string,
623
619
  deviceGroupName: string,
624
620
  claimDevicesRequest: ClaimDevicesRequest,
625
- options?: DeviceGroupsClaimDevicesOptionalParams
621
+ options?: DeviceGroupsClaimDevicesOptionalParams,
626
622
  ): Promise<DeviceGroupsClaimDevicesResponse> {
627
623
  const poller = await this.beginClaimDevices(
628
624
  resourceGroupName,
@@ -630,7 +626,7 @@ export class DeviceGroupsImpl implements DeviceGroups {
630
626
  productName,
631
627
  deviceGroupName,
632
628
  claimDevicesRequest,
633
- options
629
+ options,
634
630
  );
635
631
  return poller.pollUntilDone();
636
632
  }
@@ -649,11 +645,11 @@ export class DeviceGroupsImpl implements DeviceGroups {
649
645
  catalogName: string,
650
646
  productName: string,
651
647
  deviceGroupName: string,
652
- options?: DeviceGroupsCountDevicesOptionalParams
648
+ options?: DeviceGroupsCountDevicesOptionalParams,
653
649
  ): Promise<DeviceGroupsCountDevicesResponse> {
654
650
  return this.client.sendOperationRequest(
655
651
  { resourceGroupName, catalogName, productName, deviceGroupName, options },
656
- countDevicesOperationSpec
652
+ countDevicesOperationSpec,
657
653
  );
658
654
  }
659
655
 
@@ -670,11 +666,11 @@ export class DeviceGroupsImpl implements DeviceGroups {
670
666
  catalogName: string,
671
667
  productName: string,
672
668
  nextLink: string,
673
- options?: DeviceGroupsListByProductNextOptionalParams
669
+ options?: DeviceGroupsListByProductNextOptionalParams,
674
670
  ): Promise<DeviceGroupsListByProductNextResponse> {
675
671
  return this.client.sendOperationRequest(
676
672
  { resourceGroupName, catalogName, productName, nextLink, options },
677
- listByProductNextOperationSpec
673
+ listByProductNextOperationSpec,
678
674
  );
679
675
  }
680
676
  }
@@ -682,45 +678,43 @@ export class DeviceGroupsImpl implements DeviceGroups {
682
678
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
683
679
 
684
680
  const listByProductOperationSpec: coreClient.OperationSpec = {
685
- path:
686
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups",
681
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups",
687
682
  httpMethod: "GET",
688
683
  responses: {
689
684
  200: {
690
- bodyMapper: Mappers.DeviceGroupListResult
685
+ bodyMapper: Mappers.DeviceGroupListResult,
691
686
  },
692
687
  default: {
693
- bodyMapper: Mappers.ErrorResponse
694
- }
688
+ bodyMapper: Mappers.ErrorResponse,
689
+ },
695
690
  },
696
691
  queryParameters: [
697
692
  Parameters.apiVersion,
698
693
  Parameters.filter,
699
694
  Parameters.top,
700
695
  Parameters.skip,
701
- Parameters.maxpagesize
696
+ Parameters.maxpagesize,
702
697
  ],
703
698
  urlParameters: [
704
699
  Parameters.$host,
705
700
  Parameters.subscriptionId,
706
701
  Parameters.resourceGroupName,
707
702
  Parameters.catalogName,
708
- Parameters.productName
703
+ Parameters.productName,
709
704
  ],
710
705
  headerParameters: [Parameters.accept],
711
- serializer
706
+ serializer,
712
707
  };
713
708
  const getOperationSpec: coreClient.OperationSpec = {
714
- path:
715
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
709
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
716
710
  httpMethod: "GET",
717
711
  responses: {
718
712
  200: {
719
- bodyMapper: Mappers.DeviceGroup
713
+ bodyMapper: Mappers.DeviceGroup,
720
714
  },
721
715
  default: {
722
- bodyMapper: Mappers.ErrorResponse
723
- }
716
+ bodyMapper: Mappers.ErrorResponse,
717
+ },
724
718
  },
725
719
  queryParameters: [Parameters.apiVersion],
726
720
  urlParameters: [
@@ -729,31 +723,30 @@ const getOperationSpec: coreClient.OperationSpec = {
729
723
  Parameters.resourceGroupName,
730
724
  Parameters.catalogName,
731
725
  Parameters.productName,
732
- Parameters.deviceGroupName
726
+ Parameters.deviceGroupName,
733
727
  ],
734
728
  headerParameters: [Parameters.accept],
735
- serializer
729
+ serializer,
736
730
  };
737
731
  const createOrUpdateOperationSpec: coreClient.OperationSpec = {
738
- path:
739
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
732
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
740
733
  httpMethod: "PUT",
741
734
  responses: {
742
735
  200: {
743
- bodyMapper: Mappers.DeviceGroup
736
+ bodyMapper: Mappers.DeviceGroup,
744
737
  },
745
738
  201: {
746
- bodyMapper: Mappers.DeviceGroup
739
+ bodyMapper: Mappers.DeviceGroup,
747
740
  },
748
741
  202: {
749
- bodyMapper: Mappers.DeviceGroup
742
+ bodyMapper: Mappers.DeviceGroup,
750
743
  },
751
744
  204: {
752
- bodyMapper: Mappers.DeviceGroup
745
+ bodyMapper: Mappers.DeviceGroup,
753
746
  },
754
747
  default: {
755
- bodyMapper: Mappers.ErrorResponse
756
- }
748
+ bodyMapper: Mappers.ErrorResponse,
749
+ },
757
750
  },
758
751
  requestBody: Parameters.resource3,
759
752
  queryParameters: [Parameters.apiVersion],
@@ -763,32 +756,31 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
763
756
  Parameters.resourceGroupName,
764
757
  Parameters.catalogName,
765
758
  Parameters.productName,
766
- Parameters.deviceGroupName
759
+ Parameters.deviceGroupName,
767
760
  ],
768
761
  headerParameters: [Parameters.accept, Parameters.contentType],
769
762
  mediaType: "json",
770
- serializer
763
+ serializer,
771
764
  };
772
765
  const updateOperationSpec: coreClient.OperationSpec = {
773
- path:
774
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
766
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
775
767
  httpMethod: "PATCH",
776
768
  responses: {
777
769
  200: {
778
- bodyMapper: Mappers.DeviceGroup
770
+ bodyMapper: Mappers.DeviceGroup,
779
771
  },
780
772
  201: {
781
- bodyMapper: Mappers.DeviceGroup
773
+ bodyMapper: Mappers.DeviceGroup,
782
774
  },
783
775
  202: {
784
- bodyMapper: Mappers.DeviceGroup
776
+ bodyMapper: Mappers.DeviceGroup,
785
777
  },
786
778
  204: {
787
- bodyMapper: Mappers.DeviceGroup
779
+ bodyMapper: Mappers.DeviceGroup,
788
780
  },
789
781
  default: {
790
- bodyMapper: Mappers.ErrorResponse
791
- }
782
+ bodyMapper: Mappers.ErrorResponse,
783
+ },
792
784
  },
793
785
  requestBody: Parameters.properties2,
794
786
  queryParameters: [Parameters.apiVersion],
@@ -798,15 +790,14 @@ const updateOperationSpec: coreClient.OperationSpec = {
798
790
  Parameters.resourceGroupName,
799
791
  Parameters.catalogName,
800
792
  Parameters.productName,
801
- Parameters.deviceGroupName
793
+ Parameters.deviceGroupName,
802
794
  ],
803
795
  headerParameters: [Parameters.accept, Parameters.contentType],
804
796
  mediaType: "json",
805
- serializer
797
+ serializer,
806
798
  };
807
799
  const deleteOperationSpec: coreClient.OperationSpec = {
808
- path:
809
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
800
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}",
810
801
  httpMethod: "DELETE",
811
802
  responses: {
812
803
  200: {},
@@ -814,8 +805,8 @@ const deleteOperationSpec: coreClient.OperationSpec = {
814
805
  202: {},
815
806
  204: {},
816
807
  default: {
817
- bodyMapper: Mappers.ErrorResponse
818
- }
808
+ bodyMapper: Mappers.ErrorResponse,
809
+ },
819
810
  },
820
811
  queryParameters: [Parameters.apiVersion],
821
812
  urlParameters: [
@@ -824,31 +815,30 @@ const deleteOperationSpec: coreClient.OperationSpec = {
824
815
  Parameters.resourceGroupName,
825
816
  Parameters.catalogName,
826
817
  Parameters.productName,
827
- Parameters.deviceGroupName
818
+ Parameters.deviceGroupName,
828
819
  ],
829
820
  headerParameters: [Parameters.accept],
830
- serializer
821
+ serializer,
831
822
  };
832
823
  const claimDevicesOperationSpec: coreClient.OperationSpec = {
833
- path:
834
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices",
824
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices",
835
825
  httpMethod: "POST",
836
826
  responses: {
837
827
  200: {
838
- headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders
828
+ headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders,
839
829
  },
840
830
  201: {
841
- headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders
831
+ headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders,
842
832
  },
843
833
  202: {
844
- headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders
834
+ headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders,
845
835
  },
846
836
  204: {
847
- headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders
837
+ headersMapper: Mappers.DeviceGroupsClaimDevicesHeaders,
848
838
  },
849
839
  default: {
850
- bodyMapper: Mappers.ErrorResponse
851
- }
840
+ bodyMapper: Mappers.ErrorResponse,
841
+ },
852
842
  },
853
843
  requestBody: Parameters.claimDevicesRequest,
854
844
  queryParameters: [Parameters.apiVersion],
@@ -858,23 +848,22 @@ const claimDevicesOperationSpec: coreClient.OperationSpec = {
858
848
  Parameters.resourceGroupName,
859
849
  Parameters.catalogName,
860
850
  Parameters.productName,
861
- Parameters.deviceGroupName
851
+ Parameters.deviceGroupName,
862
852
  ],
863
853
  headerParameters: [Parameters.accept, Parameters.contentType],
864
854
  mediaType: "json",
865
- serializer
855
+ serializer,
866
856
  };
867
857
  const countDevicesOperationSpec: coreClient.OperationSpec = {
868
- path:
869
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices",
858
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices",
870
859
  httpMethod: "POST",
871
860
  responses: {
872
861
  200: {
873
- bodyMapper: Mappers.CountDeviceResponse
862
+ bodyMapper: Mappers.CountDevicesResponse,
874
863
  },
875
864
  default: {
876
- bodyMapper: Mappers.ErrorResponse
877
- }
865
+ bodyMapper: Mappers.ErrorResponse,
866
+ },
878
867
  },
879
868
  queryParameters: [Parameters.apiVersion],
880
869
  urlParameters: [
@@ -883,21 +872,21 @@ const countDevicesOperationSpec: coreClient.OperationSpec = {
883
872
  Parameters.resourceGroupName,
884
873
  Parameters.catalogName,
885
874
  Parameters.productName,
886
- Parameters.deviceGroupName
875
+ Parameters.deviceGroupName,
887
876
  ],
888
877
  headerParameters: [Parameters.accept],
889
- serializer
878
+ serializer,
890
879
  };
891
880
  const listByProductNextOperationSpec: coreClient.OperationSpec = {
892
881
  path: "{nextLink}",
893
882
  httpMethod: "GET",
894
883
  responses: {
895
884
  200: {
896
- bodyMapper: Mappers.DeviceGroupListResult
885
+ bodyMapper: Mappers.DeviceGroupListResult,
897
886
  },
898
887
  default: {
899
- bodyMapper: Mappers.ErrorResponse
900
- }
888
+ bodyMapper: Mappers.ErrorResponse,
889
+ },
901
890
  },
902
891
  urlParameters: [
903
892
  Parameters.$host,
@@ -905,8 +894,8 @@ const listByProductNextOperationSpec: coreClient.OperationSpec = {
905
894
  Parameters.subscriptionId,
906
895
  Parameters.resourceGroupName,
907
896
  Parameters.catalogName,
908
- Parameters.productName
897
+ Parameters.productName,
909
898
  ],
910
899
  headerParameters: [Parameters.accept],
911
- serializer
900
+ serializer,
912
901
  };