@azure/arm-appconfiguration 2.0.0 → 3.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 (176) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +1 -1
  4. package/README.md +70 -80
  5. package/dist/index.js +3105 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/src/appConfigurationManagementClient.d.ts +22 -0
  10. package/dist-esm/src/appConfigurationManagementClient.d.ts.map +1 -0
  11. package/dist-esm/src/appConfigurationManagementClient.js +55 -0
  12. package/dist-esm/src/appConfigurationManagementClient.js.map +1 -0
  13. package/dist-esm/src/index.d.ts +5 -0
  14. package/dist-esm/src/index.d.ts.map +1 -0
  15. package/dist-esm/src/index.js +12 -0
  16. package/dist-esm/src/index.js.map +1 -0
  17. package/dist-esm/src/lroImpl.d.ts +16 -0
  18. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  19. package/dist-esm/src/lroImpl.js +29 -0
  20. package/dist-esm/src/lroImpl.js.map +1 -0
  21. package/dist-esm/src/models/index.d.ts +826 -0
  22. package/dist-esm/src/models/index.d.ts.map +1 -0
  23. package/dist-esm/src/models/index.js +59 -0
  24. package/dist-esm/src/models/index.js.map +1 -0
  25. package/dist-esm/src/models/mappers.d.ts +38 -0
  26. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  27. package/{esm → dist-esm/src}/models/mappers.js +464 -547
  28. package/dist-esm/src/models/mappers.js.map +1 -0
  29. package/dist-esm/src/models/parameters.d.ts +20 -0
  30. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  31. package/dist-esm/src/models/parameters.js +162 -0
  32. package/dist-esm/src/models/parameters.js.map +1 -0
  33. package/dist-esm/src/operations/configurationStores.d.ts +139 -0
  34. package/dist-esm/src/operations/configurationStores.d.ts.map +1 -0
  35. package/dist-esm/src/operations/configurationStores.js +655 -0
  36. package/dist-esm/src/operations/configurationStores.js.map +1 -0
  37. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  38. package/dist-esm/src/operations/index.d.ts.map +1 -0
  39. package/{esm → dist-esm/src}/operations/index.js +1 -2
  40. package/dist-esm/src/operations/index.js.map +1 -0
  41. package/dist-esm/src/operations/keyValues.d.ts +76 -0
  42. package/dist-esm/src/operations/keyValues.d.ts.map +1 -0
  43. package/dist-esm/src/operations/keyValues.js +284 -0
  44. package/dist-esm/src/operations/keyValues.js.map +1 -0
  45. package/dist-esm/src/operations/operations.d.ts +39 -0
  46. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  47. package/dist-esm/src/operations/operations.js +147 -0
  48. package/dist-esm/src/operations/operations.js.map +1 -0
  49. package/dist-esm/src/operations/privateEndpointConnections.d.ts +84 -0
  50. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  51. package/dist-esm/src/operations/privateEndpointConnections.js +350 -0
  52. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  53. package/dist-esm/src/operations/privateLinkResources.d.ts +47 -0
  54. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  55. package/dist-esm/src/operations/privateLinkResources.js +170 -0
  56. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  57. package/dist-esm/src/operationsInterfaces/configurationStores.d.ts +86 -0
  58. package/dist-esm/src/operationsInterfaces/configurationStores.d.ts.map +1 -0
  59. package/{src/models/privateLinkResourcesMappers.ts → dist-esm/src/operationsInterfaces/configurationStores.js} +2 -8
  60. package/dist-esm/src/operationsInterfaces/configurationStores.js.map +1 -0
  61. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  62. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  63. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  64. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  65. package/dist-esm/src/operationsInterfaces/keyValues.d.ts +50 -0
  66. package/dist-esm/src/operationsInterfaces/keyValues.d.ts.map +1 -0
  67. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/keyValues.js} +2 -1
  68. package/dist-esm/src/operationsInterfaces/keyValues.js.map +1 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts +18 -0
  70. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  71. package/{esm/models/privateLinkResourcesMappers.js → dist-esm/src/operationsInterfaces/operations.js} +2 -2
  72. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  73. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +58 -0
  74. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  75. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  76. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  77. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  78. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  79. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  80. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  81. package/dist-esm/test/sampleTest.d.ts +2 -0
  82. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  83. package/dist-esm/test/sampleTest.js +40 -0
  84. package/dist-esm/test/sampleTest.js.map +1 -0
  85. package/package.json +65 -32
  86. package/review/arm-appconfiguration.api.md +665 -0
  87. package/rollup.config.js +181 -30
  88. package/src/appConfigurationManagementClient.ts +80 -40
  89. package/src/index.ts +12 -0
  90. package/src/lroImpl.ts +34 -0
  91. package/src/models/index.ts +644 -1242
  92. package/src/models/mappers.ts +467 -557
  93. package/src/models/parameters.ts +119 -46
  94. package/src/operations/configurationStores.ts +638 -419
  95. package/src/operations/index.ts +1 -2
  96. package/src/operations/keyValues.ts +266 -209
  97. package/src/operations/operations.ts +108 -121
  98. package/src/operations/privateEndpointConnections.ts +343 -181
  99. package/src/operations/privateLinkResources.ts +157 -123
  100. package/src/operationsInterfaces/configurationStores.ts +168 -0
  101. package/src/operationsInterfaces/index.ts +13 -0
  102. package/src/operationsInterfaces/keyValues.ts +91 -0
  103. package/src/operationsInterfaces/operations.ts +38 -0
  104. package/src/operationsInterfaces/privateEndpointConnections.ts +111 -0
  105. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  106. package/tsconfig.json +3 -3
  107. package/types/arm-appconfiguration.d.ts +1171 -0
  108. package/types/tsdoc-metadata.json +11 -0
  109. package/dist/arm-appconfiguration.js +0 -2849
  110. package/dist/arm-appconfiguration.js.map +0 -1
  111. package/dist/arm-appconfiguration.min.js +0 -1
  112. package/dist/arm-appconfiguration.min.js.map +0 -1
  113. package/esm/appConfigurationManagementClient.d.ts +0 -28
  114. package/esm/appConfigurationManagementClient.d.ts.map +0 -1
  115. package/esm/appConfigurationManagementClient.js +0 -41
  116. package/esm/appConfigurationManagementClient.js.map +0 -1
  117. package/esm/appConfigurationManagementClientContext.d.ts +0 -22
  118. package/esm/appConfigurationManagementClientContext.d.ts.map +0 -1
  119. package/esm/appConfigurationManagementClientContext.js +0 -60
  120. package/esm/appConfigurationManagementClientContext.js.map +0 -1
  121. package/esm/models/configurationStoresMappers.d.ts +0 -2
  122. package/esm/models/configurationStoresMappers.d.ts.map +0 -1
  123. package/esm/models/configurationStoresMappers.js +0 -9
  124. package/esm/models/configurationStoresMappers.js.map +0 -1
  125. package/esm/models/index.d.ts +0 -1433
  126. package/esm/models/index.d.ts.map +0 -1
  127. package/esm/models/index.js.map +0 -1
  128. package/esm/models/keyValuesMappers.d.ts +0 -2
  129. package/esm/models/keyValuesMappers.d.ts.map +0 -1
  130. package/esm/models/keyValuesMappers.js +0 -9
  131. package/esm/models/keyValuesMappers.js.map +0 -1
  132. package/esm/models/mappers.d.ts +0 -42
  133. package/esm/models/mappers.d.ts.map +0 -1
  134. package/esm/models/mappers.js.map +0 -1
  135. package/esm/models/operationsMappers.d.ts +0 -2
  136. package/esm/models/operationsMappers.d.ts.map +0 -1
  137. package/esm/models/operationsMappers.js +0 -9
  138. package/esm/models/operationsMappers.js.map +0 -1
  139. package/esm/models/parameters.d.ts +0 -12
  140. package/esm/models/parameters.d.ts.map +0 -1
  141. package/esm/models/parameters.js +0 -117
  142. package/esm/models/parameters.js.map +0 -1
  143. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  144. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  145. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  146. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  147. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  148. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  149. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  150. package/esm/operations/configurationStores.d.ts +0 -219
  151. package/esm/operations/configurationStores.d.ts.map +0 -1
  152. package/esm/operations/configurationStores.js +0 -441
  153. package/esm/operations/configurationStores.js.map +0 -1
  154. package/esm/operations/index.d.ts.map +0 -1
  155. package/esm/operations/index.js.map +0 -1
  156. package/esm/operations/keyValues.d.ts +0 -127
  157. package/esm/operations/keyValues.d.ts.map +0 -1
  158. package/esm/operations/keyValues.js +0 -216
  159. package/esm/operations/keyValues.js.map +0 -1
  160. package/esm/operations/operations.d.ts +0 -67
  161. package/esm/operations/operations.d.ts.map +0 -1
  162. package/esm/operations/operations.js +0 -114
  163. package/esm/operations/operations.js.map +0 -1
  164. package/esm/operations/privateEndpointConnections.d.ts +0 -117
  165. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  166. package/esm/operations/privateEndpointConnections.js +0 -238
  167. package/esm/operations/privateEndpointConnections.js.map +0 -1
  168. package/esm/operations/privateLinkResources.d.ts +0 -76
  169. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  170. package/esm/operations/privateLinkResources.js +0 -119
  171. package/esm/operations/privateLinkResources.js.map +0 -1
  172. package/src/appConfigurationManagementClientContext.ts +0 -67
  173. package/src/models/configurationStoresMappers.ts +0 -35
  174. package/src/models/keyValuesMappers.ts +0 -31
  175. package/src/models/operationsMappers.ts +0 -23
  176. package/src/models/privateEndpointConnectionsMappers.ts +0 -31
