@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 {
@@ -35,7 +35,7 @@ import {
35
35
  GenerateCapabilityImageRequest,
36
36
  DevicesGenerateCapabilityImageOptionalParams,
37
37
  DevicesGenerateCapabilityImageResponse,
38
- DevicesListByDeviceGroupNextResponse
38
+ DevicesListByDeviceGroupNextResponse,
39
39
  } from "../models";
40
40
 
41
41
  /// <reference lib="esnext.asynciterable" />
@@ -65,14 +65,14 @@ export class DevicesImpl implements Devices {
65
65
  catalogName: string,
66
66
  productName: string,
67
67
  deviceGroupName: string,
68
- options?: DevicesListByDeviceGroupOptionalParams
68
+ options?: DevicesListByDeviceGroupOptionalParams,
69
69
  ): PagedAsyncIterableIterator<Device> {
70
70
  const iter = this.listByDeviceGroupPagingAll(
71
71
  resourceGroupName,
72
72
  catalogName,
73
73
  productName,
74
74
  deviceGroupName,
75
- options
75
+ options,
76
76
  );
77
77
  return {
78
78
  next() {
@@ -91,9 +91,9 @@ export class DevicesImpl implements Devices {
91
91
  productName,
92
92
  deviceGroupName,
93
93
  options,
94
- settings
94
+ settings,
95
95
  );
96
- }
96
+ },
97
97
  };
98
98
  }
99
99
 
