@azure/arm-search 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 (209) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -78
  4. package/dist/index.js +2926 -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/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/{esm/models/adminKeysMappers.js → dist-esm/src/index.js} +5 -2
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +692 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +21 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +35 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +503 -558
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +22 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/parameters.js +92 -47
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/adminKeys.d.ts +33 -0
  29. package/dist-esm/src/operations/adminKeys.d.ts.map +1 -0
  30. package/dist-esm/src/operations/adminKeys.js +90 -0
  31. package/dist-esm/src/operations/adminKeys.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +1 -2
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +26 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +90 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/privateEndpointConnections.d.ts +79 -0
  41. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  42. package/dist-esm/src/operations/privateEndpointConnections.js +273 -0
  43. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  44. package/dist-esm/src/operations/privateLinkResources.d.ts +34 -0
  45. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  46. package/dist-esm/src/operations/privateLinkResources.js +103 -0
  47. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  48. package/dist-esm/src/operations/queryKeys.d.ts +66 -0
  49. package/dist-esm/src/operations/queryKeys.d.ts.map +1 -0
  50. package/dist-esm/src/operations/queryKeys.js +213 -0
  51. package/dist-esm/src/operations/queryKeys.js.map +1 -0
  52. package/dist-esm/src/operations/services.d.ts +123 -0
  53. package/dist-esm/src/operations/services.d.ts.map +1 -0
  54. package/dist-esm/src/operations/services.js +475 -0
  55. package/dist-esm/src/operations/services.js.map +1 -0
  56. package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts +107 -0
  57. package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts.map +1 -0
  58. package/dist-esm/src/operations/sharedPrivateLinkResources.js +379 -0
  59. package/dist-esm/src/operations/sharedPrivateLinkResources.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/adminKeys.d.ts +25 -0
  61. package/dist-esm/src/operationsInterfaces/adminKeys.d.ts.map +1 -0
  62. package/{src/models/adminKeysMappers.ts → dist-esm/src/operationsInterfaces/adminKeys.js} +2 -5
  63. package/dist-esm/src/operationsInterfaces/adminKeys.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/{src/models/queryKeysMappers.ts → dist-esm/src/operationsInterfaces/operations.js} +2 -6
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +50 -0
  73. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  74. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/privateEndpointConnections.js} +2 -7
  75. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +15 -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/src/operationsInterfaces/queryKeys.d.ts +37 -0
  81. package/dist-esm/src/operationsInterfaces/queryKeys.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/queryKeys.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/queryKeys.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/services.d.ts +85 -0
  85. package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
  86. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/services.js} +2 -1
  87. package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts +78 -0
  89. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js.map +1 -0
  92. package/dist-esm/src/searchManagementClient.d.ts +25 -0
  93. package/dist-esm/src/searchManagementClient.d.ts.map +1 -0
  94. package/dist-esm/src/searchManagementClient.js +58 -0
  95. package/dist-esm/src/searchManagementClient.js.map +1 -0
  96. package/dist-esm/test/search_examples.d.ts +4 -0
  97. package/dist-esm/test/search_examples.d.ts.map +1 -0
  98. package/dist-esm/test/search_examples.js +163 -0
  99. package/dist-esm/test/search_examples.js.map +1 -0
  100. package/package.json +65 -32
  101. package/review/arm-search.api.md +600 -0
  102. package/rollup.config.js +181 -30
  103. package/{esm/models/queryKeysMappers.js → src/index.ts} +5 -2
  104. package/src/lroImpl.ts +34 -0
  105. package/src/models/index.ts +563 -1357
  106. package/src/models/mappers.ts +516 -575
  107. package/src/models/parameters.ts +122 -48
  108. package/src/operations/adminKeys.ts +65 -109
  109. package/src/operations/index.ts +1 -2
  110. package/src/operations/operations.ts +64 -39
  111. package/src/operations/privateEndpointConnections.ts +223 -235
  112. package/src/operations/privateLinkResources.ts +100 -54
  113. package/src/operations/queryKeys.ts +192 -190
  114. package/src/operations/services.ts +423 -409
  115. package/src/operations/sharedPrivateLinkResources.ts +390 -232
  116. package/src/operationsInterfaces/adminKeys.ts +48 -0
  117. package/src/operationsInterfaces/index.ts +15 -0
  118. package/src/operationsInterfaces/operations.ts +22 -0
  119. package/src/operationsInterfaces/privateEndpointConnections.ts +88 -0
  120. package/src/operationsInterfaces/privateLinkResources.ts +31 -0
  121. package/src/operationsInterfaces/queryKeys.ts +66 -0
  122. package/src/operationsInterfaces/services.ts +144 -0
  123. package/src/operationsInterfaces/sharedPrivateLinkResources.ts +131 -0
  124. package/src/searchManagementClient.ts +90 -46
  125. package/tsconfig.json +3 -3
  126. package/types/arm-search.d.ts +1104 -0
  127. package/types/tsdoc-metadata.json +11 -0
  128. package/dist/arm-search.js +0 -2737
  129. package/dist/arm-search.js.map +0 -1
  130. package/dist/arm-search.min.js +0 -1
  131. package/dist/arm-search.min.js.map +0 -1
  132. package/esm/models/adminKeysMappers.d.ts +0 -2
  133. package/esm/models/adminKeysMappers.d.ts.map +0 -1
  134. package/esm/models/adminKeysMappers.js.map +0 -1
  135. package/esm/models/index.d.ts +0 -1499
  136. package/esm/models/index.d.ts.map +0 -1
  137. package/esm/models/index.js.map +0 -1
  138. package/esm/models/mappers.d.ts +0 -38
  139. package/esm/models/mappers.d.ts.map +0 -1
  140. package/esm/models/mappers.js.map +0 -1
  141. package/esm/models/operationsMappers.d.ts +0 -2
  142. package/esm/models/operationsMappers.d.ts.map +0 -1
  143. package/esm/models/operationsMappers.js +0 -9
  144. package/esm/models/operationsMappers.js.map +0 -1
  145. package/esm/models/parameters.d.ts +0 -14
  146. package/esm/models/parameters.d.ts.map +0 -1
  147. package/esm/models/parameters.js.map +0 -1
  148. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  149. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  150. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  151. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  152. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  153. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  154. package/esm/models/privateLinkResourcesMappers.js +0 -9
  155. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  156. package/esm/models/queryKeysMappers.d.ts +0 -2
  157. package/esm/models/queryKeysMappers.d.ts.map +0 -1
  158. package/esm/models/queryKeysMappers.js.map +0 -1
  159. package/esm/models/servicesMappers.d.ts +0 -2
  160. package/esm/models/servicesMappers.d.ts.map +0 -1
  161. package/esm/models/servicesMappers.js +0 -9
  162. package/esm/models/servicesMappers.js.map +0 -1
  163. package/esm/models/sharedPrivateLinkResourcesMappers.d.ts +0 -2
  164. package/esm/models/sharedPrivateLinkResourcesMappers.d.ts.map +0 -1
  165. package/esm/models/sharedPrivateLinkResourcesMappers.js +0 -9
  166. package/esm/models/sharedPrivateLinkResourcesMappers.js.map +0 -1
  167. package/esm/operations/adminKeys.d.ts +0 -74
  168. package/esm/operations/adminKeys.d.ts.map +0 -1
  169. package/esm/operations/adminKeys.js +0 -92
  170. package/esm/operations/adminKeys.js.map +0 -1
  171. package/esm/operations/index.d.ts.map +0 -1
  172. package/esm/operations/index.js.map +0 -1
  173. package/esm/operations/operations.d.ts +0 -28
  174. package/esm/operations/operations.d.ts.map +0 -1
  175. package/esm/operations/operations.js +0 -50
  176. package/esm/operations/operations.js.map +0 -1
  177. package/esm/operations/privateEndpointConnections.d.ts +0 -161
  178. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  179. package/esm/operations/privateEndpointConnections.js +0 -197
  180. package/esm/operations/privateEndpointConnections.js.map +0 -1
  181. package/esm/operations/privateLinkResources.d.ts +0 -40
  182. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  183. package/esm/operations/privateLinkResources.js +0 -58
  184. package/esm/operations/privateLinkResources.js.map +0 -1
  185. package/esm/operations/queryKeys.d.ts +0 -120
  186. package/esm/operations/queryKeys.d.ts.map +0 -1
  187. package/esm/operations/queryKeys.js +0 -156
  188. package/esm/operations/queryKeys.js.map +0 -1
  189. package/esm/operations/services.d.ts +0 -225
  190. package/esm/operations/services.d.ts.map +0 -1
  191. package/esm/operations/services.js +0 -355
  192. package/esm/operations/services.js.map +0 -1
  193. package/esm/operations/sharedPrivateLinkResources.d.ts +0 -147
  194. package/esm/operations/sharedPrivateLinkResources.d.ts.map +0 -1
  195. package/esm/operations/sharedPrivateLinkResources.js +0 -255
  196. package/esm/operations/sharedPrivateLinkResources.js.map +0 -1
  197. package/esm/searchManagementClient.d.ts +0 -31
  198. package/esm/searchManagementClient.d.ts.map +0 -1
  199. package/esm/searchManagementClient.js +0 -44
  200. package/esm/searchManagementClient.js.map +0 -1
  201. package/esm/searchManagementClientContext.d.ts +0 -23
  202. package/esm/searchManagementClientContext.d.ts.map +0 -1
  203. package/esm/searchManagementClientContext.js +0 -61
  204. package/esm/searchManagementClientContext.js.map +0 -1
  205. package/src/models/privateEndpointConnectionsMappers.ts +0 -33
  206. package/src/models/privateLinkResourcesMappers.ts +0 -33
  207. package/src/models/servicesMappers.ts +0 -35
  208. package/src/models/sharedPrivateLinkResourcesMappers.ts +0 -33
  209. package/src/searchManagementClientContext.ts +0 -68
