@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
@@ -1,377 +1,667 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/sqlVirtualMachinesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { SqlVirtualMachines } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
15
13
  import * as Parameters from "../models/parameters";
16
- import { SqlVirtualMachineManagementClientContext } from "../sqlVirtualMachineManagementClientContext";
14
+ import { SqlVirtualMachineManagementClient } from "../sqlVirtualMachineManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ SqlVirtualMachine,
19
+ SqlVirtualMachinesListBySqlVmGroupNextOptionalParams,
20
+ SqlVirtualMachinesListBySqlVmGroupOptionalParams,
21
+ SqlVirtualMachinesListNextOptionalParams,
22
+ SqlVirtualMachinesListOptionalParams,
23
+ SqlVirtualMachinesListByResourceGroupNextOptionalParams,
24
+ SqlVirtualMachinesListByResourceGroupOptionalParams,
25
+ SqlVirtualMachinesListBySqlVmGroupResponse,
26
+ SqlVirtualMachinesListResponse,
27
+ SqlVirtualMachinesGetOptionalParams,
28
+ SqlVirtualMachinesGetResponse,
29
+ SqlVirtualMachinesCreateOrUpdateOptionalParams,
30
+ SqlVirtualMachinesCreateOrUpdateResponse,
31
+ SqlVirtualMachinesDeleteOptionalParams,
32
+ SqlVirtualMachineUpdate,
33
+ SqlVirtualMachinesUpdateOptionalParams,
34
+ SqlVirtualMachinesUpdateResponse,
35
+ SqlVirtualMachinesListByResourceGroupResponse,
36
+ SqlVirtualMachinesListBySqlVmGroupNextResponse,
37
+ SqlVirtualMachinesListNextResponse,
38
+ SqlVirtualMachinesListByResourceGroupNextResponse
39
+ } from "../models";
17
40
 
