@azure/arm-sqlvirtualmachine 5.0.0-beta.2 → 5.0.0-beta.5

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 (136) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +11 -0
  4. package/dist/index.js +719 -91
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +50 -0
  11. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +32 -0
  15. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +32 -0
  19. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +45 -0
  23. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  27. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  28. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +46 -0
  31. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +1 -0
  32. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +31 -0
  35. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +1 -0
  36. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +31 -0
  39. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +1 -0
  40. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +44 -0
  43. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +1 -0
  44. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +43 -0
  47. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +1 -0
  48. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +32 -0
  51. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +1 -0
  52. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +269 -0
  55. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +1 -0
  56. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +31 -0
  59. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +1 -0
  60. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +31 -0
  63. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +1 -0
  64. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +44 -0
  67. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +1 -0
  68. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +45 -0
  71. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +1 -0
  72. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +43 -0
  75. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +1 -0
  76. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +2 -0
  77. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +31 -0
  79. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +1 -0
  80. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +31 -0
  83. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +1 -0
  84. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +32 -0
  87. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +1 -0
  88. package/dist-esm/src/models/index.d.ts +237 -4
  89. package/dist-esm/src/models/index.d.ts.map +1 -1
  90. package/dist-esm/src/models/index.js +45 -0
  91. package/dist-esm/src/models/index.js.map +1 -1
  92. package/dist-esm/src/models/mappers.d.ts +7 -0
  93. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  94. package/dist-esm/src/models/mappers.js +334 -3
  95. package/dist-esm/src/models/mappers.js.map +1 -1
  96. package/dist-esm/src/models/parameters.d.ts +1 -1
  97. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  98. package/dist-esm/src/models/parameters.js +10 -10
  99. package/dist-esm/src/models/parameters.js.map +1 -1
  100. package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +1 -1
  101. package/dist-esm/src/operations/availabilityGroupListeners.js +7 -3
  102. package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
  103. package/dist-esm/src/operations/operations.d.ts +2 -2
  104. package/dist-esm/src/operations/operations.js +2 -2
  105. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -1
  106. package/dist-esm/src/operations/sqlVirtualMachineGroups.js +9 -3
  107. package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -1
  108. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +33 -1
  109. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
  110. package/dist-esm/src/operations/sqlVirtualMachines.js +142 -4
  111. package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
  112. package/dist-esm/src/operationsInterfaces/operations.d.ts +1 -1
  113. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +33 -1
  114. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
  115. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +2 -0
  116. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
  117. package/dist-esm/src/sqlVirtualMachineManagementClient.js +50 -3
  118. package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
  119. package/dist-esm/test/sampleTest.js +11 -13
  120. package/dist-esm/test/sampleTest.js.map +1 -1
  121. package/package.json +48 -18
  122. package/review/arm-sqlvirtualmachine.api.md +176 -3
  123. package/rollup.config.js +6 -72
  124. package/src/models/index.ts +269 -4
  125. package/src/models/mappers.ts +344 -1
  126. package/src/models/parameters.ts +11 -11
  127. package/src/operations/availabilityGroupListeners.ts +7 -3
  128. package/src/operations/operations.ts +2 -2
  129. package/src/operations/sqlVirtualMachineGroups.ts +9 -3
  130. package/src/operations/sqlVirtualMachines.ts +208 -4
  131. package/src/operationsInterfaces/operations.ts +1 -1
  132. package/src/operationsInterfaces/sqlVirtualMachines.ts +51 -1
  133. package/src/sqlVirtualMachineManagementClient.ts +62 -3
  134. package/tsconfig.json +19 -5
  135. package/types/arm-sqlvirtualmachine.d.ts +294 -5
  136. package/types/tsdoc-metadata.json +1 -1
package/dist/index.js CHANGED
@@ -2,10 +2,32 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var coreClient = require('@azure/core-client');
6
5
  var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
+
9
31
  /*
10
32
  * Copyright (c) Microsoft Corporation.
11
33
  * Licensed under the MIT License.
@@ -13,36 +35,88 @@ var coreLro = require('@azure/core-lro');
13
35
  * Code generated by Microsoft (R) AutoRest Code Generator.
14
36
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
37
  */
