@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,8 +3,7 @@
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
9
  export * from "./configurationStores";
@@ -3,26 +3,40 @@
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/keyValuesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { KeyValues } 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
+ KeyValue,
19
+ KeyValuesListByConfigurationStoreNextOptionalParams,
20
+ KeyValuesListByConfigurationStoreOptionalParams,
21
+ KeyValuesListByConfigurationStoreResponse,
22
+ KeyValuesGetOptionalParams,
23
+ KeyValuesGetResponse,
24
+ KeyValuesCreateOrUpdateOptionalParams,
25
+ KeyValuesCreateOrUpdateResponse,
26
+ KeyValuesDeleteOptionalParams,
27
+ KeyValuesListByConfigurationStoreNextResponse
28
+ } from "../models";
16
29
 
17
- /** Class representing a KeyValues. */
18
- export class KeyValues {
19
- private readonly client: AppConfigurationManagementClientContext;
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing KeyValues operations. */
32
+ export class KeyValuesImpl implements KeyValues {
33
+ private readonly client: AppConfigurationManagementClient;
20
34
 
21
35
  /**
22
- * Create a KeyValues.
23
- * @param {AppConfigurationManagementClientContext} client Reference to the service client.
36
+ * Initialize a new instance of the class KeyValues class.
37
+ * @param client Reference to the service client
24
38
  */
25
- constructor(client: AppConfigurationManagementClientContext) {
39
+ constructor(client: AppConfigurationManagementClient) {
26
40
  this.client = client;
27
41
  }
28
42
 
@@ -30,71 +44,108 @@ export class KeyValues {
30
44
  * Lists the key-values for a given configuration store.
31
45
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
32
46
  * @param configStoreName The name of the configuration store.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.KeyValuesListByConfigurationStoreResponse>
47
+ * @param options The options parameters.
35
48
  */
36
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: Models.KeyValuesListByConfigurationStoreOptionalParams): Promise<Models.KeyValuesListByConfigurationStoreResponse>;
37
- /**
38
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
39
- * @param configStoreName The name of the configuration store.
40
- * @param callback The callback
41
- */
42
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, callback: msRest.ServiceCallback<Models.KeyValueListResult>): void;
43
- /**
44
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
45
- * @param configStoreName The name of the configuration store.
46
- * @param options The optional parameters
47
- * @param callback The callback
48
- */
49
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options: Models.KeyValuesListByConfigurationStoreOptionalParams, callback: msRest.ServiceCallback<Models.KeyValueListResult>): void;
50
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: Models.KeyValuesListByConfigurationStoreOptionalParams | msRest.ServiceCallback<Models.KeyValueListResult>, callback?: msRest.ServiceCallback<Models.KeyValueListResult>): Promise<Models.KeyValuesListByConfigurationStoreResponse> {
51
- return this.client.sendOperationRequest(
52
- {
49
+ public listByConfigurationStore(
50
+ resourceGroupName: string,
51
+ configStoreName: string,
52
+ options?: KeyValuesListByConfigurationStoreOptionalParams
53
+ ): PagedAsyncIterableIterator<KeyValue> {
54
+ const iter = this.listByConfigurationStorePagingAll(
55
+ resourceGroupName,
56
+ configStoreName,
57
+ options
58
+ );
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: () => {
67
+ return this.listByConfigurationStorePagingPage(
68
+ resourceGroupName,
69
+ configStoreName,
70
+ options
71
+ );
72
+ }
73
+ };
74
+ }
75
+
76
+ private async *listByConfigurationStorePagingPage(
77
+ resourceGroupName: string,
78
+ configStoreName: string,
79
+ options?: KeyValuesListByConfigurationStoreOptionalParams
80
+ ): AsyncIterableIterator<KeyValue[]> {
81
+ let result = await this._listByConfigurationStore(
82
+ resourceGroupName,
83
+ configStoreName,
84
+ options
85
+ );
86
+ yield result.value || [];
87
+ let continuationToken = result.nextLink;
88
+ while (continuationToken) {
89
+ result = await this._listByConfigurationStoreNext(
53
90
  resourceGroupName,
54
91
  configStoreName,
92
+ continuationToken,
55
93
  options
56
- },
57
- listByConfigurationStoreOperationSpec,
58
- callback) as Promise<Models.KeyValuesListByConfigurationStoreResponse>;
94
+ );
95
+ continuationToken = result.nextLink;
96
+ yield result.value || [];
97
+ }
98
+ }
99
+
100
+ private async *listByConfigurationStorePagingAll(
101
+ resourceGroupName: string,
102
+ configStoreName: string,
103
+ options?: KeyValuesListByConfigurationStoreOptionalParams
104
+ ): AsyncIterableIterator<KeyValue> {
105
+ for await (const page of this.listByConfigurationStorePagingPage(
106
+ resourceGroupName,
107
+ configStoreName,
108
+ options
109
+ )) {
110
+ yield* page;
111
+ }
59
112
  }