@@ -3,65 +3,134 @@
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 Models from "../models";
12
- 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";
13
13
  import * as Parameters from "../models/parameters";
14
- import { SearchManagementClientContext } from "../searchManagementClientContext";
14
+ import { SearchManagementClient } from "../searchManagementClient";
15
+ import {
16
+ PrivateEndpointConnection,
17
+ PrivateEndpointConnectionsListByServiceNextOptionalParams,
18
+ PrivateEndpointConnectionsListByServiceOptionalParams,
19
+ PrivateEndpointConnectionsUpdateOptionalParams,
20
+ PrivateEndpointConnectionsUpdateResponse,
21
+ PrivateEndpointConnectionsGetOptionalParams,
22
+ PrivateEndpointConnectionsGetResponse,
23
+ PrivateEndpointConnectionsDeleteOptionalParams,
24
+ PrivateEndpointConnectionsDeleteResponse,
25
+ PrivateEndpointConnectionsListByServiceResponse,
26
+ PrivateEndpointConnectionsListByServiceNextResponse
27
+ } from "../models";
15
28
 
16
- /** Class representing a PrivateEndpointConnections. */
17
- export class PrivateEndpointConnections {
18
- private readonly client: SearchManagementClientContext;
29
+ /// <reference lib="esnext.asynciterable" />
30
+ /** Class containing PrivateEndpointConnections operations. */
31
+ export class PrivateEndpointConnectionsImpl
32
+ implements PrivateEndpointConnections {
33
+ private readonly client: SearchManagementClient;
19
34
 
20
35
  /**
21
- * Create a PrivateEndpointConnections.
22
- * @param {SearchManagementClientContext} client Reference to the service client.
36
+ * Initialize a new instance of the class PrivateEndpointConnections class.
37
+ * @param client Reference to the service client
23
38
  */
24
- constructor(client: SearchManagementClientContext) {
39
+ constructor(client: SearchManagementClient) {
25
40
  this.client = client;
26
41
  }
27
42
 
28
43
  /**
29
- * Updates a Private Endpoint connection to the search service in the given resource group.
44
+ * Gets a list of all private endpoint connections in the given service.
30
45
  * @param resourceGroupName The name of the resource group within the current subscription. You can
31
- * obtain this value from the Azure Resource Manager API or the portal.
46
+ * obtain this value from the Azure Resource Manager API or the portal.
32
47
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
33
- * specified resource group.
34
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
35
- * Cognitive Search service with the specified resource group.
36
- * @param privateEndpointConnection The definition of the private endpoint connection to update.
37
- * @param [options] The optional parameters
38
- * @returns Promise<Models.PrivateEndpointConnectionsUpdateResponse>
48
+ * specified resource group.
49
+ * @param options The options parameters.
39
50
  */
40
- update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionsUpdateOptionalParams): Promise<Models.PrivateEndpointConnectionsUpdateResponse>;
41
- /**
42
- * @param resourceGroupName The name of the resource group within the current subscription. You can
43
- * obtain this value from the Azure Resource Manager API or the portal.
44
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
45
- * specified resource group.
46
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
47
- * Cognitive Search service with the specified resource group.
48
- * @param privateEndpointConnection The definition of the private endpoint connection to update.
49
- * @param callback The callback
50
- */
51
- update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
51
+ public listByService(
52
+ resourceGroupName: string,
53
+ searchServiceName: string,
54
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
55
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
56
+ const iter = this.listByServicePagingAll(
57
+ resourceGroupName,
58
+ searchServiceName,
59
+ options
60
+ );
61
+ return {
62
+ next() {
63
+ return iter.next();
64
+ },
65
+ [Symbol.asyncIterator]() {
66
+ return this;
67
+ },
68
+ byPage: () => {
69
+ return this.listByServicePagingPage(
70
+ resourceGroupName,
71
+ searchServiceName,
72
+ options
73
+ );
74
+ }
75
+ };
76
+ }
77
+
78
+ private async *listByServicePagingPage(
79
+ resourceGroupName: string,
80
+ searchServiceName: string,
81
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
82
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
83
+ let result = await this._listByService(
84
+ resourceGroupName,
85
+ searchServiceName,
86
+ options
87
+ );
88
+ yield result.value || [];
89
+ let continuationToken = result.nextLink;
90
+ while (continuationToken) {
91
+ result = await this._listByServiceNext(
92
+ resourceGroupName,
93
+ searchServiceName,
94
+ continuationToken,
95
+ options
96
+ );
97
+ continuationToken = result.nextLink;
98
+ yield result.value || [];
99
+ }
100
+ }
101
+
102
+ private async *listByServicePagingAll(
103
+ resourceGroupName: string,
104
+ searchServiceName: string,
105
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
106
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
107
+ for await (const page of this.listByServicePagingPage(
108
+ resourceGroupName,
109
+ searchServiceName,
110
+ options
111
+ )) {
112
+ yield* page;
113
+ }
114
+ }
115
+
52
116
  /**
117
+ * Updates a Private Endpoint connection to the search service in the given resource group.
53
118
  * @param resourceGroupName The name of the resource group within the current subscription. You can
54
- * obtain this value from the Azure Resource Manager API or the portal.
119
+ * obtain this value from the Azure Resource Manager API or the portal.
55
120
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
56
- * specified resource group.
121
+ * specified resource group.
57
122
  * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
58
- * Cognitive Search service with the specified resource group.
123
+ * Cognitive Search service with the specified resource group.
59
124
  * @param privateEndpointConnection The definition of the private endpoint connection to update.
60
- * @param options The optional parameters
61
- * @param callback The callback
125
+ * @param options The options parameters.
62
126
  */
63
- update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options: Models.PrivateEndpointConnectionsUpdateOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
64
- update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionsUpdateOptionalParams | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsUpdateResponse> {
127
+ update(
128
+ resourceGroupName: string,
129
+ searchServiceName: string,
130
+ privateEndpointConnectionName: string,
131
+ privateEndpointConnection: PrivateEndpointConnection,
132
+ options?: PrivateEndpointConnectionsUpdateOptionalParams
133
+ ): Promise<PrivateEndpointConnectionsUpdateResponse> {
65
134
  return this.client.sendOperationRequest(
66
135
  {
67
136
  resourceGroupName,
@@ -70,45 +139,27 @@ export class PrivateEndpointConnections {
70
139
  privateEndpointConnection,
71
140
  options
72
141
  },
73
- updateOperationSpec,
74
- callback) as Promise<Models.PrivateEndpointConnectionsUpdateResponse>;
142
+ updateOperationSpec
143
+ );
75
144
  }
76
145
 
77
146
  /**
78
147
  * Gets the details of the private endpoint connection to the search service in the given resource
79
148
  * group.
80
149
  * @param resourceGroupName The name of the resource group within the current subscription. You can
81
- * obtain this value from the Azure Resource Manager API or the portal.
82
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
83
- * specified resource group.
84
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
85
- * Cognitive Search service with the specified resource group.
86
- * @param [options] The optional parameters
87
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
88
- */
89
- get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsGetOptionalParams): Promise<Models.PrivateEndpointConnectionsGetResponse>;
90
- /**
91
- * @param resourceGroupName The name of the resource group within the current subscription. You can
92
- * obtain this value from the Azure Resource Manager API or the portal.
93
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
94
- * specified resource group.
95
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
96
- * Cognitive Search service with the specified resource group.
97
- * @param callback The callback
98
- */
99
- get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
100
- /**
101
- * @param resourceGroupName The name of the resource group within the current subscription. You can
102
- * obtain this value from the Azure Resource Manager API or the portal.
150
+ * obtain this value from the Azure Resource Manager API or the portal.
103
151
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
104
- * specified resource group.
152
+ * specified resource group.
105
153
  * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
106
- * Cognitive Search service with the specified resource group.
107
- * @param options The optional parameters
108
- * @param callback The callback
154
+ * Cognitive Search service with the specified resource group.
155
+ * @param options The options parameters.
109
156
  */
110
- get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options: Models.PrivateEndpointConnectionsGetOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
111
- get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsGetOptionalParams | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
157
+ get(
158
+ resourceGroupName: string,
159
+ searchServiceName: string,
160
+ privateEndpointConnectionName: string,
161
+ options?: PrivateEndpointConnectionsGetOptionalParams
162
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
112
163
  return this.client.sendOperationRequest(
113
164
  {
114
165
  resourceGroupName,
@@ -116,44 +167,26 @@ export class PrivateEndpointConnections {
116
167
  privateEndpointConnectionName,
117
168
  options
118
169
  },
119
- getOperationSpec,
120
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
170
+ getOperationSpec
171
+ );
121
172
  }
122
173
 
123
174
  /**
124
175
  * Disconnects the private endpoint connection and deletes it from the search service.
125
176
  * @param resourceGroupName The name of the resource group within the current subscription. You can
126
- * obtain this value from the Azure Resource Manager API or the portal.
177
+ * obtain this value from the Azure Resource Manager API or the portal.
127
178
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
128
- * specified resource group.
179
+ * specified resource group.
129
180
  * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
130
- * Cognitive Search service with the specified resource group.
131
- * @param [options] The optional parameters
132
- * @returns Promise<Models.PrivateEndpointConnectionsDeleteMethodResponse>
181
+ * Cognitive Search service with the specified resource group.
182
+ * @param options The options parameters.
133
183
  */
134
- deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams): Promise<Models.PrivateEndpointConnectionsDeleteMethodResponse>;
135
- /**
136
- * @param resourceGroupName The name of the resource group within the current subscription. You can
137
- * obtain this value from the Azure Resource Manager API or the portal.
138
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
139
- * specified resource group.
140
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
141
- * Cognitive Search service with the specified resource group.
142
- * @param callback The callback
143
- */
144
- deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
145
- /**
146
- * @param resourceGroupName The name of the resource group within the current subscription. You can
147
- * obtain this value from the Azure Resource Manager API or the portal.
148
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
149
- * specified resource group.
150
- * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
151
- * Cognitive Search service with the specified resource group.
152
- * @param options The optional parameters
153
- * @param callback The callback
154
- */
155
- deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
156
- deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsDeleteMethodResponse> {
184
+ delete(
185
+ resourceGroupName: string,
186
+ searchServiceName: string,
187
+ privateEndpointConnectionName: string,
188
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
189
+ ): Promise<PrivateEndpointConnectionsDeleteResponse> {
157
190
  return this.client.sendOperationRequest(
158
191
  {
159
192
  resourceGroupName,
@@ -161,102 +194,57 @@ export class PrivateEndpointConnections {
161
194
  privateEndpointConnectionName,
162
195
  options
163
196
  },
164
- deleteMethodOperationSpec,
165
- callback) as Promise<Models.PrivateEndpointConnectionsDeleteMethodResponse>;
197
+ deleteOperationSpec
198
+ );
166
199
  }
167
200
 
168
201
  /**
169
202
  * Gets a list of all private endpoint connections in the given service.
170
203
  * @param resourceGroupName The name of the resource group within the current subscription. You can
171
- * obtain this value from the Azure Resource Manager API or the portal.
172
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
173
- * specified resource group.
174
- * @param [options] The optional parameters
175
- * @returns Promise<Models.PrivateEndpointConnectionsListByServiceResponse>
176
- */
177
- listByService(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateEndpointConnectionsListByServiceOptionalParams): Promise<Models.PrivateEndpointConnectionsListByServiceResponse>;
178
- /**
179
- * @param resourceGroupName The name of the resource group within the current subscription. You can
180
- * obtain this value from the Azure Resource Manager API or the portal.
204
+ * obtain this value from the Azure Resource Manager API or the portal.
181
205
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
182
- * specified resource group.
183
- * @param callback The callback
206
+ * specified resource group.
207
+ * @param options The options parameters.
184
208
  */
185
- listByService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
186
- /**
187
- * @param resourceGroupName The name of the resource group within the current subscription. You can
188
- * obtain this value from the Azure Resource Manager API or the portal.
189
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
190
- * specified resource group.
191
- * @param options The optional parameters
192
- * @param callback The callback
193
- */
194
- listByService(resourceGroupName: string, searchServiceName: string, options: Models.PrivateEndpointConnectionsListByServiceOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
195
- listByService(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateEndpointConnectionsListByServiceOptionalParams | msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): Promise<Models.PrivateEndpointConnectionsListByServiceResponse> {
209
+ private _listByService(
210
+ resourceGroupName: string,
211
+ searchServiceName: string,
212
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
213
+ ): Promise<PrivateEndpointConnectionsListByServiceResponse> {
196
214
  return this.client.sendOperationRequest(
197
- {
198
- resourceGroupName,
199
- searchServiceName,
200
- options
201
- },
202
- listByServiceOperationSpec,
203
- callback) as Promise<Models.PrivateEndpointConnectionsListByServiceResponse>;
215
+ { resourceGroupName, searchServiceName, options },
216
+ listByServiceOperationSpec
217
+ );
204
218
  }
205
219
 
206
220
  /**
207
- * Gets a list of all private endpoint connections in the given service.
208
- * @param nextPageLink The NextLink from the previous successful call to List operation.
209
- * @param [options] The optional parameters
210
- * @returns Promise<Models.PrivateEndpointConnectionsListByServiceNextResponse>
211
- */
212
- listByServiceNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams): Promise<Models.PrivateEndpointConnectionsListByServiceNextResponse>;
213
- /**
214
- * @param nextPageLink The NextLink from the previous successful call to List operation.
215
- * @param callback The callback
216
- */
217
- listByServiceNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
218
- /**
219
- * @param nextPageLink The NextLink from the previous successful call to List operation.
220
- * @param options The optional parameters
221
- * @param callback The callback
221
+ * ListByServiceNext
222
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
223
+ * obtain this value from the Azure Resource Manager API or the portal.
224
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
225
+ * specified resource group.
226
+ * @param nextLink The nextLink from the previous successful call to the ListByService method.
227
+ * @param options The options parameters.
222
228
  */
223
- listByServiceNext(nextPageLink: string, options: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
224
- listByServiceNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams | msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): Promise<Models.PrivateEndpointConnectionsListByServiceNextResponse> {
229
+ private _listByServiceNext(
230
+ resourceGroupName: string,
231
+ searchServiceName: string,
232
+ nextLink: string,
233
+ options?: PrivateEndpointConnectionsListByServiceNextOptionalParams
234
+ ): Promise<PrivateEndpointConnectionsListByServiceNextResponse> {
225
235
  return this.client.sendOperationRequest(
226
- {
227
- nextPageLink,
228
- options
229
- },
230
- listByServiceNextOperationSpec,
231
- callback) as Promise<Models.PrivateEndpointConnectionsListByServiceNextResponse>;
236
+ { resourceGroupName, searchServiceName, nextLink, options },
237
+ listByServiceNextOperationSpec
238
+ );
232
239
  }
233
240
  }
234
-
235
241
  // Operation Specifications
236
- const serializer = new msRest.Serializer(Mappers);
237
- const updateOperationSpec: msRest.OperationSpec = {
242
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
243
+
244
+ const updateOperationSpec: coreClient.OperationSpec = {
245
+ path:
246
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
238
247
  httpMethod: "PUT",
239
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
240
- urlParameters: [
241
- Parameters.resourceGroupName,
242
- Parameters.searchServiceName,
243
- Parameters.privateEndpointConnectionName,
244
- Parameters.subscriptionId
245
- ],
246
- queryParameters: [
247
- Parameters.apiVersion
248
- ],
249
- headerParameters: [
250
- Parameters.acceptLanguage,
251
- Parameters.clientRequestId
252
- ],
253
- requestBody: {
254
- parameterPath: "privateEndpointConnection",
255
- mapper: {
256
- ...Mappers.PrivateEndpointConnection,
257
- required: true
258
- }
259
- },
260
248
  responses: {
261
249
  200: {
262
250
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -265,25 +253,27 @@ const updateOperationSpec: msRest.OperationSpec = {
265
253
  bodyMapper: Mappers.CloudError
266
254
  }
267
255
  },
268
- serializer
269
- };
270
-
271
- const getOperationSpec: msRest.OperationSpec = {
272
- httpMethod: "GET",
273
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
256
+ requestBody: Parameters.privateEndpointConnection,
257
+ queryParameters: [Parameters.apiVersion],
274
258
  urlParameters: [
259
+ Parameters.$host,
275
260
  Parameters.resourceGroupName,
276
261
  Parameters.searchServiceName,
277
- Parameters.privateEndpointConnectionName,
278
- Parameters.subscriptionId
279
- ],
280
- queryParameters: [
281
- Parameters.apiVersion
262
+ Parameters.subscriptionId,
263
+ Parameters.privateEndpointConnectionName
282
264
  ],
283
265
  headerParameters: [
284
- Parameters.acceptLanguage,
285
- Parameters.clientRequestId
266
+ Parameters.accept,
267
+ Parameters.clientRequestId,
268
+ Parameters.contentType
286
269
  ],
270
+ mediaType: "json",
271
+ serializer
272
+ };
273
+ const getOperationSpec: coreClient.OperationSpec = {
274
+ path:
275
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
276
+ httpMethod: "GET",
287
277
  responses: {
288
278
  200: {
289
279
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -292,25 +282,21 @@ const getOperationSpec: msRest.OperationSpec = {
292
282
  bodyMapper: Mappers.CloudError
293
283
  }
294
284
  },
295
- serializer
296
- };
297
-
298
- const deleteMethodOperationSpec: msRest.OperationSpec = {
299
- httpMethod: "DELETE",
300
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
285
+ queryParameters: [Parameters.apiVersion],
301
286
  urlParameters: [
287
+ Parameters.$host,
302
288
  Parameters.resourceGroupName,
303
289
  Parameters.searchServiceName,
304
- Parameters.privateEndpointConnectionName,
305
- Parameters.subscriptionId
306
- ],
307
- queryParameters: [
308
- Parameters.apiVersion
309
- ],
310
- headerParameters: [
311
- Parameters.acceptLanguage,
312
- Parameters.clientRequestId
290
+ Parameters.subscriptionId,
291
+ Parameters.privateEndpointConnectionName
313
292
  ],
293
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
294
+ serializer
295
+ };
296
+ const deleteOperationSpec: coreClient.OperationSpec = {
297
+ path:
298
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
299
+ httpMethod: "DELETE",
314
300
  responses: {
315
301
  200: {
316
302
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -320,24 +306,21 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
320
306
  bodyMapper: Mappers.CloudError
321
307
  }
322
308
  },
323
- serializer
324
- };
325
-
326
- const listByServiceOperationSpec: msRest.OperationSpec = {
327
- httpMethod: "GET",
328
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections",
309
+ queryParameters: [Parameters.apiVersion],
329
310
  urlParameters: [
330
- Parameters.subscriptionId,
311
+ Parameters.$host,
331
312
  Parameters.resourceGroupName,
332
- Parameters.searchServiceName
333
- ],
334
- queryParameters: [
335
- Parameters.apiVersion
336
- ],
337
- headerParameters: [
338
- Parameters.acceptLanguage,
339
- Parameters.clientRequestId
313
+ Parameters.searchServiceName,
314
+ Parameters.subscriptionId,
315
+ Parameters.privateEndpointConnectionName
340
316
  ],
317
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
318
+ serializer
319
+ };
320
+ const listByServiceOperationSpec: coreClient.OperationSpec = {
321
+ path:
322
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections",
323
+ httpMethod: "GET",
341
324
  responses: {
342
325
  200: {
343
326
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
@@ -346,23 +329,19 @@ const listByServiceOperationSpec: msRest.OperationSpec = {
346
329
  bodyMapper: Mappers.CloudError
347
330
  }
348
331
  },
332
+ queryParameters: [Parameters.apiVersion],
333
+ urlParameters: [
334
+ Parameters.$host,
335
+ Parameters.resourceGroupName,
336
+ Parameters.searchServiceName,
337
+ Parameters.subscriptionId
338
+ ],
339
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
349
340
  serializer
350
341
  };
351
-
352
- const listByServiceNextOperationSpec: msRest.OperationSpec = {
353
- httpMethod: "GET",
354
- baseUrl: "https://management.azure.com",
342
+ const listByServiceNextOperationSpec: coreClient.OperationSpec = {
355
343
  path: "{nextLink}",
356
- urlParameters: [
357
- Parameters.nextPageLink
358
- ],
359
- queryParameters: [
360
- Parameters.apiVersion
361
- ],
362
- headerParameters: [
363
- Parameters.acceptLanguage,
364
- Parameters.clientRequestId
365
- ],
344
+ httpMethod: "GET",
366
345
  responses: {
367
346
  200: {
368
347
  bodyMapper: Mappers.PrivateEndpointConnectionListResult
@@ -371,5 +350,14 @@ const listByServiceNextOperationSpec: msRest.OperationSpec = {
371
350
  bodyMapper: Mappers.CloudError
372
351
  }
373
352
  },
353
+ queryParameters: [Parameters.apiVersion],
354
+ urlParameters: [
355
+ Parameters.$host,
356
+ Parameters.resourceGroupName,
357
+ Parameters.searchServiceName,
358
+ Parameters.subscriptionId,
359
+ Parameters.nextLink
360
+ ],
361
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
374
362
  serializer
375
363
  };