38
+ /** Known values of {@link Role} that the service accepts. */
39
+ exports.KnownRole = void 0;
40
+ (function (KnownRole) {
41
+ KnownRole["Primary"] = "PRIMARY";
42
+ KnownRole["Secondary"] = "SECONDARY";
43
+ })(exports.KnownRole || (exports.KnownRole = {}));
44
+ /** Known values of {@link Commit} that the service accepts. */
45
+ exports.KnownCommit = void 0;
46
+ (function (KnownCommit) {
47
+ KnownCommit["SynchronousCommit"] = "SYNCHRONOUS_COMMIT";
48
+ KnownCommit["AsynchronousCommit"] = "ASYNCHRONOUS_COMMIT";
49
+ })(exports.KnownCommit || (exports.KnownCommit = {}));
50
+ /** Known values of {@link Failover} that the service accepts. */
51
+ exports.KnownFailover = void 0;
52
+ (function (KnownFailover) {
53
+ KnownFailover["Automatic"] = "AUTOMATIC";
54
+ KnownFailover["Manual"] = "MANUAL";
55
+ })(exports.KnownFailover || (exports.KnownFailover = {}));
56
+ /** Known values of {@link ReadableSecondary} that the service accepts. */
57
+ exports.KnownReadableSecondary = void 0;
58
+ (function (KnownReadableSecondary) {
59
+ KnownReadableSecondary["NO"] = "NO";
60
+ KnownReadableSecondary["ALL"] = "ALL";
61
+ KnownReadableSecondary["ReadOnly"] = "READ_ONLY";
62
+ })(exports.KnownReadableSecondary || (exports.KnownReadableSecondary = {}));
63
+ /** Known values of {@link CreatedByType} that the service accepts. */
64
+ exports.KnownCreatedByType = void 0;
65
+ (function (KnownCreatedByType) {
66
+ KnownCreatedByType["User"] = "User";
67
+ KnownCreatedByType["Application"] = "Application";
68
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
69
+ KnownCreatedByType["Key"] = "Key";
70
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
71
+ /** Known values of {@link OperationOrigin} that the service accepts. */
72
+ exports.KnownOperationOrigin = void 0;
16
73
  (function (KnownOperationOrigin) {
17
74
  KnownOperationOrigin["User"] = "user";
18
75
  KnownOperationOrigin["System"] = "system";
19
76
  })(exports.KnownOperationOrigin || (exports.KnownOperationOrigin = {}));
77
+ /** Known values of {@link SqlVmGroupImageSku} that the service accepts. */
78
+ exports.KnownSqlVmGroupImageSku = void 0;
20
79
  (function (KnownSqlVmGroupImageSku) {
21
80
  KnownSqlVmGroupImageSku["Developer"] = "Developer";
22
81
  KnownSqlVmGroupImageSku["Enterprise"] = "Enterprise";
23
82
  })(exports.KnownSqlVmGroupImageSku || (exports.KnownSqlVmGroupImageSku = {}));
83
+ /** Known values of {@link ScaleType} that the service accepts. */
84
+ exports.KnownScaleType = void 0;
24
85
  (function (KnownScaleType) {
25
86
  KnownScaleType["HA"] = "HA";
26
87
  })(exports.KnownScaleType || (exports.KnownScaleType = {}));
88
+ /** Known values of {@link ClusterManagerType} that the service accepts. */
89
+ exports.KnownClusterManagerType = void 0;
27
90
  (function (KnownClusterManagerType) {
28
91
  KnownClusterManagerType["Wsfc"] = "WSFC";
29
92
  })(exports.KnownClusterManagerType || (exports.KnownClusterManagerType = {}));
93
+ /** Known values of {@link ClusterConfiguration} that the service accepts. */
94
+ exports.KnownClusterConfiguration = void 0;
30
95
  (function (KnownClusterConfiguration) {
31
96
  KnownClusterConfiguration["Domainful"] = "Domainful";
32
97
  })(exports.KnownClusterConfiguration || (exports.KnownClusterConfiguration = {}));
98
+ /** Known values of {@link IdentityType} that the service accepts. */
99
+ exports.KnownIdentityType = void 0;
33
100
  (function (KnownIdentityType) {
101
+ KnownIdentityType["None"] = "None";
34
102
  KnownIdentityType["SystemAssigned"] = "SystemAssigned";
35
103
  })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
104
+ /** Known values of {@link SqlServerLicenseType} that the service accepts. */
105
+ exports.KnownSqlServerLicenseType = void 0;
36
106
  (function (KnownSqlServerLicenseType) {
37
107
  KnownSqlServerLicenseType["Payg"] = "PAYG";
38
108
  KnownSqlServerLicenseType["Ahub"] = "AHUB";
39
109
  KnownSqlServerLicenseType["DR"] = "DR";
40
110
  })(exports.KnownSqlServerLicenseType || (exports.KnownSqlServerLicenseType = {}));
111
+ /** Known values of {@link SqlManagementMode} that the service accepts. */
112
+ exports.KnownSqlManagementMode = void 0;
41
113
  (function (KnownSqlManagementMode) {
42
114
  KnownSqlManagementMode["Full"] = "Full";
43
115
  KnownSqlManagementMode["LightWeight"] = "LightWeight";
44
116
  KnownSqlManagementMode["NoAgent"] = "NoAgent";
45
117
  })(exports.KnownSqlManagementMode || (exports.KnownSqlManagementMode = {}));
118
+ /** Known values of {@link SqlImageSku} that the service accepts. */
119
+ exports.KnownSqlImageSku = void 0;
46
120
  (function (KnownSqlImageSku) {
47
121
  KnownSqlImageSku["Developer"] = "Developer";
48
122
  KnownSqlImageSku["Express"] = "Express";
@@ -50,29 +124,52 @@ var coreLro = require('@azure/core-lro');
50
124
  KnownSqlImageSku["Enterprise"] = "Enterprise";
51
125
  KnownSqlImageSku["Web"] = "Web";
52
126
  })(exports.KnownSqlImageSku || (exports.KnownSqlImageSku = {}));
127
+ /** Known values of {@link BackupScheduleType} that the service accepts. */
128
+ exports.KnownBackupScheduleType = void 0;
53
129
  (function (KnownBackupScheduleType) {
54
130
  KnownBackupScheduleType["Manual"] = "Manual";
55
131
  KnownBackupScheduleType["Automated"] = "Automated";
56
132
  })(exports.KnownBackupScheduleType || (exports.KnownBackupScheduleType = {}));
133
+ /** Known values of {@link FullBackupFrequencyType} that the service accepts. */
134
+ exports.KnownFullBackupFrequencyType = void 0;
57
135
  (function (KnownFullBackupFrequencyType) {
58
136
  KnownFullBackupFrequencyType["Daily"] = "Daily";
59
137
  KnownFullBackupFrequencyType["Weekly"] = "Weekly";
60
138
  })(exports.KnownFullBackupFrequencyType || (exports.KnownFullBackupFrequencyType = {}));
139
+ /** Known values of {@link AutoBackupDaysOfWeek} that the service accepts. */
140
+ exports.KnownAutoBackupDaysOfWeek = void 0;
141
+ (function (KnownAutoBackupDaysOfWeek) {
142
+ KnownAutoBackupDaysOfWeek["Monday"] = "Monday";
143
+ KnownAutoBackupDaysOfWeek["Tuesday"] = "Tuesday";
144
+ KnownAutoBackupDaysOfWeek["Wednesday"] = "Wednesday";
145
+ KnownAutoBackupDaysOfWeek["Thursday"] = "Thursday";
146
+ KnownAutoBackupDaysOfWeek["Friday"] = "Friday";
147
+ KnownAutoBackupDaysOfWeek["Saturday"] = "Saturday";
148
+ KnownAutoBackupDaysOfWeek["Sunday"] = "Sunday";
149
+ })(exports.KnownAutoBackupDaysOfWeek || (exports.KnownAutoBackupDaysOfWeek = {}));
150
+ /** Known values of {@link ConnectivityType} that the service accepts. */
151
+ exports.KnownConnectivityType = void 0;
61
152
  (function (KnownConnectivityType) {
62
153
  KnownConnectivityType["Local"] = "LOCAL";
63
154
  KnownConnectivityType["Private"] = "PRIVATE";
64
155
  KnownConnectivityType["Public"] = "PUBLIC";
65
156
  })(exports.KnownConnectivityType || (exports.KnownConnectivityType = {}));
157
+ /** Known values of {@link SqlWorkloadType} that the service accepts. */
158
+ exports.KnownSqlWorkloadType = void 0;
66
159
  (function (KnownSqlWorkloadType) {
67
160
  KnownSqlWorkloadType["General"] = "GENERAL";
68
161
  KnownSqlWorkloadType["Oltp"] = "OLTP";
69
162
  KnownSqlWorkloadType["DW"] = "DW";
70
163
  })(exports.KnownSqlWorkloadType || (exports.KnownSqlWorkloadType = {}));
164
+ /** Known values of {@link DiskConfigurationType} that the service accepts. */
165
+ exports.KnownDiskConfigurationType = void 0;
71
166
  (function (KnownDiskConfigurationType) {
72
167
  KnownDiskConfigurationType["NEW"] = "NEW";
73
168
  KnownDiskConfigurationType["Extend"] = "EXTEND";
74
169
  KnownDiskConfigurationType["ADD"] = "ADD";
75
170
  })(exports.KnownDiskConfigurationType || (exports.KnownDiskConfigurationType = {}));
171
+ /** Known values of {@link StorageWorkloadType} that the service accepts. */
172
+ exports.KnownStorageWorkloadType = void 0;
76
173
  (function (KnownStorageWorkloadType) {
77
174
  KnownStorageWorkloadType["General"] = "GENERAL";
78
175
  KnownStorageWorkloadType["Oltp"] = "OLTP";
@@ -150,6 +247,109 @@ const PrivateIPAddress = {
150
247
  }
151
248
  }
152
249
  };
250
+ const AgConfiguration = {
251
+ type: {
252
+ name: "Composite",
253
+ className: "AgConfiguration",
254
+ modelProperties: {
255
+ replicas: {
256
+ serializedName: "replicas",
257
+ readOnly: true,
258
+ type: {
259
+ name: "Sequence",
260
+ element: {
261
+ type: {
262
+ name: "Composite",
263
+ className: "AgReplica"
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ };
271
+ const AgReplica = {
272
+ type: {
273
+ name: "Composite",
274
+ className: "AgReplica",
275
+ modelProperties: {
276
+ sqlVirtualMachineInstanceId: {
277
+ serializedName: "sqlVirtualMachineInstanceId",
278
+ type: {
279
+ name: "String"
280
+ }
281
+ },
282
+ role: {
283
+ serializedName: "role",
284
+ type: {
285
+ name: "String"
286
+ }
287
+ },
288
+ commit: {
289
+ serializedName: "commit",
290
+ type: {
291
+ name: "String"
292
+ }
293
+ },
294
+ failover: {
295
+ serializedName: "failover",
296
+ type: {
297
+ name: "String"
298
+ }
299
+ },
300
+ readableSecondary: {
301
+ serializedName: "readableSecondary",
302
+ type: {
303
+ name: "String"
304
+ }
305
+ }
306
+ }
307
+ }
308
+ };
309
+ const SystemData = {
310
+ type: {
311
+ name: "Composite",
312
+ className: "SystemData",
313
+ modelProperties: {
314
+ createdBy: {
315
+ serializedName: "createdBy",
316
+ type: {
317
+ name: "String"
318
+ }
319
+ },
320
+ createdByType: {
321
+ serializedName: "createdByType",
322
+ type: {
323
+ name: "String"
324
+ }
325
+ },
326
+ createdAt: {
327
+ serializedName: "createdAt",
328
+ type: {
329
+ name: "DateTime"
330
+ }
331
+ },
332
+ lastModifiedBy: {
333
+ serializedName: "lastModifiedBy",
334
+ type: {
335
+ name: "String"
336
+ }
337
+ },
338
+ lastModifiedByType: {
339
+ serializedName: "lastModifiedByType",
340
+ type: {
341
+ name: "String"
342
+ }
343
+ },
344
+ lastModifiedAt: {
345
+ serializedName: "lastModifiedAt",
346
+ type: {
347
+ name: "DateTime"
348
+ }
349
+ }
350
+ }
351
+ }
352
+ };
153
353
  const Resource = {
154
354
  type: {
155
355
  name: "Composite",
@@ -507,6 +707,7 @@ const AutoPatchingSettings = {
507
707
  type: {
508
708
  name: "Enum",
509
709
  allowedValues: [
710
+ "Everyday",
510
711
  "Monday",
511
712
  "Tuesday",
512
713
  "Wednesday",
@@ -561,6 +762,12 @@ const AutoBackupSettings = {
561
762
  name: "String"
562
763
  }
563
764
  },
765
+ storageContainerName: {
766
+ serializedName: "storageContainerName",
767
+ type: {
768
+ name: "String"
769
+ }
770
+ },
564
771
  storageAccessKey: {
565
772
  serializedName: "storageAccessKey",
566
773
  type: {
@@ -591,6 +798,17 @@ const AutoBackupSettings = {
591
798
  name: "String"
592
799
  }
593
800
  },
801
+ daysOfWeek: {
802
+ serializedName: "daysOfWeek",
803
+ type: {
804
+ name: "Sequence",
805
+ element: {
806
+ type: {
807
+ name: "String"
808
+ }
809
+ }
810
+ }
811
+ },
594
812
  fullBackupStartTime: {
595
813
  serializedName: "fullBackupStartTime",
596
814
  type: {
@@ -682,6 +900,13 @@ const ServerConfigurationsManagementSettings = {
682
900
  name: "Composite",
683
901
  className: "AdditionalFeaturesServerConfigurations"
684
902
  }
903
+ },
904
+ sqlInstanceSettings: {
905
+ serializedName: "sqlInstanceSettings",
906
+ type: {
907
+ name: "Composite",
908
+ className: "SQLInstanceSettings"
909
+ }
685
910
  }
686
911
  }
687
912
  }
@@ -772,6 +997,44 @@ const AdditionalFeaturesServerConfigurations = {
772
997
  }
773
998
  }
774
999
  };
1000
+ const SQLInstanceSettings = {
1001
+ type: {
1002
+ name: "Composite",
1003
+ className: "SQLInstanceSettings",
1004
+ modelProperties: {
1005
+ collation: {
1006
+ serializedName: "collation",
1007
+ type: {
1008
+ name: "String"
1009
+ }
1010
+ },
1011
+ maxDop: {
1012
+ serializedName: "maxDop",
1013
+ type: {
1014
+ name: "Number"
1015
+ }
1016
+ },
1017
+ isOptimizeForAdHocWorkloadsEnabled: {
1018
+ serializedName: "isOptimizeForAdHocWorkloadsEnabled",
1019
+ type: {
1020
+ name: "Boolean"
1021
+ }
1022
+ },
1023
+ minServerMemoryMB: {
1024
+ serializedName: "minServerMemoryMB",
1025
+ type: {
1026
+ name: "Number"
1027
+ }
1028
+ },
1029
+ maxServerMemoryMB: {
1030
+ serializedName: "maxServerMemoryMB",
1031
+ type: {
1032
+ name: "Number"
1033
+ }
1034
+ }
1035
+ }
1036
+ }
1037
+ };
775
1038
  const StorageConfigurationSettings = {
776
1039
  type: {
777
1040
  name: "Composite",
@@ -795,7 +1058,13 @@ const StorageConfigurationSettings = {
795
1058
  serializedName: "sqlTempDbSettings",
796
1059
  type: {
797
1060
  name: "Composite",
798
- className: "SQLStorageSettings"
1061
+ className: "SQLTempDbSettings"
1062
+ }
1063
+ },
1064
+ sqlSystemDbOnDataDisk: {
1065
+ serializedName: "sqlSystemDbOnDataDisk",
1066
+ type: {
1067
+ name: "Boolean"
799
1068
  }
800
1069
  },
801
1070
  diskConfigurationType: {
@@ -838,6 +1107,135 @@ const SQLStorageSettings = {
838
1107
  }
839
1108
  }
840
1109
  };
1110
+ const SQLTempDbSettings = {
1111
+ type: {
1112
+ name: "Composite",
1113
+ className: "SQLTempDbSettings",
1114
+ modelProperties: {
1115
+ dataFileSize: {
1116
+ serializedName: "dataFileSize",
1117
+ type: {
1118
+ name: "Number"
1119
+ }
1120
+ },
1121
+ dataGrowth: {
1122
+ serializedName: "dataGrowth",
1123
+ type: {
1124
+ name: "Number"
1125
+ }
1126
+ },
1127
+ logFileSize: {
1128
+ serializedName: "logFileSize",
1129
+ type: {
1130
+ name: "Number"
1131
+ }
1132
+ },
1133
+ logGrowth: {
1134
+ serializedName: "logGrowth",
1135
+ type: {
1136
+ name: "Number"
1137
+ }
1138
+ },
1139
+ dataFileCount: {
1140
+ serializedName: "dataFileCount",
1141
+ type: {
1142
+ name: "Number"
1143
+ }
1144
+ },
1145
+ luns: {
1146
+ serializedName: "luns",
1147
+ type: {
1148
+ name: "Sequence",
1149
+ element: {
1150
+ type: {
1151
+ name: "Number"
1152
+ }
1153
+ }
1154
+ }
1155
+ },
1156
+ defaultFilePath: {
1157
+ serializedName: "defaultFilePath",
1158
+ type: {
1159
+ name: "String"
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ };
1165
+ const AssessmentSettings = {
1166
+ type: {
1167
+ name: "Composite",
1168
+ className: "AssessmentSettings",
1169
+ modelProperties: {
1170
+ enable: {
1171
+ serializedName: "enable",
1172
+ type: {
1173
+ name: "Boolean"
1174
+ }
1175
+ },
1176
+ runImmediately: {
1177
+ serializedName: "runImmediately",
1178
+ type: {
1179
+ name: "Boolean"
1180
+ }
1181
+ },
1182
+ schedule: {
1183
+ serializedName: "schedule",
1184
+ type: {
1185
+ name: "Composite",
1186
+ className: "Schedule"
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ };
1192
+ const Schedule = {
1193
+ type: {
1194
+ name: "Composite",
1195
+ className: "Schedule",
1196
+ modelProperties: {
1197
+ enable: {
1198
+ serializedName: "enable",
1199
+ type: {
1200
+ name: "Boolean"
1201
+ }
1202
+ },
1203
+ weeklyInterval: {
1204
+ serializedName: "weeklyInterval",
1205
+ type: {
1206
+ name: "Number"
1207
+ }
1208
+ },
1209
+ monthlyOccurrence: {
1210
+ serializedName: "monthlyOccurrence",
1211
+ type: {
1212
+ name: "Number"
1213
+ }
1214
+ },
1215
+ dayOfWeek: {
1216
+ serializedName: "dayOfWeek",
1217
+ type: {
1218
+ name: "Enum",
1219
+ allowedValues: [
1220
+ "Monday",
1221
+ "Tuesday",
1222
+ "Wednesday",
1223
+ "Thursday",
1224
+ "Friday",
1225
+ "Saturday",
1226
+ "Sunday"
1227
+ ]
1228
+ }
1229
+ },
1230
+ startTime: {
1231
+ serializedName: "startTime",
1232
+ type: {
1233
+ name: "String"
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ };
841
1239
  const SqlVirtualMachineUpdate = {
842
1240
  type: {
843
1241
  name: "Composite",
@@ -883,7 +1281,13 @@ const AvailabilityGroupListener = {
883
1281
  type: {
884
1282
  name: "Composite",
885
1283
  className: "AvailabilityGroupListener",
886
- modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { provisioningState: {
1284
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
1285
+ serializedName: "systemData",
1286
+ type: {
1287
+ name: "Composite",
1288
+ className: "SystemData"
1289
+ }
1290
+ }, provisioningState: {
887
1291
  serializedName: "properties.provisioningState",
888
1292
  readOnly: true,
889
1293
  type: {
@@ -915,6 +1319,12 @@ const AvailabilityGroupListener = {
915
1319
  type: {
916
1320
  name: "Number"
917
1321
  }
1322
+ }, availabilityGroupConfiguration: {
1323
+ serializedName: "properties.availabilityGroupConfiguration",
1324
+ type: {
1325
+ name: "Composite",
1326
+ className: "AgConfiguration"
1327
+ }
918
1328
  } })
919
1329
  }
920
1330
  };
@@ -922,7 +1332,13 @@ const SqlVirtualMachineGroup = {
922
1332
  type: {
923
1333
  name: "Composite",
924
1334
  className: "SqlVirtualMachineGroup",
925
- modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
1335
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
1336
+ serializedName: "systemData",
1337
+ type: {
1338
+ name: "Composite",
1339
+ className: "SystemData"
1340
+ }
1341
+ }, provisioningState: {
926
1342
  serializedName: "properties.provisioningState",
927
1343
  readOnly: true,
928
1344
  type: {
@@ -975,6 +1391,12 @@ const SqlVirtualMachine = {
975
1391
  name: "Composite",
976
1392
  className: "ResourceIdentity"
977
1393
  }
1394
+ }, systemData: {
1395
+ serializedName: "systemData",
1396
+ type: {
1397
+ name: "Composite",
1398
+ className: "SystemData"
1399
+ }
978
1400
  }, virtualMachineResourceId: {
979
1401
  serializedName: "properties.virtualMachineResourceId",
980
1402
  type: {
@@ -1047,6 +1469,12 @@ const SqlVirtualMachine = {
1047
1469
  name: "Composite",
1048
1470
  className: "StorageConfigurationSettings"
1049
1471
  }
1472
+ }, assessmentSettings: {
1473
+ serializedName: "properties.assessmentSettings",
1474
+ type: {
1475
+ name: "Composite",
1476
+ className: "AssessmentSettings"
1477
+ }
1050
1478
  } })
1051
1479
  }
1052
1480
  };
@@ -1055,6 +1483,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
1055
1483
  __proto__: null,
1056
1484
  LoadBalancerConfiguration: LoadBalancerConfiguration,
1057
1485
  PrivateIPAddress: PrivateIPAddress,
1486
+ AgConfiguration: AgConfiguration,
1487
+ AgReplica: AgReplica,
1488
+ SystemData: SystemData,
1058
1489
  Resource: Resource,
1059
1490
  AvailabilityGroupListenerListResult: AvailabilityGroupListenerListResult,
1060
1491
  OperationListResult: OperationListResult,
@@ -1074,8 +1505,12 @@ var Mappers = /*#__PURE__*/Object.freeze({
1074
1505
  SqlWorkloadTypeUpdateSettings: SqlWorkloadTypeUpdateSettings,
1075
1506
  SqlStorageUpdateSettings: SqlStorageUpdateSettings,
1076
1507
  AdditionalFeaturesServerConfigurations: AdditionalFeaturesServerConfigurations,
1508
+ SQLInstanceSettings: SQLInstanceSettings,
1077
1509
  StorageConfigurationSettings: StorageConfigurationSettings,
1078
1510
  SQLStorageSettings: SQLStorageSettings,
1511
+ SQLTempDbSettings: SQLTempDbSettings,
1512
+ AssessmentSettings: AssessmentSettings,
1513
+ Schedule: Schedule,
1079
1514
  SqlVirtualMachineUpdate: SqlVirtualMachineUpdate,
1080
1515
  ProxyResource: ProxyResource,
1081
1516
  TrackedResource: TrackedResource,
@@ -1143,6 +1578,15 @@ const availabilityGroupListenerName = {
1143
1578
  }
1144
1579
  }
1145
1580
  };
1581
+ const expand = {
1582
+ parameterPath: ["options", "expand"],
1583
+ mapper: {
1584
+ serializedName: "$expand",
1585
+ type: {
1586
+ name: "String"
1587
+ }
1588
+ }
1589
+ };
1146
1590
  const subscriptionId = {
1147
1591
  parameterPath: "subscriptionId",
1148
1592
  mapper: {
@@ -1156,7 +1600,7 @@ const subscriptionId = {
1156
1600
  const apiVersion = {
1157
1601
  parameterPath: "apiVersion",
1158
1602
  mapper: {
1159
- defaultValue: "2017-03-01-preview",
1603
+ defaultValue: "2021-11-01-preview",
1160
1604
  isConstant: true,
1161
1605
  serializedName: "api-version",
1162
1606
  type: {
@@ -1208,15 +1652,6 @@ const sqlVirtualMachineName = {
1208
1652
  }
1209
1653
  }
1210
1654
  };
1211
- const expand = {
1212
- parameterPath: ["options", "expand"],
1213
- mapper: {
1214
- serializedName: "$expand",
1215
- type: {
1216
- name: "String"
1217
- }
1218
- }
1219
- };
1220
1655
  const parameters3 = {
1221
1656
  parameterPath: "parameters",
1222
1657
  mapper: SqlVirtualMachine
@@ -1336,7 +1771,7 @@ class AvailabilityGroupListenersImpl {
1336
1771
  sqlVirtualMachineGroupName,
1337
1772
  availabilityGroupListenerName,
1338
1773
  options
1339
- }, getOperationSpec);
1774
+ }, getOperationSpec$2);
1340
1775
  }
1341
1776
  /**
1342
1777
  * Creates or updates an availability group listener.
@@ -1377,11 +1812,13 @@ class AvailabilityGroupListenersImpl {
1377
1812
  availabilityGroupListenerName,
1378
1813
  parameters,
1379
1814
  options
1380
- }, createOrUpdateOperationSpec);
1381
- return new coreLro.LroEngine(lro, {
1815
+ }, createOrUpdateOperationSpec$2);
1816
+ const poller = new coreLro.LroEngine(lro, {
1382
1817
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1383
1818
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1384
1819
  });
1820
+ yield poller.poll();
1821
+ return poller;
1385
1822
  });
1386
1823
  }
1387
1824
  /**
@@ -1436,11 +1873,13 @@ class AvailabilityGroupListenersImpl {
1436
1873
  sqlVirtualMachineGroupName,
1437
1874
  availabilityGroupListenerName,
1438
1875
  options
1439
- }, deleteOperationSpec);
1440
- return new coreLro.LroEngine(lro, {
1876
+ }, deleteOperationSpec$2);
1877
+ const poller = new coreLro.LroEngine(lro, {
1441
1878
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1442
1879
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1443
1880
  });
1881
+ yield poller.poll();
1882
+ return poller;
1444
1883
  });
1445
1884
  }
1446
1885
  /**
@@ -1480,8 +1919,8 @@ class AvailabilityGroupListenersImpl {
1480
1919
  }
1481
1920
  }
1482
1921
  // Operation Specifications
1483
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1484
- const getOperationSpec = {
1922
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1923
+ const getOperationSpec$2 = {
1485
1924
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1486
1925
  httpMethod: "GET",
1487
1926
  responses: {
@@ -1490,7 +1929,7 @@ const getOperationSpec = {
1490
1929
  },
1491
1930
  default: {}
1492
1931
  },
1493
- queryParameters: [apiVersion],
1932
+ queryParameters: [expand, apiVersion],
1494
1933
  urlParameters: [
1495
1934
  $host,
1496
1935
  resourceGroupName,
@@ -1499,9 +1938,9 @@ const getOperationSpec = {
1499
1938
  subscriptionId
1500
1939
  ],
1501
1940
  headerParameters: [accept],
1502
- serializer
1941
+ serializer: serializer$3
1503
1942
  };
1504
- const createOrUpdateOperationSpec = {
1943
+ const createOrUpdateOperationSpec$2 = {
1505
1944
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1506
1945
  httpMethod: "PUT",
1507
1946
  responses: {
@@ -1530,9 +1969,9 @@ const createOrUpdateOperationSpec = {
1530
1969
  ],
1531
1970
  headerParameters: [accept, contentType],
1532
1971
  mediaType: "json",
1533
- serializer
1972
+ serializer: serializer$3
1534
1973
  };
1535
- const deleteOperationSpec = {
1974
+ const deleteOperationSpec$2 = {
1536
1975
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}",
1537
1976
  httpMethod: "DELETE",
1538
1977
  responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
@@ -1544,7 +1983,7 @@ const deleteOperationSpec = {
1544
1983
  availabilityGroupListenerName,
1545
1984
  subscriptionId
1546
1985
  ],
1547
- serializer
1986
+ serializer: serializer$3
1548
1987
  };
1549
1988
  const listByGroupOperationSpec = {
1550
1989
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners",
@@ -1563,7 +2002,7 @@ const listByGroupOperationSpec = {
1563
2002
  subscriptionId
1564
2003
  ],
1565
2004
  headerParameters: [accept],
1566
- serializer
2005
+ serializer: serializer$3
1567
2006
  };
1568
2007
  const listByGroupNextOperationSpec = {
1569
2008
  path: "{nextLink}",
@@ -1583,7 +2022,7 @@ const listByGroupNextOperationSpec = {
1583
2022
  nextLink
1584
2023
  ],
1585
2024
  headerParameters: [accept],
1586
- serializer
2025
+ serializer: serializer$3
1587
2026
  };
1588
2027
 
1589
2028
  /*
@@ -1604,7 +2043,7 @@ class OperationsImpl {
1604
2043
  this.client = client;
1605
2044
  }
1606
2045
  /**
1607
- * Lists all of the available SQL Rest API operations.
2046
+ * Lists all of the available SQL Virtual Machine Rest API operations.
1608
2047
  * @param options The options parameters.
1609
2048
  */
1610
2049
  list(options) {
@@ -1652,11 +2091,11 @@ class OperationsImpl {
1652
2091
  });
1653
2092
  }
1654
2093
  /**
1655
- * Lists all of the available SQL Rest API operations.
2094
+ * Lists all of the available SQL Virtual Machine Rest API operations.
1656
2095
  * @param options The options parameters.
1657
2096
  */
1658
2097
  _list(options) {
1659
- return this.client.sendOperationRequest({ options }, listOperationSpec);
2098
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
1660
2099
  }
1661
2100
  /**
1662
2101
  * ListNext
@@ -1664,12 +2103,12 @@ class OperationsImpl {
1664
2103
  * @param options The options parameters.
1665
2104
  */
1666
2105
  _listNext(nextLink, options) {
1667
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
2106
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
1668
2107
  }
1669
2108
  }
1670
2109
  // Operation Specifications
1671
- const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
1672
- const listOperationSpec = {
2110
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2111
+ const listOperationSpec$2 = {
1673
2112
  path: "/providers/Microsoft.SqlVirtualMachine/operations",
1674
2113
  httpMethod: "GET",
1675
2114
  responses: {
@@ -1681,9 +2120,9 @@ const listOperationSpec = {
1681
2120
  queryParameters: [apiVersion],
1682
2121
  urlParameters: [$host],
1683
2122
  headerParameters: [accept],
1684
- serializer: serializer$1
2123
+ serializer: serializer$2
1685
2124
  };
1686
- const listNextOperationSpec = {
2125
+ const listNextOperationSpec$2 = {
1687
2126
  path: "{nextLink}",
1688
2127
  httpMethod: "GET",
1689
2128
  responses: {
@@ -1695,7 +2134,7 @@ const listNextOperationSpec = {
1695
2134
  queryParameters: [apiVersion],
1696
2135
  urlParameters: [$host, nextLink],
1697
2136
  headerParameters: [accept],
1698
- serializer: serializer$1
2137
+ serializer: serializer$2
1699
2138
  };
1700
2139
 
1701
2140
  /*
@@ -1856,10 +2295,12 @@ class SqlVirtualMachineGroupsImpl {
1856
2295
  };
1857
2296
  });
1858
2297
  const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, parameters, options }, createOrUpdateOperationSpec$1);
1859
- return new coreLro.LroEngine(lro, {
2298
+ const poller = new coreLro.LroEngine(lro, {
1860
2299
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1861
2300
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1862
2301
  });
2302
+ yield poller.poll();
2303
+ return poller;
1863
2304
  });
1864
2305
  }
1865
2306
  /**
@@ -1908,10 +2349,12 @@ class SqlVirtualMachineGroupsImpl {
1908
2349
  };
1909
2350
  });
1910
2351
  const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, options }, deleteOperationSpec$1);
1911
- return new coreLro.LroEngine(lro, {
2352
+ const poller = new coreLro.LroEngine(lro, {
1912
2353
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1913
2354
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1914
2355
  });
2356
+ yield poller.poll();
2357
+ return poller;
1915
2358
  });
1916
2359
  }
1917
2360
  /**
@@ -1959,11 +2402,13 @@ class SqlVirtualMachineGroupsImpl {
1959
2402
  }
1960
2403
  };
1961
2404
  });
1962
- const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, parameters, options }, updateOperationSpec);
1963
- return new coreLro.LroEngine(lro, {
2405
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineGroupName, parameters, options }, updateOperationSpec$1);
2406
+ const poller = new coreLro.LroEngine(lro, {
1964
2407
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1965
2408
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1966
2409
  });
2410
+ yield poller.poll();
2411
+ return poller;
1967
2412
  });
1968
2413
  }
1969
2414
  /**
@@ -1987,7 +2432,7 @@ class SqlVirtualMachineGroupsImpl {
1987
2432
  * @param options The options parameters.
1988
2433
  */
1989
2434
  _listByResourceGroup(resourceGroupName, options) {
1990
- return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2435
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
1991
2436
  }
1992
2437
  /**
1993
2438
  * Gets all SQL virtual machine groups in a subscription.
@@ -2004,7 +2449,7 @@ class SqlVirtualMachineGroupsImpl {
2004
2449
  * @param options The options parameters.
2005
2450
  */
2006
2451
  _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2007
- return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2452
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
2008
2453
  }
2009
2454
  /**
2010
2455
  * ListNext
@@ -2016,7 +2461,7 @@ class SqlVirtualMachineGroupsImpl {
2016
2461
  }
2017
2462
  }
2018
2463
  // Operation Specifications
2019
- const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
2464
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2020
2465
  const getOperationSpec$1 = {
2021
2466
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2022
2467
  httpMethod: "GET",
@@ -2034,7 +2479,7 @@ const getOperationSpec$1 = {
2034
2479
  subscriptionId
2035
2480
  ],
2036
2481
  headerParameters: [accept],
2037
- serializer: serializer$2
2482
+ serializer: serializer$1
2038
2483
  };
2039
2484
  const createOrUpdateOperationSpec$1 = {
2040
2485
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
@@ -2064,7 +2509,7 @@ const createOrUpdateOperationSpec$1 = {
2064
2509
  ],
2065
2510
  headerParameters: [accept, contentType],
2066
2511
  mediaType: "json",
2067
- serializer: serializer$2
2512
+ serializer: serializer$1
2068
2513
  };
2069
2514
  const deleteOperationSpec$1 = {
2070
2515
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
@@ -2077,9 +2522,9 @@ const deleteOperationSpec$1 = {
2077
2522
  sqlVirtualMachineGroupName,
2078
2523
  subscriptionId
2079
2524
  ],
2080
- serializer: serializer$2
2525
+ serializer: serializer$1
2081
2526
  };
2082
- const updateOperationSpec = {
2527
+ const updateOperationSpec$1 = {
2083
2528
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
2084
2529
  httpMethod: "PATCH",
2085
2530
  responses: {
@@ -2107,9 +2552,9 @@ const updateOperationSpec = {
2107
2552
  ],
2108
2553
  headerParameters: [accept, contentType],
2109
2554
  mediaType: "json",
2110
- serializer: serializer$2
2555
+ serializer: serializer$1
2111
2556
  };
2112
- const listByResourceGroupOperationSpec = {
2557
+ const listByResourceGroupOperationSpec$1 = {
2113
2558
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups",
2114
2559
  httpMethod: "GET",
2115
2560
  responses: {
@@ -2125,7 +2570,7 @@ const listByResourceGroupOperationSpec = {
2125
2570
  subscriptionId
2126
2571
  ],
2127
2572
  headerParameters: [accept],
2128
- serializer: serializer$2
2573
+ serializer: serializer$1
2129
2574
  };
2130
2575
  const listOperationSpec$1 = {
2131
2576
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups",
@@ -2139,9 +2584,9 @@ const listOperationSpec$1 = {
2139
2584
  queryParameters: [apiVersion],
2140
2585
  urlParameters: [$host, subscriptionId],
2141
2586
  headerParameters: [accept],
2142
- serializer: serializer$2
2587
+ serializer: serializer$1
2143
2588
  };
2144
- const listByResourceGroupNextOperationSpec = {
2589
+ const listByResourceGroupNextOperationSpec$1 = {
2145
2590
  path: "{nextLink}",
2146
2591
  httpMethod: "GET",
2147
2592
  responses: {
@@ -2158,7 +2603,7 @@ const listByResourceGroupNextOperationSpec = {
2158
2603
  nextLink
2159
2604
  ],
2160
2605
  headerParameters: [accept],
2161
- serializer: serializer$2
2606
+ serializer: serializer$1
2162
2607
  };
2163
2608
  const listNextOperationSpec$1 = {
2164
2609
  path: "{nextLink}",
@@ -2176,7 +2621,7 @@ const listNextOperationSpec$1 = {
2176
2621
  nextLink
2177
2622
  ],
2178
2623
  headerParameters: [accept],
2179
- serializer: serializer$2
2624
+ serializer: serializer$1
2180
2625
  };
2181
2626
 
2182
2627
  /*
@@ -2360,7 +2805,60 @@ class SqlVirtualMachinesImpl {
2360
2805
  * @param options The options parameters.
2361
2806
  */
2362
2807
  _list(options) {
2363
- return this.client.sendOperationRequest({ options }, listOperationSpec$2);
2808
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
2809
+ }
2810
+ /**
2811
+ * Uninstalls and reinstalls the SQL Iaas Extension.
2812
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2813
+ * value from the Azure Resource Manager API or the portal.
2814
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2815
+ * @param options The options parameters.
2816
+ */
2817
+ beginRedeploy(resourceGroupName, sqlVirtualMachineName, options) {
2818
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2819
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2820
+ return this.client.sendOperationRequest(args, spec);
2821
+ });
2822
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2823
+ var _a;
2824
+ let currentRawResponse = undefined;
2825
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2826
+ const callback = (rawResponse, flatResponse) => {
2827
+ currentRawResponse = rawResponse;
2828
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2829
+ };
2830
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2831
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2832
+ return {
2833
+ flatResponse,
2834
+ rawResponse: {
2835
+ statusCode: currentRawResponse.status,
2836
+ body: currentRawResponse.parsedBody,
2837
+ headers: currentRawResponse.headers.toJSON()
2838
+ }
2839
+ };
2840
+ });
2841
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, redeployOperationSpec);
2842
+ const poller = new coreLro.LroEngine(lro, {
2843
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2844
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2845
+ });
2846
+ yield poller.poll();
2847
+ return poller;
2848
+ });
2849
+ }
2850
+ /**
2851
+ * Uninstalls and reinstalls the SQL Iaas Extension.
2852
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2853
+ * value from the Azure Resource Manager API or the portal.
2854
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2855
+ * @param options The options parameters.
2856
+ */
2857
+ beginRedeployAndWait(resourceGroupName, sqlVirtualMachineName, options) {
2858
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2859
+ const poller = yield this.beginRedeploy(resourceGroupName, sqlVirtualMachineName, options);
2860
+ return poller.pollUntilDone();
2861
+ });
2364
2862
  }
2365
2863
  /**
2366
2864
  * Gets a SQL virtual machine.
@@ -2370,7 +2868,7 @@ class SqlVirtualMachinesImpl {
2370
2868
  * @param options The options parameters.
2371
2869
  */
2372
2870
  get(resourceGroupName, sqlVirtualMachineName, options) {
2373
- return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineName, options }, getOperationSpec$2);
2871
+ return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineName, options }, getOperationSpec);
2374
2872
  }
2375
2873
  /**
2376
2874
  * Creates or updates a SQL virtual machine.
@@ -2404,11 +2902,13 @@ class SqlVirtualMachinesImpl {
2404
2902
  }
2405
2903
  };
2406
2904
  });
2407
- const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, createOrUpdateOperationSpec$2);
2408
- return new coreLro.LroEngine(lro, {
2905
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, createOrUpdateOperationSpec);
2906
+ const poller = new coreLro.LroEngine(lro, {
2409
2907
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2410
2908
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2411
2909
  });
2910
+ yield poller.poll();
2911
+ return poller;
2412
2912
  });
2413
2913
  }
2414
2914
  /**
@@ -2456,11 +2956,13 @@ class SqlVirtualMachinesImpl {
2456
2956
  }
2457
2957
  };
2458
2958
  });
2459
- const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, deleteOperationSpec$2);
2460
- return new coreLro.LroEngine(lro, {
2959
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, deleteOperationSpec);
2960
+ const poller = new coreLro.LroEngine(lro, {
2461
2961
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2462
2962
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2463
2963
  });
2964
+ yield poller.poll();
2965
+ return poller;
2464
2966
  });
2465
2967
  }
2466
2968
  /**
@@ -2508,11 +3010,13 @@ class SqlVirtualMachinesImpl {
2508
3010
  }
2509
3011
  };
2510
3012
  });
2511
- const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, updateOperationSpec$1);
2512
- return new coreLro.LroEngine(lro, {
3013
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, updateOperationSpec);
3014
+ const poller = new coreLro.LroEngine(lro, {
2513
3015
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2514
3016
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2515
3017
  });
3018
+ yield poller.poll();
3019
+ return poller;
2516
3020
  });
2517
3021
  }
2518
3022
  /**
@@ -2536,7 +3040,60 @@ class SqlVirtualMachinesImpl {
2536
3040
  * @param options The options parameters.
2537
3041
  */
2538
3042
  _listByResourceGroup(resourceGroupName, options) {
2539
- return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
3043
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
3044
+ }
3045
+ /**
3046
+ * Starts Assessment on SQL virtual machine.
3047
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
3048
+ * value from the Azure Resource Manager API or the portal.
3049
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
3050
+ * @param options The options parameters.
3051
+ */
3052
+ beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options) {
3053
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3054
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3055
+ return this.client.sendOperationRequest(args, spec);
3056
+ });
3057
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3058
+ var _a;
3059
+ let currentRawResponse = undefined;
3060
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3061
+ const callback = (rawResponse, flatResponse) => {
3062
+ currentRawResponse = rawResponse;
3063
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3064
+ };
3065
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3066
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3067
+ return {
3068
+ flatResponse,
3069
+ rawResponse: {
3070
+ statusCode: currentRawResponse.status,
3071
+ body: currentRawResponse.parsedBody,
3072
+ headers: currentRawResponse.headers.toJSON()
3073
+ }
3074
+ };
3075
+ });
3076
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, startAssessmentOperationSpec);
3077
+ const poller = new coreLro.LroEngine(lro, {
3078
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3079
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3080
+ });
3081
+ yield poller.poll();
3082
+ return poller;
3083
+ });
3084
+ }
3085
+ /**
3086
+ * Starts Assessment on SQL virtual machine.
3087
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
3088
+ * value from the Azure Resource Manager API or the portal.
3089
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
3090
+ * @param options The options parameters.
3091
+ */
3092
+ beginStartAssessmentAndWait(resourceGroupName, sqlVirtualMachineName, options) {
3093
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3094
+ const poller = yield this.beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options);
3095
+ return poller.pollUntilDone();
3096
+ });
2540
3097
  }
2541
3098
  /**
2542
3099
  * ListBySqlVmGroupNext
@@ -2555,7 +3112,7 @@ class SqlVirtualMachinesImpl {
2555
3112
  * @param options The options parameters.
2556
3113
  */
2557
3114
  _listNext(nextLink, options) {
2558
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
3115
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
2559
3116
  }
2560
3117
  /**
2561
3118
  * ListByResourceGroupNext
@@ -2565,11 +3122,11 @@ class SqlVirtualMachinesImpl {
2565
3122
  * @param options The options parameters.
2566
3123
  */
2567
3124
  _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2568
- return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
3125
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2569
3126
  }
2570
3127
  }
2571
3128
  // Operation Specifications
2572
- const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
3129
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2573
3130
  const listBySqlVmGroupOperationSpec = {
2574
3131
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines",
2575
3132
  httpMethod: "GET",
@@ -2587,9 +3144,9 @@ const listBySqlVmGroupOperationSpec = {
2587
3144
  subscriptionId
2588
3145
  ],
2589
3146
  headerParameters: [accept],
2590
- serializer: serializer$3
3147
+ serializer
2591
3148
  };
2592
- const listOperationSpec$2 = {
3149
+ const listOperationSpec = {
2593
3150
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
2594
3151
  httpMethod: "GET",
2595
3152
  responses: {
@@ -2601,9 +3158,22 @@ const listOperationSpec$2 = {
2601
3158
  queryParameters: [apiVersion],
2602
3159
  urlParameters: [$host, subscriptionId],
2603
3160
  headerParameters: [accept],
2604
- serializer: serializer$3
3161
+ serializer
2605
3162
  };
2606
- const getOperationSpec$2 = {
3163
+ const redeployOperationSpec = {
3164
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
3165
+ httpMethod: "POST",
3166
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
3167
+ queryParameters: [apiVersion],
3168
+ urlParameters: [
3169
+ $host,
3170
+ resourceGroupName,
3171
+ subscriptionId,
3172
+ sqlVirtualMachineName
3173
+ ],
3174
+ serializer
3175
+ };
3176
+ const getOperationSpec = {
2607
3177
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2608
3178
  httpMethod: "GET",
2609
3179
  responses: {
@@ -2612,7 +3182,7 @@ const getOperationSpec$2 = {
2612
3182
  },
2613
3183
  default: {}
2614
3184
  },
2615
- queryParameters: [apiVersion, expand],
3185
+ queryParameters: [expand, apiVersion],
2616
3186
  urlParameters: [
2617
3187
  $host,
2618
3188
  resourceGroupName,
@@ -2620,9 +3190,9 @@ const getOperationSpec$2 = {
2620
3190
  sqlVirtualMachineName
2621
3191
  ],
2622
3192
  headerParameters: [accept],
2623
- serializer: serializer$3
3193
+ serializer
2624
3194
  };
2625
- const createOrUpdateOperationSpec$2 = {
3195
+ const createOrUpdateOperationSpec = {
2626
3196
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2627
3197
  httpMethod: "PUT",
2628
3198
  responses: {
@@ -2650,9 +3220,9 @@ const createOrUpdateOperationSpec$2 = {
2650
3220
  ],
2651
3221
  headerParameters: [accept, contentType],
2652
3222
  mediaType: "json",
2653
- serializer: serializer$3
3223
+ serializer
2654
3224
  };
2655
- const deleteOperationSpec$2 = {
3225
+ const deleteOperationSpec = {
2656
3226
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2657
3227
  httpMethod: "DELETE",
2658
3228
  responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
@@ -2663,9 +3233,9 @@ const deleteOperationSpec$2 = {
2663
3233
  subscriptionId,
2664
3234
  sqlVirtualMachineName
2665
3235
  ],
2666
- serializer: serializer$3
3236
+ serializer
2667
3237
  };
2668
- const updateOperationSpec$1 = {
3238
+ const updateOperationSpec = {
2669
3239
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2670
3240
  httpMethod: "PATCH",
2671
3241
  responses: {
@@ -2693,9 +3263,9 @@ const updateOperationSpec$1 = {
2693
3263
  ],
2694
3264
  headerParameters: [accept, contentType],
2695
3265
  mediaType: "json",
2696
- serializer: serializer$3
3266
+ serializer
2697
3267
  };
2698
- const listByResourceGroupOperationSpec$1 = {
3268
+ const listByResourceGroupOperationSpec = {
2699
3269
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
2700
3270
  httpMethod: "GET",
2701
3271
  responses: {
@@ -2711,7 +3281,20 @@ const listByResourceGroupOperationSpec$1 = {
2711
3281
  subscriptionId
2712
3282
  ],
2713
3283
  headerParameters: [accept],
2714
- serializer: serializer$3
3284
+ serializer
3285
+ };
3286
+ const startAssessmentOperationSpec = {
3287
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
3288
+ httpMethod: "POST",
3289
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
3290
+ queryParameters: [apiVersion],
3291
+ urlParameters: [
3292
+ $host,
3293
+ resourceGroupName,
3294
+ subscriptionId,
3295
+ sqlVirtualMachineName
3296
+ ],
3297
+ serializer
2715
3298
  };
2716
3299
  const listBySqlVmGroupNextOperationSpec = {
2717
3300
  path: "{nextLink}",
@@ -2731,9 +3314,9 @@ const listBySqlVmGroupNextOperationSpec = {
2731
3314
  nextLink
2732
3315
  ],
2733
3316
  headerParameters: [accept],
2734
- serializer: serializer$3
3317
+ serializer
2735
3318
  };
2736
- const listNextOperationSpec$2 = {
3319
+ const listNextOperationSpec = {
2737
3320
  path: "{nextLink}",
2738
3321
  httpMethod: "GET",
2739
3322
  responses: {
@@ -2749,9 +3332,9 @@ const listNextOperationSpec$2 = {
2749
3332
  nextLink
2750
3333
  ],
2751
3334
  headerParameters: [accept],
2752
- serializer: serializer$3
3335
+ serializer
2753
3336
  };
2754
- const listByResourceGroupNextOperationSpec$1 = {
3337
+ const listByResourceGroupNextOperationSpec = {
2755
3338
  path: "{nextLink}",
2756
3339
  httpMethod: "GET",
2757
3340
  responses: {
@@ -2768,7 +3351,7 @@ const listByResourceGroupNextOperationSpec$1 = {
2768
3351
  nextLink
2769
3352
  ],
2770
3353
  headerParameters: [accept],
2771
- serializer: serializer$3
3354
+ serializer
2772
3355
  };
2773
3356
 
2774
3357
  /*
@@ -2778,7 +3361,7 @@ const listByResourceGroupNextOperationSpec$1 = {
2778
3361
  * Code generated by Microsoft (R) AutoRest Code Generator.
2779
3362
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2780
3363
  */
2781
- class SqlVirtualMachineManagementClient extends coreClient.ServiceClient {
3364
+ class SqlVirtualMachineManagementClient extends coreClient__namespace.ServiceClient {
2782
3365
  /**
2783
3366
  * Initializes a new instance of the SqlVirtualMachineManagementClient class.
2784
3367
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -2786,6 +3369,7 @@ class SqlVirtualMachineManagementClient extends coreClient.ServiceClient {
2786
3369
  * @param options The parameter options
2787
3370
  */
2788
3371
  constructor(credentials, subscriptionId, options) {
3372
+ var _a, _b;
2789
3373
  if (credentials === undefined) {
2790
3374
  throw new Error("'credentials' cannot be null");
2791
3375
  }
@@ -2800,7 +3384,7 @@ class SqlVirtualMachineManagementClient extends coreClient.ServiceClient {
2800
3384
  requestContentType: "application/json; charset=utf-8",
2801
3385
  credential: credentials
2802
3386
  };
2803
- const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.2`;
3387
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.5`;
2804
3388
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2805
3389
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2806
3390
  : `${packageDetails}`;
@@ -2809,17 +3393,61 @@ class SqlVirtualMachineManagementClient extends coreClient.ServiceClient {
2809
3393
  }
2810
3394
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2811
3395
  userAgentPrefix
2812
- }, baseUri: options.endpoint || "https://management.azure.com" });
3396
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2813
3397
  super(optionsWithDefaults);
3398
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3399
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3400
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3401
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3402
+ if (!bearerTokenAuthenticationPolicyFound) {
3403
+ this.pipeline.removePolicy({
3404
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3405
+ });
3406
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3407
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
3408
+ challengeCallbacks: {
3409
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3410
+ }
3411
+ }));
3412
+ }
3413
+ }
2814
3414
  // Parameter assignments
2815
3415
  this.subscriptionId = subscriptionId;
2816
3416
  // Assigning values to Constant parameters
2817
3417
  this.$host = options.$host || "https://management.azure.com";
2818
- this.apiVersion = options.apiVersion || "2017-03-01-preview";
3418
+ this.apiVersion = options.apiVersion || "2021-11-01-preview";
2819
3419
  this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
2820
3420
  this.operations = new OperationsImpl(this);
2821
3421
  this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
2822
3422
  this.sqlVirtualMachines = new SqlVirtualMachinesImpl(this);
3423
+ this.addCustomApiVersionPolicy(options.apiVersion);
3424
+ }
3425
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3426
+ addCustomApiVersionPolicy(apiVersion) {
3427
+ if (!apiVersion) {
3428
+ return;
3429
+ }
3430
+ const apiVersionPolicy = {
3431
+ name: "CustomApiVersionPolicy",
3432
+ sendRequest(request, next) {
3433
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3434
+ const param = request.url.split("?");
3435
+ if (param.length > 1) {
3436
+ const newParams = param[1].split("&").map((item) => {
3437
+ if (item.indexOf("api-version") > -1) {
3438
+ return item.replace(/(?<==).*$/, apiVersion);
3439
+ }
3440
+ else {
3441
+ return item;
3442
+ }
3443
+ });
3444
+ request.url = param[0] + "?" + newParams.join("&");
3445
+ }
3446
+ return next(request);
3447
+ });
3448
+ }
3449
+ };
3450
+ this.pipeline.addPolicy(apiVersionPolicy);
2823
3451
  }
2824
3452
  }
2825
3453