@azure/arm-sqlvirtualmachine 3.1.0 → 5.0.0-beta.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 (159) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +72 -78
  4. package/dist/index.js +2827 -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/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +783 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +103 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +31 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +366 -340
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +18 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +143 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/availabilityGroupListeners.d.ts +89 -0
  29. package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +1 -0
  30. package/dist-esm/src/operations/availabilityGroupListeners.js +338 -0
  31. package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +3 -5
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +32 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +116 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts +117 -0
  41. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -0
  42. package/dist-esm/src/operations/sqlVirtualMachineGroups.js +487 -0
  43. package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -0
  44. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +144 -0
  45. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -0
  46. package/dist-esm/src/operations/sqlVirtualMachines.js +598 -0
  47. package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts +62 -0
  49. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.js +9 -0
  51. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  53. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  55. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  57. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts +79 -0
  61. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +87 -0
  65. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.js.map +1 -0
  68. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +21 -0
  69. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -0
  70. package/dist-esm/src/sqlVirtualMachineManagementClient.js +54 -0
  71. package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -0
  72. package/dist-esm/test/sampleTest.d.ts +2 -0
  73. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  74. package/dist-esm/test/sampleTest.js +40 -0
  75. package/dist-esm/test/sampleTest.js.map +1 -0
  76. package/package.json +65 -31
  77. package/review/arm-sqlvirtualmachine.api.md +678 -0
  78. package/rollup.config.js +181 -30
  79. package/src/index.ts +12 -0
  80. package/src/lroImpl.ts +34 -0
  81. package/src/models/index.ts +641 -985
  82. package/src/models/mappers.ts +380 -351
  83. package/src/models/parameters.ts +106 -41
  84. package/src/operations/availabilityGroupListeners.ts +366 -222
  85. package/src/operations/index.ts +3 -5
  86. package/src/operations/operations.ts +89 -79
  87. package/src/operations/sqlVirtualMachineGroups.ts +517 -344
  88. package/src/operations/sqlVirtualMachines.ts +662 -336
  89. package/src/operationsInterfaces/availabilityGroupListeners.ts +115 -0
  90. package/src/operationsInterfaces/index.ts +12 -0
  91. package/src/operationsInterfaces/operations.ts +22 -0
  92. package/src/operationsInterfaces/sqlVirtualMachineGroups.ts +147 -0
  93. package/src/operationsInterfaces/sqlVirtualMachines.ts +160 -0
  94. package/src/sqlVirtualMachineManagementClient.ts +78 -35
  95. package/tsconfig.json +4 -4
  96. package/types/arm-sqlvirtualmachine.d.ts +1141 -0
  97. package/types/tsdoc-metadata.json +11 -0
  98. package/dist/arm-sqlvirtualmachine.js +0 -2335
  99. package/dist/arm-sqlvirtualmachine.js.map +0 -1
  100. package/dist/arm-sqlvirtualmachine.min.js +0 -1
  101. package/dist/arm-sqlvirtualmachine.min.js.map +0 -1
  102. package/esm/models/availabilityGroupListenersMappers.d.ts +0 -2
  103. package/esm/models/availabilityGroupListenersMappers.d.ts.map +0 -1
  104. package/esm/models/availabilityGroupListenersMappers.js +0 -9
  105. package/esm/models/availabilityGroupListenersMappers.js.map +0 -1
  106. package/esm/models/index.d.ts +0 -1156
  107. package/esm/models/index.d.ts.map +0 -1
  108. package/esm/models/index.js +0 -8
  109. package/esm/models/index.js.map +0 -1
  110. package/esm/models/mappers.d.ts +0 -31
  111. package/esm/models/mappers.d.ts.map +0 -1
  112. package/esm/models/mappers.js.map +0 -1
  113. package/esm/models/operationsMappers.d.ts +0 -2
  114. package/esm/models/operationsMappers.d.ts.map +0 -1
  115. package/esm/models/operationsMappers.js +0 -9
  116. package/esm/models/operationsMappers.js.map +0 -1
  117. package/esm/models/parameters.d.ts +0 -11
  118. package/esm/models/parameters.d.ts.map +0 -1
  119. package/esm/models/parameters.js +0 -103
  120. package/esm/models/parameters.js.map +0 -1
  121. package/esm/models/sqlVirtualMachineGroupsMappers.d.ts +0 -2
  122. package/esm/models/sqlVirtualMachineGroupsMappers.d.ts.map +0 -1
  123. package/esm/models/sqlVirtualMachineGroupsMappers.js +0 -9
  124. package/esm/models/sqlVirtualMachineGroupsMappers.js.map +0 -1
  125. package/esm/models/sqlVirtualMachinesMappers.d.ts +0 -2
  126. package/esm/models/sqlVirtualMachinesMappers.d.ts.map +0 -1
  127. package/esm/models/sqlVirtualMachinesMappers.js +0 -9
  128. package/esm/models/sqlVirtualMachinesMappers.js.map +0 -1
  129. package/esm/operations/availabilityGroupListeners.d.ts +0 -125
  130. package/esm/operations/availabilityGroupListeners.d.ts.map +0 -1
  131. package/esm/operations/availabilityGroupListeners.js +0 -238
  132. package/esm/operations/availabilityGroupListeners.js.map +0 -1
  133. package/esm/operations/index.d.ts.map +0 -1
  134. package/esm/operations/index.js.map +0 -1
  135. package/esm/operations/operations.d.ts +0 -46
  136. package/esm/operations/operations.d.ts.map +0 -1
  137. package/esm/operations/operations.js +0 -77
  138. package/esm/operations/operations.js.map +0 -1
  139. package/esm/operations/sqlVirtualMachineGroups.d.ts +0 -168
  140. package/esm/operations/sqlVirtualMachineGroups.d.ts.map +0 -1
  141. package/esm/operations/sqlVirtualMachineGroups.js +0 -337
  142. package/esm/operations/sqlVirtualMachineGroups.js.map +0 -1
  143. package/esm/operations/sqlVirtualMachines.d.ts +0 -168
  144. package/esm/operations/sqlVirtualMachines.d.ts.map +0 -1
  145. package/esm/operations/sqlVirtualMachines.js +0 -338
  146. package/esm/operations/sqlVirtualMachines.js.map +0 -1
  147. package/esm/sqlVirtualMachineManagementClient.d.ts +0 -21
  148. package/esm/sqlVirtualMachineManagementClient.d.ts.map +0 -1
  149. package/esm/sqlVirtualMachineManagementClient.js +0 -36
  150. package/esm/sqlVirtualMachineManagementClient.js.map +0 -1
  151. package/esm/sqlVirtualMachineManagementClientContext.d.ts +0 -16
  152. package/esm/sqlVirtualMachineManagementClientContext.d.ts.map +0 -1
  153. package/esm/sqlVirtualMachineManagementClientContext.js +0 -56
  154. package/esm/sqlVirtualMachineManagementClientContext.js.map +0 -1
  155. package/src/models/availabilityGroupListenersMappers.ts +0 -32
  156. package/src/models/operationsMappers.ts +0 -14
  157. package/src/models/sqlVirtualMachineGroupsMappers.ts +0 -33
  158. package/src/models/sqlVirtualMachinesMappers.ts +0 -33
  159. package/src/sqlVirtualMachineManagementClientContext.ts +0 -62
