@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,29 +1,43 @@
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/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";
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
+ PrivateEndpointConnection,
19
+ PrivateEndpointConnectionsListByConfigurationStoreNextOptionalParams,
20
+ PrivateEndpointConnectionsListByConfigurationStoreOptionalParams,
21
+ PrivateEndpointConnectionsListByConfigurationStoreResponse,
22
+ PrivateEndpointConnectionsGetOptionalParams,
23
+ PrivateEndpointConnectionsGetResponse,
24
+ PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
25
+ PrivateEndpointConnectionsCreateOrUpdateResponse,
26
+ PrivateEndpointConnectionsDeleteOptionalParams,
27
+ PrivateEndpointConnectionsListByConfigurationStoreNextResponse
28
+ } from "../models";
17
29
 
18
- /** Class representing a PrivateEndpointConnections. */
19
- export class PrivateEndpointConnections {
20
- 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;
21
35
 
22
36
  /**
23
- * Create a PrivateEndpointConnections.
24
- * @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
25
39
  */
26
- constructor(client: AppConfigurationManagementClientContext) {
40
+ constructor(client: AppConfigurationManagementClient) {
27
41
  this.client = client;
28
42
  }
29
43
 
@@ -31,68 +45,189 @@ export class PrivateEndpointConnections {
31
45
  * Lists all private endpoint connections for a configuration store.
32
46
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
33
47
  * @param configStoreName The name of the configuration store.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse>
48
+ * @param options The options parameters.
36
49
  */
37
- 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
+
38
115
  /**
116
+ * Lists all private endpoint connections for a configuration store.
39
117
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
40
118
  * @param configStoreName The name of the configuration store.
41
- * @param callback The callback
119
+ * @param options The options parameters.
42
120
  */
43
- 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
+
44
132
  /**
133
+ * Gets the specified private endpoint connection associated with the configuration store.
45
134
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
46
135
  * @param configStoreName The name of the configuration store.
47
- * @param options The optional parameters
48
- * @param callback The callback
136
+ * @param privateEndpointConnectionName Private endpoint connection name
137
+ * @param options The options parameters.
49
138
  */
50
- listByConfigurationStore(resourceGroupName: string, configStoreName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
51
- 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> {
52
145
  return this.client.sendOperationRequest(
53
146
  {
54
147
  resourceGroupName,
55
148
  configStoreName,
149
+ privateEndpointConnectionName,
56
150
  options
57
151
  },
58
- listByConfigurationStoreOperationSpec,
59
- callback) as Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreResponse>;
152
+ getOperationSpec
153
+ );
60
154
  }
61
155
 
62
156
  /**
63
- * Gets the specified private endpoint connection associated with the configuration store.
64
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
65
- * @param configStoreName The name of the configuration store.
66
- * @param privateEndpointConnectionName Private endpoint connection name
67
- * @param [options] The optional parameters
68
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
69
- */
70
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
71
- /**
72
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
73
- * @param configStoreName The name of the configuration store.
74
- * @param privateEndpointConnectionName Private endpoint connection name
75
- * @param callback The callback
76
- */
77
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
78
- /**
157
+ * Update the state of the specified private endpoint connection associated with the configuration
158
+ * store.
79
159
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
80
160
  * @param configStoreName The name of the configuration store.
81
161
  * @param privateEndpointConnectionName Private endpoint connection name
82
- * @param options The optional parameters
83
- * @param callback The callback
162
+ * @param privateEndpointConnection The private endpoint connection properties.
163
+ * @param options The options parameters.
84
164
  */
85
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
86
- get(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
87
- 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,
88
218
  {
89
219
  resourceGroupName,
90
220
  configStoreName,
91
221
  privateEndpointConnectionName,
222
+ privateEndpointConnection,
92
223
  options
93
224
  },
94
- getOperationSpec,
95
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
225
+ createOrUpdateOperationSpec
226
+ );
227
+ return new LroEngine(lro, {
228
+ resumeFrom: options?.resumeFrom,
229
+ intervalInMs: options?.updateIntervalInMs
230
+ });
96
231
  }
97
232
 
98
233
  /**
@@ -102,12 +237,23 @@ export class PrivateEndpointConnections {
102
237
  * @param configStoreName The name of the configuration store.
103
238
  * @param privateEndpointConnectionName Private endpoint connection name
104
239
  * @param privateEndpointConnection The private endpoint connection properties.
105
- * @param [options] The optional parameters
106
- * @returns Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>
240
+ * @param options The options parameters.
107
241
  */
108
- createOrUpdate(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse> {
109
- return this.beginCreateOrUpdate(resourceGroupName,configStoreName,privateEndpointConnectionName,privateEndpointConnection,options)
110
- .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();
111
257
  }
112
258
 
113
259
  /**
@@ -115,35 +261,67 @@ export class PrivateEndpointConnections {
115
261
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
116
262
  * @param configStoreName The name of the configuration store.
117
263
  * @param privateEndpointConnectionName Private endpoint connection name
118
- * @param [options] The optional parameters
119
- * @returns Promise<msRest.RestResponse>
264
+ * @param options The options parameters.
120
265
  */
121
- deleteMethod(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
122
- return this.beginDeleteMethod(resourceGroupName,configStoreName,privateEndpointConnectionName,options)
123
- .then(lroPoller => lroPoller.pollUntilFinished());
124
- }
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
+ };
125
310
 
126
- /**
127
- * Update the state of the specified private endpoint connection associated with the configuration
128
- * 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 privateEndpointConnectionName Private endpoint connection name
132
- * @param privateEndpointConnection The private endpoint connection properties.
133
- * @param [options] The optional parameters
134
- * @returns Promise<msRestAzure.LROPoller>
135
- */
136
- beginCreateOrUpdate(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
137
- return this.client.sendLRORequest(
311
+ const lro = new LroImpl(
312
+ sendOperation,
138
313
  {
139
314
  resourceGroupName,
140
315
  configStoreName,
141
316
  privateEndpointConnectionName,
142
- privateEndpointConnection,
143
317
  options
144
318
  },
145
- beginCreateOrUpdateOperationSpec,
146
- options);
319
+ deleteOperationSpec
320
+ );
321
+ return new LroEngine(lro, {
322
+ resumeFrom: options?.resumeFrom,
323
+ intervalInMs: options?.updateIntervalInMs
324
+ });
147
325
  }
148
326
 
149
327
  /**
@@ -151,125 +329,95 @@ export class PrivateEndpointConnections {
151
329
  * @param resourceGroupName The name of the resource group to which the container registry belongs.
152
330
  * @param configStoreName The name of the configuration store.
153
331
  * @param privateEndpointConnectionName Private endpoint connection name
154
- * @param [options] The optional parameters
155
- * @returns Promise<msRestAzure.LROPoller>
332
+ * @param options The options parameters.
156
333
  */
157
- beginDeleteMethod(resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
158
- return this.client.sendLRORequest(
159
- {
160
- resourceGroupName,
161
- configStoreName,
162
- privateEndpointConnectionName,
163
- options
164
- },
165
- beginDeleteMethodOperationSpec,
166
- 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();
167
347
  }
168
348
 
169
349
  /**
170
- * Lists all private endpoint connections for a configuration store.
171
- * @param nextPageLink The NextLink from the previous successful call to List operation.
172
- * @param [options] The optional parameters
173
- * @returns Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>
174
- */
175
- listByConfigurationStoreNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>;
176
- /**
177
- * @param nextPageLink The NextLink from the previous successful call to List operation.
178
- * @param callback The callback
179
- */
180
- listByConfigurationStoreNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
181
- /**
182
- * @param nextPageLink The NextLink from the previous successful call to List operation.
183
- * @param options The optional parameters
184
- * @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.
185
356
  */
186
- listByConfigurationStoreNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
187
- 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> {
188
363
  return this.client.sendOperationRequest(
189
- {
190
- nextPageLink,
191
- options
192
- },
193
- listByConfigurationStoreNextOperationSpec,
194
- callback) as Promise<Models.PrivateEndpointConnectionsListByConfigurationStoreNextResponse>;
364
+ { resourceGroupName, configStoreName, nextLink, options },
365
+ listByConfigurationStoreNextOperationSpec
366
+ );
195
367
  }
196
368
  }
197
-
198
369
  // Operation Specifications
199
- const serializer = new msRest.Serializer(Mappers);
200
- 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",
201
375
  httpMethod: "GET",
202
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections",
203
- urlParameters: [
204
- Parameters.subscriptionId,
205
- Parameters.resourceGroupName,
206
- Parameters.configStoreName
207
- ],
208
- queryParameters: [
209
- Parameters.apiVersion
210
- ],
211
- headerParameters: [
212
- Parameters.acceptLanguage
213
- ],
214
376
  responses: {
215
377
  200: {
216
378
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
217
379
  },
218
380
  default: {
219
- bodyMapper: Mappers.ErrorModel
381
+ bodyMapper: Mappers.ErrorResponse
220
382
  }
221
383
  },
222
- serializer
223
- };
224
-
225
- const getOperationSpec: msRest.OperationSpec = {
226
- httpMethod: "GET",
227
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
384
+ queryParameters: [Parameters.apiVersion],
228
385
  urlParameters: [
386
+ Parameters.$host,
229
387
  Parameters.subscriptionId,
230
388
  Parameters.resourceGroupName,
231
- Parameters.configStoreName,
232
- Parameters.privateEndpointConnectionName
233
- ],
234
- queryParameters: [
235
- Parameters.apiVersion
236
- ],
237
- headerParameters: [
238
- Parameters.acceptLanguage
389
+ Parameters.configStoreName
239
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",
240
398
  responses: {
241
399
  200: {
242
400
  bodyMapper: Mappers.PrivateEndpointConnection
243
401
  },
244
402
  default: {
245
- bodyMapper: Mappers.ErrorModel
403
+ bodyMapper: Mappers.ErrorResponse
246
404
  }
247
405
  },
248
- serializer
249
- };
250
-
251
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
252
- httpMethod: "PUT",
253
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
406
+ queryParameters: [Parameters.apiVersion],
254
407
  urlParameters: [
408
+ Parameters.$host,
255
409
  Parameters.subscriptionId,
256
410
  Parameters.resourceGroupName,
257
411
  Parameters.configStoreName,
258
412
  Parameters.privateEndpointConnectionName
259
413
  ],
260
- queryParameters: [
261
- Parameters.apiVersion
262
- ],
263
- headerParameters: [
264
- Parameters.acceptLanguage
265
- ],
266
- requestBody: {
267
- parameterPath: "privateEndpointConnection",
268
- mapper: {
269
- ...Mappers.PrivateEndpointConnection,
270
- required: true
271
- }
272
- },
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",
273
421
  responses: {
274
422
  200: {
275
423
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -277,56 +425,72 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
277
425
  201: {
278
426
  bodyMapper: Mappers.PrivateEndpointConnection
279
427
  },
428
+ 202: {
429
+ bodyMapper: Mappers.PrivateEndpointConnection
430
+ },
431
+ 204: {
432
+ bodyMapper: Mappers.PrivateEndpointConnection
433
+ },
280
434
  default: {
281
- bodyMapper: Mappers.ErrorModel
435
+ bodyMapper: Mappers.ErrorResponse
282
436
  }
283
437
  },
284
- serializer
285
- };
286
-
287
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
288
- httpMethod: "DELETE",
289
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}",
438
+ requestBody: Parameters.privateEndpointConnection,
439
+ queryParameters: [Parameters.apiVersion],
290
440
  urlParameters: [
441
+ Parameters.$host,
291
442
  Parameters.subscriptionId,
292
443
  Parameters.resourceGroupName,
293
444
  Parameters.configStoreName,
294
445
  Parameters.privateEndpointConnectionName
295
446
  ],
296
- queryParameters: [
297
- Parameters.apiVersion
298
- ],
299
- headerParameters: [
300
- Parameters.acceptLanguage
301
- ],
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",
302
455
  responses: {
303
456
  200: {},
457
+ 201: {},
304
458
  202: {},
305
459
  204: {},
306
460
  default: {
307
- bodyMapper: Mappers.ErrorModel
461
+ bodyMapper: Mappers.ErrorResponse
308
462
  }
309
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],
310
473
  serializer
311
474
  };
312
-
313
- const listByConfigurationStoreNextOperationSpec: msRest.OperationSpec = {
314
- httpMethod: "GET",
315
- baseUrl: "https://management.azure.com",
475
+ const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = {
316
476
  path: "{nextLink}",
317
- urlParameters: [
318
- Parameters.nextPageLink
319
- ],
320
- headerParameters: [
321
- Parameters.acceptLanguage
322
- ],
477
+ httpMethod: "GET",
323
478
  responses: {
324
479
  200: {
325
480
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
326
481
  },
327
482
  default: {
328
- bodyMapper: Mappers.ErrorModel
483
+ bodyMapper: Mappers.ErrorResponse
329
484
  }
330
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],
331
495
  serializer
332
496
  };