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