package/dist/index.js ADDED
@@ -0,0 +1,2827 @@
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 (KnownOperationOrigin) {
17
+ KnownOperationOrigin["User"] = "user";
18
+ KnownOperationOrigin["System"] = "system";
19
+ })(exports.KnownOperationOrigin || (exports.KnownOperationOrigin = {}));
20
+ (function (KnownSqlVmGroupImageSku) {
21
+ KnownSqlVmGroupImageSku["Developer"] = "Developer";
22
+ KnownSqlVmGroupImageSku["Enterprise"] = "Enterprise";
23
+ })(exports.KnownSqlVmGroupImageSku || (exports.KnownSqlVmGroupImageSku = {}));
24
+ (function (KnownScaleType) {
25
+ KnownScaleType["HA"] = "HA";
26
+ })(exports.KnownScaleType || (exports.KnownScaleType = {}));
27
+ (function (KnownClusterManagerType) {
28
+ KnownClusterManagerType["Wsfc"] = "WSFC";
29
+ })(exports.KnownClusterManagerType || (exports.KnownClusterManagerType = {}));
30
+ (function (KnownClusterConfiguration) {
31
+ KnownClusterConfiguration["Domainful"] = "Domainful";
32
+ })(exports.KnownClusterConfiguration || (exports.KnownClusterConfiguration = {}));
33
+ (function (KnownIdentityType) {
34
+ KnownIdentityType["SystemAssigned"] = "SystemAssigned";
35
+ })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
36
+ (function (KnownSqlServerLicenseType) {
37
+ KnownSqlServerLicenseType["Payg"] = "PAYG";
38
+ KnownSqlServerLicenseType["Ahub"] = "AHUB";
39
+ KnownSqlServerLicenseType["DR"] = "DR";
40
+ })(exports.KnownSqlServerLicenseType || (exports.KnownSqlServerLicenseType = {}));
41
+ (function (KnownSqlManagementMode) {
42
+ KnownSqlManagementMode["Full"] = "Full";
43
+ KnownSqlManagementMode["LightWeight"] = "LightWeight";
44
+ KnownSqlManagementMode["NoAgent"] = "NoAgent";
45
+ })(exports.KnownSqlManagementMode || (exports.KnownSqlManagementMode = {}));
46
+ (function (KnownSqlImageSku) {
47
+ KnownSqlImageSku["Developer"] = "Developer";
48
+ KnownSqlImageSku["Express"] = "Express";
49
+ KnownSqlImageSku["Standard"] = "Standard";
50
+ KnownSqlImageSku["Enterprise"] = "Enterprise";
51
+ KnownSqlImageSku["Web"] = "Web";
52
+ })(exports.KnownSqlImageSku || (exports.KnownSqlImageSku = {}));
53
+ (function (KnownBackupScheduleType) {
54
+ KnownBackupScheduleType["Manual"] = "Manual";
55
+ KnownBackupScheduleType["Automated"] = "Automated";
56
+ })(exports.KnownBackupScheduleType || (exports.KnownBackupScheduleType = {}));
57
+ (function (KnownFullBackupFrequencyType) {
58
+ KnownFullBackupFrequencyType["Daily"] = "Daily";
59
+ KnownFullBackupFrequencyType["Weekly"] = "Weekly";
60
+ })(exports.KnownFullBackupFrequencyType || (exports.KnownFullBackupFrequencyType = {}));
61
+ (function (KnownConnectivityType) {
62
+ KnownConnectivityType["Local"] = "LOCAL";
63
+ KnownConnectivityType["Private"] = "PRIVATE";
64
+ KnownConnectivityType["Public"] = "PUBLIC";
65
+ })(exports.KnownConnectivityType || (exports.KnownConnectivityType = {}));
66
+ (function (KnownSqlWorkloadType) {
67
+ KnownSqlWorkloadType["General"] = "GENERAL";
68
+ KnownSqlWorkloadType["Oltp"] = "OLTP";
69
+ KnownSqlWorkloadType["DW"] = "DW";
70
+ })(exports.KnownSqlWorkloadType || (exports.KnownSqlWorkloadType = {}));
71
+ (function (KnownDiskConfigurationType) {
72
+ KnownDiskConfigurationType["NEW"] = "NEW";
73
+ KnownDiskConfigurationType["Extend"] = "EXTEND";
74
+ KnownDiskConfigurationType["ADD"] = "ADD";
75
+ })(exports.KnownDiskConfigurationType || (exports.KnownDiskConfigurationType = {}));
76
+ (function (KnownStorageWorkloadType) {
77
+ KnownStorageWorkloadType["General"] = "GENERAL";
78
+ KnownStorageWorkloadType["Oltp"] = "OLTP";
79
+ KnownStorageWorkloadType["DW"] = "DW";
80
+ })(exports.KnownStorageWorkloadType || (exports.KnownStorageWorkloadType = {}));
81
+
82
+ /*
83
+ * Copyright (c) Microsoft Corporation.
84
+ * Licensed under the MIT License.
85
+ *
86
+ * Code generated by Microsoft (R) AutoRest Code Generator.
87
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
+ */
89
+ const LoadBalancerConfiguration = {
90
+ type: {
91
+ name: "Composite",
92
+ className: "LoadBalancerConfiguration",
93
+ modelProperties: {
94
+ privateIpAddress: {
95
+ serializedName: "privateIpAddress",
96
+ type: {
97
+ name: "Composite",
98
+ className: "PrivateIPAddress"
99
+ }
100
+ },
101
+ publicIpAddressResourceId: {
102
+ serializedName: "publicIpAddressResourceId",
103
+ type: {
104
+ name: "String"
105
+ }
106
+ },
107
+ loadBalancerResourceId: {
108
+ serializedName: "loadBalancerResourceId",
109
+ type: {
110
+ name: "String"
111
+ }
112
+ },
113
+ probePort: {
114
+ serializedName: "probePort",
115
+ type: {
116
+ name: "Number"
117
+ }
118
+ },
119
+ sqlVirtualMachineInstances: {
120
+ serializedName: "sqlVirtualMachineInstances",
121
+ type: {
122
+ name: "Sequence",
123
+ element: {
124
+ type: {
125
+ name: "String"
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ };
133
+ const PrivateIPAddress = {
134
+ type: {
135
+ name: "Composite",
136
+ className: "PrivateIPAddress",
137
+ modelProperties: {
138
+ ipAddress: {
139
+ serializedName: "ipAddress",
140
+ type: {
141
+ name: "String"
142
+ }
143
+ },
144
+ subnetResourceId: {
145
+ serializedName: "subnetResourceId",
146
+ type: {
147
+ name: "String"
148
+ }
149
+ }
150
+ }
151
+ }
152
+ };
153
+ const Resource = {
154
+ type: {
155
+ name: "Composite",
156
+ className: "Resource",
157
+ modelProperties: {
158
+ id: {
159
+ serializedName: "id",
160
+ readOnly: true,
161
+ type: {
162
+ name: "String"
163
+ }
164
+ },
165
+ name: {
166
+ serializedName: "name",
167
+ readOnly: true,
168
+ type: {
169
+ name: "String"
170
+ }
171
+ },
172
+ type: {
173
+ serializedName: "type",
174
+ readOnly: true,
175
+ type: {
176
+ name: "String"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ };
182
+ const AvailabilityGroupListenerListResult = {
183
+ type: {
184
+ name: "Composite",
185
+ className: "AvailabilityGroupListenerListResult",
186
+ modelProperties: {
187
+ value: {
188
+ serializedName: "value",
189
+ readOnly: true,
190
+ type: {
191
+ name: "Sequence",
192
+ element: {
193
+ type: {
194
+ name: "Composite",
195
+ className: "AvailabilityGroupListener"
196
+ }
197
+ }
198
+ }
199
+ },
200
+ nextLink: {
201
+ serializedName: "nextLink",
202
+ readOnly: true,
203
+ type: {
204
+ name: "String"
205
+ }
206
+ }
207
+ }
208
+ }
209
+ };
210
+ const OperationListResult = {
211
+ type: {
212
+ name: "Composite",
213
+ className: "OperationListResult",
214
+ modelProperties: {
215
+ value: {
216
+ serializedName: "value",
217
+ readOnly: true,
218
+ type: {
219
+ name: "Sequence",
220
+ element: {
221
+ type: {
222
+ name: "Composite",
223
+ className: "Operation"
224
+ }
225
+ }
226
+ }
227
+ },
228
+ nextLink: {
229
+ serializedName: "nextLink",
230
+ readOnly: true,
231
+ type: {
232
+ name: "String"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ };
238
+ const Operation = {
239
+ type: {
240
+ name: "Composite",
241
+ className: "Operation",
242
+ modelProperties: {
243
+ name: {
244
+ serializedName: "name",
245
+ readOnly: true,
246
+ type: {
247
+ name: "String"
248
+ }
249
+ },
250
+ display: {
251
+ serializedName: "display",
252
+ type: {
253
+ name: "Composite",
254
+ className: "OperationDisplay"
255
+ }
256
+ },
257
+ origin: {
258
+ serializedName: "origin",
259
+ readOnly: true,
260
+ type: {
261
+ name: "String"
262
+ }
263
+ },
264
+ properties: {
265
+ serializedName: "properties",
266
+ readOnly: true,
267
+ type: {
268
+ name: "Dictionary",
269
+ value: {
270
+ type: { name: "Dictionary", value: { type: { name: "any" } } }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ };
277
+ const OperationDisplay = {
278
+ type: {
279
+ name: "Composite",
280
+ className: "OperationDisplay",
281
+ modelProperties: {
282
+ provider: {
283
+ serializedName: "provider",
284
+ readOnly: true,
285
+ type: {
286
+ name: "String"
287
+ }
288
+ },
289
+ resource: {
290
+ serializedName: "resource",
291
+ readOnly: true,
292
+ type: {
293
+ name: "String"
294
+ }
295
+ },
296
+ operation: {
297
+ serializedName: "operation",
298
+ readOnly: true,
299
+ type: {
300
+ name: "String"
301
+ }
302
+ },
303
+ description: {
304
+ serializedName: "description",
305
+ readOnly: true,
306
+ type: {
307
+ name: "String"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ };
313
+ const WsfcDomainProfile = {
314
+ type: {
315
+ name: "Composite",
316
+ className: "WsfcDomainProfile",
317
+ modelProperties: {
318
+ domainFqdn: {
319
+ serializedName: "domainFqdn",
320
+ type: {
321
+ name: "String"
322
+ }
323
+ },
324
+ ouPath: {
325
+ serializedName: "ouPath",
326
+ type: {
327
+ name: "String"
328
+ }
329
+ },
330
+ clusterBootstrapAccount: {
331
+ serializedName: "clusterBootstrapAccount",
332
+ type: {
333
+ name: "String"
334
+ }
335
+ },
336
+ clusterOperatorAccount: {
337
+ serializedName: "clusterOperatorAccount",
338
+ type: {
339
+ name: "String"
340
+ }
341
+ },
342
+ sqlServiceAccount: {
343
+ serializedName: "sqlServiceAccount",
344
+ type: {
345
+ name: "String"
346
+ }
347
+ },
348
+ fileShareWitnessPath: {
349
+ serializedName: "fileShareWitnessPath",
350
+ type: {
351
+ name: "String"
352
+ }
353
+ },
354
+ storageAccountUrl: {
355
+ serializedName: "storageAccountUrl",
356
+ type: {
357
+ name: "String"
358
+ }
359
+ },
360
+ storageAccountPrimaryKey: {
361
+ serializedName: "storageAccountPrimaryKey",
362
+ type: {
363
+ name: "String"
364
+ }
365
+ }
366
+ }
367
+ }
368
+ };
369
+ const SqlVirtualMachineGroupUpdate = {
370
+ type: {
371
+ name: "Composite",
372
+ className: "SqlVirtualMachineGroupUpdate",
373
+ modelProperties: {
374
+ tags: {
375
+ serializedName: "tags",
376
+ type: {
377
+ name: "Dictionary",
378
+ value: { type: { name: "String" } }
379
+ }
380
+ }
381
+ }
382
+ }
383
+ };
384
+ const SqlVirtualMachineGroupListResult = {
385
+ type: {
386
+ name: "Composite",
387
+ className: "SqlVirtualMachineGroupListResult",
388
+ modelProperties: {
389
+ value: {
390
+ serializedName: "value",
391
+ readOnly: true,
392
+ type: {
393
+ name: "Sequence",
394
+ element: {
395
+ type: {
396
+ name: "Composite",
397
+ className: "SqlVirtualMachineGroup"
398
+ }
399
+ }
400
+ }
401
+ },
402
+ nextLink: {
403
+ serializedName: "nextLink",
404
+ readOnly: true,
405
+ type: {
406
+ name: "String"
407
+ }
408
+ }
409
+ }
410
+ }
411
+ };
412
+ const SqlVirtualMachineListResult = {
413
+ type: {
414
+ name: "Composite",
415
+ className: "SqlVirtualMachineListResult",
416
+ modelProperties: {
417
+ value: {
418
+ serializedName: "value",
419
+ readOnly: true,
420
+ type: {
421
+ name: "Sequence",
422
+ element: {
423
+ type: {
424
+ name: "Composite",
425
+ className: "SqlVirtualMachine"
426
+ }
427
+ }
428
+ }
429
+ },
430
+ nextLink: {
431
+ serializedName: "nextLink",
432
+ readOnly: true,
433
+ type: {
434
+ name: "String"
435
+ }
436
+ }
437
+ }
438
+ }
439
+ };
440
+ const ResourceIdentity = {
441
+ type: {
442
+ name: "Composite",
443
+ className: "ResourceIdentity",
444
+ modelProperties: {
445
+ principalId: {
446
+ serializedName: "principalId",
447
+ readOnly: true,
448
+ type: {
449
+ name: "Uuid"
450
+ }
451
+ },
452
+ type: {
453
+ serializedName: "type",
454
+ type: {
455
+ name: "String"
456
+ }
457
+ },
458
+ tenantId: {
459
+ serializedName: "tenantId",
460
+ readOnly: true,
461
+ type: {
462
+ name: "Uuid"
463
+ }
464
+ }
465
+ }
466
+ }
467
+ };
468
+ const WsfcDomainCredentials = {
469
+ type: {
470
+ name: "Composite",
471
+ className: "WsfcDomainCredentials",
472
+ modelProperties: {
473
+ clusterBootstrapAccountPassword: {
474
+ serializedName: "clusterBootstrapAccountPassword",
475
+ type: {
476
+ name: "String"
477
+ }
478
+ },
479
+ clusterOperatorAccountPassword: {
480
+ serializedName: "clusterOperatorAccountPassword",
481
+ type: {
482
+ name: "String"
483
+ }
484
+ },
485
+ sqlServiceAccountPassword: {
486
+ serializedName: "sqlServiceAccountPassword",
487
+ type: {
488
+ name: "String"
489
+ }
490
+ }
491
+ }
492
+ }
493
+ };
494
+ const AutoPatchingSettings = {
495
+ type: {
496
+ name: "Composite",
497
+ className: "AutoPatchingSettings",
498
+ modelProperties: {
499
+ enable: {
500
+ serializedName: "enable",
501
+ type: {
502
+ name: "Boolean"
503
+ }
504
+ },
505
+ dayOfWeek: {
506
+ serializedName: "dayOfWeek",
507
+ type: {
508
+ name: "Enum",
509
+ allowedValues: [
510
+ "Monday",
511
+ "Tuesday",
512
+ "Wednesday",
513
+ "Thursday",
514
+ "Friday",
515
+ "Saturday",
516
+ "Sunday"
517
+ ]
518
+ }
519
+ },
520
+ maintenanceWindowStartingHour: {
521
+ serializedName: "maintenanceWindowStartingHour",
522
+ type: {
523
+ name: "Number"
524
+ }
525
+ },
526
+ maintenanceWindowDuration: {
527
+ serializedName: "maintenanceWindowDuration",
528
+ type: {
529
+ name: "Number"
530
+ }
531
+ }
532
+ }
533
+ }
534
+ };
535
+ const AutoBackupSettings = {
536
+ type: {
537
+ name: "Composite",
538
+ className: "AutoBackupSettings",
539
+ modelProperties: {
540
+ enable: {
541
+ serializedName: "enable",
542
+ type: {
543
+ name: "Boolean"
544
+ }
545
+ },
546
+ enableEncryption: {
547
+ serializedName: "enableEncryption",
548
+ type: {
549
+ name: "Boolean"
550
+ }
551
+ },
552
+ retentionPeriod: {
553
+ serializedName: "retentionPeriod",
554
+ type: {
555
+ name: "Number"
556
+ }
557
+ },
558
+ storageAccountUrl: {
559
+ serializedName: "storageAccountUrl",
560
+ type: {
561
+ name: "String"
562
+ }
563
+ },
564
+ storageAccessKey: {
565
+ serializedName: "storageAccessKey",
566
+ type: {
567
+ name: "String"
568
+ }
569
+ },
570
+ password: {
571
+ serializedName: "password",
572
+ type: {
573
+ name: "String"
574
+ }
575
+ },
576
+ backupSystemDbs: {
577
+ serializedName: "backupSystemDbs",
578
+ type: {
579
+ name: "Boolean"
580
+ }
581
+ },
582
+ backupScheduleType: {
583
+ serializedName: "backupScheduleType",
584
+ type: {
585
+ name: "String"
586
+ }
587
+ },
588
+ fullBackupFrequency: {
589
+ serializedName: "fullBackupFrequency",
590
+ type: {
591
+ name: "String"
592
+ }
593
+ },
594
+ fullBackupStartTime: {
595
+ serializedName: "fullBackupStartTime",
596
+ type: {
597
+ name: "Number"
598
+ }
599
+ },
600
+ fullBackupWindowHours: {
601
+ serializedName: "fullBackupWindowHours",
602
+ type: {
603
+ name: "Number"
604
+ }
605
+ },
606
+ logBackupFrequency: {
607
+ serializedName: "logBackupFrequency",
608
+ type: {
609
+ name: "Number"
610
+ }
611
+ }
612
+ }
613
+ }
614
+ };
615
+ const KeyVaultCredentialSettings = {
616
+ type: {
617
+ name: "Composite",
618
+ className: "KeyVaultCredentialSettings",
619
+ modelProperties: {
620
+ enable: {
621
+ serializedName: "enable",
622
+ type: {
623
+ name: "Boolean"
624
+ }
625
+ },
626
+ credentialName: {
627
+ serializedName: "credentialName",
628
+ type: {
629
+ name: "String"
630
+ }
631
+ },
632
+ azureKeyVaultUrl: {
633
+ serializedName: "azureKeyVaultUrl",
634
+ type: {
635
+ name: "String"
636
+ }
637
+ },
638
+ servicePrincipalName: {
639
+ serializedName: "servicePrincipalName",
640
+ type: {
641
+ name: "String"
642
+ }
643
+ },
644
+ servicePrincipalSecret: {
645
+ serializedName: "servicePrincipalSecret",
646
+ type: {
647
+ name: "String"
648
+ }
649
+ }
650
+ }
651
+ }
652
+ };
653
+ const ServerConfigurationsManagementSettings = {
654
+ type: {
655
+ name: "Composite",
656
+ className: "ServerConfigurationsManagementSettings",
657
+ modelProperties: {
658
+ sqlConnectivityUpdateSettings: {
659
+ serializedName: "sqlConnectivityUpdateSettings",
660
+ type: {
661
+ name: "Composite",
662
+ className: "SqlConnectivityUpdateSettings"
663
+ }
664
+ },
665
+ sqlWorkloadTypeUpdateSettings: {
666
+ serializedName: "sqlWorkloadTypeUpdateSettings",
667
+ type: {
668
+ name: "Composite",
669
+ className: "SqlWorkloadTypeUpdateSettings"
670
+ }
671
+ },
672
+ sqlStorageUpdateSettings: {
673
+ serializedName: "sqlStorageUpdateSettings",
674
+ type: {
675
+ name: "Composite",
676
+ className: "SqlStorageUpdateSettings"
677
+ }
678
+ },
679
+ additionalFeaturesServerConfigurations: {
680
+ serializedName: "additionalFeaturesServerConfigurations",
681
+ type: {
682
+ name: "Composite",
683
+ className: "AdditionalFeaturesServerConfigurations"
684
+ }
685
+ }
686
+ }
687
+ }
688
+ };
689
+ const SqlConnectivityUpdateSettings = {
690
+ type: {
691
+ name: "Composite",
692
+ className: "SqlConnectivityUpdateSettings",
693
+ modelProperties: {
694
+ connectivityType: {
695
+ serializedName: "connectivityType",
696
+ type: {
697
+ name: "String"
698
+ }
699
+ },
700
+ port: {
701
+ serializedName: "port",
702
+ type: {
703
+ name: "Number"
704
+ }
705
+ },
706
+ sqlAuthUpdateUserName: {
707
+ serializedName: "sqlAuthUpdateUserName",
708
+ type: {
709
+ name: "String"
710
+ }
711
+ },
712
+ sqlAuthUpdatePassword: {
713
+ serializedName: "sqlAuthUpdatePassword",
714
+ type: {
715
+ name: "String"
716
+ }
717
+ }
718
+ }
719
+ }
720
+ };
721
+ const SqlWorkloadTypeUpdateSettings = {
722
+ type: {
723
+ name: "Composite",
724
+ className: "SqlWorkloadTypeUpdateSettings",
725
+ modelProperties: {
726
+ sqlWorkloadType: {
727
+ serializedName: "sqlWorkloadType",
728
+ type: {
729
+ name: "String"
730
+ }
731
+ }
732
+ }
733
+ }
734
+ };
735
+ const SqlStorageUpdateSettings = {
736
+ type: {
737
+ name: "Composite",
738
+ className: "SqlStorageUpdateSettings",
739
+ modelProperties: {
740
+ diskCount: {
741
+ serializedName: "diskCount",
742
+ type: {
743
+ name: "Number"
744
+ }
745
+ },
746
+ startingDeviceId: {
747
+ serializedName: "startingDeviceId",
748
+ type: {
749
+ name: "Number"
750
+ }
751
+ },
752
+ diskConfigurationType: {
753
+ serializedName: "diskConfigurationType",
754
+ type: {
755
+ name: "String"
756
+ }
757
+ }
758
+ }
759
+ }
760
+ };
761
+ const AdditionalFeaturesServerConfigurations = {
762
+ type: {
763
+ name: "Composite",
764
+ className: "AdditionalFeaturesServerConfigurations",
765
+ modelProperties: {
766
+ isRServicesEnabled: {
767
+ serializedName: "isRServicesEnabled",
768
+ type: {
769
+ name: "Boolean"
770
+ }
771
+ }
772
+ }
773
+ }
774
+ };
775
+ const StorageConfigurationSettings = {
776
+ type: {
777
+ name: "Composite",
778
+ className: "StorageConfigurationSettings",
779
+ modelProperties: {
780
+ sqlDataSettings: {
781
+ serializedName: "sqlDataSettings",
782
+ type: {
783
+ name: "Composite",
784
+ className: "SQLStorageSettings"
785
+ }
786
+ },
787
+ sqlLogSettings: {
788
+ serializedName: "sqlLogSettings",
789
+ type: {
790
+ name: "Composite",
791
+ className: "SQLStorageSettings"
792
+ }
793
+ },
794
+ sqlTempDbSettings: {
795
+ serializedName: "sqlTempDbSettings",
796
+ type: {
797
+ name: "Composite",
798
+ className: "SQLStorageSettings"
799
+ }
800
+ },
801
+ diskConfigurationType: {
802
+ serializedName: "diskConfigurationType",
803
+ type: {
804
+ name: "String"
805
+ }
806
+ },
807
+ storageWorkloadType: {
808
+ serializedName: "storageWorkloadType",
809
+ type: {
810
+ name: "String"
811
+ }
812
+ }
813
+ }
814
+ }
815
+ };
816
+ const SQLStorageSettings = {
817
+ type: {
818
+ name: "Composite",
819
+ className: "SQLStorageSettings",
820
+ modelProperties: {
821
+ luns: {
822
+ serializedName: "luns",
823
+ type: {
824
+ name: "Sequence",
825
+ element: {
826
+ type: {
827
+ name: "Number"
828
+ }
829
+ }
830
+ }
831
+ },
832
+ defaultFilePath: {
833
+ serializedName: "defaultFilePath",
834
+ type: {
835
+ name: "String"
836
+ }
837
+ }
838
+ }
839
+ }
840
+ };
841
+ const SqlVirtualMachineUpdate = {
842
+ type: {
843
+ name: "Composite",
844
+ className: "SqlVirtualMachineUpdate",
845
+ modelProperties: {
846
+ tags: {
847
+ serializedName: "tags",
848
+ type: {
849
+ name: "Dictionary",
850
+ value: { type: { name: "String" } }
851
+ }
852
+ }
853
+ }
854
+ }
855
+ };
856
+ const ProxyResource = {
857
+ type: {
858
+ name: "Composite",
859
+ className: "ProxyResource",
860
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
861
+ }
862
+ };
863
+ const TrackedResource = {
864
+ type: {
865
+ name: "Composite",
866
+ className: "TrackedResource",
867
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { location: {
868
+ serializedName: "location",
869
+ required: true,
870
+ type: {
871
+ name: "String"
872
+ }
873
+ }, tags: {
874
+ serializedName: "tags",
875
+ type: {
876
+ name: "Dictionary",
877
+ value: { type: { name: "String" } }
878
+ }
879
+ } })
880
+ }
881
+ };
882
+ const AvailabilityGroupListener = {
883
+ type: {
884
+ name: "Composite",
885
+ className: "AvailabilityGroupListener",
886
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { provisioningState: {
887
+ serializedName: "properties.provisioningState",
888
+ readOnly: true,
889
+ type: {
890
+ name: "String"
891
+ }
892
+ }, availabilityGroupName: {
893
+ serializedName: "properties.availabilityGroupName",
894
+ type: {
895
+ name: "String"
896
+ }
897
+ }, loadBalancerConfigurations: {
898
+ serializedName: "properties.loadBalancerConfigurations",
899
+ type: {
900
+ name: "Sequence",
901
+ element: {
902
+ type: {
903
+ name: "Composite",
904
+ className: "LoadBalancerConfiguration"
905
+ }
906
+ }
907
+ }
908
+ }, createDefaultAvailabilityGroupIfNotExist: {
909
+ serializedName: "properties.createDefaultAvailabilityGroupIfNotExist",
910
+ type: {
911
+ name: "Boolean"
912
+ }
913
+ }, port: {
914
+ serializedName: "properties.port",
915
+ type: {
916
+ name: "Number"
917
+ }
918
+ } })
919
+ }
920
+ };
921
+ const SqlVirtualMachineGroup = {
922
+ type: {
923
+ name: "Composite",
924
+ className: "SqlVirtualMachineGroup",
925
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
926
+ serializedName: "properties.provisioningState",
927
+ readOnly: true,
928
+ type: {
929
+ name: "String"
930
+ }
931
+ }, sqlImageOffer: {
932
+ serializedName: "properties.sqlImageOffer",
933
+ type: {
934
+ name: "String"
935
+ }
936
+ }, sqlImageSku: {
937
+ serializedName: "properties.sqlImageSku",
938
+ type: {
939
+ name: "String"
940
+ }
941
+ }, scaleType: {
942
+ serializedName: "properties.scaleType",
943
+ readOnly: true,
944
+ type: {
945
+ name: "String"
946
+ }
947
+ }, clusterManagerType: {
948
+ serializedName: "properties.clusterManagerType",
949
+ readOnly: true,
950
+ type: {
951
+ name: "String"
952
+ }
953
+ }, clusterConfiguration: {
954
+ serializedName: "properties.clusterConfiguration",
955
+ readOnly: true,
956
+ type: {
957
+ name: "String"
958
+ }
959
+ }, wsfcDomainProfile: {
960
+ serializedName: "properties.wsfcDomainProfile",
961
+ type: {
962
+ name: "Composite",
963
+ className: "WsfcDomainProfile"
964
+ }
965
+ } })
966
+ }
967
+ };
968
+ const SqlVirtualMachine = {
969
+ type: {
970
+ name: "Composite",
971
+ className: "SqlVirtualMachine",
972
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { identity: {
973
+ serializedName: "identity",
974
+ type: {
975
+ name: "Composite",
976
+ className: "ResourceIdentity"
977
+ }
978
+ }, virtualMachineResourceId: {
979
+ serializedName: "properties.virtualMachineResourceId",
980
+ type: {
981
+ name: "String"
982
+ }
983
+ }, provisioningState: {
984
+ serializedName: "properties.provisioningState",
985
+ readOnly: true,
986
+ type: {
987
+ name: "String"
988
+ }
989
+ }, sqlImageOffer: {
990
+ serializedName: "properties.sqlImageOffer",
991
+ type: {
992
+ name: "String"
993
+ }
994
+ }, sqlServerLicenseType: {
995
+ serializedName: "properties.sqlServerLicenseType",
996
+ type: {
997
+ name: "String"
998
+ }
999
+ }, sqlManagement: {
1000
+ serializedName: "properties.sqlManagement",
1001
+ type: {
1002
+ name: "String"
1003
+ }
1004
+ }, sqlImageSku: {
1005
+ serializedName: "properties.sqlImageSku",
1006
+ type: {
1007
+ name: "String"
1008
+ }
1009
+ }, sqlVirtualMachineGroupResourceId: {
1010
+ serializedName: "properties.sqlVirtualMachineGroupResourceId",
1011
+ type: {
1012
+ name: "String"
1013
+ }
1014
+ }, wsfcDomainCredentials: {
1015
+ serializedName: "properties.wsfcDomainCredentials",
1016
+ type: {
1017
+ name: "Composite",
1018
+ className: "WsfcDomainCredentials"
1019
+ }
1020
+ }, autoPatchingSettings: {
1021
+ serializedName: "properties.autoPatchingSettings",
1022
+ type: {
1023
+ name: "Composite",
1024
+ className: "AutoPatchingSettings"
1025
+ }
1026
+ }, autoBackupSettings: {
1027
+ serializedName: "properties.autoBackupSettings",
1028
+ type: {
1029
+ name: "Composite",
1030
+ className: "AutoBackupSettings"
1031
+ }
1032
+ }, keyVaultCredentialSettings: {
1033
+ serializedName: "properties.keyVaultCredentialSettings",
1034
+ type: {
1035
+ name: "Composite",
1036
+ className: "KeyVaultCredentialSettings"
1037
+ }
1038
+ }, serverConfigurationsManagementSettings: {
1039
+ serializedName: "properties.serverConfigurationsManagementSettings",
1040
+ type: {
1041
+ name: "Composite",
1042
+ className: "ServerConfigurationsManagementSettings"
1043
+ }
1044
+ }, storageConfigurationSettings: {
1045
+ serializedName: "properties.storageConfigurationSettings",
1046
+ type: {
1047
+ name: "Composite",
1048
+ className: "StorageConfigurationSettings"
1049
+ }
1050
+ } })
1051
+ }
1052
+ };
1053
+
1054
+ var Mappers = /*#__PURE__*/Object.freeze({
1055
+ __proto__: null,
1056
+ LoadBalancerConfiguration: LoadBalancerConfiguration,
1057
+ PrivateIPAddress: PrivateIPAddress,
1058
+ Resource: Resource,
1059
+ AvailabilityGroupListenerListResult: AvailabilityGroupListenerListResult,
1060
+ OperationListResult: OperationListResult,
1061
+ Operation: Operation,
1062
+ OperationDisplay: OperationDisplay,
1063
+ WsfcDomainProfile: WsfcDomainProfile,
1064
+ SqlVirtualMachineGroupUpdate: SqlVirtualMachineGroupUpdate,
1065
+ SqlVirtualMachineGroupListResult: SqlVirtualMachineGroupListResult,
1066
+ SqlVirtualMachineListResult: SqlVirtualMachineListResult,
1067
+ ResourceIdentity: ResourceIdentity,
1068
+ WsfcDomainCredentials: WsfcDomainCredentials,
1069
+ AutoPatchingSettings: AutoPatchingSettings,
1070
+ AutoBackupSettings: AutoBackupSettings,
1071
+ KeyVaultCredentialSettings: KeyVaultCredentialSettings,
1072
+ ServerConfigurationsManagementSettings: ServerConfigurationsManagementSettings,
1073
+ SqlConnectivityUpdateSettings: SqlConnectivityUpdateSettings,
1074
+ SqlWorkloadTypeUpdateSettings: SqlWorkloadTypeUpdateSettings,
1075
+ SqlStorageUpdateSettings: SqlStorageUpdateSettings,
1076
+ AdditionalFeaturesServerConfigurations: AdditionalFeaturesServerConfigurations,
1077
+ StorageConfigurationSettings: StorageConfigurationSettings,
1078
+ SQLStorageSettings: SQLStorageSettings,
1079
+ SqlVirtualMachineUpdate: SqlVirtualMachineUpdate,
1080
+ ProxyResource: ProxyResource,
1081
+ TrackedResource: TrackedResource,
1082
+ AvailabilityGroupListener: AvailabilityGroupListener,
1083
+ SqlVirtualMachineGroup: SqlVirtualMachineGroup,
1084
+ SqlVirtualMachine: SqlVirtualMachine
1085
+ });
1086
+
1087
+ /*
1088
+ * Copyright (c) Microsoft Corporation.
1089
+ * Licensed under the MIT License.
1090
+ *
1091
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1092
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1093
+ */
1094
+ const accept = {
1095
+ parameterPath: "accept",
1096
+ mapper: {
1097
+ defaultValue: "application/json",
1098
+ isConstant: true,
1099
+ serializedName: "Accept",
1100
+ type: {
1101
+ name: "String"
1102
+ }
1103
+ }
1104
+ };
1105
+ const $host = {
1106
+ parameterPath: "$host",
1107
+ mapper: {
1108
+ serializedName: "$host",
1109
+ required: true,
1110
+ type: {
1111
+ name: "String"
1112
+ }
1113
+ },
1114
+ skipEncoding: true
1115
+ };
1116
+ const resourceGroupName = {
1117
+ parameterPath: "resourceGroupName",
1118
+ mapper: {
1119
+ serializedName: "resourceGroupName",
1120
+ required: true,
1121
+ type: {
1122
+ name: "String"
1123
+ }
1124
+ }
1125
+ };
1126
+ const sqlVirtualMachineGroupName = {
1127
+ parameterPath: "sqlVirtualMachineGroupName",
1128
+ mapper: {
1129
+ serializedName: "sqlVirtualMachineGroupName",
1130
+ required: true,
1131
+ type: {
1132
+ name: "String"
1133
+ }
1134
+ }
1135
+ };
1136
+ const availabilityGroupListenerName = {
1137
+ parameterPath: "availabilityGroupListenerName",
1138
+ mapper: {
1139
+ serializedName: "availabilityGroupListenerName",
1140
+ required: true,
1141
+ type: {
1142
+ name: "String"
1143
+ }
1144
+ }
1145
+ };
1146
+ const subscriptionId = {
1147
+ parameterPath: "subscriptionId",
1148
+ mapper: {
1149
+ serializedName: "subscriptionId",
1150
+ required: true,
1151
+ type: {
1152
+ name: "String"
1153
+ }
1154
+ }
1155
+ };
1156
+ const apiVersion = {
1157
+ parameterPath: "apiVersion",
1158
+ mapper: {
1159
+ defaultValue: "2017-03-01-preview",
1160
+ isConstant: true,
1161
+ serializedName: "api-version",
1162
+ type: {
1163
+ name: "String"
1164
+ }
1165
+ }
1166
+ };
1167
+ const contentType = {
1168
+ parameterPath: ["options", "contentType"],
1169
+ mapper: {
1170
+ defaultValue: "application/json",
1171
+ isConstant: true,
1172
+ serializedName: "Content-Type",
1173
+ type: {
1174
+ name: "String"
1175
+ }
1176
+ }
1177
+ };
1178
+ const parameters = {
1179
+ parameterPath: "parameters",
1180
+ mapper: AvailabilityGroupListener
1181
+ };
1182
+ const nextLink = {
1183
+ parameterPath: "nextLink",
1184
+ mapper: {
1185
+ serializedName: "nextLink",
1186
+ required: true,
1187
+ type: {
1188
+ name: "String"
1189
+ }
1190
+ },
1191
+ skipEncoding: true
1192
+ };
1193
+ const parameters1 = {
1194
+ parameterPath: "parameters",
1195
+ mapper: SqlVirtualMachineGroup
1196
+ };
1197
+ const parameters2 = {
1198
+ parameterPath: "parameters",
1199
+ mapper: SqlVirtualMachineGroupUpdate
1200
+ };
1201
+ const sqlVirtualMachineName = {
1202
+ parameterPath: "sqlVirtualMachineName",
1203
+ mapper: {
1204
+ serializedName: "sqlVirtualMachineName",
1205
+ required: true,
1206
+ type: {
1207
+ name: "String"
1208
+ }
1209
+ }
1210
+ };
1211
+ const expand = {
1212
+ parameterPath: ["options", "expand"],
1213
+ mapper: {
1214
+ serializedName: "$expand",
1215
+ type: {
1216
+ name: "String"
1217
+ }
1218
+ }
1219
+ };
1220
+ const parameters3 = {
1221
+ parameterPath: "parameters",
1222
+ mapper: SqlVirtualMachine
1223
+ };
1224
+ const parameters4 = {
1225
+ parameterPath: "parameters",
1226
+ mapper: SqlVirtualMachineUpdate
1227
+ };
1228
+
1229
+ /*
1230
+ * Copyright (c) Microsoft Corporation.
1231
+ * Licensed under the MIT License.
1232
+ *
1233
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1234
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1235
+ */
1236
+ class LroImpl {
1237
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1238
+ this.sendOperationFn = sendOperationFn;
1239
+ this.args = args;
1240
+ this.spec = spec;
1241
+ this.requestPath = requestPath;
1242
+ this.requestMethod = requestMethod;
1243
+ }
1244
+ sendInitialRequest() {
1245
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1246
+ return this.sendOperationFn(this.args, this.spec);
1247
+ });
1248
+ }
1249
+ sendPollRequest(path) {
1250
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1251
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1252
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1253
+ });
1254
+ }
1255
+ }
1256
+
1257
+ /*
1258
+ * Copyright (c) Microsoft Corporation.
1259
+ * Licensed under the MIT License.
1260
+ *
1261
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1262
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1263
+ */
1264
+ /// <reference lib="esnext.asynciterable" />
1265
+ /** Class containing AvailabilityGroupListeners operations. */
1266
+ class AvailabilityGroupListenersImpl {
1267
+ /**
1268
+ * Initialize a new instance of the class AvailabilityGroupListeners class.
1269
+ * @param client Reference to the service client
1270
+ */
1271
+ constructor(client) {
1272
+ this.client = client;
1273
+ }
1274
+ /**
1275
+ * Lists all availability group listeners in a SQL virtual machine group.
1276
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1277
+ * value from the Azure Resource Manager API or the portal.
1278
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1279
+ * @param options The options parameters.
1280
+ */
1281
+ listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options) {
1282
+ const iter = this.listByGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options);
1283
+ return {
1284
+ next() {
1285
+ return iter.next();
1286
+ },
1287
+ [Symbol.asyncIterator]() {
1288
+ return this;
1289
+ },
1290
+ byPage: () => {
1291
+ return this.listByGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options);
1292
+ }
1293
+ };
1294
+ }
1295
+ listByGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options) {
1296
+ return tslib.__asyncGenerator(this, arguments, function* listByGroupPagingPage_1() {
1297
+ let result = yield tslib.__await(this._listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options));
1298
+ yield yield tslib.__await(result.value || []);
1299
+ let continuationToken = result.nextLink;
1300
+ while (continuationToken) {
1301
+ result = yield tslib.__await(this._listByGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options));
1302
+ continuationToken = result.nextLink;
1303
+ yield yield tslib.__await(result.value || []);
1304
+ }
1305
+ });
1306
+ }
1307
+ listByGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
1308
+ return tslib.__asyncGenerator(this, arguments, function* listByGroupPagingAll_1() {
1309
+ var e_1, _a;
1310
+ try {
1311
+ for (var _b = tslib.__asyncValues(this.listByGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1312
+ const page = _c.value;
1313
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1314
+ }
1315
+ }
1316
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1317
+ finally {
1318
+ try {
1319
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1320
+ }
1321
+ finally { if (e_1) throw e_1.error; }
1322
+ }
1323
+ });
1324
+ }
1325
+ /**
1326
+ * Gets an availability group listener.
1327
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1328
+ * value from the Azure Resource Manager API or the portal.
1329
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1330
+ * @param availabilityGroupListenerName Name of the availability group listener.
1331
+ * @param options The options parameters.
1332
+ */
1333
+ get(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) {
1334
+ return this.client.sendOperationRequest({
1335
+ resourceGroupName,
1336
+ sqlVirtualMachineGroupName,
1337
+ availabilityGroupListenerName,
1338
+ options
1339
+ }, getOperationSpec);
1340
+ }
1341
+ /**
1342
+ * Creates or updates an availability group listener.
1343
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1344
+ * value from the Azure Resource Manager API or the portal.
1345
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1346
+ * @param availabilityGroupListenerName Name of the availability group listener.
1347
+ * @param parameters The availability group listener.
1348
+ * @param options The options parameters.
1349
+ */
1350
+ beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options) {
1351
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1352
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1353
+ return this.client.sendOperationRequest(args, spec);
1354
+ });
1355
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1356
+ var _a;
1357
+ let currentRawResponse = undefined;
1358
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1359
+ const callback = (rawResponse, flatResponse) => {
1360
+ currentRawResponse = rawResponse;
1361
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1362
+ };
1363
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1364
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1365
+ return {
1366
+ flatResponse,
1367
+ rawResponse: {
1368
+ statusCode: currentRawResponse.status,
1369
+ body: currentRawResponse.parsedBody,
1370
+ headers: currentRawResponse.headers.toJSON()
1371
+ }
1372
+ };
1373
+ });
1374
+ const lro = new LroImpl(sendOperation, {
1375
+ resourceGroupName,
1376
+ sqlVirtualMachineGroupName,
1377
+ availabilityGroupListenerName,
1378
+ parameters,
1379
+ options
1380
+ }, createOrUpdateOperationSpec);
1381
+ return new coreLro.LroEngine(lro, {
1382
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1383
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1384
+ });
1385
+ });
1386
+ }
1387
+ /**
1388
+ * Creates or updates an availability group listener.
1389
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1390
+ * value from the Azure Resource Manager API or the portal.
1391
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1392
+ * @param availabilityGroupListenerName Name of the availability group listener.
1393
+ * @param parameters The availability group listener.
1394
+ * @param options The options parameters.
1395
+ */
1396
+ beginCreateOrUpdateAndWait(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options) {
1397
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1398
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, parameters, options);
1399
+ return poller.pollUntilDone();
1400
+ });
1401
+ }
1402
+ /**
1403
+ * Deletes an availability group listener.
1404
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1405
+ * value from the Azure Resource Manager API or the portal.
1406
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1407
+ * @param availabilityGroupListenerName Name of the availability group listener.
1408
+ * @param options The options parameters.
1409
+ */
1410
+ beginDelete(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) {
1411
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1412
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1413
+ return this.client.sendOperationRequest(args, spec);
1414
+ });
1415
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1416
+ var _a;
1417
+ let currentRawResponse = undefined;
1418
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1419
+ const callback = (rawResponse, flatResponse) => {
1420
+ currentRawResponse = rawResponse;
1421
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1422
+ };
1423
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1424
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1425
+ return {
1426
+ flatResponse,
1427
+ rawResponse: {
1428
+ statusCode: currentRawResponse.status,
1429
+ body: currentRawResponse.parsedBody,
1430
+ headers: currentRawResponse.headers.toJSON()
1431
+ }
1432
+ };
1433
+ });
1434
+ const lro = new LroImpl(sendOperation, {
1435
+ resourceGroupName,
1436
+ sqlVirtualMachineGroupName,
1437
+ availabilityGroupListenerName,
1438
+ options
1439
+ }, deleteOperationSpec);
1440
+ return new coreLro.LroEngine(lro, {
1441
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1442
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1443
+ });
1444
+ });
1445
+ }
1446
+ /**
1447
+ * Deletes an availability group listener.
1448
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1449
+ * value from the Azure Resource Manager API or the portal.
1450
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1451
+ * @param availabilityGroupListenerName Name of the availability group listener.
1452
+ * @param options The options parameters.
1453
+ */
1454
+ beginDeleteAndWait(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options) {
1455
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1456
+ const poller = yield this.beginDelete(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, options);
1457
+ return poller.pollUntilDone();
1458
+ });
1459
+ }
1460
+ /**
1461
+ * Lists all availability group listeners in a SQL virtual machine group.
1462
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1463
+ * value from the Azure Resource Manager API or the portal.
1464
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1465
+ * @param options The options parameters.
1466
+ */
1467
+ _listByGroup(resourceGroupName, sqlVirtualMachineGroupName, options) {
1468
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineGroupName, options }, listByGroupOperationSpec);
1469
+ }
1470
+ /**
1471
+ * ListByGroupNext
1472
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1473
+ * value from the Azure Resource Manager API or the portal.
1474
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1475
+ * @param nextLink The nextLink from the previous successful call to the ListByGroup method.
1476
+ * @param options The options parameters.
1477
+ */
1478
+ _listByGroupNext(resourceGroupName, sqlVirtualMachineGroupName, nextLink, options) {
1479
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineGroupName, nextLink, options }, listByGroupNextOperationSpec);
1480
+ }
1481
+ }
1482
+ // Operation Specifications
1483
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1484
+ const getOperationSpec = {
1485
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1486
+ httpMethod: "GET",
1487
+ responses: {
1488
+ 200: {
1489
+ bodyMapper: AvailabilityGroupListener
1490
+ },
1491
+ default: {}
1492
+ },
1493
+ queryParameters: [apiVersion],
1494
+ urlParameters: [
1495
+ $host,
1496
+ resourceGroupName,
1497
+ sqlVirtualMachineGroupName,
1498
+ availabilityGroupListenerName,
1499
+ subscriptionId
1500
+ ],
1501
+ headerParameters: [accept],
1502
+ serializer
1503
+ };
1504
+ const createOrUpdateOperationSpec = {
1505
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1506
+ httpMethod: "PUT",
1507
+ responses: {
1508
+ 200: {
1509
+ bodyMapper: AvailabilityGroupListener
1510
+ },
1511
+ 201: {
1512
+ bodyMapper: AvailabilityGroupListener
1513
+ },
1514
+ 202: {
1515
+ bodyMapper: AvailabilityGroupListener
1516
+ },
1517
+ 204: {
1518
+ bodyMapper: AvailabilityGroupListener
1519
+ },
1520
+ default: {}
1521
+ },
1522
+ requestBody: parameters,
1523
+ queryParameters: [apiVersion],
1524
+ urlParameters: [
1525
+ $host,
1526
+ resourceGroupName,
1527
+ sqlVirtualMachineGroupName,
1528
+ availabilityGroupListenerName,
1529
+ subscriptionId
1530
+ ],
1531
+ headerParameters: [accept, contentType],
1532
+ mediaType: "json",
1533
+ serializer
1534
+ };
1535
+ const deleteOperationSpec = {
1536
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1537
+ httpMethod: "DELETE",
1538
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
1539
+ queryParameters: [apiVersion],
1540
+ urlParameters: [
1541
+ $host,
1542
+ resourceGroupName,
1543
+ sqlVirtualMachineGroupName,
1544
+ availabilityGroupListenerName,
1545
+ subscriptionId
1546
+ ],
1547
+ serializer
1548
+ };
1549
+ const listByGroupOperationSpec = {
1550
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners",
1551
+ httpMethod: "GET",
1552
+ responses: {
1553
+ 200: {
1554
+ bodyMapper: AvailabilityGroupListenerListResult
1555
+ },
1556
+ default: {}
1557
+ },
1558
+ queryParameters: [apiVersion],
1559
+ urlParameters: [
1560
+ $host,
1561
+ resourceGroupName,
1562
+ sqlVirtualMachineGroupName,
1563
+ subscriptionId
1564
+ ],
1565
+ headerParameters: [accept],
1566
+ serializer
1567
+ };
1568
+ const listByGroupNextOperationSpec = {
1569
+ path: "{nextLink}",
1570
+ httpMethod: "GET",
1571
+ responses: {
1572
+ 200: {
1573
+ bodyMapper: AvailabilityGroupListenerListResult
1574
+ },
1575
+ default: {}
1576
+ },
1577
+ queryParameters: [apiVersion],
1578
+ urlParameters: [
1579
+ $host,
1580
+ resourceGroupName,
1581
+ sqlVirtualMachineGroupName,
1582
+ subscriptionId,
1583
+ nextLink
1584
+ ],
1585
+ headerParameters: [accept],
1586
+ serializer
1587
+ };
1588
+
1589
+ /*
1590
+ * Copyright (c) Microsoft Corporation.
1591
+ * Licensed under the MIT License.
1592
+ *
1593
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1594
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1595
+ */
1596
+ /// <reference lib="esnext.asynciterable" />
1597
+ /** Class containing Operations operations. */
1598
+ class OperationsImpl {
1599
+ /**
1600
+ * Initialize a new instance of the class Operations class.
1601
+ * @param client Reference to the service client
1602
+ */
1603
+ constructor(client) {
1604
+ this.client = client;
1605
+ }
1606
+ /**
1607
+ * Lists all of the available SQL Rest API operations.
1608
+ * @param options The options parameters.
1609
+ */
1610
+ list(options) {
1611
+ const iter = this.listPagingAll(options);
1612
+ return {
1613
+ next() {
1614
+ return iter.next();
1615
+ },
1616
+ [Symbol.asyncIterator]() {
1617
+ return this;
1618
+ },
1619
+ byPage: () => {
1620
+ return this.listPagingPage(options);
1621
+ }
1622
+ };
1623
+ }
1624
+ listPagingPage(options) {
1625
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1626
+ let result = yield tslib.__await(this._list(options));
1627
+ yield yield tslib.__await(result.value || []);
1628
+ let continuationToken = result.nextLink;
1629
+ while (continuationToken) {
1630
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1631
+ continuationToken = result.nextLink;
1632
+ yield yield tslib.__await(result.value || []);
1633
+ }
1634
+ });
1635
+ }
1636
+ listPagingAll(options) {
1637
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1638
+ var e_1, _a;
1639
+ try {
1640
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1641
+ const page = _c.value;
1642
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1643
+ }
1644
+ }
1645
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1646
+ finally {
1647
+ try {
1648
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1649
+ }
1650
+ finally { if (e_1) throw e_1.error; }
1651
+ }
1652
+ });
1653
+ }
1654
+ /**
1655
+ * Lists all of the available SQL Rest API operations.
1656
+ * @param options The options parameters.
1657
+ */
1658
+ _list(options) {
1659
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1660
+ }
1661
+ /**
1662
+ * ListNext
1663
+ * @param nextLink The nextLink from the previous successful call to the List method.
1664
+ * @param options The options parameters.
1665
+ */
1666
+ _listNext(nextLink, options) {
1667
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1668
+ }
1669
+ }
1670
+ // Operation Specifications
1671
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
1672
+ const listOperationSpec = {
1673
+ path: "/providers/Microsoft.SqlVirtualMachine/operations",
1674
+ httpMethod: "GET",
1675
+ responses: {
1676
+ 200: {
1677
+ bodyMapper: OperationListResult
1678
+ },
1679
+ default: {}
1680
+ },
1681
+ queryParameters: [apiVersion],
1682
+ urlParameters: [$host],
1683
+ headerParameters: [accept],
1684
+ serializer: serializer$1
1685
+ };
1686
+ const listNextOperationSpec = {
1687
+ path: "{nextLink}",
1688
+ httpMethod: "GET",
1689
+ responses: {
1690
+ 200: {
1691
+ bodyMapper: OperationListResult
1692
+ },
1693
+ default: {}
1694
+ },
1695
+ queryParameters: [apiVersion],
1696
+ urlParameters: [$host, nextLink],
1697
+ headerParameters: [accept],
1698
+ serializer: serializer$1
1699
+ };
1700
+
1701
+ /*
1702
+ * Copyright (c) Microsoft Corporation.
1703
+ * Licensed under the MIT License.
1704
+ *
1705
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1706
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1707
+ */
1708
+ /// <reference lib="esnext.asynciterable" />
1709
+ /** Class containing SqlVirtualMachineGroups operations. */
1710
+ class SqlVirtualMachineGroupsImpl {
1711
+ /**
1712
+ * Initialize a new instance of the class SqlVirtualMachineGroups class.
1713
+ * @param client Reference to the service client
1714
+ */
1715
+ constructor(client) {
1716
+ this.client = client;
1717
+ }
1718
+ /**
1719
+ * Gets all SQL virtual machine groups in a resource group.
1720
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1721
+ * value from the Azure Resource Manager API or the portal.
1722
+ * @param options The options parameters.
1723
+ */
1724
+ listByResourceGroup(resourceGroupName, options) {
1725
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
1726
+ return {
1727
+ next() {
1728
+ return iter.next();
1729
+ },
1730
+ [Symbol.asyncIterator]() {
1731
+ return this;
1732
+ },
1733
+ byPage: () => {
1734
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
1735
+ }
1736
+ };
1737
+ }
1738
+ listByResourceGroupPagingPage(resourceGroupName, options) {
1739
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1740
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1741
+ yield yield tslib.__await(result.value || []);
1742
+ let continuationToken = result.nextLink;
1743
+ while (continuationToken) {
1744
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1745
+ continuationToken = result.nextLink;
1746
+ yield yield tslib.__await(result.value || []);
1747
+ }
1748
+ });
1749
+ }
1750
+ listByResourceGroupPagingAll(resourceGroupName, options) {
1751
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1752
+ var e_1, _a;
1753
+ try {
1754
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1755
+ const page = _c.value;
1756
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1757
+ }
1758
+ }
1759
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1760
+ finally {
1761
+ try {
1762
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1763
+ }
1764
+ finally { if (e_1) throw e_1.error; }
1765
+ }
1766
+ });
1767
+ }
1768
+ /**
1769
+ * Gets all SQL virtual machine groups in a subscription.
1770
+ * @param options The options parameters.
1771
+ */
1772
+ list(options) {
1773
+ const iter = this.listPagingAll(options);
1774
+ return {
1775
+ next() {
1776
+ return iter.next();
1777
+ },
1778
+ [Symbol.asyncIterator]() {
1779
+ return this;
1780
+ },
1781
+ byPage: () => {
1782
+ return this.listPagingPage(options);
1783
+ }
1784
+ };
1785
+ }
1786
+ listPagingPage(options) {
1787
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1788
+ let result = yield tslib.__await(this._list(options));
1789
+ yield yield tslib.__await(result.value || []);
1790
+ let continuationToken = result.nextLink;
1791
+ while (continuationToken) {
1792
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1793
+ continuationToken = result.nextLink;
1794
+ yield yield tslib.__await(result.value || []);
1795
+ }
1796
+ });
1797
+ }
1798
+ listPagingAll(options) {
1799
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1800
+ var e_2, _a;
1801
+ try {
1802
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1803
+ const page = _c.value;
1804
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1805
+ }
1806
+ }
1807
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1808
+ finally {
1809
+ try {
1810
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1811
+ }
1812
+ finally { if (e_2) throw e_2.error; }
1813
+ }
1814
+ });
1815
+ }
1816
+ /**
1817
+ * Gets a SQL virtual machine group.
1818
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1819
+ * value from the Azure Resource Manager API or the portal.
1820
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1821
+ * @param options The options parameters.
1822
+ */
1823
+ get(resourceGroupName, sqlVirtualMachineGroupName, options) {
1824
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineGroupName, options }, getOperationSpec$1);
1825
+ }
1826
+ /**
1827
+ * Creates or updates a SQL virtual machine group.
1828
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1829
+ * value from the Azure Resource Manager API or the portal.
1830
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1831
+ * @param parameters The SQL virtual machine group.
1832
+ * @param options The options parameters.
1833
+ */
1834
+ beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) {
1835
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1836
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1837
+ return this.client.sendOperationRequest(args, spec);
1838
+ });
1839
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1840
+ var _a;
1841
+ let currentRawResponse = undefined;
1842
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1843
+ const callback = (rawResponse, flatResponse) => {
1844
+ currentRawResponse = rawResponse;
1845
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1846
+ };
1847
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1848
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1849
+ return {
1850
+ flatResponse,
1851
+ rawResponse: {
1852
+ statusCode: currentRawResponse.status,
1853
+ body: currentRawResponse.parsedBody,
1854
+ headers: currentRawResponse.headers.toJSON()
1855
+ }
1856
+ };
1857
+ });
1858
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, parameters, options }, createOrUpdateOperationSpec$1);
1859
+ return new coreLro.LroEngine(lro, {
1860
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1861
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1862
+ });
1863
+ });
1864
+ }
1865
+ /**
1866
+ * Creates or updates a SQL virtual machine group.
1867
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1868
+ * value from the Azure Resource Manager API or the portal.
1869
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1870
+ * @param parameters The SQL virtual machine group.
1871
+ * @param options The options parameters.
1872
+ */
1873
+ beginCreateOrUpdateAndWait(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) {
1874
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1875
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options);
1876
+ return poller.pollUntilDone();
1877
+ });
1878
+ }
1879
+ /**
1880
+ * Deletes a SQL virtual machine group.
1881
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1882
+ * value from the Azure Resource Manager API or the portal.
1883
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1884
+ * @param options The options parameters.
1885
+ */
1886
+ beginDelete(resourceGroupName, sqlVirtualMachineGroupName, options) {
1887
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1888
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1889
+ return this.client.sendOperationRequest(args, spec);
1890
+ });
1891
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1892
+ var _a;
1893
+ let currentRawResponse = undefined;
1894
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1895
+ const callback = (rawResponse, flatResponse) => {
1896
+ currentRawResponse = rawResponse;
1897
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1898
+ };
1899
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1900
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1901
+ return {
1902
+ flatResponse,
1903
+ rawResponse: {
1904
+ statusCode: currentRawResponse.status,
1905
+ body: currentRawResponse.parsedBody,
1906
+ headers: currentRawResponse.headers.toJSON()
1907
+ }
1908
+ };
1909
+ });
1910
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, options }, deleteOperationSpec$1);
1911
+ return new coreLro.LroEngine(lro, {
1912
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1913
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1914
+ });
1915
+ });
1916
+ }
1917
+ /**
1918
+ * Deletes a SQL virtual machine group.
1919
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1920
+ * value from the Azure Resource Manager API or the portal.
1921
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1922
+ * @param options The options parameters.
1923
+ */
1924
+ beginDeleteAndWait(resourceGroupName, sqlVirtualMachineGroupName, options) {
1925
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1926
+ const poller = yield this.beginDelete(resourceGroupName, sqlVirtualMachineGroupName, options);
1927
+ return poller.pollUntilDone();
1928
+ });
1929
+ }
1930
+ /**
1931
+ * Updates SQL virtual machine group tags.
1932
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1933
+ * value from the Azure Resource Manager API or the portal.
1934
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1935
+ * @param parameters The SQL virtual machine group.
1936
+ * @param options The options parameters.
1937
+ */
1938
+ beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) {
1939
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1940
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1941
+ return this.client.sendOperationRequest(args, spec);
1942
+ });
1943
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1944
+ var _a;
1945
+ let currentRawResponse = undefined;
1946
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1947
+ const callback = (rawResponse, flatResponse) => {
1948
+ currentRawResponse = rawResponse;
1949
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1950
+ };
1951
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1952
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1953
+ return {
1954
+ flatResponse,
1955
+ rawResponse: {
1956
+ statusCode: currentRawResponse.status,
1957
+ body: currentRawResponse.parsedBody,
1958
+ headers: currentRawResponse.headers.toJSON()
1959
+ }
1960
+ };
1961
+ });
1962
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, parameters, options }, updateOperationSpec);
1963
+ return new coreLro.LroEngine(lro, {
1964
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1965
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1966
+ });
1967
+ });
1968
+ }
1969
+ /**
1970
+ * Updates SQL virtual machine group tags.
1971
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1972
+ * value from the Azure Resource Manager API or the portal.
1973
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
1974
+ * @param parameters The SQL virtual machine group.
1975
+ * @param options The options parameters.
1976
+ */
1977
+ beginUpdateAndWait(resourceGroupName, sqlVirtualMachineGroupName, parameters, options) {
1978
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1979
+ const poller = yield this.beginUpdate(resourceGroupName, sqlVirtualMachineGroupName, parameters, options);
1980
+ return poller.pollUntilDone();
1981
+ });
1982
+ }
1983
+ /**
1984
+ * Gets all SQL virtual machine groups in a resource group.
1985
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
1986
+ * value from the Azure Resource Manager API or the portal.
1987
+ * @param options The options parameters.
1988
+ */
1989
+ _listByResourceGroup(resourceGroupName, options) {
1990
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
1991
+ }
1992
+ /**
1993
+ * Gets all SQL virtual machine groups in a subscription.
1994
+ * @param options The options parameters.
1995
+ */
1996
+ _list(options) {
1997
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1998
+ }
1999
+ /**
2000
+ * ListByResourceGroupNext
2001
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2002
+ * value from the Azure Resource Manager API or the portal.
2003
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
2004
+ * @param options The options parameters.
2005
+ */
2006
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2007
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2008
+ }
2009
+ /**
2010
+ * ListNext
2011
+ * @param nextLink The nextLink from the previous successful call to the List method.
2012
+ * @param options The options parameters.
2013
+ */
2014
+ _listNext(nextLink, options) {
2015
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
2016
+ }
2017
+ }
2018
+ // Operation Specifications
2019
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
2020
+ const getOperationSpec$1 = {
2021
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2022
+ httpMethod: "GET",
2023
+ responses: {
2024
+ 200: {
2025
+ bodyMapper: SqlVirtualMachineGroup
2026
+ },
2027
+ default: {}
2028
+ },
2029
+ queryParameters: [apiVersion],
2030
+ urlParameters: [
2031
+ $host,
2032
+ resourceGroupName,
2033
+ sqlVirtualMachineGroupName,
2034
+ subscriptionId
2035
+ ],
2036
+ headerParameters: [accept],
2037
+ serializer: serializer$2
2038
+ };
2039
+ const createOrUpdateOperationSpec$1 = {
2040
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2041
+ httpMethod: "PUT",
2042
+ responses: {
2043
+ 200: {
2044
+ bodyMapper: SqlVirtualMachineGroup
2045
+ },
2046
+ 201: {
2047
+ bodyMapper: SqlVirtualMachineGroup
2048
+ },
2049
+ 202: {
2050
+ bodyMapper: SqlVirtualMachineGroup
2051
+ },
2052
+ 204: {
2053
+ bodyMapper: SqlVirtualMachineGroup
2054
+ },
2055
+ default: {}
2056
+ },
2057
+ requestBody: parameters1,
2058
+ queryParameters: [apiVersion],
2059
+ urlParameters: [
2060
+ $host,
2061
+ resourceGroupName,
2062
+ sqlVirtualMachineGroupName,
2063
+ subscriptionId
2064
+ ],
2065
+ headerParameters: [accept, contentType],
2066
+ mediaType: "json",
2067
+ serializer: serializer$2
2068
+ };
2069
+ const deleteOperationSpec$1 = {
2070
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2071
+ httpMethod: "DELETE",
2072
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
2073
+ queryParameters: [apiVersion],
2074
+ urlParameters: [
2075
+ $host,
2076
+ resourceGroupName,
2077
+ sqlVirtualMachineGroupName,
2078
+ subscriptionId
2079
+ ],
2080
+ serializer: serializer$2
2081
+ };
2082
+ const updateOperationSpec = {
2083
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2084
+ httpMethod: "PATCH",
2085
+ responses: {
2086
+ 200: {
2087
+ bodyMapper: SqlVirtualMachineGroup
2088
+ },
2089
+ 201: {
2090
+ bodyMapper: SqlVirtualMachineGroup
2091
+ },
2092
+ 202: {
2093
+ bodyMapper: SqlVirtualMachineGroup
2094
+ },
2095
+ 204: {
2096
+ bodyMapper: SqlVirtualMachineGroup
2097
+ },
2098
+ default: {}
2099
+ },
2100
+ requestBody: parameters2,
2101
+ queryParameters: [apiVersion],
2102
+ urlParameters: [
2103
+ $host,
2104
+ resourceGroupName,
2105
+ sqlVirtualMachineGroupName,
2106
+ subscriptionId
2107
+ ],
2108
+ headerParameters: [accept, contentType],
2109
+ mediaType: "json",
2110
+ serializer: serializer$2
2111
+ };
2112
+ const listByResourceGroupOperationSpec = {
2113
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups",
2114
+ httpMethod: "GET",
2115
+ responses: {
2116
+ 200: {
2117
+ bodyMapper: SqlVirtualMachineGroupListResult
2118
+ },
2119
+ default: {}
2120
+ },
2121
+ queryParameters: [apiVersion],
2122
+ urlParameters: [
2123
+ $host,
2124
+ resourceGroupName,
2125
+ subscriptionId
2126
+ ],
2127
+ headerParameters: [accept],
2128
+ serializer: serializer$2
2129
+ };
2130
+ const listOperationSpec$1 = {
2131
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups",
2132
+ httpMethod: "GET",
2133
+ responses: {
2134
+ 200: {
2135
+ bodyMapper: SqlVirtualMachineGroupListResult
2136
+ },
2137
+ default: {}
2138
+ },
2139
+ queryParameters: [apiVersion],
2140
+ urlParameters: [$host, subscriptionId],
2141
+ headerParameters: [accept],
2142
+ serializer: serializer$2
2143
+ };
2144
+ const listByResourceGroupNextOperationSpec = {
2145
+ path: "{nextLink}",
2146
+ httpMethod: "GET",
2147
+ responses: {
2148
+ 200: {
2149
+ bodyMapper: SqlVirtualMachineGroupListResult
2150
+ },
2151
+ default: {}
2152
+ },
2153
+ queryParameters: [apiVersion],
2154
+ urlParameters: [
2155
+ $host,
2156
+ resourceGroupName,
2157
+ subscriptionId,
2158
+ nextLink
2159
+ ],
2160
+ headerParameters: [accept],
2161
+ serializer: serializer$2
2162
+ };
2163
+ const listNextOperationSpec$1 = {
2164
+ path: "{nextLink}",
2165
+ httpMethod: "GET",
2166
+ responses: {
2167
+ 200: {
2168
+ bodyMapper: SqlVirtualMachineGroupListResult
2169
+ },
2170
+ default: {}
2171
+ },
2172
+ queryParameters: [apiVersion],
2173
+ urlParameters: [
2174
+ $host,
2175
+ subscriptionId,
2176
+ nextLink
2177
+ ],
2178
+ headerParameters: [accept],
2179
+ serializer: serializer$2
2180
+ };
2181
+
2182
+ /*
2183
+ * Copyright (c) Microsoft Corporation.
2184
+ * Licensed under the MIT License.
2185
+ *
2186
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2187
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2188
+ */
2189
+ /// <reference lib="esnext.asynciterable" />
2190
+ /** Class containing SqlVirtualMachines operations. */
2191
+ class SqlVirtualMachinesImpl {
2192
+ /**
2193
+ * Initialize a new instance of the class SqlVirtualMachines class.
2194
+ * @param client Reference to the service client
2195
+ */
2196
+ constructor(client) {
2197
+ this.client = client;
2198
+ }
2199
+ /**
2200
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
2201
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2202
+ * value from the Azure Resource Manager API or the portal.
2203
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
2204
+ * @param options The options parameters.
2205
+ */
2206
+ listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options) {
2207
+ const iter = this.listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options);
2208
+ return {
2209
+ next() {
2210
+ return iter.next();
2211
+ },
2212
+ [Symbol.asyncIterator]() {
2213
+ return this;
2214
+ },
2215
+ byPage: () => {
2216
+ return this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options);
2217
+ }
2218
+ };
2219
+ }
2220
+ listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options) {
2221
+ return tslib.__asyncGenerator(this, arguments, function* listBySqlVmGroupPagingPage_1() {
2222
+ let result = yield tslib.__await(this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options));
2223
+ yield yield tslib.__await(result.value || []);
2224
+ let continuationToken = result.nextLink;
2225
+ while (continuationToken) {
2226
+ result = yield tslib.__await(this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options));
2227
+ continuationToken = result.nextLink;
2228
+ yield yield tslib.__await(result.value || []);
2229
+ }
2230
+ });
2231
+ }
2232
+ listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
2233
+ return tslib.__asyncGenerator(this, arguments, function* listBySqlVmGroupPagingAll_1() {
2234
+ var e_1, _a;
2235
+ try {
2236
+ for (var _b = tslib.__asyncValues(this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2237
+ const page = _c.value;
2238
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2239
+ }
2240
+ }
2241
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2242
+ finally {
2243
+ try {
2244
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2245
+ }
2246
+ finally { if (e_1) throw e_1.error; }
2247
+ }
2248
+ });
2249
+ }
2250
+ /**
2251
+ * Gets all SQL virtual machines in a subscription.
2252
+ * @param options The options parameters.
2253
+ */
2254
+ list(options) {
2255
+ const iter = this.listPagingAll(options);
2256
+ return {
2257
+ next() {
2258
+ return iter.next();
2259
+ },
2260
+ [Symbol.asyncIterator]() {
2261
+ return this;
2262
+ },
2263
+ byPage: () => {
2264
+ return this.listPagingPage(options);
2265
+ }
2266
+ };
2267
+ }
2268
+ listPagingPage(options) {
2269
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2270
+ let result = yield tslib.__await(this._list(options));
2271
+ yield yield tslib.__await(result.value || []);
2272
+ let continuationToken = result.nextLink;
2273
+ while (continuationToken) {
2274
+ result = yield tslib.__await(this._listNext(continuationToken, options));
2275
+ continuationToken = result.nextLink;
2276
+ yield yield tslib.__await(result.value || []);
2277
+ }
2278
+ });
2279
+ }
2280
+ listPagingAll(options) {
2281
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2282
+ var e_2, _a;
2283
+ try {
2284
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2285
+ const page = _c.value;
2286
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2287
+ }
2288
+ }
2289
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2290
+ finally {
2291
+ try {
2292
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2293
+ }
2294
+ finally { if (e_2) throw e_2.error; }
2295
+ }
2296
+ });
2297
+ }
2298
+ /**
2299
+ * Gets all SQL virtual machines in a resource group.
2300
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2301
+ * value from the Azure Resource Manager API or the portal.
2302
+ * @param options The options parameters.
2303
+ */
2304
+ listByResourceGroup(resourceGroupName, options) {
2305
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
2306
+ return {
2307
+ next() {
2308
+ return iter.next();
2309
+ },
2310
+ [Symbol.asyncIterator]() {
2311
+ return this;
2312
+ },
2313
+ byPage: () => {
2314
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
2315
+ }
2316
+ };
2317
+ }
2318
+ listByResourceGroupPagingPage(resourceGroupName, options) {
2319
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2320
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2321
+ yield yield tslib.__await(result.value || []);
2322
+ let continuationToken = result.nextLink;
2323
+ while (continuationToken) {
2324
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2325
+ continuationToken = result.nextLink;
2326
+ yield yield tslib.__await(result.value || []);
2327
+ }
2328
+ });
2329
+ }
2330
+ listByResourceGroupPagingAll(resourceGroupName, options) {
2331
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
2332
+ var e_3, _a;
2333
+ try {
2334
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2335
+ const page = _c.value;
2336
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2337
+ }
2338
+ }
2339
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2340
+ finally {
2341
+ try {
2342
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2343
+ }
2344
+ finally { if (e_3) throw e_3.error; }
2345
+ }
2346
+ });
2347
+ }
2348
+ /**
2349
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
2350
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2351
+ * value from the Azure Resource Manager API or the portal.
2352
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
2353
+ * @param options The options parameters.
2354
+ */
2355
+ _listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options) {
2356
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineGroupName, options }, listBySqlVmGroupOperationSpec);
2357
+ }
2358
+ /**
2359
+ * Gets all SQL virtual machines in a subscription.
2360
+ * @param options The options parameters.
2361
+ */
2362
+ _list(options) {
2363
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
2364
+ }
2365
+ /**
2366
+ * Gets a SQL virtual machine.
2367
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2368
+ * value from the Azure Resource Manager API or the portal.
2369
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2370
+ * @param options The options parameters.
2371
+ */
2372
+ get(resourceGroupName, sqlVirtualMachineName, options) {
2373
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineName, options }, getOperationSpec$2);
2374
+ }
2375
+ /**
2376
+ * Creates or updates a SQL virtual machine.
2377
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2378
+ * value from the Azure Resource Manager API or the portal.
2379
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2380
+ * @param parameters The SQL virtual machine.
2381
+ * @param options The options parameters.
2382
+ */
2383
+ beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options) {
2384
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2385
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2386
+ return this.client.sendOperationRequest(args, spec);
2387
+ });
2388
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2389
+ var _a;
2390
+ let currentRawResponse = undefined;
2391
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2392
+ const callback = (rawResponse, flatResponse) => {
2393
+ currentRawResponse = rawResponse;
2394
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2395
+ };
2396
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2397
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2398
+ return {
2399
+ flatResponse,
2400
+ rawResponse: {
2401
+ statusCode: currentRawResponse.status,
2402
+ body: currentRawResponse.parsedBody,
2403
+ headers: currentRawResponse.headers.toJSON()
2404
+ }
2405
+ };
2406
+ });
2407
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, createOrUpdateOperationSpec$2);
2408
+ return new coreLro.LroEngine(lro, {
2409
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2410
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2411
+ });
2412
+ });
2413
+ }
2414
+ /**
2415
+ * Creates or updates a SQL virtual machine.
2416
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2417
+ * value from the Azure Resource Manager API or the portal.
2418
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2419
+ * @param parameters The SQL virtual machine.
2420
+ * @param options The options parameters.
2421
+ */
2422
+ beginCreateOrUpdateAndWait(resourceGroupName, sqlVirtualMachineName, parameters, options) {
2423
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2424
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options);
2425
+ return poller.pollUntilDone();
2426
+ });
2427
+ }
2428
+ /**
2429
+ * Deletes a SQL virtual machine.
2430
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2431
+ * value from the Azure Resource Manager API or the portal.
2432
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2433
+ * @param options The options parameters.
2434
+ */
2435
+ beginDelete(resourceGroupName, sqlVirtualMachineName, options) {
2436
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2437
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2438
+ return this.client.sendOperationRequest(args, spec);
2439
+ });
2440
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2441
+ var _a;
2442
+ let currentRawResponse = undefined;
2443
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2444
+ const callback = (rawResponse, flatResponse) => {
2445
+ currentRawResponse = rawResponse;
2446
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2447
+ };
2448
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2449
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2450
+ return {
2451
+ flatResponse,
2452
+ rawResponse: {
2453
+ statusCode: currentRawResponse.status,
2454
+ body: currentRawResponse.parsedBody,
2455
+ headers: currentRawResponse.headers.toJSON()
2456
+ }
2457
+ };
2458
+ });
2459
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, deleteOperationSpec$2);
2460
+ return new coreLro.LroEngine(lro, {
2461
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2462
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2463
+ });
2464
+ });
2465
+ }
2466
+ /**
2467
+ * Deletes a SQL virtual machine.
2468
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2469
+ * value from the Azure Resource Manager API or the portal.
2470
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2471
+ * @param options The options parameters.
2472
+ */
2473
+ beginDeleteAndWait(resourceGroupName, sqlVirtualMachineName, options) {
2474
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2475
+ const poller = yield this.beginDelete(resourceGroupName, sqlVirtualMachineName, options);
2476
+ return poller.pollUntilDone();
2477
+ });
2478
+ }
2479
+ /**
2480
+ * Updates a SQL virtual machine.
2481
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2482
+ * value from the Azure Resource Manager API or the portal.
2483
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2484
+ * @param parameters The SQL virtual machine.
2485
+ * @param options The options parameters.
2486
+ */
2487
+ beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options) {
2488
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2489
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2490
+ return this.client.sendOperationRequest(args, spec);
2491
+ });
2492
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2493
+ var _a;
2494
+ let currentRawResponse = undefined;
2495
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2496
+ const callback = (rawResponse, flatResponse) => {
2497
+ currentRawResponse = rawResponse;
2498
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2499
+ };
2500
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2501
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2502
+ return {
2503
+ flatResponse,
2504
+ rawResponse: {
2505
+ statusCode: currentRawResponse.status,
2506
+ body: currentRawResponse.parsedBody,
2507
+ headers: currentRawResponse.headers.toJSON()
2508
+ }
2509
+ };
2510
+ });
2511
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, updateOperationSpec$1);
2512
+ return new coreLro.LroEngine(lro, {
2513
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2514
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2515
+ });
2516
+ });
2517
+ }
2518
+ /**
2519
+ * Updates a SQL virtual machine.
2520
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2521
+ * value from the Azure Resource Manager API or the portal.
2522
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2523
+ * @param parameters The SQL virtual machine.
2524
+ * @param options The options parameters.
2525
+ */
2526
+ beginUpdateAndWait(resourceGroupName, sqlVirtualMachineName, parameters, options) {
2527
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2528
+ const poller = yield this.beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options);
2529
+ return poller.pollUntilDone();
2530
+ });
2531
+ }
2532
+ /**
2533
+ * Gets all SQL virtual machines in a resource group.
2534
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2535
+ * value from the Azure Resource Manager API or the portal.
2536
+ * @param options The options parameters.
2537
+ */
2538
+ _listByResourceGroup(resourceGroupName, options) {
2539
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
2540
+ }
2541
+ /**
2542
+ * ListBySqlVmGroupNext
2543
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2544
+ * value from the Azure Resource Manager API or the portal.
2545
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
2546
+ * @param nextLink The nextLink from the previous successful call to the ListBySqlVmGroup method.
2547
+ * @param options The options parameters.
2548
+ */
2549
+ _listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, nextLink, options) {
2550
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineGroupName, nextLink, options }, listBySqlVmGroupNextOperationSpec);
2551
+ }
2552
+ /**
2553
+ * ListNext
2554
+ * @param nextLink The nextLink from the previous successful call to the List method.
2555
+ * @param options The options parameters.
2556
+ */
2557
+ _listNext(nextLink, options) {
2558
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
2559
+ }
2560
+ /**
2561
+ * ListByResourceGroupNext
2562
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2563
+ * value from the Azure Resource Manager API or the portal.
2564
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
2565
+ * @param options The options parameters.
2566
+ */
2567
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2568
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
2569
+ }
2570
+ }
2571
+ // Operation Specifications
2572
+ const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
2573
+ const listBySqlVmGroupOperationSpec = {
2574
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines",
2575
+ httpMethod: "GET",
2576
+ responses: {
2577
+ 200: {
2578
+ bodyMapper: SqlVirtualMachineListResult
2579
+ },
2580
+ default: {}
2581
+ },
2582
+ queryParameters: [apiVersion],
2583
+ urlParameters: [
2584
+ $host,
2585
+ resourceGroupName,
2586
+ sqlVirtualMachineGroupName,
2587
+ subscriptionId
2588
+ ],
2589
+ headerParameters: [accept],
2590
+ serializer: serializer$3
2591
+ };
2592
+ const listOperationSpec$2 = {
2593
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
2594
+ httpMethod: "GET",
2595
+ responses: {
2596
+ 200: {
2597
+ bodyMapper: SqlVirtualMachineListResult
2598
+ },
2599
+ default: {}
2600
+ },
2601
+ queryParameters: [apiVersion],
2602
+ urlParameters: [$host, subscriptionId],
2603
+ headerParameters: [accept],
2604
+ serializer: serializer$3
2605
+ };
2606
+ const getOperationSpec$2 = {
2607
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2608
+ httpMethod: "GET",
2609
+ responses: {
2610
+ 200: {
2611
+ bodyMapper: SqlVirtualMachine
2612
+ },
2613
+ default: {}
2614
+ },
2615
+ queryParameters: [apiVersion, expand],
2616
+ urlParameters: [
2617
+ $host,
2618
+ resourceGroupName,
2619
+ subscriptionId,
2620
+ sqlVirtualMachineName
2621
+ ],
2622
+ headerParameters: [accept],
2623
+ serializer: serializer$3
2624
+ };
2625
+ const createOrUpdateOperationSpec$2 = {
2626
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2627
+ httpMethod: "PUT",
2628
+ responses: {
2629
+ 200: {
2630
+ bodyMapper: SqlVirtualMachine
2631
+ },
2632
+ 201: {
2633
+ bodyMapper: SqlVirtualMachine
2634
+ },
2635
+ 202: {
2636
+ bodyMapper: SqlVirtualMachine
2637
+ },
2638
+ 204: {
2639
+ bodyMapper: SqlVirtualMachine
2640
+ },
2641
+ default: {}
2642
+ },
2643
+ requestBody: parameters3,
2644
+ queryParameters: [apiVersion],
2645
+ urlParameters: [
2646
+ $host,
2647
+ resourceGroupName,
2648
+ subscriptionId,
2649
+ sqlVirtualMachineName
2650
+ ],
2651
+ headerParameters: [accept, contentType],
2652
+ mediaType: "json",
2653
+ serializer: serializer$3
2654
+ };
2655
+ const deleteOperationSpec$2 = {
2656
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2657
+ httpMethod: "DELETE",
2658
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
2659
+ queryParameters: [apiVersion],
2660
+ urlParameters: [
2661
+ $host,
2662
+ resourceGroupName,
2663
+ subscriptionId,
2664
+ sqlVirtualMachineName
2665
+ ],
2666
+ serializer: serializer$3
2667
+ };
2668
+ const updateOperationSpec$1 = {
2669
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2670
+ httpMethod: "PATCH",
2671
+ responses: {
2672
+ 200: {
2673
+ bodyMapper: SqlVirtualMachine
2674
+ },
2675
+ 201: {
2676
+ bodyMapper: SqlVirtualMachine
2677
+ },
2678
+ 202: {
2679
+ bodyMapper: SqlVirtualMachine
2680
+ },
2681
+ 204: {
2682
+ bodyMapper: SqlVirtualMachine
2683
+ },
2684
+ default: {}
2685
+ },
2686
+ requestBody: parameters4,
2687
+ queryParameters: [apiVersion],
2688
+ urlParameters: [
2689
+ $host,
2690
+ resourceGroupName,
2691
+ subscriptionId,
2692
+ sqlVirtualMachineName
2693
+ ],
2694
+ headerParameters: [accept, contentType],
2695
+ mediaType: "json",
2696
+ serializer: serializer$3
2697
+ };
2698
+ const listByResourceGroupOperationSpec$1 = {
2699
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
2700
+ httpMethod: "GET",
2701
+ responses: {
2702
+ 200: {
2703
+ bodyMapper: SqlVirtualMachineListResult
2704
+ },
2705
+ default: {}
2706
+ },
2707
+ queryParameters: [apiVersion],
2708
+ urlParameters: [
2709
+ $host,
2710
+ resourceGroupName,
2711
+ subscriptionId
2712
+ ],
2713
+ headerParameters: [accept],
2714
+ serializer: serializer$3
2715
+ };
2716
+ const listBySqlVmGroupNextOperationSpec = {
2717
+ path: "{nextLink}",
2718
+ httpMethod: "GET",
2719
+ responses: {
2720
+ 200: {
2721
+ bodyMapper: SqlVirtualMachineListResult
2722
+ },
2723
+ default: {}
2724
+ },
2725
+ queryParameters: [apiVersion],
2726
+ urlParameters: [
2727
+ $host,
2728
+ resourceGroupName,
2729
+ sqlVirtualMachineGroupName,
2730
+ subscriptionId,
2731
+ nextLink
2732
+ ],
2733
+ headerParameters: [accept],
2734
+ serializer: serializer$3
2735
+ };
2736
+ const listNextOperationSpec$2 = {
2737
+ path: "{nextLink}",
2738
+ httpMethod: "GET",
2739
+ responses: {
2740
+ 200: {
2741
+ bodyMapper: SqlVirtualMachineListResult
2742
+ },
2743
+ default: {}
2744
+ },
2745
+ queryParameters: [apiVersion],
2746
+ urlParameters: [
2747
+ $host,
2748
+ subscriptionId,
2749
+ nextLink
2750
+ ],
2751
+ headerParameters: [accept],
2752
+ serializer: serializer$3
2753
+ };
2754
+ const listByResourceGroupNextOperationSpec$1 = {
2755
+ path: "{nextLink}",
2756
+ httpMethod: "GET",
2757
+ responses: {
2758
+ 200: {
2759
+ bodyMapper: SqlVirtualMachineListResult
2760
+ },
2761
+ default: {}
2762
+ },
2763
+ queryParameters: [apiVersion],
2764
+ urlParameters: [
2765
+ $host,
2766
+ resourceGroupName,
2767
+ subscriptionId,
2768
+ nextLink
2769
+ ],
2770
+ headerParameters: [accept],
2771
+ serializer: serializer$3
2772
+ };
2773
+
2774
+ /*
2775
+ * Copyright (c) Microsoft Corporation.
2776
+ * Licensed under the MIT License.
2777
+ *
2778
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2779
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2780
+ */
2781
+ class SqlVirtualMachineManagementClient extends coreClient.ServiceClient {
2782
+ /**
2783
+ * Initializes a new instance of the SqlVirtualMachineManagementClient class.
2784
+ * @param credentials Subscription credentials which uniquely identify client subscription.
2785
+ * @param subscriptionId Subscription ID that identifies an Azure subscription.
2786
+ * @param options The parameter options
2787
+ */
2788
+ constructor(credentials, subscriptionId, options) {
2789
+ if (credentials === undefined) {
2790
+ throw new Error("'credentials' cannot be null");
2791
+ }
2792
+ if (subscriptionId === undefined) {
2793
+ throw new Error("'subscriptionId' cannot be null");
2794
+ }
2795
+ // Initializing default values for options
2796
+ if (!options) {
2797
+ options = {};
2798
+ }
2799
+ const defaults = {
2800
+ requestContentType: "application/json; charset=utf-8",
2801
+ credential: credentials
2802
+ };
2803
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/1.0.0-beta.1`;
2804
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2805
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2806
+ : `${packageDetails}`;
2807
+ if (!options.credentialScopes) {
2808
+ options.credentialScopes = ["https://management.azure.com/.default"];
2809
+ }
2810
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2811
+ userAgentPrefix
2812
+ }, baseUri: options.endpoint || "https://management.azure.com" });
2813
+ super(optionsWithDefaults);
2814
+ // Parameter assignments
2815
+ this.subscriptionId = subscriptionId;
2816
+ // Assigning values to Constant parameters
2817
+ this.$host = options.$host || "https://management.azure.com";
2818
+ this.apiVersion = options.apiVersion || "2017-03-01-preview";
2819
+ this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
2820
+ this.operations = new OperationsImpl(this);
2821
+ this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
2822
+ this.sqlVirtualMachines = new SqlVirtualMachinesImpl(this);
2823
+ }
2824
+ }
2825
+
2826
+ exports.SqlVirtualMachineManagementClient = SqlVirtualMachineManagementClient;
2827
+ //# sourceMappingURL=index.js.map