60
113
 
61
114
  /**
62
- * Gets the properties of the specified key-value.
63
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
64
- * @param configStoreName The name of the configuration store.
65
- * @param keyValueName Identifier of key and label combination. Key and label are joined by $
66
- * character. Label is optional.
67
- * @param [options] The optional parameters
68
- * @returns Promise<Models.KeyValuesGetResponse>
69
- */
70
- get(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise<Models.KeyValuesGetResponse>;
71
- /**
115
+ * Lists the key-values for a given configuration store.
72
116
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
73
117
  * @param configStoreName The name of the configuration store.
74
- * @param keyValueName Identifier of key and label combination. Key and label are joined by $
75
- * character. Label is optional.
76
- * @param callback The callback
118
+ * @param options The options parameters.
77
119
  */
78
- get(resourceGroupName: string, configStoreName: string, keyValueName: string, callback: msRest.ServiceCallback<Models.KeyValue>): void;
120
+ private _listByConfigurationStore(
121
+ resourceGroupName: string,
122
+ configStoreName: string,
123
+ options?: KeyValuesListByConfigurationStoreOptionalParams
124
+ ): Promise<KeyValuesListByConfigurationStoreResponse> {
125
+ return this.client.sendOperationRequest(
126
+ { resourceGroupName, configStoreName, options },
127
+ listByConfigurationStoreOperationSpec
128
+ );
129
+ }
130
+
79
131
  /**
132
+ * Gets the properties of the specified key-value.
80
133
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
81
134
  * @param configStoreName The name of the configuration store.
82
135
  * @param keyValueName Identifier of key and label combination. Key and label are joined by $
83
- * character. Label is optional.
84
- * @param options The optional parameters
85
- * @param callback The callback
136
+ * character. Label is optional.
137
+ * @param options The options parameters.
86
138
  */
87
- get(resourceGroupName: string, configStoreName: string, keyValueName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.KeyValue>): void;
88
- get(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.KeyValue>, callback?: msRest.ServiceCallback<Models.KeyValue>): Promise<Models.KeyValuesGetResponse> {
139
+ get(
140
+ resourceGroupName: string,
141
+ configStoreName: string,
142
+ keyValueName: string,
143
+ options?: KeyValuesGetOptionalParams
144
+ ): Promise<KeyValuesGetResponse> {
89
145
  return this.client.sendOperationRequest(
90
- {
91
- resourceGroupName,
92
- configStoreName,
93
- keyValueName,
94
- options
95
- },
96
- getOperationSpec,
97
- callback) as Promise<Models.KeyValuesGetResponse>;
146
+ { resourceGroupName, configStoreName, keyValueName, options },
147
+ getOperationSpec
148
+ );
98
149
  }
99
150
 
100
151
  /**
@@ -102,38 +153,19 @@ export class KeyValues {
102
153
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
103
154
  * @param configStoreName The name of the configuration store.
104
155
  * @param keyValueName Identifier of key and label combination. Key and label are joined by $
105
- * character. Label is optional.
106
- * @param [options] The optional parameters
107
- * @returns Promise<Models.KeyValuesCreateOrUpdateResponse>
156
+ * character. Label is optional.
157
+ * @param options The options parameters.
108
158
  */
109
- createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: Models.KeyValuesCreateOrUpdateOptionalParams): Promise<Models.KeyValuesCreateOrUpdateResponse>;
110
- /**
111
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
112
- * @param configStoreName The name of the configuration store.
113
- * @param keyValueName Identifier of key and label combination. Key and label are joined by $
114
- * character. Label is optional.
115
- * @param callback The callback
116
- */
117
- createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, callback: msRest.ServiceCallback<Models.KeyValue>): void;
118
- /**
119
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
120
- * @param configStoreName The name of the configuration store.
121
- * @param keyValueName Identifier of key and label combination. Key and label are joined by $
122
- * character. Label is optional.
123
- * @param options The optional parameters
124
- * @param callback The callback
125
- */
126
- createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options: Models.KeyValuesCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback<Models.KeyValue>): void;
127
- createOrUpdate(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: Models.KeyValuesCreateOrUpdateOptionalParams | msRest.ServiceCallback<Models.KeyValue>, callback?: msRest.ServiceCallback<Models.KeyValue>): Promise<Models.KeyValuesCreateOrUpdateResponse> {
159
+ createOrUpdate(
160
+ resourceGroupName: string,
161
+ configStoreName: string,
162
+ keyValueName: string,
163
+ options?: KeyValuesCreateOrUpdateOptionalParams
164
+ ): Promise<KeyValuesCreateOrUpdateResponse> {
128
165
  return this.client.sendOperationRequest(
129
- {
130
- resourceGroupName,
131
- configStoreName,
132
- keyValueName,
133
- options
134
- },
135
- createOrUpdateOperationSpec,
136
- callback) as Promise<Models.KeyValuesCreateOrUpdateResponse>;
166
+ { resourceGroupName, configStoreName, keyValueName, options },
167
+ createOrUpdateOperationSpec
168
+ );
137
169
  }