@@ -3,255 +3,439 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/configurationStoresMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { ConfigurationStores } 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 { AppConfigurationManagementClientContext } from "../appConfigurationManagementClientContext";
14
+ import { AppConfigurationManagementClient } from "../appConfigurationManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ ConfigurationStore,
19
+ ConfigurationStoresListNextOptionalParams,
20
+ ConfigurationStoresListOptionalParams,
21
+ ConfigurationStoresListByResourceGroupNextOptionalParams,
22
+ ConfigurationStoresListByResourceGroupOptionalParams,
23
+ ApiKey,
24
+ ConfigurationStoresListKeysNextOptionalParams,
25
+ ConfigurationStoresListKeysOptionalParams,
26
+ ConfigurationStoresListResponse,
27
+ ConfigurationStoresListByResourceGroupResponse,
28
+ ConfigurationStoresGetOptionalParams,
29
+ ConfigurationStoresGetResponse,
30
+ ConfigurationStoresCreateOptionalParams,
31
+ ConfigurationStoresCreateResponse,
32
+ ConfigurationStoresDeleteOptionalParams,
33
+ ConfigurationStoreUpdateParameters,
34
+ ConfigurationStoresUpdateOptionalParams,
35
+ ConfigurationStoresUpdateResponse,
36
+ ConfigurationStoresListKeysResponse,
37
+ RegenerateKeyParameters,
38
+ ConfigurationStoresRegenerateKeyOptionalParams,
39
+ ConfigurationStoresRegenerateKeyResponse,
40
+ ConfigurationStoresListNextResponse,
41
+ ConfigurationStoresListByResourceGroupNextResponse,
42
+ ConfigurationStoresListKeysNextResponse
43
+ } from "../models";
16
44
 
