@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,26 +3,41 @@
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/privateEndpointConnectionsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateEndpointConnections } 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
+ PrivateEndpointConnection,
19
+ PrivateEndpointConnectionsListByConfigurationStoreNextOptionalParams,
20
+ PrivateEndpointConnectionsListByConfigurationStoreOptionalParams,
21
+ PrivateEndpointConnectionsListByConfigurationStoreResponse,
22
+ PrivateEndpointConnectionsGetOptionalParams,
23
+ PrivateEndpointConnectionsGetResponse,
24
+ PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
25
+ PrivateEndpointConnectionsCreateOrUpdateResponse,
26
+ PrivateEndpointConnectionsDeleteOptionalParams,
27
+ PrivateEndpointConnectionsListByConfigurationStoreNextResponse
28
+ } from "../models";
16
29
 
17
- /** Class representing a PrivateEndpointConnections. */
18
- export class PrivateEndpointConnections {
19
- private readonly client: AppConfigurationManagementClientContext;
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing PrivateEndpointConnections operations. */
32
+ export class PrivateEndpointConnectionsImpl
33
+ implements PrivateEndpointConnections {
34
+ private readonly client: AppConfigurationManagementClient;
20
35
 
21
36
  /**
22
- * Create a PrivateEndpointConnections.
23
- * @param {AppConfigurationManagementClientContext} client Reference to the service client.
37
+ * Initialize a new instance of the class PrivateEndpointConnections class.
38
+ * @param client Reference to the service client
24
39
  */
25
- constructor(client: AppConfigurationManagementClientContext) {
40
+ constructor(client: AppConfigurationManagementClient) {
26
41
  this.client = client;
27
42
  }
28
43
 
@@ -30,68 +45,189 @@ export class PrivateEndpointConnections {
30
45
  * Lists all private endpoint connections for a configuration store.
31
46
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
32
47
  * @param configStoreName The name of the configuration store.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse>
48
+ * @param options The options parameters.
35
49
  */
36
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse>;
50
+ public listByConfigurationStore(
51
+ resourceGroupName: string,
52
+ configStoreName: string,
53
+ options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams
54
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
55
+ const iter = this.listByConfigurationStorePagingAll(
56
+ resourceGroupName,
57
+ configStoreName,
58
+ options
59
+ );
60
+ return {
61
+ next() {
62
+ return iter.next();
63
+ },
64
+ [Symbol.asyncIterator]() {
65
+ return this;
66
+ },
67
+ byPage: () => {
68
+ return this.listByConfigurationStorePagingPage(
69
+ resourceGroupName,
70
+ configStoreName,
71
+ options
72
+ );
73
+ }
74
+ };
75
+ }
76
+
77
+ private async *listByConfigurationStorePagingPage(
78
+ resourceGroupName: string,
79
+ configStoreName: string,
80
+ options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams
81
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
82
+ let result = await this._listByConfigurationStore(
83
+ resourceGroupName,
84
+ configStoreName,
85
+ options
86
+ );
87
+ yield result.value || [];
88
+ let continuationToken = result.nextLink;
89
+ while (continuationToken) {
90
+ result = await this._listByConfigurationStoreNext(
91
+ resourceGroupName,
92
+ configStoreName,
93
+ continuationToken,
94
+ options
95
+ );
96
+ continuationToken = result.nextLink;
97
+ yield result.value || [];
98
+ }
99
+ }
100
+
101
+ private async *listByConfigurationStorePagingAll(
102
+ resourceGroupName: string,
103
+ configStoreName: string,
104
+ options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams
105
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
106
+ for await (const page of this.listByConfigurationStorePagingPage(
107
+ resourceGroupName,
108
+ configStoreName,
109
+ options
110
+ )) {
111
+ yield* page;
112
+ }
113
+ }
114
+
37
115
  /**
116
+ * Lists all private endpoint connections for a configuration store.
38
117
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
39
118
  * @param configStoreName The name of the configuration store.
40
- * @param callback The callback
119
+ * @param options The options parameters.
41
120
  */
42
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
121
+ private _listByConfigurationStore(
122
+ resourceGroupName: string,
123
+ configStoreName: string,
124
+ options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams
125
+ ): Promise<PrivateEndpointConnectionsListByConfigurationStoreResponse> {
126
+ return this.client.sendOperationRequest(
127
+ { resourceGroupName, configStoreName, options },
128
+ listByConfigurationStoreOperationSpec
129
+ );
130
+ }
131
+
43
132
  /**
133
+ * Gets the specified private endpoint connection associated with the configuration store.
44
134
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
45
135
  * @param configStoreName The name of the configuration store.
46
- * @param options The optional parameters
47
- * @param callback The callback
136
+ * @param privateEndpointConnectionName Private endpoint connection name
137
+ * @param options The options parameters.
48
138
  */
49
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
50
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse> {
139
+ get(
140
+ resourceGroupName: string,
141
+ configStoreName: string,
142
+ privateEndpointConnectionName: string,
143
+ options?: PrivateEndpointConnectionsGetOptionalParams
144
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
51
145
  return this.client.sendOperationRequest(
52
146
  {
53
147
  resourceGroupName,
54
148
  configStoreName,
149
+ privateEndpointConnectionName,
55
150
  options
56
151
  },
57
- listByConfigurationStoreOperationSpec,
58
- callback) as Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse>;
152
+ getOperationSpec
153
+ );
59
154
  }
60
155
 
61
156
  /**
62
- * Gets the specified private endpoint connection associated with the configuration store.
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 privateEndpointConnectionName Private endpoint connection name
66
- * @param [options] The optional parameters
67
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
68
- */
69
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
70
- /**
71
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
72
- * @param configStoreName The name of the configuration store.
73
- * @param privateEndpointConnectionName Private endpoint connection name
74
- * @param callback The callback
75
- */
76
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
77
- /**
157
+ * Update the state of the specified private endpoint connection associated with the configuration
158
+ * store.
78
159
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
79
160
  * @param configStoreName The name of the configuration store.
80
161
  * @param privateEndpointConnectionName Private endpoint connection name
81
- * @param options The optional parameters
82
- * @param callback The callback
162
+ * @param privateEndpointConnection The private endpoint connection properties.
163
+ * @param options The options parameters.
83
164
  */
84
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
85
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
86
- return this.client.sendOperationRequest(
165
+ async beginCreateOrUpdate(
166
+ resourceGroupName: string,
167
+ configStoreName: string,
168
+ privateEndpointConnectionName: string,
169
+ privateEndpointConnection: PrivateEndpointConnection,
170
+ options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
171
+ ): Promise<
172
+ PollerLike<
173
+ PollOperationState<PrivateEndpointConnectionsCreateOrUpdateResponse>,
174
+ PrivateEndpointConnectionsCreateOrUpdateResponse
175
+ >
176
+ > {
177
+ const directSendOperation = async (
178
+ args: coreClient.OperationArguments,
179
+ spec: coreClient.OperationSpec
180
+ ): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> => {
181
+ return this.client.sendOperationRequest(args, spec);
182
+ };
183
+ const sendOperation = async (
184
+ args: coreClient.OperationArguments,
185
+ spec: coreClient.OperationSpec
186
+ ) => {
187
+ let currentRawResponse:
188
+ | coreClient.FullOperationResponse
189
+ | undefined = undefined;
190
+ const providedCallback = args.options?.onResponse;
191
+ const callback: coreClient.RawResponseCallback = (
192
+ rawResponse: coreClient.FullOperationResponse,
193
+ flatResponse: unknown
194
+ ) => {
195
+ currentRawResponse = rawResponse;
196
+ providedCallback?.(rawResponse, flatResponse);
197
+ };
198
+ const updatedArgs = {
199
+ ...args,
200
+ options: {
201
+ ...args.options,
202
+ onResponse: callback
203
+ }
204
+ };
205
+ const flatResponse = await directSendOperation(updatedArgs, spec);
206
+ return {
207
+ flatResponse,
208
+ rawResponse: {
209
+ statusCode: currentRawResponse!.status,
210
+ body: currentRawResponse!.parsedBody,
211
+ headers: currentRawResponse!.headers.toJSON()
212
+ }
213
+ };
214
+ };
215
+
216
+ const lro = new LroImpl(
217
+ sendOperation,
87
218
  {
88
219
  resourceGroupName,
89
220
  configStoreName,
90
221
  privateEndpointConnectionName,
222
+ privateEndpointConnection,
91
223
  options
92
224
  },
93
- getOperationSpec,
94
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
225
+ createOrUpdateOperationSpec
226
+ );
227
+ return new LroEngine(lro, {
228
+ resumeFrom: options?.resumeFrom,
229
+ intervalInMs: options?.updateIntervalInMs
230
+ });
95
231
  }
96
232
 
97
233
  /**
@@ -101,12 +237,23 @@ export class PrivateEndpointConnections {
101
237
  * @param configStoreName The name of the configuration store.
102
238
  * @param privateEndpointConnectionName Private endpoint connection name
103
239
  * @param privateEndpointConnection The private endpoint connection properties.
104
- * @param [options] The optional parameters
105
- * @returns Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>
240
+ * @param options The options parameters.
106
241
  */
107
- createOrUpdate(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse> {
108
- return this.beginCreateOrUpdate(resourceGroupName,configStoreName,privateEndpointConnectionName,privateEndpointConnection,options)
109
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>;
242
+ async beginCreateOrUpdateAndWait(
243
+ resourceGroupName: string,
244
+ configStoreName: string,
245
+ privateEndpointConnectionName: string,
246
+ privateEndpointConnection: PrivateEndpointConnection,
247
+ options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
248
+ ): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> {
249
+ const poller = await this.beginCreateOrUpdate(
250
+ resourceGroupName,
251
+ configStoreName,
252
+ privateEndpointConnectionName,
253
+ privateEndpointConnection,
254
+ options
255
+ );
256
+ return poller.pollUntilDone();
110
257
  }
111
258
 
112
259
  /**
@@ -114,35 +261,67 @@ export class PrivateEndpointConnections {
114
261
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
115
262
  * @param configStoreName The name of the configuration store.
116
263
  * @param privateEndpointConnectionName Private endpoint connection name
117
- * @param [options] The optional parameters
118
- * @returns Promise<msRest.RestResponse>
264
+ * @param options The options parameters.
119
265
  */
120
- deleteMethod(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
121
- return this.beginDeleteMethod(resourceGroupName,configStoreName,privateEndpointConnectionName,options)
122
- .then(lroPoller => lroPoller.pollUntilFinished());
123
- }
266
+ async beginDelete(
267
+ resourceGroupName: string,
268
+ configStoreName: string,
269
+ privateEndpointConnectionName: string,
270
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
271
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
272
+ const directSendOperation = async (
273
+ args: coreClient.OperationArguments,
274
+ spec: coreClient.OperationSpec
275
+ ): Promise<void> => {
276
+ return this.client.sendOperationRequest(args, spec);
277
+ };
278
+ const sendOperation = async (
279
+ args: coreClient.OperationArguments,
280
+ spec: coreClient.OperationSpec
281
+ ) => {
282
+ let currentRawResponse:
283
+ | coreClient.FullOperationResponse
284
+ | undefined = undefined;
285
+ const providedCallback = args.options?.onResponse;
286
+ const callback: coreClient.RawResponseCallback = (
287
+ rawResponse: coreClient.FullOperationResponse,
288
+ flatResponse: unknown
289
+ ) => {
290
+ currentRawResponse = rawResponse;
291
+ providedCallback?.(rawResponse, flatResponse);
292
+ };
293
+ const updatedArgs = {
294
+ ...args,
295
+ options: {
296
+ ...args.options,
297
+ onResponse: callback
298
+ }
299
+ };
300
+ const flatResponse = await directSendOperation(updatedArgs, spec);
301
+ return {
302
+ flatResponse,
303
+ rawResponse: {
304
+ statusCode: currentRawResponse!.status,
305
+ body: currentRawResponse!.parsedBody,
306
+ headers: currentRawResponse!.headers.toJSON()
307
+ }
308
+ };
309
+ };
124
310
 
125
- /**
126
- * Update the state of the specified private endpoint connection associated with the configuration
127
- * store.
128
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
129
- * @param configStoreName The name of the configuration store.
130
- * @param privateEndpointConnectionName Private endpoint connection name
131
- * @param privateEndpointConnection The private endpoint connection properties.
132
- * @param [options] The optional parameters
133
- * @returns Promise<msRestAzure.LROPoller>
134
- */
135
- beginCreateOrUpdate(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
136
- return this.client.sendLRORequest(
311
+ const lro = new LroImpl(
312
+ sendOperation,
137
313
  {
138
314
  resourceGroupName,
139
315
  configStoreName,
140
316
  privateEndpointConnectionName,
141
- privateEndpointConnection,
142
317
  options
143
318
  },
144
- beginCreateOrUpdateOperationSpec,
145
- options);
319
+ deleteOperationSpec
320
+ );
321
+ return new LroEngine(lro, {
322
+ resumeFrom: options?.resumeFrom,
323
+ intervalInMs: options?.updateIntervalInMs
324
+ });
146
325
  }
147
326
 
148
327
  /**
@@ -150,66 +329,50 @@ export class PrivateEndpointConnections {
150
329
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
151
330
  * @param configStoreName The name of the configuration store.
152
331
  * @param privateEndpointConnectionName Private endpoint connection name
153
- * @param [options] The optional parameters
154
- * @returns Promise<msRestAzure.LROPoller>
332
+ * @param options The options parameters.
155
333
  */
156
- beginDeleteMethod(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
157
- return this.client.sendLRORequest(
158
- {
159
- resourceGroupName,
160
- configStoreName,
161
- privateEndpointConnectionName,
162
- options
163
- },
164
- beginDeleteMethodOperationSpec,
165
- options);
334
+ async beginDeleteAndWait(
335
+ resourceGroupName: string,
336
+ configStoreName: string,
337
+ privateEndpointConnectionName: string,
338
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
339
+ ): Promise<void> {
340
+ const poller = await this.beginDelete(
341
+ resourceGroupName,
342
+ configStoreName,
343
+ privateEndpointConnectionName,
344
+ options
345
+ );
346
+ return poller.pollUntilDone();
166
347
  }
167
348
 
168
349
  /**
169
- * Lists all private endpoint connections for a configuration store.
170
- * @param nextPageLink The NextLink from the previous successful call to List operation.
171
- * @param [options] The optional parameters
172
- * @returns Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>
173
- */
174
- listByConfigurationStoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>;
175
- /**
176
- * @param nextPageLink The NextLink from the previous successful call to List operation.
177
- * @param callback The callback
178
- */
179
- listByConfigurationStoreNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
180
- /**
181
- * @param nextPageLink The NextLink from the previous successful call to List operation.
182
- * @param options The optional parameters
183
- * @param callback The callback
350
+ * ListByConfigurationStoreNext
351
+ * @param resourceGroupName The name of the resource group to which the container registry belongs.
352
+ * @param configStoreName The name of the configuration store.
353
+ * @param nextLink The nextLink from the previous successful call to the ListByConfigurationStore
354
+ * method.
355
+ * @param options The options parameters.
184
356
  */
185
- listByConfigurationStoreNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
186
- listByConfigurationStoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse> {
357
+ private _listByConfigurationStoreNext(
358
+ resourceGroupName: string,
359
+ configStoreName: string,
360
+ nextLink: string,
361
+ options?: PrivateEndpointConnectionsListByConfigurationStoreNextOptionalParams
362
+ ): Promise<PrivateEndpointConnectionsListByConfigurationStoreNextResponse> {
187
363
  return this.client.sendOperationRequest(
188
- {
189
- nextPageLink,
190
- options
191
- },
192
- listByConfigurationStoreNextOperationSpec,
193
- callback) as Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>;
364
+ { resourceGroupName, configStoreName, nextLink, options },
365
+ listByConfigurationStoreNextOperationSpec
366
+ );
194
367
  }
195
368
  }
196
-
197
369
  // Operation Specifications
198
- const serializer = new msRest.Serializer(Mappers);
199
- const listByConfigurationStoreOperationSpec: msRest.OperationSpec = {
370
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
371
+
372
+ const listByConfigurationStoreOperationSpec: coreClient.OperationSpec = {
373
+ path:
374
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections",
200
375
  httpMethod: "GET",
201
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections",
202
- urlParameters: [
203
- Parameters.subscriptionId,
204
- Parameters.resourceGroupName,
205
- Parameters.configStoreName
206
- ],
207
- queryParameters: [
208
- Parameters.apiVersion
209
- ],
210
- headerParameters: [
211
- Parameters.acceptLanguage
212
- ],
213
376
  responses: {
214
377
  200: {
215
378
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
@@ -218,24 +381,20 @@ const listByConfigurationStoreOperationSpec: msRest.OperationSpec = {
218
381
  bodyMapper: Mappers.ErrorResponse
219
382
  }
220
383
  },
221
- serializer
222
- };
223
-
224
- const getOperationSpec: msRest.OperationSpec = {
225
- httpMethod: "GET",
226
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
384
+ queryParameters: [Parameters.apiVersion],
227
385
  urlParameters: [
386
+ Parameters.$host,
228
387
  Parameters.subscriptionId,
229
388
  Parameters.resourceGroupName,
230
- Parameters.configStoreName,
231
- Parameters.privateEndpointConnectionName
232
- ],
233
- queryParameters: [
234
- Parameters.apiVersion
235
- ],
236
- headerParameters: [
237
- Parameters.acceptLanguage
389
+ Parameters.configStoreName
238
390
  ],
391
+ headerParameters: [Parameters.accept],
392
+ serializer
393
+ };
394
+ const getOperationSpec: coreClient.OperationSpec = {
395
+ path:
396
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
397
+ httpMethod: "GET",
239
398
  responses: {
240
399
  200: {
241
400
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -244,31 +403,21 @@ const getOperationSpec: msRest.OperationSpec = {
244
403
  bodyMapper: Mappers.ErrorResponse
245
404
  }
246
405
  },
247
- serializer
248
- };
249
-
250
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
251
- httpMethod: "PUT",
252
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
406
+ queryParameters: [Parameters.apiVersion],
253
407
  urlParameters: [
408
+ Parameters.$host,
254
409
  Parameters.subscriptionId,
255
410
  Parameters.resourceGroupName,
256
411
  Parameters.configStoreName,
257
412
  Parameters.privateEndpointConnectionName
258
413
  ],
259
- queryParameters: [
260
- Parameters.apiVersion
261
- ],
262
- headerParameters: [
263
- Parameters.acceptLanguage
264
- ],
265
- requestBody: {
266
- parameterPath: "privateEndpointConnection",
267
- mapper: {
268
- ...Mappers.PrivateEndpointConnection,
269
- required: true
270
- }
271
- },
414
+ headerParameters: [Parameters.accept],
415
+ serializer
416
+ };
417
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
418
+ path:
419
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
420
+ httpMethod: "PUT",
272
421
  responses: {
273
422
  200: {
274
423
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -276,52 +425,56 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
276
425
  201: {
277
426
  bodyMapper: Mappers.PrivateEndpointConnection
278
427
  },
428
+ 202: {
429
+ bodyMapper: Mappers.PrivateEndpointConnection
430
+ },
431
+ 204: {
432
+ bodyMapper: Mappers.PrivateEndpointConnection
433
+ },
279
434
  default: {
280
435
  bodyMapper: Mappers.ErrorResponse
281
436
  }
282
437
  },
283
- serializer
284
- };
285
-
286
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
287
- httpMethod: "DELETE",
288
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
438
+ requestBody: Parameters.privateEndpointConnection,
439
+ queryParameters: [Parameters.apiVersion],
289
440
  urlParameters: [
441
+ Parameters.$host,
290
442
  Parameters.subscriptionId,
291
443
  Parameters.resourceGroupName,
292
444
  Parameters.configStoreName,
293
445
  Parameters.privateEndpointConnectionName
294
446
  ],
295
- queryParameters: [
296
- Parameters.apiVersion
297
- ],
298
- headerParameters: [
299
- Parameters.acceptLanguage
300
- ],
447
+ headerParameters: [Parameters.accept, Parameters.contentType],
448
+ mediaType: "json",
449
+ serializer
450
+ };
451
+ const deleteOperationSpec: coreClient.OperationSpec = {
452
+ path:
453
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
454
+ httpMethod: "DELETE",
301
455
  responses: {
302
456
  200: {},
457
+ 201: {},
303
458
  202: {},
304
459
  204: {},
305
460
  default: {
306
461
  bodyMapper: Mappers.ErrorResponse
307
462
  }
308
463
  },
464
+ queryParameters: [Parameters.apiVersion],
465
+ urlParameters: [
466
+ Parameters.$host,
467
+ Parameters.subscriptionId,
468
+ Parameters.resourceGroupName,
469
+ Parameters.configStoreName,
470
+ Parameters.privateEndpointConnectionName
471
+ ],
472
+ headerParameters: [Parameters.accept],
309
473
  serializer
310
474
  };
311
-
312
- const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = {
313
- httpMethod: "GET",
314
- baseUrl: "https://management.azure.com",
475
+ const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = {
315
476
  path: "{nextLink}",
316
- urlParameters: [
317
- Parameters.nextPageLink
318
- ],
319
- queryParameters: [
320
- Parameters.apiVersion
321
- ],
322
- headerParameters: [
323
- Parameters.acceptLanguage
324
- ],
477
+ httpMethod: "GET",
325
478
  responses: {
326
479
  200: {
327
480
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
@@ -330,5 +483,14 @@ const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = {
330
483
  bodyMapper: Mappers.ErrorResponse
331
484
  }
332
485
  },
486
+ queryParameters: [Parameters.apiVersion],
487
+ urlParameters: [
488
+ Parameters.$host,
489
+ Parameters.subscriptionId,
490
+ Parameters.resourceGroupName,
491
+ Parameters.configStoreName,
492
+ Parameters.nextLink
493
+ ],
494
+ headerParameters: [Parameters.accept],
333
495
  serializer
334
496
  };