@azure/arm-devspaces 1.2.1 → 2.0.1-alpha.20220201.1

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