17
- /** Class representing a ConfigurationStores. */
18
- export class ConfigurationStores {
19
- private readonly client: AppConfigurationManagementClientContext;
45
+ /// <reference lib="esnext.asynciterable" />
46
+ /** Class containing ConfigurationStores operations. */
47
+ export class ConfigurationStoresImpl implements ConfigurationStores {
48
+ private readonly client: AppConfigurationManagementClient;
20
49
 
21
50
  /**
22
- * Create a ConfigurationStores.
23
- * @param {AppConfigurationManagementClientContext} client Reference to the service client.
51
+ * Initialize a new instance of the class ConfigurationStores class.
52
+ * @param client Reference to the service client
24
53
  */
25
- constructor(client: AppConfigurationManagementClientContext) {
54
+ constructor(client: AppConfigurationManagementClient) {
26
55
  this.client = client;
27
56
  }
28
57
 
29
58
  /**
30
59
  * Lists the configuration stores for a given subscription.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.ConfigurationStoresListResponse>
60
+ * @param options The options parameters.
33
61
  */
34
- list(options?: Models.ConfigurationStoresListOptionalParams): Promise<Models.ConfigurationStoresListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
39
- /**
40
- * @param options The optional parameters
41
- * @param callback The callback
42
- */
43
- list(options: Models.ConfigurationStoresListOptionalParams, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
44
- list(options?: Models.ConfigurationStoresListOptionalParams | msRest.ServiceCallback<Models.ConfigurationStoreListResult>, callback?: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): Promise<Models.ConfigurationStoresListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
62
+ public list(
63
+ options?: ConfigurationStoresListOptionalParams
64
+ ): PagedAsyncIterableIterator<ConfigurationStore> {
65
+ const iter = this.listPagingAll(options);
66
+ return {
67
+ next() {
68
+ return iter.next();
69
+ },
70
+ [Symbol.asyncIterator]() {
71
+ return this;
48
72
  },
49
- listOperationSpec,
50
- callback) as Promise<Models.ConfigurationStoresListResponse>;
73
+ byPage: () => {
74
+ return this.listPagingPage(options);
75
+ }
76
+ };
77
+ }
78
+
79
+ private async *listPagingPage(
80
+ options?: ConfigurationStoresListOptionalParams
81
+ ): AsyncIterableIterator<ConfigurationStore[]> {
82
+ let result = await this._list(options);
83
+ yield result.value || [];
84
+ let continuationToken = result.nextLink;
85
+ while (continuationToken) {
86
+ result = await this._listNext(continuationToken, options);
87
+ continuationToken = result.nextLink;
88
+ yield result.value || [];
89
+ }
90
+ }
91
+
92
+ private async *listPagingAll(
93
+ options?: ConfigurationStoresListOptionalParams
94
+ ): AsyncIterableIterator<ConfigurationStore> {
95
+ for await (const page of this.listPagingPage(options)) {
96
+ yield* page;
97
+ }
51
98
  }
52
99
 
53
100
  /**
54
101
  * Lists the configuration stores for a given resource group.
55
102
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
56
- * @param [options] The optional parameters
57
- * @returns Promise<Models.ConfigurationStoresListByResourceGroupResponse>
58
- */
59
- listByResourceGroup(resourceGroupName: string, options?: Models.ConfigurationStoresListByResourceGroupOptionalParams): Promise<Models.ConfigurationStoresListByResourceGroupResponse>;
60
- /**
61
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
62
- * @param callback The callback
63
- */
64
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
65
- /**
66
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
67
- * @param options The optional parameters
68
- * @param callback The callback
103
+ * @param options The options parameters.
69
104
  */
70
- listByResourceGroup(resourceGroupName: string, options: Models.ConfigurationStoresListByResourceGroupOptionalParams, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
71
- listByResourceGroup(resourceGroupName: string, options?: Models.ConfigurationStoresListByResourceGroupOptionalParams | msRest.ServiceCallback<Models.ConfigurationStoreListResult>, callback?: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): Promise<Models.ConfigurationStoresListByResourceGroupResponse> {
72
- return this.client.sendOperationRequest(
73
- {
105
+ public listByResourceGroup(
106
+ resourceGroupName: string,
107
+ options?: ConfigurationStoresListByResourceGroupOptionalParams
108
+ ): PagedAsyncIterableIterator<ConfigurationStore> {
109
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
110
+ return {
111
+ next() {
112
+ return iter.next();
113
+ },
114
+ [Symbol.asyncIterator]() {
115
+ return this;
116
+ },
117
+ byPage: () => {
118
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
119
+ }
120
+ };
121
+ }
122
+
123
+ private async *listByResourceGroupPagingPage(
124
+ resourceGroupName: string,
125
+ options?: ConfigurationStoresListByResourceGroupOptionalParams
126
+ ): AsyncIterableIterator<ConfigurationStore[]> {
127
+ let result = await this._listByResourceGroup(resourceGroupName, options);
128
+ yield result.value || [];
129
+ let continuationToken = result.nextLink;
130
+ while (continuationToken) {
131
+ result = await this._listByResourceGroupNext(
74
132
  resourceGroupName,
133
+ continuationToken,
75
134
  options
76
- },
77
- listByResourceGroupOperationSpec,
78
- callback) as Promise<Models.ConfigurationStoresListByResourceGroupResponse>;
135
+ );
136
+ continuationToken = result.nextLink;
137
+ yield result.value || [];
138
+ }
139
+ }
140
+
141
+ private async *listByResourceGroupPagingAll(
142
+ resourceGroupName: string,
143
+ options?: ConfigurationStoresListByResourceGroupOptionalParams
144
+ ): AsyncIterableIterator<ConfigurationStore> {
145
+ for await (const page of this.listByResourceGroupPagingPage(
146
+ resourceGroupName,
147
+ options
148
+ )) {
149
+ yield* page;
150
+ }
79
151
  }
80
152
 
81
153
  /**
82
- * Gets the properties of the specified configuration store.
83
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
84
- * @param configStoreName The name of the configuration store.
85
- * @param [options] The optional parameters
86
- * @returns Promise<Models.ConfigurationStoresGetResponse>
87
- */
88
- get(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase): Promise<Models.ConfigurationStoresGetResponse>;
89
- /**
90
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
91
- * @param configStoreName The name of the configuration store.
92
- * @param callback The callback
93
- */
94
- get(resourceGroupName: string, configStoreName: string, callback: msRest.ServiceCallback<Models.ConfigurationStore>): void;
95
- /**
154
+ * Lists the access key for the specified configuration store.
96
155
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
97
156
  * @param configStoreName The name of the configuration store.
98
- * @param options The optional parameters
99
- * @param callback The callback
157
+ * @param options The options parameters.
100
158
  */
101
- get(resourceGroupName: string, configStoreName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ConfigurationStore>): void;
102
- get(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ConfigurationStore>, callback?: msRest.ServiceCallback<Models.ConfigurationStore>): Promise<Models.ConfigurationStoresGetResponse> {
103
- return this.client.sendOperationRequest(
104
- {
159
+ public listKeys(
160
+ resourceGroupName: string,
161
+ configStoreName: string,
162
+ options?: ConfigurationStoresListKeysOptionalParams
163
+ ): PagedAsyncIterableIterator<ApiKey> {
164
+ const iter = this.listKeysPagingAll(
165
+ resourceGroupName,
166
+ configStoreName,
167
+ options
168
+ );
169
+ return {
170
+ next() {
171
+ return iter.next();
172
+ },
173
+ [Symbol.asyncIterator]() {
174
+ return this;
175
+ },
176
+ byPage: () => {
177
+ return this.listKeysPagingPage(
178
+ resourceGroupName,
179
+ configStoreName,
180
+ options
181
+ );
182
+ }
183
+ };
184
+ }
185
+
186
+ private async *listKeysPagingPage(
187
+ resourceGroupName: string,
188
+ configStoreName: string,
189
+ options?: ConfigurationStoresListKeysOptionalParams
190
+ ): AsyncIterableIterator<ApiKey[]> {
191
+ let result = await this._listKeys(
192
+ resourceGroupName,
193
+ configStoreName,
194
+ options
195
+ );
196
+ yield result.value || [];
197
+ let continuationToken = result.nextLink;
198
+ while (continuationToken) {
199
+ result = await this._listKeysNext(
105
200
  resourceGroupName,
106
201
  configStoreName,
202
+ continuationToken,
107
203
  options
108
- },
109
- getOperationSpec,
110
- callback) as Promise<Models.ConfigurationStoresGetResponse>;
204
+ );
205
+ continuationToken = result.nextLink;
206
+ yield result.value || [];
207
+ }
111
208
  }
112
209
 
113
- /**
114
- * Creates a configuration store with the specified parameters.
115
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
116
- * @param configStoreName The name of the configuration store.
117
- * @param configStoreCreationParameters The parameters for creating a configuration store.
118
- * @param [options] The optional parameters
119
- * @returns Promise<Models.ConfigurationStoresCreateResponse>
120
- */
121
- create(resourceGroupName: string, configStoreName: string, configStoreCreationParameters: Models.ConfigurationStore, options?: msRest.RequestOptionsBase): Promise<Models.ConfigurationStoresCreateResponse> {
122
- return this.beginCreate(resourceGroupName,configStoreName,configStoreCreationParameters,options)
123
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ConfigurationStoresCreateResponse>;
210
+ private async *listKeysPagingAll(
211
+ resourceGroupName: string,
212
+ configStoreName: string,
213
+ options?: ConfigurationStoresListKeysOptionalParams
214
+ ): AsyncIterableIterator<ApiKey> {
215
+ for await (const page of this.listKeysPagingPage(
216
+ resourceGroupName,
217
+ configStoreName,
218
+ options
219
+ )) {
220
+ yield* page;
221
+ }
124
222
  }
125
223
 
126
224
  /**
127
- * Deletes a configuration store.
128
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
129
- * @param configStoreName The name of the configuration store.
130
- * @param [options] The optional parameters
131
- * @returns Promise<msRest.RestResponse>
225
+ * Lists the configuration stores for a given subscription.
226
+ * @param options The options parameters.
132
227
  */
133
- deleteMethod(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
134
- return this.beginDeleteMethod(resourceGroupName,configStoreName,options)
135
- .then(lroPoller => lroPoller.pollUntilFinished());
228
+ private _list(
229
+ options?: ConfigurationStoresListOptionalParams
230
+ ): Promise<ConfigurationStoresListResponse> {
231
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
136
232
  }
137
233
 
138
234
  /**
139
- * Updates a configuration store with the specified parameters.
235
+ * Lists the configuration stores for a given resource group.
140
236
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
141
- * @param configStoreName The name of the configuration store.
142
- * @param configStoreUpdateParameters The parameters for updating a configuration store.
143
- * @param [options] The optional parameters
144
- * @returns Promise<Models.ConfigurationStoresUpdateResponse>
237
+ * @param options The options parameters.
145
238
  */
146
- update(resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: Models.ConfigurationStoreUpdateParameters, options?: msRest.RequestOptionsBase): Promise<Models.ConfigurationStoresUpdateResponse> {
147
- return this.beginUpdate(resourceGroupName,configStoreName,configStoreUpdateParameters,options)
148
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ConfigurationStoresUpdateResponse>;
239
+ private _listByResourceGroup(
240
+ resourceGroupName: string,
241
+ options?: ConfigurationStoresListByResourceGroupOptionalParams
242
+ ): Promise<ConfigurationStoresListByResourceGroupResponse> {
243
+ return this.client.sendOperationRequest(
244
+ { resourceGroupName, options },
245
+ listByResourceGroupOperationSpec
246
+ );
149
247
  }
150
248
 
151
249
  /**
152
- * Lists the access key for the specified configuration store.
153
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
154
- * @param configStoreName The name of the configuration store.
155
- * @param [options] The optional parameters
156
- * @returns Promise<Models.ConfigurationStoresListKeysResponse>
157
- */
158
- listKeys(resourceGroupName: string, configStoreName: string, options?: Models.ConfigurationStoresListKeysOptionalParams): Promise<Models.ConfigurationStoresListKeysResponse>;
159
- /**
250
+ * Gets the properties of the specified configuration store.
160
251
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
161
252
  * @param configStoreName The name of the configuration store.
162
- * @param callback The callback
253
+ * @param options The options parameters.
163
254
  */
164
- listKeys(resourceGroupName: string, configStoreName: string, callback: msRest.ServiceCallback<Models.ApiKeyListResult>): void;
255
+ get(
256
+ resourceGroupName: string,
257
+ configStoreName: string,
258
+ options?: ConfigurationStoresGetOptionalParams
259
+ ): Promise<ConfigurationStoresGetResponse> {
260
+ return this.client.sendOperationRequest(
261
+ { resourceGroupName, configStoreName, options },
262
+ getOperationSpec
263
+ );
264
+ }
265
+
165
266
  /**
267
+ * Creates a configuration store with the specified parameters.
166
268
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
167
269
  * @param configStoreName The name of the configuration store.
168
- * @param options The optional parameters
169
- * @param callback The callback
270
+ * @param configStoreCreationParameters The parameters for creating a configuration store.
271
+ * @param options The options parameters.
170
272
  */
171
- listKeys(resourceGroupName: string, configStoreName: string, options: Models.ConfigurationStoresListKeysOptionalParams, callback: msRest.ServiceCallback<Models.ApiKeyListResult>): void;
172
- listKeys(resourceGroupName: string, configStoreName: string, options?: Models.ConfigurationStoresListKeysOptionalParams | msRest.ServiceCallback<Models.ApiKeyListResult>, callback?: msRest.ServiceCallback<Models.ApiKeyListResult>): Promise<Models.ConfigurationStoresListKeysResponse> {
173
- return this.client.sendOperationRequest(
273
+ async beginCreate(
274
+ resourceGroupName: string,
275
+ configStoreName: string,
276
+ configStoreCreationParameters: ConfigurationStore,
277
+ options?: ConfigurationStoresCreateOptionalParams
278
+ ): Promise<
279
+ PollerLike<
280
+ PollOperationState<ConfigurationStoresCreateResponse>,
281
+ ConfigurationStoresCreateResponse
282
+ >
283
+ > {
284
+ const directSendOperation = async (
285
+ args: coreClient.OperationArguments,
286
+ spec: coreClient.OperationSpec
287
+ ): Promise<ConfigurationStoresCreateResponse> => {
288
+ return this.client.sendOperationRequest(args, spec);
289
+ };
290
+ const sendOperation = async (
291
+ args: coreClient.OperationArguments,
292
+ spec: coreClient.OperationSpec
293
+ ) => {
294
+ let currentRawResponse:
295
+ | coreClient.FullOperationResponse
296
+ | undefined = undefined;
297
+ const providedCallback = args.options?.onResponse;
298
+ const callback: coreClient.RawResponseCallback = (
299
+ rawResponse: coreClient.FullOperationResponse,
300
+ flatResponse: unknown
301
+ ) => {
302
+ currentRawResponse = rawResponse;
303
+ providedCallback?.(rawResponse, flatResponse);
304
+ };
305
+ const updatedArgs = {
306
+ ...args,
307
+ options: {
308
+ ...args.options,
309
+ onResponse: callback
310
+ }
311
+ };
312
+ const flatResponse = await directSendOperation(updatedArgs, spec);
313
+ return {
314
+ flatResponse,
315
+ rawResponse: {
316
+ statusCode: currentRawResponse!.status,
317
+ body: currentRawResponse!.parsedBody,
318
+ headers: currentRawResponse!.headers.toJSON()
319
+ }
320
+ };
321
+ };
322
+
323
+ const lro = new LroImpl(
324
+ sendOperation,
174
325
  {
175
326
  resourceGroupName,
176
327
  configStoreName,
328
+ configStoreCreationParameters,
177
329
  options
178
330
  },
179
- listKeysOperationSpec,
180
- callback) as Promise<Models.ConfigurationStoresListKeysResponse>;
331
+ createOperationSpec
332
+ );
333
+ return new LroEngine(lro, {
334
+ resumeFrom: options?.resumeFrom,
335
+ intervalInMs: options?.updateIntervalInMs
336
+ });
181
337
  }
182
338
 
183
339
  /**
184
- * Regenerates an access key for the specified configuration store.
185
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
186
- * @param configStoreName The name of the configuration store.
187
- * @param regenerateKeyParameters The parameters for regenerating an access key.
188
- * @param [options] The optional parameters
189
- * @returns Promise<Models.ConfigurationStoresRegenerateKeyResponse>
190
- */
191
- regenerateKey(resourceGroupName: string, configStoreName: string, regenerateKeyParameters: Models.RegenerateKeyParameters, options?: msRest.RequestOptionsBase): Promise<Models.ConfigurationStoresRegenerateKeyResponse>;
192
- /**
193
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
194
- * @param configStoreName The name of the configuration store.
195
- * @param regenerateKeyParameters The parameters for regenerating an access key.
196
- * @param callback The callback
197
- */
198
- regenerateKey(resourceGroupName: string, configStoreName: string, regenerateKeyParameters: Models.RegenerateKeyParameters, callback: msRest.ServiceCallback<Models.ApiKey>): void;
199
- /**
340
+ * Creates a configuration store with the specified parameters.
200
341
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
201
342
  * @param configStoreName The name of the configuration store.
202
- * @param regenerateKeyParameters The parameters for regenerating an access key.
203
- * @param options The optional parameters
204
- * @param callback The callback
343
+ * @param configStoreCreationParameters The parameters for creating a configuration store.
344
+ * @param options The options parameters.
205
345
  */
206
- regenerateKey(resourceGroupName: string, configStoreName: string, regenerateKeyParameters: Models.RegenerateKeyParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ApiKey>): void;
207
- regenerateKey(resourceGroupName: string, configStoreName: string, regenerateKeyParameters: Models.RegenerateKeyParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ApiKey>, callback?: msRest.ServiceCallback<Models.ApiKey>): Promise<Models.ConfigurationStoresRegenerateKeyResponse> {
208
- return this.client.sendOperationRequest(
209
- {
210
- resourceGroupName,
211
- configStoreName,
212
- regenerateKeyParameters,
213
- options
214
- },
215
- regenerateKeyOperationSpec,
216
- callback) as Promise<Models.ConfigurationStoresRegenerateKeyResponse>;
346
+ async beginCreateAndWait(
347
+ resourceGroupName: string,
348
+ configStoreName: string,
349
+ configStoreCreationParameters: ConfigurationStore,
350
+ options?: ConfigurationStoresCreateOptionalParams
351
+ ): Promise<ConfigurationStoresCreateResponse> {
352
+ const poller = await this.beginCreate(
353
+ resourceGroupName,
354
+ configStoreName,
355
+ configStoreCreationParameters,
356
+ options
357
+ );
358
+ return poller.pollUntilDone();
217
359
  }
218
360
 
219
361
  /**
220
- * Creates a configuration store with the specified parameters.
362
+ * Deletes a configuration store.
221
363
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
222
364
  * @param configStoreName The name of the configuration store.
223
- * @param configStoreCreationParameters The parameters for creating a configuration store.
224
- * @param [options] The optional parameters
225
- * @returns Promise<msRestAzure.LROPoller>
365
+ * @param options The options parameters.
226
366
  */
227
- beginCreate(resourceGroupName: string, configStoreName: string, configStoreCreationParameters: Models.ConfigurationStore, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
228
- return this.client.sendLRORequest(
229
- {
230
- resourceGroupName,
231
- configStoreName,
232
- configStoreCreationParameters,
233
- options
234
- },
235
- beginCreateOperationSpec,
236
- options);
367
+ async beginDelete(
368
+ resourceGroupName: string,
369
+ configStoreName: string,
370
+ options?: ConfigurationStoresDeleteOptionalParams
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, configStoreName, options },
414
+ deleteOperationSpec
415
+ );
416
+ return new LroEngine(lro, {
417
+ resumeFrom: options?.resumeFrom,
418
+ intervalInMs: options?.updateIntervalInMs
419
+ });
237
420
  }
238
421
 
239
422
  /**
240
423
  * Deletes a configuration store.
241
424
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
242
425
  * @param configStoreName The name of the configuration store.
243
- * @param [options] The optional parameters
244
- * @returns Promise<msRestAzure.LROPoller>
426
+ * @param options The options parameters.
245
427
  */
246
- beginDeleteMethod(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
247
- return this.client.sendLRORequest(
248
- {
249
- resourceGroupName,
250
- configStoreName,
251
- options
252
- },
253
- beginDeleteMethodOperationSpec,
254
- options);
428
+ async beginDeleteAndWait(
429
+ resourceGroupName: string,
430
+ configStoreName: string,
431
+ options?: ConfigurationStoresDeleteOptionalParams
432
+ ): Promise<void> {
433
+ const poller = await this.beginDelete(
434
+ resourceGroupName,
435
+ configStoreName,
436
+ options
437
+ );
438
+ return poller.pollUntilDone();
255
439
  }
256
440
 
257
441
  /**
@@ -259,121 +443,190 @@ export class ConfigurationStores {
259
443
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
260
444
  * @param configStoreName The name of the configuration store.
261
445
  * @param configStoreUpdateParameters The parameters for updating a configuration store.
262
- * @param [options] The optional parameters
263
- * @returns Promise<msRestAzure.LROPoller>
446
+ * @param options The options parameters.
264
447
  */
265
- beginUpdate(resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: Models.ConfigurationStoreUpdateParameters, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
266
- return this.client.sendLRORequest(
448
+ async beginUpdate(
449
+ resourceGroupName: string,
450
+ configStoreName: string,
451
+ configStoreUpdateParameters: ConfigurationStoreUpdateParameters,
452
+ options?: ConfigurationStoresUpdateOptionalParams
453
+ ): Promise<
454
+ PollerLike<
455
+ PollOperationState<ConfigurationStoresUpdateResponse>,
456
+ ConfigurationStoresUpdateResponse
457
+ >
458
+ > {
459
+ const directSendOperation = async (
460
+ args: coreClient.OperationArguments,
461
+ spec: coreClient.OperationSpec
462
+ ): Promise<ConfigurationStoresUpdateResponse> => {
463
+ return this.client.sendOperationRequest(args, spec);
464
+ };
465
+ const sendOperation = async (
466
+ args: coreClient.OperationArguments,
467
+ spec: coreClient.OperationSpec
468
+ ) => {
469
+ let currentRawResponse:
470
+ | coreClient.FullOperationResponse
471
+ | undefined = undefined;
472
+ const providedCallback = args.options?.onResponse;
473
+ const callback: coreClient.RawResponseCallback = (
474
+ rawResponse: coreClient.FullOperationResponse,
475
+ flatResponse: unknown
476
+ ) => {
477
+ currentRawResponse = rawResponse;
478
+ providedCallback?.(rawResponse, flatResponse);
479
+ };
480
+ const updatedArgs = {
481
+ ...args,
482
+ options: {
483
+ ...args.options,
484
+ onResponse: callback
485
+ }
486
+ };
487
+ const flatResponse = await directSendOperation(updatedArgs, spec);
488
+ return {
489
+ flatResponse,
490
+ rawResponse: {
491
+ statusCode: currentRawResponse!.status,
492
+ body: currentRawResponse!.parsedBody,
493
+ headers: currentRawResponse!.headers.toJSON()
494
+ }
495
+ };
496
+ };
497
+
498
+ const lro = new LroImpl(
499
+ sendOperation,
267
500
  {
268
501
  resourceGroupName,
269
502
  configStoreName,
270
503
  configStoreUpdateParameters,
271
504
  options
272
505
  },
273
- beginUpdateOperationSpec,
274
- options);
506
+ updateOperationSpec
507
+ );
508
+ return new LroEngine(lro, {
509
+ resumeFrom: options?.resumeFrom,
510
+ intervalInMs: options?.updateIntervalInMs
511
+ });
275
512
  }
276
513
 
277
514
  /**
278
- * Lists the configuration stores for a given subscription.
279
- * @param nextPageLink The NextLink from the previous successful call to List operation.
280
- * @param [options] The optional parameters
281
- * @returns Promise<Models.ConfigurationStoresListNextResponse>
282
- */
283
- listNext(nextPageLink: string, options?: Models.ConfigurationStoresListNextOptionalParams): Promise<Models.ConfigurationStoresListNextResponse>;
284
- /**
285
- * @param nextPageLink The NextLink from the previous successful call to List operation.
286
- * @param callback The callback
515
+ * Updates a configuration store with the specified parameters.
516
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
517
+ * @param configStoreName The name of the configuration store.
518
+ * @param configStoreUpdateParameters The parameters for updating a configuration store.
519
+ * @param options The options parameters.
287
520
  */
288
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
521
+ async beginUpdateAndWait(
522
+ resourceGroupName: string,
523
+ configStoreName: string,
524
+ configStoreUpdateParameters: ConfigurationStoreUpdateParameters,
525
+ options?: ConfigurationStoresUpdateOptionalParams
526
+ ): Promise<ConfigurationStoresUpdateResponse> {
527
+ const poller = await this.beginUpdate(
528
+ resourceGroupName,
529
+ configStoreName,
530
+ configStoreUpdateParameters,
531
+ options
532
+ );
533
+ return poller.pollUntilDone();
534
+ }
535
+
289
536
  /**
290
- * @param nextPageLink The NextLink from the previous successful call to List operation.
291
- * @param options The optional parameters
292
- * @param callback The callback
537
+ * Lists the access key for the specified configuration store.
538
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
539
+ * @param configStoreName The name of the configuration store.
540
+ * @param options The options parameters.
293
541
  */
294
- listNext(nextPageLink: string, options: Models.ConfigurationStoresListNextOptionalParams, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
295
- listNext(nextPageLink: string, options?: Models.ConfigurationStoresListNextOptionalParams | msRest.ServiceCallback<Models.ConfigurationStoreListResult>, callback?: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): Promise<Models.ConfigurationStoresListNextResponse> {
542
+ private _listKeys(
543
+ resourceGroupName: string,
544
+ configStoreName: string,
545
+ options?: ConfigurationStoresListKeysOptionalParams
546
+ ): Promise<ConfigurationStoresListKeysResponse> {
296
547
  return this.client.sendOperationRequest(
297
- {
298
- nextPageLink,
299
- options
300
- },
301
- listNextOperationSpec,
302
- callback) as Promise<Models.ConfigurationStoresListNextResponse>;
548
+ { resourceGroupName, configStoreName, options },
549
+ listKeysOperationSpec
550
+ );
303
551
  }
304
552
 
305
553
  /**
306
- * Lists the configuration stores for a given resource group.
307
- * @param nextPageLink The NextLink from the previous successful call to List operation.
308
- * @param [options] The optional parameters
309
- * @returns Promise<Models.ConfigurationStoresListByResourceGroupNextResponse>
310
- */
311
- listByResourceGroupNext(nextPageLink: string, options?: Models.ConfigurationStoresListByResourceGroupNextOptionalParams): Promise<Models.ConfigurationStoresListByResourceGroupNextResponse>;
312
- /**
313
- * @param nextPageLink The NextLink from the previous successful call to List operation.
314
- * @param callback The callback
315
- */
316
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
317
- /**
318
- * @param nextPageLink The NextLink from the previous successful call to List operation.
319
- * @param options The optional parameters
320
- * @param callback The callback
554
+ * Regenerates an access key for the specified configuration store.
555
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
556
+ * @param configStoreName The name of the configuration store.
557
+ * @param regenerateKeyParameters The parameters for regenerating an access key.
558
+ * @param options The options parameters.
321
559
  */
322
- listByResourceGroupNext(nextPageLink: string, options: Models.ConfigurationStoresListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): void;
323
- listByResourceGroupNext(nextPageLink: string, options?: Models.ConfigurationStoresListByResourceGroupNextOptionalParams | msRest.ServiceCallback<Models.ConfigurationStoreListResult>, callback?: msRest.ServiceCallback<Models.ConfigurationStoreListResult>): Promise<Models.ConfigurationStoresListByResourceGroupNextResponse> {
560
+ regenerateKey(
561
+ resourceGroupName: string,
562
+ configStoreName: string,
563
+ regenerateKeyParameters: RegenerateKeyParameters,
564
+ options?: ConfigurationStoresRegenerateKeyOptionalParams
565
+ ): Promise<ConfigurationStoresRegenerateKeyResponse> {
324
566
  return this.client.sendOperationRequest(
325
- {
326
- nextPageLink,
327
- options
328
- },
329
- listByResourceGroupNextOperationSpec,
330
- callback) as Promise<Models.ConfigurationStoresListByResourceGroupNextResponse>;
567
+ { resourceGroupName, configStoreName, regenerateKeyParameters, options },
568
+ regenerateKeyOperationSpec
569
+ );
331
570
  }
332
571
 
333
572
  /**
334
- * Lists the access key for the specified configuration store.
335
- * @param nextPageLink The NextLink from the previous successful call to List operation.
336
- * @param [options] The optional parameters
337
- * @returns Promise<Models.ConfigurationStoresListKeysNextResponse>
573
+ * ListNext
574
+ * @param nextLink The nextLink from the previous successful call to the List method.
575
+ * @param options The options parameters.
338
576
  */
339
- listKeysNext(nextPageLink: string, options?: Models.ConfigurationStoresListKeysNextOptionalParams): Promise<Models.ConfigurationStoresListKeysNextResponse>;
577
+ private _listNext(
578
+ nextLink: string,
579
+ options?: ConfigurationStoresListNextOptionalParams
580
+ ): Promise<ConfigurationStoresListNextResponse> {
581
+ return this.client.sendOperationRequest(
582
+ { nextLink, options },
583
+ listNextOperationSpec
584
+ );
585
+ }
586
+
340
587
  /**
341
- * @param nextPageLink The NextLink from the previous successful call to List operation.
342
- * @param callback The callback
588
+ * ListByResourceGroupNext
589
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
590
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
591
+ * @param options The options parameters.
343
592
  */
344
- listKeysNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ApiKeyListResult>): void;
593
+ private _listByResourceGroupNext(
594
+ resourceGroupName: string,
595
+ nextLink: string,
596
+ options?: ConfigurationStoresListByResourceGroupNextOptionalParams
597
+ ): Promise<ConfigurationStoresListByResourceGroupNextResponse> {
598
+ return this.client.sendOperationRequest(
599
+ { resourceGroupName, nextLink, options },
600
+ listByResourceGroupNextOperationSpec
601
+ );
602
+ }
603
+
345
604
  /**
346
- * @param nextPageLink The NextLink from the previous successful call to List operation.
347
- * @param options The optional parameters
348
- * @param callback The callback
605
+ * ListKeysNext
606
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
607
+ * @param configStoreName The name of the configuration store.
608
+ * @param nextLink The nextLink from the previous successful call to the ListKeys method.
609
+ * @param options The options parameters.
349
610
  */
350
- listKeysNext(nextPageLink: string, options: Models.ConfigurationStoresListKeysNextOptionalParams, callback: msRest.ServiceCallback<Models.ApiKeyListResult>): void;
351
- listKeysNext(nextPageLink: string, options?: Models.ConfigurationStoresListKeysNextOptionalParams | msRest.ServiceCallback<Models.ApiKeyListResult>, callback?: msRest.ServiceCallback<Models.ApiKeyListResult>): Promise<Models.ConfigurationStoresListKeysNextResponse> {
611
+ private _listKeysNext(
612
+ resourceGroupName: string,
613
+ configStoreName: string,
614
+ nextLink: string,
615
+ options?: ConfigurationStoresListKeysNextOptionalParams
616
+ ): Promise<ConfigurationStoresListKeysNextResponse> {
352
617
  return this.client.sendOperationRequest(
353
- {
354
- nextPageLink,
355
- options
356
- },
357
- listKeysNextOperationSpec,
358
- callback) as Promise<Models.ConfigurationStoresListKeysNextResponse>;
618
+ { resourceGroupName, configStoreName, nextLink, options },
619
+ listKeysNextOperationSpec
620
+ );
359
621
  }
360
622
  }
361
-
362
623
  // Operation Specifications
363
- const serializer = new msRest.Serializer(Mappers);
364
- const listOperationSpec: msRest.OperationSpec = {
624
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
625
+
626
+ const listOperationSpec: coreClient.OperationSpec = {
627
+ path:
628
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores",
365
629
  httpMethod: "GET",
366
- path: "subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores",
367
- urlParameters: [
368
- Parameters.subscriptionId
369
- ],
370
- queryParameters: [
371
- Parameters.apiVersion,
372
- Parameters.skipToken
373
- ],
374
- headerParameters: [
375
- Parameters.acceptLanguage
376
- ],
377
630
  responses: {
378
631
  200: {
379
632
  bodyMapper: Mappers.ConfigurationStoreListResult
@@ -382,23 +635,15 @@ const listOperationSpec: msRest.OperationSpec = {
382
635
  bodyMapper: Mappers.ErrorResponse
383
636
  }
384
637
  },
638
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
639
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
640
+ headerParameters: [Parameters.accept],
385
641
  serializer
386
642
  };
387
-
388
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
643
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
644
+ path:
645
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores",
389
646
  httpMethod: "GET",
390
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores",
391
- urlParameters: [
392
- Parameters.subscriptionId,
393
- Parameters.resourceGroupName
394
- ],
395
- queryParameters: [
396
- Parameters.apiVersion,
397
- Parameters.skipToken
398
- ],
399
- headerParameters: [
400
- Parameters.acceptLanguage
401
- ],
402
647
  responses: {
403
648
  200: {
404
649
  bodyMapper: Mappers.ConfigurationStoreListResult
@@ -407,23 +652,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
407
652
  bodyMapper: Mappers.ErrorResponse
408
653
  }
409
654
  },
410
- serializer
411
- };
412
-
413
- const getOperationSpec: msRest.OperationSpec = {
414
- httpMethod: "GET",
415
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
655
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
416
656
  urlParameters: [
657
+ Parameters.$host,
417
658
  Parameters.subscriptionId,
418
- Parameters.resourceGroupName,
419
- Parameters.configStoreName
420
- ],
421
- queryParameters: [
422
- Parameters.apiVersion
423
- ],
424
- headerParameters: [
425
- Parameters.acceptLanguage
659
+ Parameters.resourceGroupName
426
660
  ],
661
+ headerParameters: [Parameters.accept],
662
+ serializer
663
+ };
664
+ const getOperationSpec: coreClient.OperationSpec = {
665
+ path:
666
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
667
+ httpMethod: "GET",
427
668
  responses: {
428
669
  200: {
429
670
  bodyMapper: Mappers.ConfigurationStore
@@ -432,88 +673,76 @@ const getOperationSpec: msRest.OperationSpec = {
432
673
  bodyMapper: Mappers.ErrorResponse
433
674
  }
434
675
  },
435
- serializer
436
- };
437
-
438
- const listKeysOperationSpec: msRest.OperationSpec = {
439
- httpMethod: "POST",
440
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeys",
676
+ queryParameters: [Parameters.apiVersion],
441
677
  urlParameters: [
678
+ Parameters.$host,
442
679
  Parameters.subscriptionId,
443
680
  Parameters.resourceGroupName,
444
681
  Parameters.configStoreName
445
682
  ],
446
- queryParameters: [
447
- Parameters.apiVersion,
448
- Parameters.skipToken
449
- ],
450
- headerParameters: [
451
- Parameters.acceptLanguage
452
- ],
683
+ headerParameters: [Parameters.accept],
684
+ serializer
685
+ };
686
+ const createOperationSpec: coreClient.OperationSpec = {
687
+ path:
688
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
689
+ httpMethod: "PUT",
453
690
  responses: {
454
691
  200: {
455
- bodyMapper: Mappers.ApiKeyListResult
692
+ bodyMapper: Mappers.ConfigurationStore
693
+ },
694
+ 201: {
695
+ bodyMapper: Mappers.ConfigurationStore
696
+ },
697
+ 202: {
698
+ bodyMapper: Mappers.ConfigurationStore
699
+ },
700
+ 204: {
701
+ bodyMapper: Mappers.ConfigurationStore
456
702
  },
457
703
  default: {
458
704
  bodyMapper: Mappers.ErrorResponse
459
705
  }
460
706
  },
461
- serializer
462
- };
463
-
464
- const regenerateKeyOperationSpec: msRest.OperationSpec = {
465
- httpMethod: "POST",
466
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/regenerateKey",
707
+ requestBody: Parameters.configStoreCreationParameters,
708
+ queryParameters: [Parameters.apiVersion],
467
709
  urlParameters: [
710
+ Parameters.$host,
468
711
  Parameters.subscriptionId,
469
712
  Parameters.resourceGroupName,
470
713
  Parameters.configStoreName
471
714
  ],
472
- queryParameters: [
473
- Parameters.apiVersion
474
- ],
475
- headerParameters: [
476
- Parameters.acceptLanguage
477
- ],
478
- requestBody: {
479
- parameterPath: "regenerateKeyParameters",
480
- mapper: {
481
- ...Mappers.RegenerateKeyParameters,
482
- required: true
483
- }
484
- },
715
+ headerParameters: [Parameters.accept, Parameters.contentType],
716
+ mediaType: "json",
717
+ serializer
718
+ };
719
+ const deleteOperationSpec: coreClient.OperationSpec = {
720
+ path:
721
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
722
+ httpMethod: "DELETE",
485
723
  responses: {
486
- 200: {
487
- bodyMapper: Mappers.ApiKey
488
- },
724
+ 200: {},
725
+ 201: {},
726
+ 202: {},
727
+ 204: {},
489
728
  default: {
490
729
  bodyMapper: Mappers.ErrorResponse
491
730
  }
492
731
  },
493
- serializer
494
- };
495
-
496
- const beginCreateOperationSpec: msRest.OperationSpec = {
497
- httpMethod: "PUT",
498
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
732
+ queryParameters: [Parameters.apiVersion],
499
733
  urlParameters: [
734
+ Parameters.$host,
500
735
  Parameters.subscriptionId,
501
736
  Parameters.resourceGroupName,
502
737
  Parameters.configStoreName
503
738
  ],
504
- queryParameters: [
505
- Parameters.apiVersion
506
- ],
507
- headerParameters: [
508
- Parameters.acceptLanguage
509
- ],
510
- requestBody: {
511
- parameterPath: "configStoreCreationParameters",
512
- mapper: {
513
- ...Mappers.ConfigurationStore,
514
- required: true
515
- }
516
- },
739
+ headerParameters: [Parameters.accept],
740
+ serializer
741
+ };
742
+ const updateOperationSpec: coreClient.OperationSpec = {
743
+ path:
744
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
745
+ httpMethod: "PATCH",
517
746
  responses: {
518
747
  200: {
519
748
  bodyMapper: Mappers.ConfigurationStore
@@ -521,87 +750,77 @@ const beginCreateOperationSpec: msRest.OperationSpec = {
521
750
  201: {
522
751
  bodyMapper: Mappers.ConfigurationStore
523
752
  },
753
+ 202: {
754
+ bodyMapper: Mappers.ConfigurationStore
755
+ },
756
+ 204: {
757
+ bodyMapper: Mappers.ConfigurationStore
758
+ },
524
759
  default: {
525
760
  bodyMapper: Mappers.ErrorResponse
526
761
  }
527
762
  },
528
- serializer
529
- };
530
-
531
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
532
- httpMethod: "DELETE",
533
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
763
+ requestBody: Parameters.configStoreUpdateParameters,
764
+ queryParameters: [Parameters.apiVersion],
534
765
  urlParameters: [
766
+ Parameters.$host,
535
767
  Parameters.subscriptionId,
536
768
  Parameters.resourceGroupName,
537
769
  Parameters.configStoreName
538
770
  ],
539
- queryParameters: [
540
- Parameters.apiVersion
541
- ],
542
- headerParameters: [
543
- Parameters.acceptLanguage
544
- ],
771
+ headerParameters: [Parameters.accept, Parameters.contentType],
772
+ mediaType: "json",
773
+ serializer
774
+ };
775
+ const listKeysOperationSpec: coreClient.OperationSpec = {
776
+ path:
777
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeys",
778
+ httpMethod: "POST",
545
779
  responses: {
546
- 200: {},
547
- 202: {},
548
- 204: {},
780
+ 200: {
781
+ bodyMapper: Mappers.ApiKeyListResult
782
+ },
549
783
  default: {
550
784
  bodyMapper: Mappers.ErrorResponse
551
785
  }
552
786
  },
553
- serializer
554
- };
555
-
556
- const beginUpdateOperationSpec: msRest.OperationSpec = {
557
- httpMethod: "PATCH",
558
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}",
787
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
559
788
  urlParameters: [
789
+ Parameters.$host,
560
790
  Parameters.subscriptionId,
561
791
  Parameters.resourceGroupName,
562
792
  Parameters.configStoreName
563
793
  ],
564
- queryParameters: [
565
- Parameters.apiVersion
566
- ],
567
- headerParameters: [
568
- Parameters.acceptLanguage
569
- ],
570
- requestBody: {
571
- parameterPath: "configStoreUpdateParameters",
572
- mapper: {
573
- ...Mappers.ConfigurationStoreUpdateParameters,
574
- required: true
575
- }
576
- },
794
+ headerParameters: [Parameters.accept],
795
+ serializer
796
+ };
797
+ const regenerateKeyOperationSpec: coreClient.OperationSpec = {
798
+ path:
799
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/regenerateKey",
800
+ httpMethod: "POST",
577
801
  responses: {
578
802
  200: {
579
- bodyMapper: Mappers.ConfigurationStore
580
- },
581
- 201: {
582
- bodyMapper: Mappers.ConfigurationStore
803
+ bodyMapper: Mappers.ApiKey
583
804
  },
584
805
  default: {
585
806
  bodyMapper: Mappers.ErrorResponse
586
807
  }
587
808
  },
809
+ requestBody: Parameters.regenerateKeyParameters,
810
+ queryParameters: [Parameters.apiVersion],
811
+ urlParameters: [
812
+ Parameters.$host,
813
+ Parameters.subscriptionId,
814
+ Parameters.resourceGroupName,
815
+ Parameters.configStoreName
816
+ ],
817
+ headerParameters: [Parameters.accept, Parameters.contentType],
818
+ mediaType: "json",
588
819
  serializer
589
820
  };
590
-
591
- const listNextOperationSpec: msRest.OperationSpec = {
592
- httpMethod: "GET",
593
- baseUrl: "https://management.azure.com",
821
+ const listNextOperationSpec: coreClient.OperationSpec = {
594
822
  path: "{nextLink}",
595
- urlParameters: [
596
- Parameters.nextPageLink
597
- ],
598
- queryParameters: [
599
- Parameters.apiVersion,
600
- Parameters.skipToken
601
- ],
602
- headerParameters: [
603
- Parameters.acceptLanguage
604
- ],
823
+ httpMethod: "GET",
605
824
  responses: {
606
825
  200: {
607
826
  bodyMapper: Mappers.ConfigurationStoreListResult
@@ -610,23 +829,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
610
829
  bodyMapper: Mappers.ErrorResponse
611
830
  }
612
831
  },
832
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
833
+ urlParameters: [
834
+ Parameters.$host,
835
+ Parameters.subscriptionId,
836
+ Parameters.nextLink
837
+ ],
838
+ headerParameters: [Parameters.accept],
613
839
  serializer
614
840
  };
615
-
616
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
617
- httpMethod: "GET",
618
- baseUrl: "https://management.azure.com",
841
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
619
842
  path: "{nextLink}",
620
- urlParameters: [
621
- Parameters.nextPageLink
622
- ],
623
- queryParameters: [
624
- Parameters.apiVersion,
625
- Parameters.skipToken
626
- ],
627
- headerParameters: [
628
- Parameters.acceptLanguage
629
- ],
843
+ httpMethod: "GET",
630
844
  responses: {
631
845
  200: {
632
846
  bodyMapper: Mappers.ConfigurationStoreListResult
@@ -635,23 +849,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
635
849
  bodyMapper: Mappers.ErrorResponse
636
850
  }
637
851
  },
852
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
853
+ urlParameters: [
854
+ Parameters.$host,
855
+ Parameters.subscriptionId,
856
+ Parameters.resourceGroupName,
857
+ Parameters.nextLink
858
+ ],
859
+ headerParameters: [Parameters.accept],
638
860
  serializer
639
861
  };
640
-
641
- const listKeysNextOperationSpec: msRest.OperationSpec = {
642
- httpMethod: "POST",
643
- baseUrl: "https://management.azure.com",
862
+ const listKeysNextOperationSpec: coreClient.OperationSpec = {
644
863
  path: "{nextLink}",
645
- urlParameters: [
646
- Parameters.nextPageLink
647
- ],
648
- queryParameters: [
649
- Parameters.apiVersion,
650
- Parameters.skipToken
651
- ],
652
- headerParameters: [
653
- Parameters.acceptLanguage
654
- ],
864
+ httpMethod: "GET",
655
865
  responses: {
656
866
  200: {
657
867
  bodyMapper: Mappers.ApiKeyListResult
@@ -660,5 +870,14 @@ const listKeysNextOperationSpec: msRest.OperationSpec = {
660
870
  bodyMapper: Mappers.ErrorResponse
661
871
  }
662
872
  },
873
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
874
+ urlParameters: [
875
+ Parameters.$host,
876
+ Parameters.subscriptionId,
877
+ Parameters.resourceGroupName,
878
+ Parameters.configStoreName,
879
+ Parameters.nextLink
880
+ ],
881
+ headerParameters: [Parameters.accept],
663
882
  serializer
664
883
  };