138
170
 
139
171
  /**
@@ -141,13 +173,63 @@ export class KeyValues {
141
173
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
142
174
  * @param configStoreName The name of the configuration store.
143
175
  * @param keyValueName Identifier of key and label combination. Key and label are joined by $
144
- * character. Label is optional.
145
- * @param [options] The optional parameters
146
- * @returns Promise<msRest.RestResponse>
176
+ * character. Label is optional.
177
+ * @param options The options parameters.
147
178
  */
148
- deleteMethod(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
149
- return this.beginDeleteMethod(resourceGroupName,configStoreName,keyValueName,options)
150
- .then(lroPoller => lroPoller.pollUntilFinished());
179
+ async beginDelete(
180
+ resourceGroupName: string,
181
+ configStoreName: string,
182
+ keyValueName: string,
183
+ options?: KeyValuesDeleteOptionalParams
184
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
185
+ const directSendOperation = async (
186
+ args: coreClient.OperationArguments,
187
+ spec: coreClient.OperationSpec
188
+ ): Promise<void> => {
189
+ return this.client.sendOperationRequest(args, spec);
190
+ };
191
+ const sendOperation = async (
192
+ args: coreClient.OperationArguments,
193
+ spec: coreClient.OperationSpec
194
+ ) => {
195
+ let currentRawResponse:
196
+ | coreClient.FullOperationResponse
197
+ | undefined = undefined;
198
+ const providedCallback = args.options?.onResponse;
199
+ const callback: coreClient.RawResponseCallback = (
200
+ rawResponse: coreClient.FullOperationResponse,
201
+ flatResponse: unknown
202
+ ) => {
203
+ currentRawResponse = rawResponse;
204
+ providedCallback?.(rawResponse, flatResponse);
205
+ };
206
+ const updatedArgs = {
207
+ ...args,
208
+ options: {
209
+ ...args.options,
210
+ onResponse: callback
211
+ }
212
+ };
213
+ const flatResponse = await directSendOperation(updatedArgs, spec);
214
+ return {
215
+ flatResponse,
216
+ rawResponse: {
217
+ statusCode: currentRawResponse!.status,
218
+ body: currentRawResponse!.parsedBody,
219
+ headers: currentRawResponse!.headers.toJSON()
220
+ }
221
+ };
222
+ };
223
+
224
+ const lro = new LroImpl(
225
+ sendOperation,
226
+ { resourceGroupName, configStoreName, keyValueName, options },
227
+ deleteOperationSpec
228
+ );
229
+ return new LroEngine(lro, {
230
+ resumeFrom: options?.resumeFrom,
231
+ intervalInMs: options?.updateIntervalInMs
232
+ });
151
233
  }
152
234
 
153
235
  /**
@@ -155,68 +237,51 @@ export class KeyValues {
155
237
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
156
238
  * @param configStoreName The name of the configuration store.
157
239
  * @param keyValueName Identifier of key and label combination. Key and label are joined by $
158
- * character. Label is optional.
159
- * @param [options] The optional parameters
160
- * @returns Promise<msRestAzure.LROPoller>
240
+ * character. Label is optional.
241
+ * @param options The options parameters.
161
242
  */
162
- beginDeleteMethod(resourceGroupName: string, configStoreName: string, keyValueName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
163
- return this.client.sendLRORequest(
164
- {
165
- resourceGroupName,
166
- configStoreName,
167
- keyValueName,
168
- options
169
- },
170
- beginDeleteMethodOperationSpec,
171
- options);
243
+ async beginDeleteAndWait(
244
+ resourceGroupName: string,
245
+ configStoreName: string,
246
+ keyValueName: string,
247
+ options?: KeyValuesDeleteOptionalParams
248
+ ): Promise<void> {
249
+ const poller = await this.beginDelete(
250
+ resourceGroupName,
251
+ configStoreName,
252
+ keyValueName,
253
+ options
254
+ );
255
+ return poller.pollUntilDone();
172
256
  }
173
257
 
174
258
  /**
175
- * Lists the key-values for a given configuration store.
176
- * @param nextPageLink The NextLink from the previous successful call to List operation.
177
- * @param [options] The optional parameters
178
- * @returns Promise<Models.KeyValuesListByConfigurationStoreNextResponse>
179
- */
180
- listByConfigurationStoreNext(nextPageLink: string, options?: Models.KeyValuesListByConfigurationStoreNextOptionalParams): Promise<Models.KeyValuesListByConfigurationStoreNextResponse>;
181
- /**
182
- * @param nextPageLink The NextLink from the previous successful call to List operation.
183
- * @param callback The callback
184
- */
185
- listByConfigurationStoreNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.KeyValueListResult>): void;
186
- /**
187
- * @param nextPageLink The NextLink from the previous successful call to List operation.
188
- * @param options The optional parameters
189
- * @param callback The callback
259
+ * ListByConfigurationStoreNext
260
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
261
+ * @param configStoreName The name of the configuration store.
262
+ * @param nextLink The nextLink from the previous successful call to the ListByConfigurationStore
263
+ * method.
264
+ * @param options The options parameters.
190
265
  */
191
- listByConfigurationStoreNext(nextPageLink: string, options: Models.KeyValuesListByConfigurationStoreNextOptionalParams, callback: msRest.ServiceCallback<Models.KeyValueListResult>): void;
192
- listByConfigurationStoreNext(nextPageLink: string, options?: Models.KeyValuesListByConfigurationStoreNextOptionalParams | msRest.ServiceCallback<Models.KeyValueListResult>, callback?: msRest.ServiceCallback<Models.KeyValueListResult>): Promise<Models.KeyValuesListByConfigurationStoreNextResponse> {
266
+ private _listByConfigurationStoreNext(
267
+ resourceGroupName: string,
268
+ configStoreName: string,
269
+ nextLink: string,
270
+ options?: KeyValuesListByConfigurationStoreNextOptionalParams
271
+ ): Promise<KeyValuesListByConfigurationStoreNextResponse> {
193
272
  return this.client.sendOperationRequest(
194
- {
195
- nextPageLink,
196
- options
197
- },
198
- listByConfigurationStoreNextOperationSpec,
199
- callback) as Promise<Models.KeyValuesListByConfigurationStoreNextResponse>;
273
+ { resourceGroupName, configStoreName, nextLink, options },
274
+ listByConfigurationStoreNextOperationSpec
275
+ );
200
276
  }
201
277
  }