@@ -103,7 +103,7 @@ export class DevicesImpl implements Devices {
103
103
  productName: string,
104
104
  deviceGroupName: string,
105
105
  options?: DevicesListByDeviceGroupOptionalParams,
106
- settings?: PageSettings
106
+ settings?: PageSettings,
107
107
  ): AsyncIterableIterator<Device[]> {
108
108
  let result: DevicesListByDeviceGroupResponse;
109
109
  let continuationToken = settings?.continuationToken;
@@ -113,7 +113,7 @@ export class DevicesImpl implements Devices {
113
113
  catalogName,
114
114
  productName,
115
115
  deviceGroupName,
116
- options
116
+ options,
117
117
  );
118
118
  let page = result.value || [];
119
119
  continuationToken = result.nextLink;
@@ -127,7 +127,7 @@ export class DevicesImpl implements Devices {
127
127
  productName,
128
128
  deviceGroupName,
129
129
  continuationToken,
130
- options
130
+ options,
131
131
  );
132
132
  continuationToken = result.nextLink;
133
133
  let page = result.value || [];
@@ -141,14 +141,14 @@ export class DevicesImpl implements Devices {
141
141
  catalogName: string,
142
142
  productName: string,
143
143
  deviceGroupName: string,
144
- options?: DevicesListByDeviceGroupOptionalParams
144
+ options?: DevicesListByDeviceGroupOptionalParams,
145
145
  ): AsyncIterableIterator<Device> {
146
146
  for await (const page of this.listByDeviceGroupPagingPage(
147
147
  resourceGroupName,
148
148
  catalogName,
149
149
  productName,
150
150
  deviceGroupName,
151
- options
151
+ options,
152
152
  )) {
153
153
  yield* page;
154
154
  }
@@ -168,11 +168,11 @@ export class DevicesImpl implements Devices {
168
168
  catalogName: string,
169
169
  productName: string,
170
170
  deviceGroupName: string,
171
- options?: DevicesListByDeviceGroupOptionalParams
171
+ options?: DevicesListByDeviceGroupOptionalParams,
172
172
  ): Promise<DevicesListByDeviceGroupResponse> {
173
173
  return this.client.sendOperationRequest(
174
174
  { resourceGroupName, catalogName, productName, deviceGroupName, options },
175
- listByDeviceGroupOperationSpec
175
+ listByDeviceGroupOperationSpec,
176
176
  );
177
177
  }
178
178
 
@@ -192,7 +192,7 @@ export class DevicesImpl implements Devices {
192
192
  productName: string,
193
193
  deviceGroupName: string,
194
194
  deviceName: string,
195
- options?: DevicesGetOptionalParams
195
+ options?: DevicesGetOptionalParams,
196
196
  ): Promise<DevicesGetResponse> {
197
197
  return this.client.sendOperationRequest(
198
198
  {
@@ -201,9 +201,9 @@ export class DevicesImpl implements Devices {
201
201
  productName,
202
202
  deviceGroupName,
203
203
  deviceName,
204
- options
204
+ options,
205
205
  },
206
- getOperationSpec
206
+ getOperationSpec,
207
207
  );
208
208
  }
209
209
 
@@ -225,7 +225,7 @@ export class DevicesImpl implements Devices {
225
225
  deviceGroupName: string,
226
226
  deviceName: string,
227
227
  resource: Device,
228
- options?: DevicesCreateOrUpdateOptionalParams
228
+ options?: DevicesCreateOrUpdateOptionalParams,
229
229
  ): Promise<
230
230
  SimplePollerLike<
231
231
  OperationState<DevicesCreateOrUpdateResponse>,
@@ -234,21 +234,20 @@ export class DevicesImpl implements Devices {
234
234
  > {
235
235
  const directSendOperation = async (
236
236
  args: coreClient.OperationArguments,
237
- spec: coreClient.OperationSpec
237
+ spec: coreClient.OperationSpec,
238
238
  ): Promise<DevicesCreateOrUpdateResponse> => {
239
239
  return this.client.sendOperationRequest(args, spec);
240
240
  };
241
241
  const sendOperationFn = async (
242
242
  args: coreClient.OperationArguments,
243
- spec: coreClient.OperationSpec
243
+ spec: coreClient.OperationSpec,
244
244
  ) => {
245
- let currentRawResponse:
246
- | coreClient.FullOperationResponse
247
- | undefined = undefined;
245
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
246
+ undefined;
248
247
  const providedCallback = args.options?.onResponse;
249
248
  const callback: coreClient.RawResponseCallback = (
250
249
  rawResponse: coreClient.FullOperationResponse,
251
- flatResponse: unknown
250
+ flatResponse: unknown,
252
251
  ) => {
253
252
  currentRawResponse = rawResponse;
254
253
  providedCallback?.(rawResponse, flatResponse);
@@ -257,8 +256,8 @@ export class DevicesImpl implements Devices {
257
256
  ...args,
258
257
  options: {
259
258
  ...args.options,
260
- onResponse: callback
261
- }
259
+ onResponse: callback,
260
+ },
262
261
  };
263
262
  const flatResponse = await directSendOperation(updatedArgs, spec);
264
263
  return {
@@ -266,8 +265,8 @@ export class DevicesImpl implements Devices {
266
265
  rawResponse: {
267
266
  statusCode: currentRawResponse!.status,
268
267
  body: currentRawResponse!.parsedBody,
269
- headers: currentRawResponse!.headers.toJSON()
270
- }
268
+ headers: currentRawResponse!.headers.toJSON(),
269
+ },
271
270
  };
272
271
  };
273
272
 
@@ -280,9 +279,9 @@ export class DevicesImpl implements Devices {
280
279
  deviceGroupName,
281
280
  deviceName,
282
281
  resource,
283
- options
282
+ options,
284
283
  },
285
- spec: createOrUpdateOperationSpec
284
+ spec: createOrUpdateOperationSpec,
286
285
  });
287
286
  const poller = await createHttpPoller<
288
287
  DevicesCreateOrUpdateResponse,
@@ -290,7 +289,7 @@ export class DevicesImpl implements Devices {
290
289
  >(lro, {
291
290
  restoreFrom: options?.resumeFrom,
292
291
  intervalInMs: options?.updateIntervalInMs,
293
- resourceLocationConfig: "azure-async-operation"
292
+ resourceLocationConfig: "azure-async-operation",
294
293
  });
295
294
  await poller.poll();
296
295
  return poller;
@@ -314,7 +313,7 @@ export class DevicesImpl implements Devices {
314
313
  deviceGroupName: string,
315
314
  deviceName: string,
316
315
  resource: Device,
317
- options?: DevicesCreateOrUpdateOptionalParams
316
+ options?: DevicesCreateOrUpdateOptionalParams,
318
317
  ): Promise<DevicesCreateOrUpdateResponse> {
319
318
  const poller = await this.beginCreateOrUpdate(
320
319
  resourceGroupName,
@@ -323,7 +322,7 @@ export class DevicesImpl implements Devices {
323
322
  deviceGroupName,
324
323
  deviceName,
325
324
  resource,
326
- options
325
+ options,
327
326
  );
328
327
  return poller.pollUntilDone();
329
328
  }
@@ -346,7 +345,7 @@ export class DevicesImpl implements Devices {
346
345
  deviceGroupName: string,
347
346
  deviceName: string,
348
347
  properties: DeviceUpdate,
349
- options?: DevicesUpdateOptionalParams
348
+ options?: DevicesUpdateOptionalParams,
350
349
  ): Promise<
351
350
  SimplePollerLike<
352
351
  OperationState<DevicesUpdateResponse>,
@@ -355,21 +354,20 @@ export class DevicesImpl implements Devices {
355
354
  > {
356
355
  const directSendOperation = async (
357
356
  args: coreClient.OperationArguments,
358
- spec: coreClient.OperationSpec
357
+ spec: coreClient.OperationSpec,
359
358
  ): Promise<DevicesUpdateResponse> => {
360
359
  return this.client.sendOperationRequest(args, spec);
361
360
  };
362
361
  const sendOperationFn = async (
363
362
  args: coreClient.OperationArguments,
364
- spec: coreClient.OperationSpec
363
+ spec: coreClient.OperationSpec,
365
364
  ) => {
366
- let currentRawResponse:
367
- | coreClient.FullOperationResponse
368
- | undefined = undefined;
365
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
366
+ undefined;
369
367
  const providedCallback = args.options?.onResponse;
370
368
  const callback: coreClient.RawResponseCallback = (
371
369
  rawResponse: coreClient.FullOperationResponse,
372
- flatResponse: unknown
370
+ flatResponse: unknown,
373
371
  ) => {
374
372
  currentRawResponse = rawResponse;
375
373
  providedCallback?.(rawResponse, flatResponse);
@@ -378,8 +376,8 @@ export class DevicesImpl implements Devices {
378
376
  ...args,
379
377
  options: {
380
378
  ...args.options,
381
- onResponse: callback
382
- }
379
+ onResponse: callback,
380
+ },
383
381
  };
384
382
  const flatResponse = await directSendOperation(updatedArgs, spec);
385
383
  return {
@@ -387,8 +385,8 @@ export class DevicesImpl implements Devices {
387
385
  rawResponse: {
388
386
  statusCode: currentRawResponse!.status,
389
387
  body: currentRawResponse!.parsedBody,
390
- headers: currentRawResponse!.headers.toJSON()
391
- }
388
+ headers: currentRawResponse!.headers.toJSON(),
389
+ },
392
390
  };
393
391
  };
394
392
 
@@ -401,9 +399,9 @@ export class DevicesImpl implements Devices {
401
399
  deviceGroupName,
402
400
  deviceName,
403
401
  properties,
404
- options
402
+ options,
405
403
  },
406
- spec: updateOperationSpec
404
+ spec: updateOperationSpec,
407
405
  });
408
406
  const poller = await createHttpPoller<
409
407
  DevicesUpdateResponse,
@@ -411,7 +409,7 @@ export class DevicesImpl implements Devices {
411
409
  >(lro, {
412
410
  restoreFrom: options?.resumeFrom,
413
411
  intervalInMs: options?.updateIntervalInMs,
414
- resourceLocationConfig: "location"
412
+ resourceLocationConfig: "location",
415
413
  });
416
414
  await poller.poll();
417
415
  return poller;
@@ -435,7 +433,7 @@ export class DevicesImpl implements Devices {
435
433
  deviceGroupName: string,
436
434
  deviceName: string,
437
435
  properties: DeviceUpdate,
438
- options?: DevicesUpdateOptionalParams
436
+ options?: DevicesUpdateOptionalParams,
439
437
  ): Promise<DevicesUpdateResponse> {
440
438
  const poller = await this.beginUpdate(
441
439
  resourceGroupName,
@@ -444,7 +442,7 @@ export class DevicesImpl implements Devices {
444
442
  deviceGroupName,
445
443
  deviceName,
446
444
  properties,
447
- options
445
+ options,
448
446
  );
449
447
  return poller.pollUntilDone();
450
448
  }
@@ -464,25 +462,24 @@ export class DevicesImpl implements Devices {
464
462
  productName: string,
465
463
  deviceGroupName: string,
466
464
  deviceName: string,
467
- options?: DevicesDeleteOptionalParams
465
+ options?: DevicesDeleteOptionalParams,
468
466
  ): Promise<SimplePollerLike<OperationState<void>, void>> {
469
467
  const directSendOperation = async (
470
468
  args: coreClient.OperationArguments,
471
- spec: coreClient.OperationSpec
469
+ spec: coreClient.OperationSpec,
472
470
  ): Promise<void> => {
473
471
  return this.client.sendOperationRequest(args, spec);
474
472
  };
475
473
  const sendOperationFn = async (
476
474
  args: coreClient.OperationArguments,
477
- spec: coreClient.OperationSpec
475
+ spec: coreClient.OperationSpec,
478
476
  ) => {
479
- let currentRawResponse:
480
- | coreClient.FullOperationResponse
481
- | undefined = undefined;
477
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
478
+ undefined;
482
479
  const providedCallback = args.options?.onResponse;
483
480
  const callback: coreClient.RawResponseCallback = (
484
481
  rawResponse: coreClient.FullOperationResponse,
485
- flatResponse: unknown
482
+ flatResponse: unknown,
486
483
  ) => {
487
484
  currentRawResponse = rawResponse;
488
485
  providedCallback?.(rawResponse, flatResponse);
@@ -491,8 +488,8 @@ export class DevicesImpl implements Devices {
491
488
  ...args,
492
489
  options: {
493
490
  ...args.options,
494
- onResponse: callback
495
- }
491
+ onResponse: callback,
492
+ },
496
493
  };
497
494
  const flatResponse = await directSendOperation(updatedArgs, spec);
498
495
  return {
@@ -500,8 +497,8 @@ export class DevicesImpl implements Devices {
500
497
  rawResponse: {
501
498
  statusCode: currentRawResponse!.status,
502
499
  body: currentRawResponse!.parsedBody,
503
- headers: currentRawResponse!.headers.toJSON()
504
- }
500
+ headers: currentRawResponse!.headers.toJSON(),
501
+ },
505
502
  };
506
503
  };
507
504
 
@@ -513,14 +510,14 @@ export class DevicesImpl implements Devices {
513
510
  productName,
514
511
  deviceGroupName,
515
512
  deviceName,
516
- options
513
+ options,
517
514
  },
518
- spec: deleteOperationSpec
515
+ spec: deleteOperationSpec,
519
516
  });
520
517
  const poller = await createHttpPoller<void, OperationState<void>>(lro, {
521
518
  restoreFrom: options?.resumeFrom,
522
519
  intervalInMs: options?.updateIntervalInMs,
523
- resourceLocationConfig: "location"
520
+ resourceLocationConfig: "location",
524
521
  });
525
522
  await poller.poll();
526
523
  return poller;
@@ -541,7 +538,7 @@ export class DevicesImpl implements Devices {
541
538
  productName: string,
542
539
  deviceGroupName: string,
543
540
  deviceName: string,
544
- options?: DevicesDeleteOptionalParams
541
+ options?: DevicesDeleteOptionalParams,
545
542
  ): Promise<void> {
546
543
  const poller = await this.beginDelete(
547
544
  resourceGroupName,
@@ -549,7 +546,7 @@ export class DevicesImpl implements Devices {
549
546
  productName,
550
547
  deviceGroupName,
551
548
  deviceName,
552
- options
549
+ options,
553
550
  );
554
551
  return poller.pollUntilDone();
555
552
  }
@@ -573,7 +570,7 @@ export class DevicesImpl implements Devices {
573
570
  deviceGroupName: string,
574
571
  deviceName: string,
575
572
  generateDeviceCapabilityRequest: GenerateCapabilityImageRequest,
576
- options?: DevicesGenerateCapabilityImageOptionalParams
573
+ options?: DevicesGenerateCapabilityImageOptionalParams,
577
574
  ): Promise<
578
575
  SimplePollerLike<
579
576
  OperationState<DevicesGenerateCapabilityImageResponse>,
@@ -582,21 +579,20 @@ export class DevicesImpl implements Devices {
582
579
  > {
583
580
  const directSendOperation = async (
584
581
  args: coreClient.OperationArguments,
585
- spec: coreClient.OperationSpec
582
+ spec: coreClient.OperationSpec,
586
583
  ): Promise<DevicesGenerateCapabilityImageResponse> => {
587
584
  return this.client.sendOperationRequest(args, spec);
588
585
  };
589
586
  const sendOperationFn = async (
590
587
  args: coreClient.OperationArguments,
591
- spec: coreClient.OperationSpec
588
+ spec: coreClient.OperationSpec,
592
589
  ) => {
593
- let currentRawResponse:
594
- | coreClient.FullOperationResponse
595
- | undefined = undefined;
590
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
591
+ undefined;
596
592
  const providedCallback = args.options?.onResponse;
597
593
  const callback: coreClient.RawResponseCallback = (
598
594
  rawResponse: coreClient.FullOperationResponse,
599
- flatResponse: unknown
595
+ flatResponse: unknown,
600
596
  ) => {
601
597
  currentRawResponse = rawResponse;
602
598
  providedCallback?.(rawResponse, flatResponse);
@@ -605,8 +601,8 @@ export class DevicesImpl implements Devices {
605
601
  ...args,
606
602
  options: {
607
603
  ...args.options,
608
- onResponse: callback
609
- }
604
+ onResponse: callback,
605
+ },
610
606
  };
611
607
  const flatResponse = await directSendOperation(updatedArgs, spec);
612
608
  return {
@@ -614,8 +610,8 @@ export class DevicesImpl implements Devices {
614
610
  rawResponse: {
615
611
  statusCode: currentRawResponse!.status,
616
612
  body: currentRawResponse!.parsedBody,
617
- headers: currentRawResponse!.headers.toJSON()
618
- }
613
+ headers: currentRawResponse!.headers.toJSON(),
614
+ },
619
615
  };
620
616
  };
621
617
 
@@ -628,9 +624,9 @@ export class DevicesImpl implements Devices {
628
624
  deviceGroupName,
629
625
  deviceName,
630
626
  generateDeviceCapabilityRequest,
631
- options
627
+ options,
632
628
  },
633
- spec: generateCapabilityImageOperationSpec
629
+ spec: generateCapabilityImageOperationSpec,
634
630
  });
635
631
  const poller = await createHttpPoller<
636
632
  DevicesGenerateCapabilityImageResponse,
@@ -638,7 +634,7 @@ export class DevicesImpl implements Devices {
638
634
  >(lro, {
639
635
  restoreFrom: options?.resumeFrom,
640
636
  intervalInMs: options?.updateIntervalInMs,
641
- resourceLocationConfig: "location"
637
+ resourceLocationConfig: "location",
642
638
  });
643
639
  await poller.poll();
644
640
  return poller;
@@ -663,7 +659,7 @@ export class DevicesImpl implements Devices {
663
659
  deviceGroupName: string,
664
660
  deviceName: string,
665
661
  generateDeviceCapabilityRequest: GenerateCapabilityImageRequest,
666
- options?: DevicesGenerateCapabilityImageOptionalParams
662
+ options?: DevicesGenerateCapabilityImageOptionalParams,
667
663
  ): Promise<DevicesGenerateCapabilityImageResponse> {
668
664
  const poller = await this.beginGenerateCapabilityImage(
669
665
  resourceGroupName,
@@ -672,7 +668,7 @@ export class DevicesImpl implements Devices {
672
668
  deviceGroupName,
673
669
  deviceName,
674
670
  generateDeviceCapabilityRequest,
675
- options
671
+ options,
676
672
  );
677
673
  return poller.pollUntilDone();
678
674
  }
@@ -692,7 +688,7 @@ export class DevicesImpl implements Devices {
692
688
  productName: string,
693
689
  deviceGroupName: string,
694
690
  nextLink: string,
695
- options?: DevicesListByDeviceGroupNextOptionalParams
691
+ options?: DevicesListByDeviceGroupNextOptionalParams,
696
692
  ): Promise<DevicesListByDeviceGroupNextResponse> {
697
693
  return this.client.sendOperationRequest(
698
694
  {
@@ -701,9 +697,9 @@ export class DevicesImpl implements Devices {
701
697
  productName,
702
698
  deviceGroupName,
703
699
  nextLink,
704
- options
700
+ options,
705
701
  },
706
- listByDeviceGroupNextOperationSpec
702
+ listByDeviceGroupNextOperationSpec,
707
703
  );
708
704
  }
709
705
  }
@@ -711,16 +707,15 @@ export class DevicesImpl implements Devices {
711
707
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
712
708
 
713
709
  const listByDeviceGroupOperationSpec: coreClient.OperationSpec = {
714
- path:
715
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices",
710
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices",
716
711
  httpMethod: "GET",
717
712
  responses: {
718
713
  200: {
719
- bodyMapper: Mappers.DeviceListResult
714
+ bodyMapper: Mappers.DeviceListResult,
720
715
  },
721
716
  default: {
722
- bodyMapper: Mappers.ErrorResponse
723
- }
717
+ bodyMapper: Mappers.ErrorResponse,
718
+ },
724
719
  },
725
720
  queryParameters: [Parameters.apiVersion],
726
721
  urlParameters: [
@@ -729,22 +724,21 @@ const listByDeviceGroupOperationSpec: coreClient.OperationSpec = {
729
724
  Parameters.resourceGroupName,
730
725
  Parameters.catalogName,
731
726
  Parameters.productName,
732
- Parameters.deviceGroupName
727
+ Parameters.deviceGroupName,
733
728
  ],
734
729
  headerParameters: [Parameters.accept],
735
- serializer
730
+ serializer,
736
731
  };
737
732
  const getOperationSpec: coreClient.OperationSpec = {
738
- path:
739
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
733
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
740
734
  httpMethod: "GET",
741
735
  responses: {
742
736
  200: {
743
- bodyMapper: Mappers.Device
737
+ bodyMapper: Mappers.Device,
744
738
  },
745
739
  default: {
746
- bodyMapper: Mappers.ErrorResponse
747
- }
740
+ bodyMapper: Mappers.ErrorResponse,
741
+ },
748
742
  },
749
743
  queryParameters: [Parameters.apiVersion],
750
744
  urlParameters: [
@@ -754,31 +748,30 @@ const getOperationSpec: coreClient.OperationSpec = {
754
748
  Parameters.catalogName,
755
749
  Parameters.productName,
756
750
  Parameters.deviceGroupName,
757
- Parameters.deviceName
751
+ Parameters.deviceName,
758
752
  ],
759
753
  headerParameters: [Parameters.accept],
760
- serializer
754
+ serializer,
761
755
  };
762
756
  const createOrUpdateOperationSpec: coreClient.OperationSpec = {
763
- path:
764
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
757
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
765
758
  httpMethod: "PUT",
766
759
  responses: {
767
760
  200: {
768
- bodyMapper: Mappers.Device
761
+ bodyMapper: Mappers.Device,
769
762
  },
770
763
  201: {
771
- bodyMapper: Mappers.Device
764
+ bodyMapper: Mappers.Device,
772
765
  },
773
766
  202: {
774
- bodyMapper: Mappers.Device
767
+ bodyMapper: Mappers.Device,
775
768
  },
776
769
  204: {
777
- bodyMapper: Mappers.Device
770
+ bodyMapper: Mappers.Device,
778
771
  },
779
772
  default: {
780
- bodyMapper: Mappers.ErrorResponse
781
- }
773
+ bodyMapper: Mappers.ErrorResponse,
774
+ },
782
775
  },
783
776
  requestBody: Parameters.resource5,
784
777
  queryParameters: [Parameters.apiVersion],
@@ -789,32 +782,31 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
789
782
  Parameters.catalogName,
790
783
  Parameters.productName,
791
784
  Parameters.deviceGroupName,
792
- Parameters.deviceName
785
+ Parameters.deviceName,
793
786
  ],
794
787
  headerParameters: [Parameters.accept, Parameters.contentType],
795
788
  mediaType: "json",
796
- serializer
789
+ serializer,
797
790
  };
798
791
  const updateOperationSpec: coreClient.OperationSpec = {
799
- path:
800
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
792
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
801
793
  httpMethod: "PATCH",
802
794
  responses: {
803
795
  200: {
804
- bodyMapper: Mappers.Device
796
+ bodyMapper: Mappers.Device,
805
797
  },
806
798
  201: {
807
- bodyMapper: Mappers.Device
799
+ bodyMapper: Mappers.Device,
808
800
  },
809
801
  202: {
810
- bodyMapper: Mappers.Device
802
+ bodyMapper: Mappers.Device,
811
803
  },
812
804
  204: {
813
- bodyMapper: Mappers.Device
805
+ bodyMapper: Mappers.Device,
814
806
  },
815
807
  default: {
816
- bodyMapper: Mappers.ErrorResponse
817
- }
808
+ bodyMapper: Mappers.ErrorResponse,
809
+ },
818
810
  },
819
811
  requestBody: Parameters.properties3,
820
812
  queryParameters: [Parameters.apiVersion],
@@ -825,15 +817,14 @@ const updateOperationSpec: coreClient.OperationSpec = {
825
817
  Parameters.catalogName,
826
818
  Parameters.productName,
827
819
  Parameters.deviceGroupName,
828
- Parameters.deviceName
820
+ Parameters.deviceName,
829
821
  ],
830
822
  headerParameters: [Parameters.accept, Parameters.contentType],
831
823
  mediaType: "json",
832
- serializer
824
+ serializer,
833
825
  };
834
826
  const deleteOperationSpec: coreClient.OperationSpec = {
835
- path:
836
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
827
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}",
837
828
  httpMethod: "DELETE",
838
829
  responses: {
839
830
  200: {},
@@ -841,8 +832,8 @@ const deleteOperationSpec: coreClient.OperationSpec = {
841
832
  202: {},
842
833
  204: {},
843
834
  default: {
844
- bodyMapper: Mappers.ErrorResponse
845
- }
835
+ bodyMapper: Mappers.ErrorResponse,
836
+ },
846
837
  },
847
838
  queryParameters: [Parameters.apiVersion],
848
839
  urlParameters: [
@@ -852,31 +843,30 @@ const deleteOperationSpec: coreClient.OperationSpec = {
852
843
  Parameters.catalogName,
853
844
  Parameters.productName,
854
845
  Parameters.deviceGroupName,
855
- Parameters.deviceName
846
+ Parameters.deviceName,
856
847
  ],
857
848
  headerParameters: [Parameters.accept],
858
- serializer
849
+ serializer,
859
850
  };
860
851
  const generateCapabilityImageOperationSpec: coreClient.OperationSpec = {
861
- path:
862
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage",
852
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage",
863
853
  httpMethod: "POST",
864
854
  responses: {
865
855
  200: {
866
- bodyMapper: Mappers.SignedCapabilityImageResponse
856
+ bodyMapper: Mappers.SignedCapabilityImageResponse,
867
857
  },
868
858
  201: {
869
- bodyMapper: Mappers.SignedCapabilityImageResponse
859
+ bodyMapper: Mappers.SignedCapabilityImageResponse,
870
860
  },
871
861
  202: {
872
- bodyMapper: Mappers.SignedCapabilityImageResponse
862
+ bodyMapper: Mappers.SignedCapabilityImageResponse,
873
863
  },
874
864
  204: {
875
- bodyMapper: Mappers.SignedCapabilityImageResponse
865
+ bodyMapper: Mappers.SignedCapabilityImageResponse,
876
866
  },
877
867
  default: {
878
- bodyMapper: Mappers.ErrorResponse
879
- }
868
+ bodyMapper: Mappers.ErrorResponse,
869
+ },
880
870
  },
881
871
  requestBody: Parameters.generateDeviceCapabilityRequest,
882
872
  queryParameters: [Parameters.apiVersion],
@@ -887,22 +877,22 @@ const generateCapabilityImageOperationSpec: coreClient.OperationSpec = {
887
877
  Parameters.catalogName,
888
878
  Parameters.productName,
889
879
  Parameters.deviceGroupName,
890
- Parameters.deviceName
880
+ Parameters.deviceName,
891
881
  ],
892
882
  headerParameters: [Parameters.accept, Parameters.contentType],
893
883
  mediaType: "json",
894
- serializer
884
+ serializer,
895
885
  };
896
886
  const listByDeviceGroupNextOperationSpec: coreClient.OperationSpec = {
897
887
  path: "{nextLink}",
898
888
  httpMethod: "GET",
899
889
  responses: {
900
890
  200: {
901
- bodyMapper: Mappers.DeviceListResult
891
+ bodyMapper: Mappers.DeviceListResult,
902
892
  },
903
893
  default: {
904
- bodyMapper: Mappers.ErrorResponse
905
- }
894
+ bodyMapper: Mappers.ErrorResponse,
895
+ },
906
896
  },
907
897
  urlParameters: [
908
898
  Parameters.$host,
@@ -911,8 +901,8 @@ const listByDeviceGroupNextOperationSpec: coreClient.OperationSpec = {
911
901
  Parameters.resourceGroupName,
912
902
  Parameters.catalogName,
913
903
  Parameters.productName,
914
- Parameters.deviceGroupName
904
+ Parameters.deviceGroupName,
915
905
  ],
916
906
  headerParameters: [Parameters.accept],
917
- serializer
907
+ serializer,
918
908
  };