@azure/arm-oep 1.0.0-alpha.20220119.3

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 (119) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +98 -0
  4. package/dist/index.js +1216 -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/locationsCheckNameAvailability.d.ts +2 -0
  9. package/dist-esm/samples-dev/locationsCheckNameAvailability.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/locationsCheckNameAvailability.js +33 -0
  11. package/dist-esm/samples-dev/locationsCheckNameAvailability.js.map +1 -0
  12. package/dist-esm/samples-dev/oepResourceCreate.d.ts +2 -0
  13. package/dist-esm/samples-dev/oepResourceCreate.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/oepResourceCreate.js +31 -0
  15. package/dist-esm/samples-dev/oepResourceCreate.js.map +1 -0
  16. package/dist-esm/samples-dev/oepResourceDelete.d.ts +2 -0
  17. package/dist-esm/samples-dev/oepResourceDelete.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/oepResourceDelete.js +31 -0
  19. package/dist-esm/samples-dev/oepResourceDelete.js.map +1 -0
  20. package/dist-esm/samples-dev/oepResourceGet.d.ts +2 -0
  21. package/dist-esm/samples-dev/oepResourceGet.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/oepResourceGet.js +31 -0
  23. package/dist-esm/samples-dev/oepResourceGet.js.map +1 -0
  24. package/dist-esm/samples-dev/oepResourceListByResourceGroup.d.ts +2 -0
  25. package/dist-esm/samples-dev/oepResourceListByResourceGroup.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/oepResourceListByResourceGroup.js +44 -0
  27. package/dist-esm/samples-dev/oepResourceListByResourceGroup.js.map +1 -0
  28. package/dist-esm/samples-dev/oepResourceListBySubscriptionId.d.ts +2 -0
  29. package/dist-esm/samples-dev/oepResourceListBySubscriptionId.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/oepResourceListBySubscriptionId.js +43 -0
  31. package/dist-esm/samples-dev/oepResourceListBySubscriptionId.js.map +1 -0
  32. package/dist-esm/samples-dev/oepResourceUpdate.d.ts +2 -0
  33. package/dist-esm/samples-dev/oepResourceUpdate.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/oepResourceUpdate.js +31 -0
  35. package/dist-esm/samples-dev/oepResourceUpdate.js.map +1 -0
  36. package/dist-esm/samples-dev/operationsList.d.ts +2 -0
  37. package/dist-esm/samples-dev/operationsList.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/operationsList.js +29 -0
  39. package/dist-esm/samples-dev/operationsList.js.map +1 -0
  40. package/dist-esm/src/index.d.ts +5 -0
  41. package/dist-esm/src/index.d.ts.map +1 -0
  42. package/dist-esm/src/index.js +12 -0
  43. package/dist-esm/src/index.js.map +1 -0
  44. package/dist-esm/src/lroImpl.d.ts +16 -0
  45. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  46. package/dist-esm/src/lroImpl.js +29 -0
  47. package/dist-esm/src/lroImpl.js.map +1 -0
  48. package/dist-esm/src/models/index.d.ts +351 -0
  49. package/dist-esm/src/models/index.d.ts.map +1 -0
  50. package/dist-esm/src/models/index.js +45 -0
  51. package/dist-esm/src/models/index.js.map +1 -0
  52. package/dist-esm/src/models/mappers.d.ts +17 -0
  53. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  54. package/dist-esm/src/models/mappers.js +454 -0
  55. package/dist-esm/src/models/mappers.js.map +1 -0
  56. package/dist-esm/src/models/parameters.d.ts +13 -0
  57. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  58. package/dist-esm/src/models/parameters.js +113 -0
  59. package/dist-esm/src/models/parameters.js.map +1 -0
  60. package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.d.ts +20 -0
  61. package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.d.ts.map +1 -0
  62. package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.js +53 -0
  63. package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.js.map +1 -0
  64. package/dist-esm/src/operations/energyServices.d.ts +95 -0
  65. package/dist-esm/src/operations/energyServices.d.ts.map +1 -0
  66. package/dist-esm/src/operations/energyServices.js +425 -0
  67. package/dist-esm/src/operations/energyServices.js.map +1 -0
  68. package/dist-esm/src/operations/index.d.ts +4 -0
  69. package/dist-esm/src/operations/index.d.ts.map +1 -0
  70. package/dist-esm/src/operations/index.js +11 -0
  71. package/dist-esm/src/operations/index.js.map +1 -0
  72. package/dist-esm/src/operations/locations.d.ts +19 -0
  73. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/locations.js +48 -0
  75. package/dist-esm/src/operations/locations.js.map +1 -0
  76. package/dist-esm/src/operations/operations.d.ts +18 -0
  77. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  78. package/dist-esm/src/operations/operations.js +46 -0
  79. package/dist-esm/src/operations/operations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/energyServices.d.ts +59 -0
  81. package/dist-esm/src/operationsInterfaces/energyServices.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/energyServices.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/energyServices.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  85. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  87. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/locations.d.ts +11 -0
  89. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  96. package/dist-esm/test/sampleTest.d.ts +2 -0
  97. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  98. package/dist-esm/test/sampleTest.js +40 -0
  99. package/dist-esm/test/sampleTest.js.map +1 -0
  100. package/package.json +118 -0
  101. package/review/arm-oep.api.md +316 -0
  102. package/rollup.config.js +188 -0
  103. package/src/index.ts +12 -0
  104. package/src/lroImpl.ts +34 -0
  105. package/src/models/index.ts +403 -0
  106. package/src/models/mappers.ts +475 -0
  107. package/src/models/parameters.ts +133 -0
  108. package/src/openEnergyPlatformManagementServiceAPIs.ts +83 -0
  109. package/src/operations/energyServices.ts +564 -0
  110. package/src/operations/index.ts +11 -0
  111. package/src/operations/locations.ts +67 -0
  112. package/src/operations/operations.ts +59 -0
  113. package/src/operationsInterfaces/energyServices.ts +113 -0
  114. package/src/operationsInterfaces/index.ts +11 -0
  115. package/src/operationsInterfaces/locations.ts +26 -0
  116. package/src/operationsInterfaces/operations.ts +21 -0
  117. package/tsconfig.json +20 -0
  118. package/types/arm-oep.d.ts +492 -0
  119. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,1216 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation.