202
-
203
278
  // Operation Specifications
204
- const serializer = new msRest.Serializer(Mappers);
205
- const listByConfigurationStoreOperationSpec: msRest.OperationSpec = {
279
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
280
+
281
+ const listByConfigurationStoreOperationSpec: coreClient.OperationSpec = {
282
+ path:
283
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues",
206
284
  httpMethod: "GET",
207
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues",
208
- urlParameters: [
209
- Parameters.subscriptionId,
210
- Parameters.resourceGroupName,
211
- Parameters.configStoreName
212
- ],
213
- queryParameters: [
214
- Parameters.apiVersion,
215
- Parameters.skipToken
216
- ],
217
- headerParameters: [
218
- Parameters.acceptLanguage
219
- ],
220
285
  responses: {
221
286
  200: {
222
287
  bodyMapper: Mappers.KeyValueListResult
@@ -225,24 +290,20 @@ const listByConfigurationStoreOperationSpec: msRest.OperationSpec = {
225
290
  bodyMapper: Mappers.ErrorResponse
226
291
  }
227
292
  },
228
- serializer
229
- };
230
-
231
- const getOperationSpec: msRest.OperationSpec = {
232
- httpMethod: "GET",
233
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
293
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
234
294
  urlParameters: [
295
+ Parameters.$host,
235
296
  Parameters.subscriptionId,
236
297
  Parameters.resourceGroupName,
237
- Parameters.configStoreName,
238
- Parameters.keyValueName
239
- ],
240
- queryParameters: [
241
- Parameters.apiVersion
242
- ],
243
- headerParameters: [
244
- Parameters.acceptLanguage
298
+ Parameters.configStoreName
245
299
  ],
300
+ headerParameters: [Parameters.accept],
301
+ serializer
302
+ };
303
+ const getOperationSpec: coreClient.OperationSpec = {
304
+ path:
305
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
306
+ httpMethod: "GET",
246
307
  responses: {
247
308
  200: {
248
309
  bodyMapper: Mappers.KeyValue
@@ -251,31 +312,21 @@ const getOperationSpec: msRest.OperationSpec = {
251
312
  bodyMapper: Mappers.ErrorResponse
252
313
  }
253
314
  },
254
- serializer
255
- };
256
-
257
- const createOrUpdateOperationSpec: msRest.OperationSpec = {
258
- httpMethod: "PUT",
259
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
315
+ queryParameters: [Parameters.apiVersion],
260
316
  urlParameters: [
317
+ Parameters.$host,
261
318
  Parameters.subscriptionId,
262
319
  Parameters.resourceGroupName,
263
320
  Parameters.configStoreName,
264
321
  Parameters.keyValueName
265
322
  ],
266
- queryParameters: [
267
- Parameters.apiVersion
268
- ],
269
- headerParameters: [
270
- Parameters.acceptLanguage
271
- ],
272
- requestBody: {
273
- parameterPath: [
274
- "options",
275
- "keyValueParameters"
276
- ],
277
- mapper: Mappers.KeyValue
278
- },
323
+ headerParameters: [Parameters.accept],
324
+ serializer
325
+ };
326
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
327
+ path:
328
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
329
+ httpMethod: "PUT",
279
330
  responses: {
280
331
  200: {
281
332
  bodyMapper: Mappers.KeyValue
@@ -284,49 +335,46 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
284
335
  bodyMapper: Mappers.ErrorResponse
285
336
  }
286
337
  },
287
- serializer
288
- };
289
-
290
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
291
- httpMethod: "DELETE",
292
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
338
+ requestBody: Parameters.keyValueParameters,
339
+ queryParameters: [Parameters.apiVersion],
293
340
  urlParameters: [
341
+ Parameters.$host,
294
342
  Parameters.subscriptionId,
295
343
  Parameters.resourceGroupName,
296
344
  Parameters.configStoreName,
297
345
  Parameters.keyValueName
298
346
  ],
299
- queryParameters: [
300
- Parameters.apiVersion
301
- ],
302
- headerParameters: [
303
- Parameters.acceptLanguage
304
- ],
347
+ headerParameters: [Parameters.accept, Parameters.contentType],
348
+ mediaType: "json",
349
+ serializer
350
+ };
351
+ const deleteOperationSpec: coreClient.OperationSpec = {
352
+ path:
353
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}",
354
+ httpMethod: "DELETE",
305
355
  responses: {
306
356
  200: {},
357
+ 201: {},
307
358
  202: {},
308
359
  204: {},
309
360
  default: {
310
361
  bodyMapper: Mappers.ErrorResponse
311
362
  }
312
363
  },
364
+ queryParameters: [Parameters.apiVersion],
365
+ urlParameters: [
366
+ Parameters.$host,
367
+ Parameters.subscriptionId,
368
+ Parameters.resourceGroupName,
369
+ Parameters.configStoreName,
370
+ Parameters.keyValueName
371
+ ],
372
+ headerParameters: [Parameters.accept],
313
373
  serializer
314
374
  };
315
-
316
- const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = {
317
- httpMethod: "GET",
318
- baseUrl: "https://management.azure.com",
375
+ const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = {
319
376
  path: "{nextLink}",
320
- urlParameters: [
321
- Parameters.nextPageLink
322
- ],
323
- queryParameters: [
324
- Parameters.apiVersion,
325
- Parameters.skipToken
326
- ],
327
- headerParameters: [
328
- Parameters.acceptLanguage
329
- ],
377
+ httpMethod: "GET",
330
378
  responses: {
331
379
  200: {
332
380
  bodyMapper: Mappers.KeyValueListResult
@@ -335,5 +383,14 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = {
335
383
  bodyMapper: Mappers.ErrorResponse
336
384
  }
337
385
  },
386
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
387
+ urlParameters: [
388
+ Parameters.$host,
389
+ Parameters.subscriptionId,
390
+ Parameters.resourceGroupName,
391
+ Parameters.configStoreName,
392
+ Parameters.nextLink
393
+ ],
394
+ headerParameters: [Parameters.accept],
338
395
  serializer
339
396
  };