18
- /** Class representing a SqlVirtualMachines. */
19
- export class SqlVirtualMachines {
20
- private readonly client: SqlVirtualMachineManagementClientContext;
41
+ /// <reference lib="esnext.asynciterable" />
42
+ /** Class containing SqlVirtualMachines operations. */
43
+ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
44
+ private readonly client: SqlVirtualMachineManagementClient;
21
45
 
22
46
  /**
23
- * Create a SqlVirtualMachines.
24
- * @param {SqlVirtualMachineManagementClientContext} client Reference to the service client.
47
+ * Initialize a new instance of the class SqlVirtualMachines class.
48
+ * @param client Reference to the service client
25
49
  */
26
- constructor(client: SqlVirtualMachineManagementClientContext) {
50
+ constructor(client: SqlVirtualMachineManagementClient) {
27
51
  this.client = client;
28
52
  }
29
53
 
30
54
  /**
31
- * Gets all SQL virtual machines in a subscription.
32
- * @param [options] The optional parameters
33
- * @returns Promise<Models.SqlVirtualMachinesListResponse>
55
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
56
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
57
+ * value from the Azure Resource Manager API or the portal.
58
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
59
+ * @param options The options parameters.
34
60
  */
35
- list(options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesListResponse>;
61
+ public listBySqlVmGroup(
62
+ resourceGroupName: string,
63
+ sqlVirtualMachineGroupName: string,
64
+ options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
65
+ ): PagedAsyncIterableIterator<SqlVirtualMachine> {
66
+ const iter = this.listBySqlVmGroupPagingAll(
67
+ resourceGroupName,
68
+ sqlVirtualMachineGroupName,
69
+ options
70
+ );
71
+ return {
72
+ next() {
73
+ return iter.next();
74
+ },
75
+ [Symbol.asyncIterator]() {
76
+ return this;
77
+ },
78
+ byPage: () => {
79
+ return this.listBySqlVmGroupPagingPage(
80
+ resourceGroupName,
81
+ sqlVirtualMachineGroupName,
82
+ options
83
+ );
84
+ }
85
+ };
86
+ }
87
+
88
+ private async *listBySqlVmGroupPagingPage(
89
+ resourceGroupName: string,
90
+ sqlVirtualMachineGroupName: string,
91
+ options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
92
+ ): AsyncIterableIterator<SqlVirtualMachine[]> {
93
+ let result = await this._listBySqlVmGroup(
94
+ resourceGroupName,
95
+ sqlVirtualMachineGroupName,
96
+ options
97
+ );
98
+ yield result.value || [];
99
+ let continuationToken = result.nextLink;
100
+ while (continuationToken) {
101
+ result = await this._listBySqlVmGroupNext(
102
+ resourceGroupName,
103
+ sqlVirtualMachineGroupName,
104
+ continuationToken,
105
+ options
106
+ );
107
+ continuationToken = result.nextLink;
108
+ yield result.value || [];
109
+ }
110
+ }
111
+
112
+ private async *listBySqlVmGroupPagingAll(
113
+ resourceGroupName: string,
114
+ sqlVirtualMachineGroupName: string,
115
+ options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
116
+ ): AsyncIterableIterator<SqlVirtualMachine> {
117
+ for await (const page of this.listBySqlVmGroupPagingPage(
118
+ resourceGroupName,
119
+ sqlVirtualMachineGroupName,
120
+ options
121
+ )) {
122
+ yield* page;
123
+ }
124
+ }
125
+
36
126
  /**
37
- * @param callback The callback
127
+ * Gets all SQL virtual machines in a subscription.
128
+ * @param options The options parameters.
38
129
  */
39
- list(callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
130
+ public list(
131
+ options?: SqlVirtualMachinesListOptionalParams
132
+ ): PagedAsyncIterableIterator<SqlVirtualMachine> {
133
+ const iter = this.listPagingAll(options);
134
+ return {
135
+ next() {
136
+ return iter.next();
137
+ },
138
+ [Symbol.asyncIterator]() {
139
+ return this;
140
+ },
141
+ byPage: () => {
142
+ return this.listPagingPage(options);
143
+ }
144
+ };
145
+ }
146
+
147
+ private async *listPagingPage(
148
+ options?: SqlVirtualMachinesListOptionalParams
149
+ ): AsyncIterableIterator<SqlVirtualMachine[]> {
150
+ let result = await this._list(options);
151
+ yield result.value || [];
152
+ let continuationToken = result.nextLink;
153
+ while (continuationToken) {
154
+ result = await this._listNext(continuationToken, options);
155
+ continuationToken = result.nextLink;
156
+ yield result.value || [];
157
+ }
158
+ }
159
+
160
+ private async *listPagingAll(
161
+ options?: SqlVirtualMachinesListOptionalParams
162
+ ): AsyncIterableIterator<SqlVirtualMachine> {
163
+ for await (const page of this.listPagingPage(options)) {
164
+ yield* page;
165
+ }
166
+ }
167
+
40
168
  /**
41
- * @param options The optional parameters
42
- * @param callback The callback
169
+ * Gets all SQL virtual machines in a resource group.
170
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
171
+ * value from the Azure Resource Manager API or the portal.
172
+ * @param options The options parameters.
43
173
  */
44
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
45
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SqlVirtualMachineListResult>, callback?: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): Promise<Models.SqlVirtualMachinesListResponse> {
46
- return this.client.sendOperationRequest(
47
- {
48
- options
174
+ public listByResourceGroup(
175
+ resourceGroupName: string,
176
+ options?: SqlVirtualMachinesListByResourceGroupOptionalParams
177
+ ): PagedAsyncIterableIterator<SqlVirtualMachine> {
178
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
179
+ return {
180
+ next() {
181
+ return iter.next();
49
182
  },
50
- listOperationSpec,
51
- callback) as Promise<Models.SqlVirtualMachinesListResponse>;
183
+ [Symbol.asyncIterator]() {
184
+ return this;
185
+ },
186
+ byPage: () => {
187
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
188
+ }
189
+ };
190
+ }
191
+
192
+ private async *listByResourceGroupPagingPage(
193
+ resourceGroupName: string,
194
+ options?: SqlVirtualMachinesListByResourceGroupOptionalParams
195
+ ): AsyncIterableIterator<SqlVirtualMachine[]> {
196
+ let result = await this._listByResourceGroup(resourceGroupName, options);
197
+ yield result.value || [];
198
+ let continuationToken = result.nextLink;
199
+ while (continuationToken) {
200
+ result = await this._listByResourceGroupNext(
201
+ resourceGroupName,
202
+ continuationToken,
203
+ options
204
+ );
205
+ continuationToken = result.nextLink;
206
+ yield result.value || [];
207
+ }
208
+ }
209
+
210
+ private async *listByResourceGroupPagingAll(
211
+ resourceGroupName: string,
212
+ options?: SqlVirtualMachinesListByResourceGroupOptionalParams
213
+ ): AsyncIterableIterator<SqlVirtualMachine> {
214
+ for await (const page of this.listByResourceGroupPagingPage(
215
+ resourceGroupName,
216
+ options
217
+ )) {
218
+ yield* page;
219
+ }
52
220
  }
53
221
 
54
222
  /**
55
- * Gets a SQL virtual machine.
56
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
57
- * this value from the Azure Resource Manager API or the portal.
58
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.SqlVirtualMachinesGetResponse>
223
+ * Gets the list of sql virtual machines in a SQL virtual machine group.
224
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
225
+ * value from the Azure Resource Manager API or the portal.
226
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
227
+ * @param options The options parameters.
61
228
  */
62
- get(resourceGroupName: string, sqlVirtualMachineName: string, options?: Models.SqlVirtualMachinesGetOptionalParams): Promise<Models.SqlVirtualMachinesGetResponse>;
229
+ private _listBySqlVmGroup(
230
+ resourceGroupName: string,
231
+ sqlVirtualMachineGroupName: string,
232
+ options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
233
+ ): Promise<SqlVirtualMachinesListBySqlVmGroupResponse> {
234
+ return this.client.sendOperationRequest(
235
+ { resourceGroupName, sqlVirtualMachineGroupName, options },
236
+ listBySqlVmGroupOperationSpec
237
+ );
238
+ }
239
+
63
240
  /**
64
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
65
- * this value from the Azure Resource Manager API or the portal.
66
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
67
- * @param callback The callback
241
+ * Gets all SQL virtual machines in a subscription.
242
+ * @param options The options parameters.
68
243
  */
69
- get(resourceGroupName: string, sqlVirtualMachineName: string, callback: msRest.ServiceCallback<Models.SqlVirtualMachine>): void;
244
+ private _list(
245
+ options?: SqlVirtualMachinesListOptionalParams
246
+ ): Promise<SqlVirtualMachinesListResponse> {
247
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
248
+ }
249
+
70
250
  /**
71
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
72
- * this value from the Azure Resource Manager API or the portal.
251
+ * Gets a SQL virtual machine.
252
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
253
+ * value from the Azure Resource Manager API or the portal.
73
254
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
74
- * @param options The optional parameters
75
- * @param callback The callback
255
+ * @param options The options parameters.
76
256
  */
77
- get(resourceGroupName: string, sqlVirtualMachineName: string, options: Models.SqlVirtualMachinesGetOptionalParams, callback: msRest.ServiceCallback<Models.SqlVirtualMachine>): void;
78
- get(resourceGroupName: string, sqlVirtualMachineName: string, options?: Models.SqlVirtualMachinesGetOptionalParams | msRest.ServiceCallback<Models.SqlVirtualMachine>, callback?: msRest.ServiceCallback<Models.SqlVirtualMachine>): Promise<Models.SqlVirtualMachinesGetResponse> {
257
+ get(
258
+ resourceGroupName: string,
259
+ sqlVirtualMachineName: string,
260
+ options?: SqlVirtualMachinesGetOptionalParams
261
+ ): Promise<SqlVirtualMachinesGetResponse> {
79
262
  return this.client.sendOperationRequest(
80
- {
81
- resourceGroupName,
82
- sqlVirtualMachineName,
83
- options
84
- },
85
- getOperationSpec,
86
- callback) as Promise<Models.SqlVirtualMachinesGetResponse>;
263
+ { resourceGroupName, sqlVirtualMachineName, options },
264
+ getOperationSpec
265
+ );
87
266
  }
88
267
 
89
268
  /**
90
269
  * Creates or updates a SQL virtual machine.
91
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
92
- * this value from the Azure Resource Manager API or the portal.
270
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
271
+ * value from the Azure Resource Manager API or the portal.
93
272
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
94
273
  * @param parameters The SQL virtual machine.
95
- * @param [options] The optional parameters
96
- * @returns Promise<Models.SqlVirtualMachinesCreateOrUpdateResponse>
274
+ * @param options The options parameters.
97
275
  */
98
- createOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: Models.SqlVirtualMachine, options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesCreateOrUpdateResponse> {
99
- return this.beginCreateOrUpdate(resourceGroupName,sqlVirtualMachineName,parameters,options)
100
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.SqlVirtualMachinesCreateOrUpdateResponse>;
101
- }
276
+ async beginCreateOrUpdate(
277
+ resourceGroupName: string,
278
+ sqlVirtualMachineName: string,
279
+ parameters: SqlVirtualMachine,
280
+ options?: SqlVirtualMachinesCreateOrUpdateOptionalParams
281
+ ): Promise<
282
+ PollerLike<
283
+ PollOperationState<SqlVirtualMachinesCreateOrUpdateResponse>,
284
+ SqlVirtualMachinesCreateOrUpdateResponse
285
+ >
286
+ > {
287
+ const directSendOperation = async (
288
+ args: coreClient.OperationArguments,
289
+ spec: coreClient.OperationSpec
290
+ ): Promise<SqlVirtualMachinesCreateOrUpdateResponse> => {
291
+ return this.client.sendOperationRequest(args, spec);
292
+ };
293
+ const sendOperation = async (
294
+ args: coreClient.OperationArguments,
295
+ spec: coreClient.OperationSpec
296
+ ) => {
297
+ let currentRawResponse:
298
+ | coreClient.FullOperationResponse
299
+ | undefined = undefined;
300
+ const providedCallback = args.options?.onResponse;
301
+ const callback: coreClient.RawResponseCallback = (
302
+ rawResponse: coreClient.FullOperationResponse,
303
+ flatResponse: unknown
304
+ ) => {
305
+ currentRawResponse = rawResponse;
306
+ providedCallback?.(rawResponse, flatResponse);
307
+ };
308
+ const updatedArgs = {
309
+ ...args,
310
+ options: {
311
+ ...args.options,
312
+ onResponse: callback
313
+ }
314
+ };
315
+ const flatResponse = await directSendOperation(updatedArgs, spec);
316
+ return {
317
+ flatResponse,
318
+ rawResponse: {
319
+ statusCode: currentRawResponse!.status,
320
+ body: currentRawResponse!.parsedBody,
321
+ headers: currentRawResponse!.headers.toJSON()
322
+ }
323
+ };
324
+ };
102
325
 
103
- /**
104
- * Deletes a SQL virtual machine.
105
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
106
- * this value from the Azure Resource Manager API or the portal.
107
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
108
- * @param [options] The optional parameters
109
- * @returns Promise<msRest.RestResponse>
110
- */
111
- deleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
112
- return this.beginDeleteMethod(resourceGroupName,sqlVirtualMachineName,options)
113
- .then(lroPoller => lroPoller.pollUntilFinished());
326
+ const lro = new LroImpl(
327
+ sendOperation,
328
+ { resourceGroupName, sqlVirtualMachineName, parameters, options },
329
+ createOrUpdateOperationSpec
330
+ );
331
+ return new LroEngine(lro, {
332
+ resumeFrom: options?.resumeFrom,
333
+ intervalInMs: options?.updateIntervalInMs
334
+ });
114
335
  }
115
336
 
116
337
  /**
117
- * Updates a SQL virtual machine.
118
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
119
- * this value from the Azure Resource Manager API or the portal.
338
+ * Creates or updates a SQL virtual machine.
339
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
340
+ * value from the Azure Resource Manager API or the portal.
120
341
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
121
342
  * @param parameters The SQL virtual machine.
122
- * @param [options] The optional parameters
123
- * @returns Promise<Models.SqlVirtualMachinesUpdateResponse>
343
+ * @param options The options parameters.
124
344
  */
125
- update(resourceGroupName: string, sqlVirtualMachineName: string, parameters: Models.SqlVirtualMachineUpdate, options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesUpdateResponse> {
126
- return this.beginUpdate(resourceGroupName,sqlVirtualMachineName,parameters,options)
127
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.SqlVirtualMachinesUpdateResponse>;
345
+ async beginCreateOrUpdateAndWait(
346
+ resourceGroupName: string,
347
+ sqlVirtualMachineName: string,
348
+ parameters: SqlVirtualMachine,
349
+ options?: SqlVirtualMachinesCreateOrUpdateOptionalParams
350
+ ): Promise<SqlVirtualMachinesCreateOrUpdateResponse> {
351
+ const poller = await this.beginCreateOrUpdate(
352
+ resourceGroupName,
353
+ sqlVirtualMachineName,
354
+ parameters,
355
+ options
356
+ );
357
+ return poller.pollUntilDone();
128
358
  }
129
359
 
130
360
  /**
131
- * Gets all SQL virtual machines in a resource group.
132
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
133
- * this value from the Azure Resource Manager API or the portal.
134
- * @param [options] The optional parameters
135
- * @returns Promise<Models.SqlVirtualMachinesListByResourceGroupResponse>
136
- */
137
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesListByResourceGroupResponse>;
138
- /**
139
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
140
- * this value from the Azure Resource Manager API or the portal.
141
- * @param callback The callback
142
- */
143
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
144
- /**
145
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
146
- * this value from the Azure Resource Manager API or the portal.
147
- * @param options The optional parameters
148
- * @param callback The callback
361
+ * Deletes a SQL virtual machine.
362
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
363
+ * value from the Azure Resource Manager API or the portal.
364
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
365
+ * @param options The options parameters.
149
366
  */
150
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
151
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SqlVirtualMachineListResult>, callback?: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): Promise<Models.SqlVirtualMachinesListByResourceGroupResponse> {
152
- return this.client.sendOperationRequest(
153
- {
154
- resourceGroupName,
155
- options
156
- },
157
- listByResourceGroupOperationSpec,
158
- callback) as Promise<Models.SqlVirtualMachinesListByResourceGroupResponse>;
367
+ async beginDelete(
368
+ resourceGroupName: string,
369
+ sqlVirtualMachineName: string,
370
+ options?: SqlVirtualMachinesDeleteOptionalParams
371
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
372
+ const directSendOperation = async (
373
+ args: coreClient.OperationArguments,
374
+ spec: coreClient.OperationSpec
375
+ ): Promise<void> => {
376
+ return this.client.sendOperationRequest(args, spec);
377
+ };
378
+ const sendOperation = async (
379
+ args: coreClient.OperationArguments,
380
+ spec: coreClient.OperationSpec
381
+ ) => {
382
+ let currentRawResponse:
383
+ | coreClient.FullOperationResponse
384
+ | undefined = undefined;
385
+ const providedCallback = args.options?.onResponse;
386
+ const callback: coreClient.RawResponseCallback = (
387
+ rawResponse: coreClient.FullOperationResponse,
388
+ flatResponse: unknown
389
+ ) => {
390
+ currentRawResponse = rawResponse;
391
+ providedCallback?.(rawResponse, flatResponse);
392
+ };
393
+ const updatedArgs = {
394
+ ...args,
395
+ options: {
396
+ ...args.options,
397
+ onResponse: callback
398
+ }
399
+ };
400
+ const flatResponse = await directSendOperation(updatedArgs, spec);
401
+ return {
402
+ flatResponse,
403
+ rawResponse: {
404
+ statusCode: currentRawResponse!.status,
405
+ body: currentRawResponse!.parsedBody,
406
+ headers: currentRawResponse!.headers.toJSON()
407
+ }
408
+ };
409
+ };
410
+
411
+ const lro = new LroImpl(
412
+ sendOperation,
413
+ { resourceGroupName, sqlVirtualMachineName, options },
414
+ deleteOperationSpec
415
+ );
416
+ return new LroEngine(lro, {
417
+ resumeFrom: options?.resumeFrom,
418
+ intervalInMs: options?.updateIntervalInMs
419
+ });
159
420
  }
160
421
 
161
422
  /**
162
- * Creates or updates a SQL virtual machine.
163
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
164
- * this value from the Azure Resource Manager API or the portal.
423
+ * Deletes a SQL virtual machine.
424
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
425
+ * value from the Azure Resource Manager API or the portal.
165
426
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
166
- * @param parameters The SQL virtual machine.
167
- * @param [options] The optional parameters
168
- * @returns Promise<msRestAzure.LROPoller>
427
+ * @param options The options parameters.
169
428
  */
170
- beginCreateOrUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: Models.SqlVirtualMachine, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
171
- return this.client.sendLRORequest(
172
- {
173
- resourceGroupName,
174
- sqlVirtualMachineName,
175
- parameters,
176
- options
177
- },
178
- beginCreateOrUpdateOperationSpec,
179
- options);
429
+ async beginDeleteAndWait(
430
+ resourceGroupName: string,
431
+ sqlVirtualMachineName: string,
432
+ options?: SqlVirtualMachinesDeleteOptionalParams
433
+ ): Promise<void> {
434
+ const poller = await this.beginDelete(
435
+ resourceGroupName,
436
+ sqlVirtualMachineName,
437
+ options
438
+ );
439
+ return poller.pollUntilDone();
180
440
  }
181
441
 
182
442
  /**
183
- * Deletes a SQL virtual machine.
184
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
185
- * this value from the Azure Resource Manager API or the portal.
443
+ * Updates a SQL virtual machine.
444
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
445
+ * value from the Azure Resource Manager API or the portal.
186
446
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
187
- * @param [options] The optional parameters
188
- * @returns Promise<msRestAzure.LROPoller>
447
+ * @param parameters The SQL virtual machine.
448
+ * @param options The options parameters.
189
449
  */
190
- beginDeleteMethod(resourceGroupName: string, sqlVirtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
191
- return this.client.sendLRORequest(
192
- {
193
- resourceGroupName,
194
- sqlVirtualMachineName,
195
- options
196
- },
197
- beginDeleteMethodOperationSpec,
198
- options);
450
+ async beginUpdate(
451
+ resourceGroupName: string,
452
+ sqlVirtualMachineName: string,
453
+ parameters: SqlVirtualMachineUpdate,
454
+ options?: SqlVirtualMachinesUpdateOptionalParams
455
+ ): Promise<
456
+ PollerLike<
457
+ PollOperationState<SqlVirtualMachinesUpdateResponse>,
458
+ SqlVirtualMachinesUpdateResponse
459
+ >
460
+ > {
461
+ const directSendOperation = async (
462
+ args: coreClient.OperationArguments,
463
+ spec: coreClient.OperationSpec
464
+ ): Promise<SqlVirtualMachinesUpdateResponse> => {
465
+ return this.client.sendOperationRequest(args, spec);
466
+ };
467
+ const sendOperation = async (
468
+ args: coreClient.OperationArguments,
469
+ spec: coreClient.OperationSpec
470
+ ) => {
471
+ let currentRawResponse:
472
+ | coreClient.FullOperationResponse
473
+ | undefined = undefined;
474
+ const providedCallback = args.options?.onResponse;
475
+ const callback: coreClient.RawResponseCallback = (
476
+ rawResponse: coreClient.FullOperationResponse,
477
+ flatResponse: unknown
478
+ ) => {
479
+ currentRawResponse = rawResponse;
480
+ providedCallback?.(rawResponse, flatResponse);
481
+ };
482
+ const updatedArgs = {
483
+ ...args,
484
+ options: {
485
+ ...args.options,
486
+ onResponse: callback
487
+ }
488
+ };
489
+ const flatResponse = await directSendOperation(updatedArgs, spec);
490
+ return {
491
+ flatResponse,
492
+ rawResponse: {
493
+ statusCode: currentRawResponse!.status,
494
+ body: currentRawResponse!.parsedBody,
495
+ headers: currentRawResponse!.headers.toJSON()
496
+ }
497
+ };
498
+ };
499
+
500
+ const lro = new LroImpl(
501
+ sendOperation,
502
+ { resourceGroupName, sqlVirtualMachineName, parameters, options },
503
+ updateOperationSpec
504
+ );
505
+ return new LroEngine(lro, {
506
+ resumeFrom: options?.resumeFrom,
507
+ intervalInMs: options?.updateIntervalInMs
508
+ });
199
509
  }
200
510
 
201
511
  /**
202
512
  * Updates a SQL virtual machine.
203
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain
204
- * this value from the Azure Resource Manager API or the portal.
513
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
514
+ * value from the Azure Resource Manager API or the portal.
205
515
  * @param sqlVirtualMachineName Name of the SQL virtual machine.
206
516
  * @param parameters The SQL virtual machine.
207
- * @param [options] The optional parameters
208
- * @returns Promise<msRestAzure.LROPoller>
517
+ * @param options The options parameters.
209
518
  */
210
- beginUpdate(resourceGroupName: string, sqlVirtualMachineName: string, parameters: Models.SqlVirtualMachineUpdate, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
211
- return this.client.sendLRORequest(
212
- {
213
- resourceGroupName,
214
- sqlVirtualMachineName,
215
- parameters,
216
- options
217
- },
218
- beginUpdateOperationSpec,
219
- options);
519
+ async beginUpdateAndWait(
520
+ resourceGroupName: string,
521
+ sqlVirtualMachineName: string,
522
+ parameters: SqlVirtualMachineUpdate,
523
+ options?: SqlVirtualMachinesUpdateOptionalParams
524
+ ): Promise<SqlVirtualMachinesUpdateResponse> {
525
+ const poller = await this.beginUpdate(
526
+ resourceGroupName,
527
+ sqlVirtualMachineName,
528
+ parameters,
529
+ options
530
+ );
531
+ return poller.pollUntilDone();
220
532
  }
221
533
 
222
534
  /**
223
- * Gets all SQL virtual machines in a subscription.
224
- * @param nextPageLink The NextLink from the previous successful call to List operation.
225
- * @param [options] The optional parameters
226
- * @returns Promise<Models.SqlVirtualMachinesListNextResponse>
227
- */
228
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesListNextResponse>;
229
- /**
230
- * @param nextPageLink The NextLink from the previous successful call to List operation.
231
- * @param callback The callback
232
- */
233
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
234
- /**
235
- * @param nextPageLink The NextLink from the previous successful call to List operation.
236
- * @param options The optional parameters
237
- * @param callback The callback
535
+ * Gets all SQL virtual machines in a resource group.
536
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
537
+ * value from the Azure Resource Manager API or the portal.
538
+ * @param options The options parameters.
238
539
  */
239
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
240
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SqlVirtualMachineListResult>, callback?: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): Promise<Models.SqlVirtualMachinesListNextResponse> {
540
+ private _listByResourceGroup(
541
+ resourceGroupName: string,
542
+ options?: SqlVirtualMachinesListByResourceGroupOptionalParams
543
+ ): Promise<SqlVirtualMachinesListByResourceGroupResponse> {
241
544
  return this.client.sendOperationRequest(
242
- {
243
- nextPageLink,
244
- options
245
- },
246
- listNextOperationSpec,
247
- callback) as Promise<Models.SqlVirtualMachinesListNextResponse>;
545
+ { resourceGroupName, options },
546
+ listByResourceGroupOperationSpec
547
+ );
248
548
  }
249
549
 
250
550
  /**
251
- * Gets all SQL virtual machines in a resource group.
252
- * @param nextPageLink The NextLink from the previous successful call to List operation.
253
- * @param [options] The optional parameters
254
- * @returns Promise<Models.SqlVirtualMachinesListByResourceGroupNextResponse>
551
+ * ListBySqlVmGroupNext
552
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
553
+ * value from the Azure Resource Manager API or the portal.
554
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
555
+ * @param nextLink The nextLink from the previous successful call to the ListBySqlVmGroup method.
556
+ * @param options The options parameters.
255
557
  */
256
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.SqlVirtualMachinesListByResourceGroupNextResponse>;
558
+ private _listBySqlVmGroupNext(
559
+ resourceGroupName: string,
560
+ sqlVirtualMachineGroupName: string,
561
+ nextLink: string,
562
+ options?: SqlVirtualMachinesListBySqlVmGroupNextOptionalParams
563
+ ): Promise<SqlVirtualMachinesListBySqlVmGroupNextResponse> {
564
+ return this.client.sendOperationRequest(
565
+ { resourceGroupName, sqlVirtualMachineGroupName, nextLink, options },
566
+ listBySqlVmGroupNextOperationSpec
567
+ );
568
+ }
569
+
257
570
  /**
258
- * @param nextPageLink The NextLink from the previous successful call to List operation.
259
- * @param callback The callback
571
+ * ListNext
572
+ * @param nextLink The nextLink from the previous successful call to the List method.
573
+ * @param options The options parameters.
260
574
  */
261
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
575
+ private _listNext(
576
+ nextLink: string,
577
+ options?: SqlVirtualMachinesListNextOptionalParams
578
+ ): Promise<SqlVirtualMachinesListNextResponse> {
579
+ return this.client.sendOperationRequest(
580
+ { nextLink, options },
581
+ listNextOperationSpec
582
+ );
583
+ }
584
+
262
585
  /**
263
- * @param nextPageLink The NextLink from the previous successful call to List operation.
264
- * @param options The optional parameters
265
- * @param callback The callback
586
+ * ListByResourceGroupNext
587
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
588
+ * value from the Azure Resource Manager API or the portal.
589
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
590
+ * @param options The options parameters.
266
591
  */
267
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): void;
268
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SqlVirtualMachineListResult>, callback?: msRest.ServiceCallback<Models.SqlVirtualMachineListResult>): Promise<Models.SqlVirtualMachinesListByResourceGroupNextResponse> {
592
+ private _listByResourceGroupNext(
593
+ resourceGroupName: string,
594
+ nextLink: string,
595
+ options?: SqlVirtualMachinesListByResourceGroupNextOptionalParams
596
+ ): Promise<SqlVirtualMachinesListByResourceGroupNextResponse> {
269
597
  return this.client.sendOperationRequest(
270
- {
271
- nextPageLink,
272
- options
273
- },
274
- listByResourceGroupNextOperationSpec,
275
- callback) as Promise<Models.SqlVirtualMachinesListByResourceGroupNextResponse>;
598
+ { resourceGroupName, nextLink, options },
599
+ listByResourceGroupNextOperationSpec
600
+ );
276
601
  }
277
602
  }
278
-
279
603
  // Operation Specifications
280
- const serializer = new msRest.Serializer(Mappers);
281
- const listOperationSpec: msRest.OperationSpec = {
604
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
605
+
606
+ const listBySqlVmGroupOperationSpec: coreClient.OperationSpec = {
607
+ path:
608
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines",
282
609
  httpMethod: "GET",
283
- path: "subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
284
- urlParameters: [
285
- Parameters.subscriptionId
286
- ],
287
- queryParameters: [
288
- Parameters.apiVersion
289
- ],
290
- headerParameters: [
291
- Parameters.acceptLanguage
292
- ],
293
610
  responses: {
294
611
  200: {
295
612
  bodyMapper: Mappers.SqlVirtualMachineListResult
296
613
  },
297
- default: {
298
- bodyMapper: Mappers.CloudError
299
- }
614
+ default: {}
300
615
  },
301
- serializer
302
- };
303
-
304
- const getOperationSpec: msRest.OperationSpec = {
305
- httpMethod: "GET",
306
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
616
+ queryParameters: [Parameters.apiVersion],
307
617
  urlParameters: [
618
+ Parameters.$host,
308
619
  Parameters.resourceGroupName,
309
- Parameters.sqlVirtualMachineName,
620
+ Parameters.sqlVirtualMachineGroupName,
310
621
  Parameters.subscriptionId
311
622
  ],
312
- queryParameters: [
313
- Parameters.expand,
314
- Parameters.apiVersion
315
- ],
316
- headerParameters: [
317
- Parameters.acceptLanguage
318
- ],
623
+ headerParameters: [Parameters.accept],
624
+ serializer
625
+ };
626
+ const listOperationSpec: coreClient.OperationSpec = {
627
+ path:
628
+ "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
629
+ httpMethod: "GET",
319
630
  responses: {
320
631
  200: {
321
- bodyMapper: Mappers.SqlVirtualMachine
632
+ bodyMapper: Mappers.SqlVirtualMachineListResult
322
633
  },
323
- default: {
324
- bodyMapper: Mappers.CloudError
325
- }
634
+ default: {}
326
635
  },
636
+ queryParameters: [Parameters.apiVersion],
637
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
638
+ headerParameters: [Parameters.accept],
327
639
  serializer
328
640
  };
329
-
330
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
641
+ const getOperationSpec: coreClient.OperationSpec = {
642
+ path:
643
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
331
644
  httpMethod: "GET",
332
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
333
- urlParameters: [
334
- Parameters.resourceGroupName,
335
- Parameters.subscriptionId
336
- ],
337
- queryParameters: [
338
- Parameters.apiVersion
339
- ],
340
- headerParameters: [
341
- Parameters.acceptLanguage
342
- ],
343
645
  responses: {
344
646
  200: {
345
- bodyMapper: Mappers.SqlVirtualMachineListResult
647
+ bodyMapper: Mappers.SqlVirtualMachine
346
648
  },
347
- default: {
348
- bodyMapper: Mappers.CloudError
349
- }
649
+ default: {}
350
650
  },
351
- serializer
352
- };
353
-
354
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
355
- httpMethod: "PUT",
356
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
651
+ queryParameters: [Parameters.apiVersion, Parameters.expand],
357
652
  urlParameters: [
653
+ Parameters.$host,
358
654
  Parameters.resourceGroupName,
359
- Parameters.sqlVirtualMachineName,
360
- Parameters.subscriptionId
361
- ],
362
- queryParameters: [
363
- Parameters.apiVersion
364
- ],
365
- headerParameters: [
366
- Parameters.acceptLanguage
655
+ Parameters.subscriptionId,
656
+ Parameters.sqlVirtualMachineName
367
657
  ],
368
- requestBody: {
369
- parameterPath: "parameters",
370
- mapper: {
371
- ...Mappers.SqlVirtualMachine,
372
- required: true
373
- }
374
- },
658
+ headerParameters: [Parameters.accept],
659
+ serializer
660
+ };
661
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
662
+ path:
663
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
664
+ httpMethod: "PUT",
375
665
  responses: {
376
666
  200: {
377
667
  bodyMapper: Mappers.SqlVirtualMachine
@@ -379,108 +669,144 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
379
669
  201: {
380
670
  bodyMapper: Mappers.SqlVirtualMachine
381
671
  },
382
- default: {
383
- bodyMapper: Mappers.CloudError
384
- }
672
+ 202: {
673
+ bodyMapper: Mappers.SqlVirtualMachine
674
+ },
675
+ 204: {
676
+ bodyMapper: Mappers.SqlVirtualMachine
677
+ },
678
+ default: {}
385
679
  },
680
+ requestBody: Parameters.parameters3,
681
+ queryParameters: [Parameters.apiVersion],
682
+ urlParameters: [
683
+ Parameters.$host,
684
+ Parameters.resourceGroupName,
685
+ Parameters.subscriptionId,
686
+ Parameters.sqlVirtualMachineName
687
+ ],
688
+ headerParameters: [Parameters.accept, Parameters.contentType],
689
+ mediaType: "json",
386
690
  serializer
387
691
  };
388
-
389
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
692
+ const deleteOperationSpec: coreClient.OperationSpec = {
693
+ path:
694
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
390
695
  httpMethod: "DELETE",
391
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
696
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
697
+ queryParameters: [Parameters.apiVersion],
392
698
  urlParameters: [
699
+ Parameters.$host,
393
700
  Parameters.resourceGroupName,
394
- Parameters.sqlVirtualMachineName,
395
- Parameters.subscriptionId
396
- ],
397
- queryParameters: [
398
- Parameters.apiVersion
701
+ Parameters.subscriptionId,
702
+ Parameters.sqlVirtualMachineName
399
703
  ],
400
- headerParameters: [
401
- Parameters.acceptLanguage
402
- ],
403
- responses: {
404
- 200: {},
405
- 202: {},
406
- 204: {},
407
- default: {
408
- bodyMapper: Mappers.CloudError
409
- }
410
- },
411
704
  serializer
412
705
  };
413
-
414
- const beginUpdateOperationSpec: msRest.OperationSpec = {
706
+ const updateOperationSpec: coreClient.OperationSpec = {
707
+ path:
708
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
415
709
  httpMethod: "PATCH",
416
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
417
- urlParameters: [
418
- Parameters.resourceGroupName,
419
- Parameters.sqlVirtualMachineName,
420
- Parameters.subscriptionId
421
- ],
422
- queryParameters: [
423
- Parameters.apiVersion
424
- ],
425
- headerParameters: [
426
- Parameters.acceptLanguage
427
- ],
428
- requestBody: {
429
- parameterPath: "parameters",
430
- mapper: {
431
- ...Mappers.SqlVirtualMachineUpdate,
432
- required: true
433
- }
434
- },
435
710
  responses: {
436
711
  200: {
437
712
  bodyMapper: Mappers.SqlVirtualMachine
438
713
  },
439
- default: {
440
- bodyMapper: Mappers.CloudError
441
- }
714
+ 201: {
715
+ bodyMapper: Mappers.SqlVirtualMachine
716
+ },
717
+ 202: {
718
+ bodyMapper: Mappers.SqlVirtualMachine
719
+ },
720
+ 204: {
721
+ bodyMapper: Mappers.SqlVirtualMachine
722
+ },
723
+ default: {}
442
724
  },
725
+ requestBody: Parameters.parameters4,
726
+ queryParameters: [Parameters.apiVersion],
727
+ urlParameters: [
728
+ Parameters.$host,
729
+ Parameters.resourceGroupName,
730
+ Parameters.subscriptionId,
731
+ Parameters.sqlVirtualMachineName
732
+ ],
733
+ headerParameters: [Parameters.accept, Parameters.contentType],
734
+ mediaType: "json",
443
735
  serializer
444
736
  };
445
-
446
- const listNextOperationSpec: msRest.OperationSpec = {
737
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
738
+ path:
739
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines",
447
740
  httpMethod: "GET",
448
- baseUrl: "https://management.azure.com",
449
- path: "{nextLink}",
741
+ responses: {
742
+ 200: {
743
+ bodyMapper: Mappers.SqlVirtualMachineListResult
744
+ },
745
+ default: {}
746
+ },
747
+ queryParameters: [Parameters.apiVersion],
450
748
  urlParameters: [
451
- Parameters.nextPageLink
452
- ],
453
- headerParameters: [
454
- Parameters.acceptLanguage
749
+ Parameters.$host,
750
+ Parameters.resourceGroupName,
751
+ Parameters.subscriptionId
455
752
  ],
753
+ headerParameters: [Parameters.accept],
754
+ serializer
755
+ };
756
+ const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
757
+ path: "{nextLink}",
758
+ httpMethod: "GET",
456
759
  responses: {
457
760
  200: {
458
761
  bodyMapper: Mappers.SqlVirtualMachineListResult
459
762
  },
460
- default: {
461
- bodyMapper: Mappers.CloudError
462
- }
763
+ default: {}
463
764
  },
765
+ queryParameters: [Parameters.apiVersion],
766
+ urlParameters: [
767
+ Parameters.$host,
768
+ Parameters.resourceGroupName,
769
+ Parameters.sqlVirtualMachineGroupName,
770
+ Parameters.subscriptionId,
771
+ Parameters.nextLink
772
+ ],
773
+ headerParameters: [Parameters.accept],
464
774
  serializer
465
775
  };
466
-
467
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
468
- httpMethod: "GET",
469
- baseUrl: "https://management.azure.com",
776
+ const listNextOperationSpec: coreClient.OperationSpec = {
470
777
  path: "{nextLink}",
778
+ httpMethod: "GET",
779
+ responses: {
780
+ 200: {
781
+ bodyMapper: Mappers.SqlVirtualMachineListResult
782
+ },
783
+ default: {}
784
+ },
785
+ queryParameters: [Parameters.apiVersion],
471
786
  urlParameters: [
472
- Parameters.nextPageLink
473
- ],
474
- headerParameters: [
475
- Parameters.acceptLanguage
787
+ Parameters.$host,
788
+ Parameters.subscriptionId,
789
+ Parameters.nextLink
476
790
  ],
791
+ headerParameters: [Parameters.accept],
792
+ serializer
793
+ };
794
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
795
+ path: "{nextLink}",
796
+ httpMethod: "GET",
477
797
  responses: {
478
798
  200: {
479
799
  bodyMapper: Mappers.SqlVirtualMachineListResult
480
800
  },
481
- default: {
482
- bodyMapper: Mappers.CloudError
483
- }
801
+ default: {}
484
802
  },
803
+ queryParameters: [Parameters.apiVersion],
804
+ urlParameters: [
805
+ Parameters.$host,
806
+ Parameters.resourceGroupName,
807
+ Parameters.subscriptionId,
808
+ Parameters.nextLink
809
+ ],
810
+ headerParameters: [Parameters.accept],
485
811
  serializer
486
812
  };