11
+ * Licensed under the MIT License.
12
+ *
13
+ * Code generated by Microsoft (R) AutoRest Code Generator.
14
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
+ */
16
+ (function (KnownCheckNameAvailabilityReason) {
17
+ KnownCheckNameAvailabilityReason["Invalid"] = "Invalid";
18
+ KnownCheckNameAvailabilityReason["AlreadyExists"] = "AlreadyExists";
19
+ })(exports.KnownCheckNameAvailabilityReason || (exports.KnownCheckNameAvailabilityReason = {}));
20
+ (function (KnownProvisioningState) {
21
+ KnownProvisioningState["Unknown"] = "Unknown";
22
+ KnownProvisioningState["Succeeded"] = "Succeeded";
23
+ KnownProvisioningState["Failed"] = "Failed";
24
+ KnownProvisioningState["Canceled"] = "Canceled";
25
+ KnownProvisioningState["Creating"] = "Creating";
26
+ KnownProvisioningState["Deleting"] = "Deleting";
27
+ KnownProvisioningState["Updating"] = "Updating";
28
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
29
+ (function (KnownCreatedByType) {
30
+ KnownCreatedByType["User"] = "User";
31
+ KnownCreatedByType["Application"] = "Application";
32
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
33
+ KnownCreatedByType["Key"] = "Key";
34
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
35
+ (function (KnownOrigin) {
36
+ KnownOrigin["User"] = "user";
37
+ KnownOrigin["System"] = "system";
38
+ KnownOrigin["UserSystem"] = "user,system";
39
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
40
+ (function (KnownActionType) {
41
+ KnownActionType["Internal"] = "Internal";
42
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
43
+
44
+ /*
45
+ * Copyright (c) Microsoft Corporation.
46
+ * Licensed under the MIT License.
47
+ *
48
+ * Code generated by Microsoft (R) AutoRest Code Generator.
49
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
50
+ */
51
+ const CheckNameAvailabilityRequest = {
52
+ type: {
53
+ name: "Composite",
54
+ className: "CheckNameAvailabilityRequest",
55
+ modelProperties: {
56
+ name: {
57
+ serializedName: "name",
58
+ type: {
59
+ name: "String"
60
+ }
61
+ },
62
+ type: {
63
+ serializedName: "type",
64
+ type: {
65
+ name: "String"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ };
71
+ const CheckNameAvailabilityResponse = {
72
+ type: {
73
+ name: "Composite",
74
+ className: "CheckNameAvailabilityResponse",
75
+ modelProperties: {
76
+ nameAvailable: {
77
+ serializedName: "nameAvailable",
78
+ type: {
79
+ name: "Boolean"
80
+ }
81
+ },
82
+ reason: {
83
+ serializedName: "reason",
84
+ type: {
85
+ name: "String"
86
+ }
87
+ },
88
+ message: {
89
+ serializedName: "message",
90
+ type: {
91
+ name: "String"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ };
97
+ const ErrorResponse = {
98
+ type: {
99
+ name: "Composite",
100
+ className: "ErrorResponse",
101
+ modelProperties: {
102
+ error: {
103
+ serializedName: "error",
104
+ type: {
105
+ name: "Composite",
106
+ className: "ErrorDetail"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ };
112
+ const ErrorDetail = {
113
+ type: {
114
+ name: "Composite",
115
+ className: "ErrorDetail",
116
+ modelProperties: {
117
+ code: {
118
+ serializedName: "code",
119
+ readOnly: true,
120
+ type: {
121
+ name: "String"
122
+ }
123
+ },
124
+ message: {
125
+ serializedName: "message",
126
+ readOnly: true,
127
+ type: {
128
+ name: "String"
129
+ }
130
+ },
131
+ target: {
132
+ serializedName: "target",
133
+ readOnly: true,
134
+ type: {
135
+ name: "String"
136
+ }
137
+ },
138
+ details: {
139
+ serializedName: "details",
140
+ readOnly: true,
141
+ type: {
142
+ name: "Sequence",
143
+ element: {
144
+ type: {
145
+ name: "Composite",
146
+ className: "ErrorDetail"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ additionalInfo: {
152
+ serializedName: "additionalInfo",
153
+ readOnly: true,
154
+ type: {
155
+ name: "Sequence",
156
+ element: {
157
+ type: {
158
+ name: "Composite",
159
+ className: "ErrorAdditionalInfo"
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ };
167
+ const ErrorAdditionalInfo = {
168
+ type: {
169
+ name: "Composite",
170
+ className: "ErrorAdditionalInfo",
171
+ modelProperties: {
172
+ type: {
173
+ serializedName: "type",
174
+ readOnly: true,
175
+ type: {
176
+ name: "String"
177
+ }
178
+ },
179
+ info: {
180
+ serializedName: "info",
181
+ readOnly: true,
182
+ type: {
183
+ name: "Dictionary",
184
+ value: { type: { name: "any" } }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ };
190
+ const EnergyServiceList = {
191
+ type: {
192
+ name: "Composite",
193
+ className: "EnergyServiceList",
194
+ modelProperties: {
195
+ nextLink: {
196
+ serializedName: "nextLink",
197
+ type: {
198
+ name: "String"
199
+ }
200
+ },
201
+ value: {
202
+ serializedName: "value",
203
+ type: {
204
+ name: "Sequence",
205
+ element: {
206
+ type: {
207
+ name: "Composite",
208
+ className: "EnergyService"
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ };
216
+ const EnergyServiceProperties = {
217
+ type: {
218
+ name: "Composite",
219
+ className: "EnergyServiceProperties",
220
+ modelProperties: {
221
+ dnsName: {
222
+ serializedName: "dnsName",
223
+ readOnly: true,
224
+ type: {
225
+ name: "String"
226
+ }
227
+ },
228
+ provisioningState: {
229
+ serializedName: "provisioningState",
230
+ readOnly: true,
231
+ type: {
232
+ name: "String"
233
+ }
234
+ },
235
+ authAppId: {
236
+ serializedName: "authAppId",
237
+ type: {
238
+ name: "String"
239
+ }
240
+ },
241
+ dataPartitionNames: {
242
+ serializedName: "dataPartitionNames",
243
+ type: {
244
+ name: "Sequence",
245
+ element: {
246
+ type: {
247
+ name: "Composite",
248
+ className: "DataPartitionNames"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ };
256
+ const DataPartitionNames = {
257
+ type: {
258
+ name: "Composite",
259
+ className: "DataPartitionNames",
260
+ modelProperties: {
261
+ name: {
262
+ serializedName: "name",
263
+ type: {
264
+ name: "String"
265
+ }
266
+ }
267
+ }
268
+ }
269
+ };
270
+ const Resource = {
271
+ type: {
272
+ name: "Composite",
273
+ className: "Resource",
274
+ modelProperties: {
275
+ id: {
276
+ serializedName: "id",
277
+ readOnly: true,
278
+ type: {
279
+ name: "String"
280
+ }
281
+ },
282
+ name: {
283
+ serializedName: "name",
284
+ readOnly: true,
285
+ type: {
286
+ name: "String"
287
+ }
288
+ },
289
+ type: {
290
+ serializedName: "type",
291
+ readOnly: true,
292
+ type: {
293
+ name: "String"
294
+ }
295
+ },
296
+ systemData: {
297
+ serializedName: "systemData",
298
+ type: {
299
+ name: "Composite",
300
+ className: "SystemData"
301
+ }
302
+ }
303
+ }
304
+ }
305
+ };
306
+ const SystemData = {
307
+ type: {
308
+ name: "Composite",
309
+ className: "SystemData",
310
+ modelProperties: {
311
+ createdBy: {
312
+ serializedName: "createdBy",
313
+ type: {
314
+ name: "String"
315
+ }
316
+ },
317
+ createdByType: {
318
+ serializedName: "createdByType",
319
+ type: {
320
+ name: "String"
321
+ }
322
+ },
323
+ createdAt: {
324
+ serializedName: "createdAt",
325
+ type: {
326
+ name: "DateTime"
327
+ }
328
+ },
329
+ lastModifiedBy: {
330
+ serializedName: "lastModifiedBy",
331
+ type: {
332
+ name: "String"
333
+ }
334
+ },
335
+ lastModifiedByType: {
336
+ serializedName: "lastModifiedByType",
337
+ type: {
338
+ name: "String"
339
+ }
340
+ },
341
+ lastModifiedAt: {
342
+ serializedName: "lastModifiedAt",
343
+ type: {
344
+ name: "DateTime"
345
+ }
346
+ }
347
+ }
348
+ }
349
+ };
350
+ const EnergyResourceUpdate = {
351
+ type: {
352
+ name: "Composite",
353
+ className: "EnergyResourceUpdate",
354
+ modelProperties: {
355
+ tags: {
356
+ serializedName: "tags",
357
+ type: {
358
+ name: "Dictionary",
359
+ value: { type: { name: "String" } }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ };
365
+ const OperationListResult = {
366
+ type: {
367
+ name: "Composite",
368
+ className: "OperationListResult",
369
+ modelProperties: {
370
+ value: {
371
+ serializedName: "value",
372
+ readOnly: true,
373
+ type: {
374
+ name: "Sequence",
375
+ element: {
376
+ type: {
377
+ name: "Composite",
378
+ className: "Operation"
379
+ }
380
+ }
381
+ }
382
+ },
383
+ nextLink: {
384
+ serializedName: "nextLink",
385
+ readOnly: true,
386
+ type: {
387
+ name: "String"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ };
393
+ const Operation = {
394
+ type: {
395
+ name: "Composite",
396
+ className: "Operation",
397
+ modelProperties: {
398
+ name: {
399
+ serializedName: "name",
400
+ readOnly: true,
401
+ type: {
402
+ name: "String"
403
+ }
404
+ },
405
+ isDataAction: {
406
+ serializedName: "isDataAction",
407
+ readOnly: true,
408
+ type: {
409
+ name: "Boolean"
410
+ }
411
+ },
412
+ display: {
413
+ serializedName: "display",
414
+ type: {
415
+ name: "Composite",
416
+ className: "OperationDisplay"
417
+ }
418
+ },
419
+ origin: {
420
+ serializedName: "origin",
421
+ readOnly: true,
422
+ type: {
423
+ name: "String"
424
+ }
425
+ },
426
+ actionType: {
427
+ serializedName: "actionType",
428
+ readOnly: true,
429
+ type: {
430
+ name: "String"
431
+ }
432
+ }
433
+ }
434
+ }
435
+ };
436
+ const OperationDisplay = {
437
+ type: {
438
+ name: "Composite",
439
+ className: "OperationDisplay",
440
+ modelProperties: {
441
+ provider: {
442
+ serializedName: "provider",
443
+ readOnly: true,
444
+ type: {
445
+ name: "String"
446
+ }
447
+ },
448
+ resource: {
449
+ serializedName: "resource",
450
+ readOnly: true,
451
+ type: {
452
+ name: "String"
453
+ }
454
+ },
455
+ operation: {
456
+ serializedName: "operation",
457
+ readOnly: true,
458
+ type: {
459
+ name: "String"
460
+ }
461
+ },
462
+ description: {
463
+ serializedName: "description",
464
+ readOnly: true,
465
+ type: {
466
+ name: "String"
467
+ }
468
+ }
469
+ }
470
+ }
471
+ };
472
+ const EnergyService = {
473
+ type: {
474
+ name: "Composite",
475
+ className: "EnergyService",
476
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { properties: {
477
+ serializedName: "properties",
478
+ type: {
479
+ name: "Composite",
480
+ className: "EnergyServiceProperties"
481
+ }
482
+ }, tags: {
483
+ serializedName: "tags",
484
+ type: {
485
+ name: "Dictionary",
486
+ value: { type: { name: "String" } }
487
+ }
488
+ }, location: {
489
+ serializedName: "location",
490
+ required: true,
491
+ type: {
492
+ name: "String"
493
+ }
494
+ } })
495
+ }
496
+ };
497
+
498
+ var Mappers = /*#__PURE__*/Object.freeze({
499
+ __proto__: null,
500
+ CheckNameAvailabilityRequest: CheckNameAvailabilityRequest,
501
+ CheckNameAvailabilityResponse: CheckNameAvailabilityResponse,
502
+ ErrorResponse: ErrorResponse,
503
+ ErrorDetail: ErrorDetail,
504
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
505
+ EnergyServiceList: EnergyServiceList,
506
+ EnergyServiceProperties: EnergyServiceProperties,
507
+ DataPartitionNames: DataPartitionNames,
508
+ Resource: Resource,
509
+ SystemData: SystemData,
510
+ EnergyResourceUpdate: EnergyResourceUpdate,
511
+ OperationListResult: OperationListResult,
512
+ Operation: Operation,
513
+ OperationDisplay: OperationDisplay,
514
+ EnergyService: EnergyService
515
+ });
516
+
517
+ /*
518
+ * Copyright (c) Microsoft Corporation.
519
+ * Licensed under the MIT License.
520
+ *
521
+ * Code generated by Microsoft (R) AutoRest Code Generator.
522
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
523
+ */
524
+ const contentType = {
525
+ parameterPath: ["options", "contentType"],
526
+ mapper: {
527
+ defaultValue: "application/json",
528
+ isConstant: true,
529
+ serializedName: "Content-Type",
530
+ type: {
531
+ name: "String"
532
+ }
533
+ }
534
+ };
535
+ const body = {
536
+ parameterPath: "body",
537
+ mapper: CheckNameAvailabilityRequest
538
+ };
539
+ const accept = {
540
+ parameterPath: "accept",
541
+ mapper: {
542
+ defaultValue: "application/json",
543
+ isConstant: true,
544
+ serializedName: "Accept",
545
+ type: {
546
+ name: "String"
547
+ }
548
+ }
549
+ };
550
+ const $host = {
551
+ parameterPath: "$host",
552
+ mapper: {
553
+ serializedName: "$host",
554
+ required: true,
555
+ type: {
556
+ name: "String"
557
+ }
558
+ },
559
+ skipEncoding: true
560
+ };
561
+ const subscriptionId = {
562
+ parameterPath: "subscriptionId",
563
+ mapper: {
564
+ constraints: {
565
+ MinLength: 1
566
+ },
567
+ serializedName: "subscriptionId",
568
+ required: true,
569
+ type: {
570
+ name: "String"
571
+ }
572
+ }
573
+ };
574
+ const resourceGroupName = {
575
+ parameterPath: "resourceGroupName",
576
+ mapper: {
577
+ constraints: {
578
+ MaxLength: 90,
579
+ MinLength: 1
580
+ },
581
+ serializedName: "resourceGroupName",
582
+ required: true,
583
+ type: {
584
+ name: "String"
585
+ }
586
+ }
587
+ };
588
+ const apiVersion = {
589
+ parameterPath: "apiVersion",
590
+ mapper: {
591
+ defaultValue: "2021-06-01-preview",
592
+ isConstant: true,
593
+ serializedName: "api-version",
594
+ type: {
595
+ name: "String"
596
+ }
597
+ }
598
+ };
599
+ const resourceName = {
600
+ parameterPath: "resourceName",
601
+ mapper: {
602
+ serializedName: "resourceName",
603
+ required: true,
604
+ type: {
605
+ name: "String"
606
+ }
607
+ }
608
+ };
609
+ const body1 = {
610
+ parameterPath: ["options", "body"],
611
+ mapper: EnergyService
612
+ };
613
+ const body2 = {
614
+ parameterPath: ["options", "body"],
615
+ mapper: EnergyResourceUpdate
616
+ };
617
+ const nextLink = {
618
+ parameterPath: "nextLink",
619
+ mapper: {
620
+ serializedName: "nextLink",
621
+ required: true,
622
+ type: {
623
+ name: "String"
624
+ }
625
+ },
626
+ skipEncoding: true
627
+ };
628
+
629
+ /*
630
+ * Copyright (c) Microsoft Corporation.
631
+ * Licensed under the MIT License.
632
+ *
633
+ * Code generated by Microsoft (R) AutoRest Code Generator.
634
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
635
+ */
636
+ /** Class containing Locations operations. */
637
+ class LocationsImpl {
638
+ /**
639
+ * Initialize a new instance of the class Locations class.
640
+ * @param client Reference to the service client
641
+ */
642
+ constructor(client) {
643
+ this.client = client;
644
+ }
645
+ /**
646
+ * Checks the name availability of the resource with requested resource name.
647
+ * @param body NameAvailabilityRequest object.
648
+ * @param options The options parameters.
649
+ */
650
+ checkNameAvailability(body, options) {
651
+ return this.client.sendOperationRequest({ body, options }, checkNameAvailabilityOperationSpec);
652
+ }
653
+ }
654
+ // Operation Specifications
655
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
656
+ const checkNameAvailabilityOperationSpec = {
657
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/checkNameAvailability",
658
+ httpMethod: "POST",
659
+ responses: {
660
+ 200: {
661
+ bodyMapper: CheckNameAvailabilityResponse
662
+ },
663
+ default: {
664
+ bodyMapper: ErrorResponse
665
+ }
666
+ },
667
+ requestBody: body,
668
+ urlParameters: [$host, subscriptionId],
669
+ headerParameters: [contentType, accept],
670
+ mediaType: "json",
671
+ serializer
672
+ };
673
+
674
+ /*
675
+ * Copyright (c) Microsoft Corporation.
676
+ * Licensed under the MIT License.
677
+ *
678
+ * Code generated by Microsoft (R) AutoRest Code Generator.
679
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
680
+ */
681
+ class LroImpl {
682
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
683
+ this.sendOperationFn = sendOperationFn;
684
+ this.args = args;
685
+ this.spec = spec;
686
+ this.requestPath = requestPath;
687
+ this.requestMethod = requestMethod;
688
+ }
689
+ sendInitialRequest() {
690
+ return tslib.__awaiter(this, void 0, void 0, function* () {
691
+ return this.sendOperationFn(this.args, this.spec);
692
+ });
693
+ }
694
+ sendPollRequest(path) {
695
+ return tslib.__awaiter(this, void 0, void 0, function* () {
696
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
697
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
698
+ });
699
+ }
700
+ }
701
+
702
+ /*
703
+ * Copyright (c) Microsoft Corporation.
704
+ * Licensed under the MIT License.
705
+ *
706
+ * Code generated by Microsoft (R) AutoRest Code Generator.
707
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
708
+ */
709
+ /// <reference lib="esnext.asynciterable" />
710
+ /** Class containing EnergyServices operations. */
711
+ class EnergyServicesImpl {
712
+ /**
713
+ * Initialize a new instance of the class EnergyServices class.
714
+ * @param client Reference to the service client
715
+ */
716
+ constructor(client) {
717
+ this.client = client;
718
+ }
719
+ /**
720
+ * Returns list of oep resources..
721
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
722
+ * @param options The options parameters.
723
+ */
724
+ listByResourceGroup(resourceGroupName, options) {
725
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
726
+ return {
727
+ next() {
728
+ return iter.next();
729
+ },
730
+ [Symbol.asyncIterator]() {
731
+ return this;
732
+ },
733
+ byPage: () => {
734
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
735
+ }
736
+ };
737
+ }
738
+ listByResourceGroupPagingPage(resourceGroupName, options) {
739
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
740
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
741
+ yield yield tslib.__await(result.value || []);
742
+ let continuationToken = result.nextLink;
743
+ while (continuationToken) {
744
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
745
+ continuationToken = result.nextLink;
746
+ yield yield tslib.__await(result.value || []);
747
+ }
748
+ });
749
+ }
750
+ listByResourceGroupPagingAll(resourceGroupName, options) {
751
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
752
+ var e_1, _a;
753
+ try {
754
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
755
+ const page = _c.value;
756
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
757
+ }
758
+ }
759
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
760
+ finally {
761
+ try {
762
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
763
+ }
764
+ finally { if (e_1) throw e_1.error; }
765
+ }
766
+ });
767
+ }
768
+ /**
769
+ * Lists a collection of oep resources under the given Azure Subscription ID.
770
+ * @param options The options parameters.
771
+ */
772
+ listBySubscription(options) {
773
+ const iter = this.listBySubscriptionPagingAll(options);
774
+ return {
775
+ next() {
776
+ return iter.next();
777
+ },
778
+ [Symbol.asyncIterator]() {
779
+ return this;
780
+ },
781
+ byPage: () => {
782
+ return this.listBySubscriptionPagingPage(options);
783
+ }
784
+ };
785
+ }
786
+ listBySubscriptionPagingPage(options) {
787
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
788
+ let result = yield tslib.__await(this._listBySubscription(options));
789
+ yield yield tslib.__await(result.value || []);
790
+ let continuationToken = result.nextLink;
791
+ while (continuationToken) {
792
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
793
+ continuationToken = result.nextLink;
794
+ yield yield tslib.__await(result.value || []);
795
+ }
796
+ });
797
+ }
798
+ listBySubscriptionPagingAll(options) {
799
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
800
+ var e_2, _a;
801
+ try {
802
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
803
+ const page = _c.value;
804
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
805
+ }
806
+ }
807
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
808
+ finally {
809
+ try {
810
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
811
+ }
812
+ finally { if (e_2) throw e_2.error; }
813
+ }
814
+ });
815
+ }
816
+ /**
817
+ * Returns list of oep resources..
818
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
819
+ * @param options The options parameters.
820
+ */
821
+ _listByResourceGroup(resourceGroupName, options) {
822
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
823
+ }
824
+ /**
825
+ * Lists a collection of oep resources under the given Azure Subscription ID.
826
+ * @param options The options parameters.
827
+ */
828
+ _listBySubscription(options) {
829
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
830
+ }
831
+ /**
832
+ * Returns oep resource for a given name.
833
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
834
+ * @param resourceName The resource name.
835
+ * @param options The options parameters.
836
+ */
837
+ get(resourceGroupName, resourceName, options) {
838
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, getOperationSpec);
839
+ }
840
+ /**
841
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
842
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
843
+ * @param resourceName The resource name.
844
+ * @param options The options parameters.
845
+ */
846
+ beginCreate(resourceGroupName, resourceName, options) {
847
+ return tslib.__awaiter(this, void 0, void 0, function* () {
848
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
849
+ return this.client.sendOperationRequest(args, spec);
850
+ });
851
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
852
+ var _a;
853
+ let currentRawResponse = undefined;
854
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
855
+ const callback = (rawResponse, flatResponse) => {
856
+ currentRawResponse = rawResponse;
857
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
858
+ };
859
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
860
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
861
+ return {
862
+ flatResponse,
863
+ rawResponse: {
864
+ statusCode: currentRawResponse.status,
865
+ body: currentRawResponse.parsedBody,
866
+ headers: currentRawResponse.headers.toJSON()
867
+ }
868
+ };
869
+ });
870
+ const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, createOperationSpec);
871
+ return new coreLro.LroEngine(lro, {
872
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
873
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
874
+ lroResourceLocationConfig: "azure-async-operation"
875
+ });
876
+ });
877
+ }
878
+ /**
879
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
880
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
881
+ * @param resourceName The resource name.
882
+ * @param options The options parameters.
883
+ */
884
+ beginCreateAndWait(resourceGroupName, resourceName, options) {
885
+ return tslib.__awaiter(this, void 0, void 0, function* () {
886
+ const poller = yield this.beginCreate(resourceGroupName, resourceName, options);
887
+ return poller.pollUntilDone();
888
+ });
889
+ }
890
+ /**
891
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
892
+ * @param resourceName The resource name.
893
+ * @param options The options parameters.
894
+ */
895
+ update(resourceGroupName, resourceName, options) {
896
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, updateOperationSpec);
897
+ }
898
+ /**
899
+ * Deletes oep resource
900
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
901
+ * @param resourceName The resource name.
902
+ * @param options The options parameters.
903
+ */
904
+ beginDelete(resourceGroupName, resourceName, options) {
905
+ return tslib.__awaiter(this, void 0, void 0, function* () {
906
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
907
+ return this.client.sendOperationRequest(args, spec);
908
+ });
909
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
910
+ var _a;
911
+ let currentRawResponse = undefined;
912
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
913
+ const callback = (rawResponse, flatResponse) => {
914
+ currentRawResponse = rawResponse;
915
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
916
+ };
917
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
918
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
919
+ return {
920
+ flatResponse,
921
+ rawResponse: {
922
+ statusCode: currentRawResponse.status,
923
+ body: currentRawResponse.parsedBody,
924
+ headers: currentRawResponse.headers.toJSON()
925
+ }
926
+ };
927
+ });
928
+ const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec);
929
+ return new coreLro.LroEngine(lro, {
930
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
931
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
932
+ });
933
+ });
934
+ }
935
+ /**
936
+ * Deletes oep resource
937
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
938
+ * @param resourceName The resource name.
939
+ * @param options The options parameters.
940
+ */
941
+ beginDeleteAndWait(resourceGroupName, resourceName, options) {
942
+ return tslib.__awaiter(this, void 0, void 0, function* () {
943
+ const poller = yield this.beginDelete(resourceGroupName, resourceName, options);
944
+ return poller.pollUntilDone();
945
+ });
946
+ }
947
+ /**
948
+ * ListByResourceGroupNext
949
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
950
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
951
+ * @param options The options parameters.
952
+ */
953
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
954
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
955
+ }
956
+ /**
957
+ * ListBySubscriptionNext
958
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
959
+ * @param options The options parameters.
960
+ */
961
+ _listBySubscriptionNext(nextLink, options) {
962
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
963
+ }
964
+ }
965
+ // Operation Specifications
966
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
967
+ const listByResourceGroupOperationSpec = {
968
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices",
969
+ httpMethod: "GET",
970
+ responses: {
971
+ 200: {
972
+ bodyMapper: EnergyServiceList
973
+ },
974
+ default: {}
975
+ },
976
+ queryParameters: [apiVersion],
977
+ urlParameters: [
978
+ $host,
979
+ subscriptionId,
980
+ resourceGroupName
981
+ ],
982
+ headerParameters: [accept],
983
+ serializer: serializer$1
984
+ };
985
+ const listBySubscriptionOperationSpec = {
986
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/energyServices",
987
+ httpMethod: "GET",
988
+ responses: {
989
+ 200: {
990
+ bodyMapper: EnergyServiceList
991
+ },
992
+ default: {}
993
+ },
994
+ queryParameters: [apiVersion],
995
+ urlParameters: [$host, subscriptionId],
996
+ headerParameters: [accept],
997
+ serializer: serializer$1
998
+ };
999
+ const getOperationSpec = {
1000
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}",
1001
+ httpMethod: "GET",
1002
+ responses: {
1003
+ 200: {
1004
+ bodyMapper: EnergyService
1005
+ },
1006
+ default: {}
1007
+ },
1008
+ queryParameters: [apiVersion],
1009
+ urlParameters: [
1010
+ $host,
1011
+ subscriptionId,
1012
+ resourceGroupName,
1013
+ resourceName
1014
+ ],
1015
+ headerParameters: [accept],
1016
+ serializer: serializer$1
1017
+ };
1018
+ const createOperationSpec = {
1019
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}",
1020
+ httpMethod: "PUT",
1021
+ responses: {
1022
+ 200: {
1023
+ bodyMapper: EnergyService
1024
+ },
1025
+ 201: {
1026
+ bodyMapper: EnergyService
1027
+ },
1028
+ 202: {
1029
+ bodyMapper: EnergyService
1030
+ },
1031
+ 204: {
1032
+ bodyMapper: EnergyService
1033
+ },
1034
+ default: {
1035
+ bodyMapper: ErrorResponse
1036
+ }
1037
+ },
1038
+ requestBody: body1,
1039
+ urlParameters: [
1040
+ $host,
1041
+ subscriptionId,
1042
+ resourceGroupName,
1043
+ resourceName
1044
+ ],
1045
+ headerParameters: [contentType, accept],
1046
+ mediaType: "json",
1047
+ serializer: serializer$1
1048
+ };
1049
+ const updateOperationSpec = {
1050
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}",
1051
+ httpMethod: "PATCH",
1052
+ responses: {
1053
+ 200: {
1054
+ bodyMapper: EnergyService
1055
+ },
1056
+ default: {}
1057
+ },
1058
+ requestBody: body2,
1059
+ queryParameters: [apiVersion],
1060
+ urlParameters: [
1061
+ $host,
1062
+ subscriptionId,
1063
+ resourceGroupName,
1064
+ resourceName
1065
+ ],
1066
+ headerParameters: [contentType, accept],
1067
+ mediaType: "json",
1068
+ serializer: serializer$1
1069
+ };
1070
+ const deleteOperationSpec = {
1071
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}",
1072
+ httpMethod: "DELETE",
1073
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
1074
+ queryParameters: [apiVersion],
1075
+ urlParameters: [
1076
+ $host,
1077
+ subscriptionId,
1078
+ resourceGroupName,
1079
+ resourceName
1080
+ ],
1081
+ serializer: serializer$1
1082
+ };
1083
+ const listByResourceGroupNextOperationSpec = {
1084
+ path: "{nextLink}",
1085
+ httpMethod: "GET",
1086
+ responses: {
1087
+ 200: {
1088
+ bodyMapper: EnergyServiceList
1089
+ },
1090
+ default: {}
1091
+ },
1092
+ queryParameters: [apiVersion],
1093
+ urlParameters: [
1094
+ $host,
1095
+ subscriptionId,
1096
+ resourceGroupName,
1097
+ nextLink
1098
+ ],
1099
+ headerParameters: [accept],
1100
+ serializer: serializer$1
1101
+ };
1102
+ const listBySubscriptionNextOperationSpec = {
1103
+ path: "{nextLink}",
1104
+ httpMethod: "GET",
1105
+ responses: {
1106
+ 200: {
1107
+ bodyMapper: EnergyServiceList
1108
+ },
1109
+ default: {}
1110
+ },
1111
+ queryParameters: [apiVersion],
1112
+ urlParameters: [
1113
+ $host,
1114
+ subscriptionId,
1115
+ nextLink
1116
+ ],
1117
+ headerParameters: [accept],
1118
+ serializer: serializer$1
1119
+ };
1120
+
1121
+ /*
1122
+ * Copyright (c) Microsoft Corporation.
1123
+ * Licensed under the MIT License.
1124
+ *
1125
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1126
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1127
+ */
1128
+ /** Class containing Operations operations. */
1129
+ class OperationsImpl {
1130
+ /**
1131
+ * Initialize a new instance of the class Operations class.
1132
+ * @param client Reference to the service client
1133
+ */
1134
+ constructor(client) {
1135
+ this.client = client;
1136
+ }
1137
+ /**
1138
+ * Lists the available operations of Microsoft.OpenEnergyPlatform resource provider.
1139
+ * @param options The options parameters.
1140
+ */
1141
+ list(options) {
1142
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1143
+ }
1144
+ }
1145
+ // Operation Specifications
1146
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
1147
+ const listOperationSpec = {
1148
+ path: "/providers/Microsoft.OpenEnergyPlatform/operations",
1149
+ httpMethod: "GET",
1150
+ responses: {
1151
+ 200: {
1152
+ bodyMapper: OperationListResult
1153
+ },
1154
+ default: {
1155
+ bodyMapper: ErrorResponse
1156
+ }
1157
+ },
1158
+ queryParameters: [apiVersion],
1159
+ urlParameters: [$host],
1160
+ headerParameters: [accept],
1161
+ serializer: serializer$2
1162
+ };
1163
+
1164
+ /*
1165
+ * Copyright (c) Microsoft Corporation.
1166
+ * Licensed under the MIT License.
1167
+ *
1168
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1169
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1170
+ */
1171
+ class OpenEnergyPlatformManagementServiceAPIs extends coreClient.ServiceClient {
1172
+ /**
1173
+ * Initializes a new instance of the OpenEnergyPlatformManagementServiceAPIs class.
1174
+ * @param credentials Subscription credentials which uniquely identify client subscription.
1175
+ * @param subscriptionId The ID of the target subscription.
1176
+ * @param options The parameter options
1177
+ */
1178
+ constructor(credentials, subscriptionId, options) {
1179
+ if (credentials === undefined) {
1180
+ throw new Error("'credentials' cannot be null");
1181
+ }
1182
+ if (subscriptionId === undefined) {
1183
+ throw new Error("'subscriptionId' cannot be null");
1184
+ }
1185
+ // Initializing default values for options
1186
+ if (!options) {
1187
+ options = {};
1188
+ }
1189
+ const defaults = {
1190
+ requestContentType: "application/json; charset=utf-8",
1191
+ credential: credentials
1192
+ };
1193
+ const packageDetails = `azsdk-js-arm-oep/1.0.0-beta.1`;
1194
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1195
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1196
+ : `${packageDetails}`;
1197
+ if (!options.credentialScopes) {
1198
+ options.credentialScopes = ["https://management.azure.com/.default"];
1199
+ }
1200
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1201
+ userAgentPrefix
1202
+ }, baseUri: options.endpoint || "https://management.azure.com" });
1203
+ super(optionsWithDefaults);
1204
+ // Parameter assignments
1205
+ this.subscriptionId = subscriptionId;
1206
+ // Assigning values to Constant parameters
1207
+ this.$host = options.$host || "https://management.azure.com";
1208
+ this.apiVersion = options.apiVersion || "2021-06-01-preview";
1209
+ this.locations = new LocationsImpl(this);
1210
+ this.energyServices = new EnergyServicesImpl(this);
1211
+ this.operations = new OperationsImpl(this);
1212
+ }
1213
+ }
1214
+
1215
+ exports.OpenEnergyPlatformManagementServiceAPIs = OpenEnergyPlatformManagementServiceAPIs;
1216
+ //# sourceMappingURL=index.js.map