@azure/arm-sqlvirtualmachine 4.1.1 → 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 +69 -85
  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 +320 -368
  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 -32
  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 +629 -1065
  82. package/src/models/mappers.ts +328 -376
  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 +641 -424
  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 -41
  95. package/tsconfig.json +3 -3
  96. package/types/arm-sqlvirtualmachine.d.ts +1141 -0
  97. package/types/tsdoc-metadata.json +11 -0
  98. package/dist/arm-sqlvirtualmachine.js +0 -2479
  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 -1241
  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 -33
  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 -210
  144. package/esm/operations/sqlVirtualMachines.d.ts.map +0 -1
  145. package/esm/operations/sqlVirtualMachines.js +0 -395
  146. package/esm/operations/sqlVirtualMachines.js.map +0 -1
  147. package/esm/sqlVirtualMachineManagementClient.d.ts +0 -27
  148. package/esm/sqlVirtualMachineManagementClient.d.ts.map +0 -1
  149. package/esm/sqlVirtualMachineManagementClient.js +0 -41
  150. package/esm/sqlVirtualMachineManagementClient.js.map +0 -1
  151. package/esm/sqlVirtualMachineManagementClientContext.d.ts +0 -22
  152. package/esm/sqlVirtualMachineManagementClientContext.d.ts.map +0 -1
  153. package/esm/sqlVirtualMachineManagementClientContext.js +0 -61
  154. package/esm/sqlVirtualMachineManagementClientContext.js.map +0 -1
  155. package/src/models/availabilityGroupListenersMappers.ts +0 -34
  156. package/src/models/operationsMappers.ts +0 -14
  157. package/src/models/sqlVirtualMachineGroupsMappers.ts +0 -35
  158. package/src/models/sqlVirtualMachinesMappers.ts +0 -35
  159. package/src/sqlVirtualMachineManagementClientContext.ts +0 -68
@@ -1,11 +1,9 @@
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
9
  export * from "./availabilityGroupListeners";
@@ -1,123 +1,133 @@
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 Models from "../models";
13
- import * as Mappers from "../models/operationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { SqlVirtualMachineManagementClientContext } from "../sqlVirtualMachineManagementClientContext";
14
+ import { SqlVirtualMachineManagementClient } from "../sqlVirtualMachineManagementClient";
15
+ import {
16
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
16
22
 
17
- /** Class representing a Operations. */
18
- export class Operations {
19
- private readonly client: SqlVirtualMachineManagementClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: SqlVirtualMachineManagementClient;
20
27
 
21
28
  /**
22
- * Create a Operations.
23
- * @param {SqlVirtualMachineManagementClientContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
24
31
  */
25
- constructor(client: SqlVirtualMachineManagementClientContext) {
32
+ constructor(client: SqlVirtualMachineManagementClient) {
26
33
  this.client = client;
27
34
  }
28
35
 
29
36
  /**
30
37
  * Lists all of the available SQL Rest API operations.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.OperationsListResponse>
38
+ * @param options The options parameters.
33
39
  */
34
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
39
- /**
40
- * @param options The optional parameters
41
- * @param callback The callback
42
- */
43
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
44
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
48
50
  },
49
- listOperationSpec,
50
- callback) as Promise<Models.OperationsListResponse>;
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
51
76
  }
52
77
 
53
78
  /**
54
79
  * Lists all of the available SQL Rest API operations.
55
- * @param nextPageLink The NextLink from the previous successful call to List operation.
56
- * @param [options] The optional parameters
57
- * @returns Promise<Models.OperationsListNextResponse>
80
+ * @param options The options parameters.
58
81
  */
59
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
60
- /**
61
- * @param nextPageLink The NextLink from the previous successful call to List operation.
62
- * @param callback The callback
63
- */
64
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
65
88
  /**
66
- * @param nextPageLink The NextLink from the previous successful call to List operation.
67
- * @param options The optional parameters
68
- * @param callback The callback
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
69
92
  */
70
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
71
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListNextResponse> {
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
72
97
  return this.client.sendOperationRequest(
73
- {
74
- nextPageLink,
75
- options
76
- },
77
- listNextOperationSpec,
78
- callback) as Promise<Models.OperationsListNextResponse>;
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
79
101
  }
80
102
  }
81
-
82
103
  // Operation Specifications
83
- const serializer = new msRest.Serializer(Mappers);
84
- const listOperationSpec: msRest.OperationSpec = {
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.SqlVirtualMachine/operations",
85
108
  httpMethod: "GET",
86
- path: "providers/Microsoft.SqlVirtualMachine/operations",
87
- queryParameters: [
88
- Parameters.apiVersion
89
- ],
90
- headerParameters: [
91
- Parameters.acceptLanguage
92
- ],
93
109
  responses: {
94
110
  200: {
95
111
  bodyMapper: Mappers.OperationListResult
96
112
  },
97
- default: {
98
- bodyMapper: Mappers.CloudError
99
- }
113
+ default: {}
100
114
  },
115
+ queryParameters: [Parameters.apiVersion],
116
+ urlParameters: [Parameters.$host],
117
+ headerParameters: [Parameters.accept],
101
118
  serializer
102
119
  };
103
-
104
- const listNextOperationSpec: msRest.OperationSpec = {
105
- httpMethod: "GET",
106
- baseUrl: "https://management.azure.com",
120
+ const listNextOperationSpec: coreClient.OperationSpec = {
107
121
  path: "{nextLink}",
108
- urlParameters: [
109
- Parameters.nextPageLink
110
- ],
111
- headerParameters: [
112
- Parameters.acceptLanguage
113
- ],
122
+ httpMethod: "GET",
114
123
  responses: {
115
124
  200: {
116
125
  bodyMapper: Mappers.OperationListResult
117
126
  },
118
- default: {
119
- bodyMapper: Mappers.CloudError
120
- }
127
+ default: {}
121
128
  },
129
+ queryParameters: [Parameters.apiVersion],
130
+ urlParameters: [Parameters.$host, Parameters.nextLink],
131
+ headerParameters: [Parameters.accept],
122
132
  serializer
123
133
  };