@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
@@ -0,0 +1,37 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { QueryKey, QueryKeysListBySearchServiceOptionalParams, QueryKeysCreateOptionalParams, QueryKeysCreateResponse, QueryKeysDeleteOptionalParams } from "../models";
3
+ /** Interface representing a QueryKeys. */
4
+ export interface QueryKeys {
5
+ /**
6
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
7
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
8
+ * obtain this value from the Azure Resource Manager API or the portal.
9
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
10
+ * specified resource group.
11
+ * @param options The options parameters.
12
+ */
13
+ listBySearchService(resourceGroupName: string, searchServiceName: string, options?: QueryKeysListBySearchServiceOptionalParams): PagedAsyncIterableIterator<QueryKey>;
14
+ /**
15
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per
16
+ * service.
17
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
18
+ * obtain this value from the Azure Resource Manager API or the portal.
19
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
20
+ * specified resource group.
21
+ * @param name The name of the new query API key.
22
+ * @param options The options parameters.
23
+ */
24
+ create(resourceGroupName: string, searchServiceName: string, name: string, options?: QueryKeysCreateOptionalParams): Promise<QueryKeysCreateResponse>;
25
+ /**
26
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for
27
+ * regenerating a query key is to delete and then recreate it.
28
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
29
+ * obtain this value from the Azure Resource Manager API or the portal.
30
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
31
+ * specified resource group.
32
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
33
+ * @param options The options parameters.
34
+ */
35
+ delete(resourceGroupName: string, searchServiceName: string, key: string, options?: QueryKeysDeleteOptionalParams): Promise<void>;
36
+ }
37
+ //# sourceMappingURL=queryKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryKeys.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/queryKeys.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,0CAA0C,EAC1C,6BAA6B,EAC7B,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,WAAW,CAAC;AAGnB,0CAA0C;AAC1C,MAAM,WAAW,SAAS;IACxB;;;;;;;OAOG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,0CAA0C,GACnD,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACxC;;;;;;;;;OASG;IACH,MAAM,CACJ,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACpC;;;;;;;;;OASG;IACH,MAAM,CACJ,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=queryKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryKeys.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/queryKeys.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,85 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
3
+ import { SearchService, ServicesListByResourceGroupOptionalParams, ServicesListBySubscriptionOptionalParams, ServicesCreateOrUpdateOptionalParams, ServicesCreateOrUpdateResponse, SearchServiceUpdate, ServicesUpdateOptionalParams, ServicesUpdateResponse, ServicesGetOptionalParams, ServicesGetResponse, ServicesDeleteOptionalParams, ServicesCheckNameAvailabilityOptionalParams, ServicesCheckNameAvailabilityResponse } from "../models";
4
+ /** Interface representing a Services. */
5
+ export interface Services {
6
+ /**
7
+ * Gets a list of all search services in the given resource group.
8
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
9
+ * obtain this value from the Azure Resource Manager API or the portal.
10
+ * @param options The options parameters.
11
+ */
12
+ listByResourceGroup(resourceGroupName: string, options?: ServicesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<SearchService>;
13
+ /**
14
+ * Gets a list of all search services in the given subscription.
15
+ * @param options The options parameters.
16
+ */
17
+ listBySubscription(options?: ServicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator<SearchService>;
18
+ /**
19
+ * Creates or updates a search service in the given resource group. If the search service already
20
+ * exists, all properties will be updated with the given values.
21
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
22
+ * obtain this value from the Azure Resource Manager API or the portal.
23
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search
24
+ * service names must only contain lowercase letters, digits or dashes, cannot use dash as the first
25
+ * two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60
26
+ * characters in length. Search service names must be globally unique since they are part of the
27
+ * service URI (https://<name>.search.windows.net). You cannot change the service name after the
28
+ * service is created.
29
+ * @param service The definition of the search service to create or update.
30
+ * @param options The options parameters.
31
+ */
32
+ beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, service: SearchService, options?: ServicesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<ServicesCreateOrUpdateResponse>, ServicesCreateOrUpdateResponse>>;
33
+ /**
34
+ * Creates or updates a search service in the given resource group. If the search service already
35
+ * exists, all properties will be updated with the given values.
36
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
37
+ * obtain this value from the Azure Resource Manager API or the portal.
38
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search
39
+ * service names must only contain lowercase letters, digits or dashes, cannot use dash as the first
40
+ * two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60
41
+ * characters in length. Search service names must be globally unique since they are part of the
42
+ * service URI (https://<name>.search.windows.net). You cannot change the service name after the
43
+ * service is created.
44
+ * @param service The definition of the search service to create or update.
45
+ * @param options The options parameters.
46
+ */
47
+ beginCreateOrUpdateAndWait(resourceGroupName: string, searchServiceName: string, service: SearchService, options?: ServicesCreateOrUpdateOptionalParams): Promise<ServicesCreateOrUpdateResponse>;
48
+ /**
49
+ * Updates an existing search service in the given resource group.
50
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
51
+ * obtain this value from the Azure Resource Manager API or the portal.
52
+ * @param searchServiceName The name of the Azure Cognitive Search service to update.
53
+ * @param service The definition of the search service to update.
54
+ * @param options The options parameters.
55
+ */
56
+ update(resourceGroupName: string, searchServiceName: string, service: SearchServiceUpdate, options?: ServicesUpdateOptionalParams): Promise<ServicesUpdateResponse>;
57
+ /**
58
+ * Gets the search service with the given name in the given resource group.
59
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
60
+ * obtain this value from the Azure Resource Manager API or the portal.
61
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
62
+ * specified resource group.
63
+ * @param options The options parameters.
64
+ */
65
+ get(resourceGroupName: string, searchServiceName: string, options?: ServicesGetOptionalParams): Promise<ServicesGetResponse>;
66
+ /**
67
+ * Deletes a search service in the given resource group, along with its associated resources.
68
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
69
+ * obtain this value from the Azure Resource Manager API or the portal.
70
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
71
+ * specified resource group.
72
+ * @param options The options parameters.
73
+ */
74
+ delete(resourceGroupName: string, searchServiceName: string, options?: ServicesDeleteOptionalParams): Promise<void>;
75
+ /**
76
+ * Checks whether or not the given search service name is available for use. Search service names must
77
+ * be globally unique since they are part of the service URI (https://<name>.search.windows.net).
78
+ * @param name The search service name to validate. Search service names must only contain lowercase
79
+ * letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain
80
+ * consecutive dashes, and must be between 2 and 60 characters in length.
81
+ * @param options The options parameters.
82
+ */
83
+ checkNameAvailability(name: string, options?: ServicesCheckNameAvailabilityOptionalParams): Promise<ServicesCheckNameAvailabilityResponse>;
84
+ }
85
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/services.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,aAAa,EACb,yCAAyC,EACzC,wCAAwC,EACxC,oCAAoC,EACpC,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,2CAA2C,EAC3C,qCAAqC,EACtC,MAAM,WAAW,CAAC;AAGnB,yCAAyC;AACzC,MAAM,WAAW,QAAQ;IACvB;;;;;OAKG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,yCAAyC,GAClD,0BAA0B,CAAC,aAAa,CAAC,CAAC;IAC7C;;;OAGG;IACH,kBAAkB,CAChB,OAAO,CAAC,EAAE,wCAAwC,GACjD,0BAA0B,CAAC,aAAa,CAAC,CAAC;IAC7C;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CACR,UAAU,CACR,kBAAkB,CAAC,8BAA8B,CAAC,EAClD,8BAA8B,CAC/B,CACF,CAAC;IACF;;;;;;;;;;;;;OAaG;IACH,0BAA0B,CACxB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC3C;;;;;;;OAOG;IACH,MAAM,CACJ,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnC;;;;;;;OAOG;IACH,GAAG,CACD,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,MAAM,CACJ,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;;OAOG;IACH,qBAAqB,CACnB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,2CAA2C,GACpD,OAAO,CAAC,qCAAqC,CAAC,CAAC;CACnD"}
@@ -5,4 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- //# sourceMappingURL=index.js.map
8
+ export {};
9
+ //# sourceMappingURL=services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/services.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,78 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
3
+ import { SharedPrivateLinkResource, SharedPrivateLinkResourcesListByServiceOptionalParams, SharedPrivateLinkResourcesCreateOrUpdateOptionalParams, SharedPrivateLinkResourcesCreateOrUpdateResponse, SharedPrivateLinkResourcesGetOptionalParams, SharedPrivateLinkResourcesGetResponse, SharedPrivateLinkResourcesDeleteOptionalParams } from "../models";
4
+ /** Interface representing a SharedPrivateLinkResources. */
5
+ export interface SharedPrivateLinkResources {
6
+ /**
7
+ * Gets a list of all shared private link resources managed by the given service.
8
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
9
+ * obtain this value from the Azure Resource Manager API or the portal.
10
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
11
+ * specified resource group.
12
+ * @param options The options parameters.
13
+ */
14
+ listByService(resourceGroupName: string, searchServiceName: string, options?: SharedPrivateLinkResourcesListByServiceOptionalParams): PagedAsyncIterableIterator<SharedPrivateLinkResource>;
15
+ /**
16
+ * Initiates the creation or update of a shared private link resource managed by the search service in
17
+ * the given resource group.
18
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
19
+ * obtain this value from the Azure Resource Manager API or the portal.
20
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
21
+ * specified resource group.
22
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
23
+ * Azure Cognitive Search service within the specified resource group.
24
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or
25
+ * update.
26
+ * @param options The options parameters.
27
+ */
28
+ beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: SharedPrivateLinkResource, options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<SharedPrivateLinkResourcesCreateOrUpdateResponse>, SharedPrivateLinkResourcesCreateOrUpdateResponse>>;
29
+ /**
30
+ * Initiates the creation or update of a shared private link resource managed by the search service in
31
+ * the given resource group.
32
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
33
+ * obtain this value from the Azure Resource Manager API or the portal.
34
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
35
+ * specified resource group.
36
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
37
+ * Azure Cognitive Search service within the specified resource group.
38
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or
39
+ * update.
40
+ * @param options The options parameters.
41
+ */
42
+ beginCreateOrUpdateAndWait(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: SharedPrivateLinkResource, options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise<SharedPrivateLinkResourcesCreateOrUpdateResponse>;
43
+ /**
44
+ * Gets the details of the shared private link resource managed by the search service in the given
45
+ * resource group.
46
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
47
+ * obtain this value from the Azure Resource Manager API or the portal.
48
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
49
+ * specified resource group.
50
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
51
+ * Azure Cognitive Search service within the specified resource group.
52
+ * @param options The options parameters.
53
+ */
54
+ get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesGetOptionalParams): Promise<SharedPrivateLinkResourcesGetResponse>;
55
+ /**
56
+ * Initiates the deletion of the shared private link resource from the search service.
57
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
58
+ * obtain this value from the Azure Resource Manager API or the portal.
59
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
60
+ * specified resource group.
61
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
62
+ * Azure Cognitive Search service within the specified resource group.
63
+ * @param options The options parameters.
64
+ */
65
+ beginDelete(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
66
+ /**
67
+ * Initiates the deletion of the shared private link resource from the search service.
68
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
69
+ * obtain this value from the Azure Resource Manager API or the portal.
70
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
71
+ * specified resource group.
72
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
73
+ * Azure Cognitive Search service within the specified resource group.
74
+ * @param options The options parameters.
75
+ */
76
+ beginDeleteAndWait(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: SharedPrivateLinkResourcesDeleteOptionalParams): Promise<void>;
77
+ }
78
+ //# sourceMappingURL=sharedPrivateLinkResources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedPrivateLinkResources.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/sharedPrivateLinkResources.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,yBAAyB,EACzB,qDAAqD,EACrD,sDAAsD,EACtD,gDAAgD,EAChD,2CAA2C,EAC3C,qCAAqC,EACrC,8CAA8C,EAC/C,MAAM,WAAW,CAAC;AAGnB,2DAA2D;AAC3D,MAAM,WAAW,0BAA0B;IACzC;;;;;;;OAOG;IACH,aAAa,CACX,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,qDAAqD,GAC9D,0BAA0B,CAAC,yBAAyB,CAAC,CAAC;IACzD;;;;;;;;;;;;OAYG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,6BAA6B,EAAE,MAAM,EACrC,yBAAyB,EAAE,yBAAyB,EACpD,OAAO,CAAC,EAAE,sDAAsD,GAC/D,OAAO,CACR,UAAU,CACR,kBAAkB,CAAC,gDAAgD,CAAC,EACpE,gDAAgD,CACjD,CACF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,0BAA0B,CACxB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,6BAA6B,EAAE,MAAM,EACrC,yBAAyB,EAAE,yBAAyB,EACpD,OAAO,CAAC,EAAE,sDAAsD,GAC/D,OAAO,CAAC,gDAAgD,CAAC,CAAC;IAC7D;;;;;;;;;;OAUG;IACH,GAAG,CACD,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,6BAA6B,EAAE,MAAM,EACrC,OAAO,CAAC,EAAE,2CAA2C,GACpD,OAAO,CAAC,qCAAqC,CAAC,CAAC;IAClD;;;;;;;;;OASG;IACH,WAAW,CACT,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,6BAA6B,EAAE,MAAM,EACrC,OAAO,CAAC,EAAE,8CAA8C,GACvD,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD;;;;;;;;;OASG;IACH,kBAAkB,CAChB,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,6BAA6B,EAAE,MAAM,EACrC,OAAO,CAAC,EAAE,8CAA8C,GACvD,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=sharedPrivateLinkResources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedPrivateLinkResources.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/sharedPrivateLinkResources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,25 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ import * as coreAuth from "@azure/core-auth";
3
+ import { Operations, AdminKeys, QueryKeys, Services, PrivateLinkResources, PrivateEndpointConnections, SharedPrivateLinkResources } from "./operationsInterfaces";
4
+ import { SearchManagementClientOptionalParams } from "./models";
5
+ export declare class SearchManagementClient extends coreClient.ServiceClient {
6
+ $host: string;
7
+ apiVersion: string;
8
+ subscriptionId: string;
9
+ /**
10
+ * Initializes a new instance of the SearchManagementClient class.
11
+ * @param credentials Subscription credentials which uniquely identify client subscription.
12
+ * @param subscriptionId The unique identifier for a Microsoft Azure subscription. You can obtain this
13
+ * value from the Azure Resource Manager API or the portal.
14
+ * @param options The parameter options
15
+ */
16
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: SearchManagementClientOptionalParams);
17
+ operations: Operations;
18
+ adminKeys: AdminKeys;
19
+ queryKeys: QueryKeys;
20
+ services: Services;
21
+ privateLinkResources: PrivateLinkResources;
22
+ privateEndpointConnections: PrivateEndpointConnections;
23
+ sharedPrivateLinkResources: SharedPrivateLinkResources;
24
+ }
25
+ //# sourceMappingURL=searchManagementClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchManagementClient.d.ts","sourceRoot":"","sources":["../../src/searchManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAU7C,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAC;AAEhE,qBAAa,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,oCAAoC;IAmDhD,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,0BAA0B,EAAE,0BAA0B,CAAC;CACxD"}
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import * as coreClient from "@azure/core-client";
9
+ import { OperationsImpl, AdminKeysImpl, QueryKeysImpl, ServicesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, SharedPrivateLinkResourcesImpl } from "./operations";
10
+ export class SearchManagementClient extends coreClient.ServiceClient {
11
+ /**
12
+ * Initializes a new instance of the SearchManagementClient class.
13
+ * @param credentials Subscription credentials which uniquely identify client subscription.
14
+ * @param subscriptionId The unique identifier for a Microsoft Azure subscription. You can obtain this
15
+ * value from the Azure Resource Manager API or the portal.
16
+ * @param options The parameter options
17
+ */
18
+ constructor(credentials, subscriptionId, options) {
19
+ if (credentials === undefined) {
20
+ throw new Error("'credentials' cannot be null");
21
+ }
22
+ if (subscriptionId === undefined) {
23
+ throw new Error("'subscriptionId' cannot be null");
24
+ }
25
+ // Initializing default values for options
26
+ if (!options) {
27
+ options = {};
28
+ }
29
+ const defaults = {
30
+ requestContentType: "application/json; charset=utf-8",
31
+ credential: credentials
32
+ };
33
+ const packageDetails = `azsdk-js-arm-search/1.0.0-beta.1`;
34
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
35
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
36
+ : `${packageDetails}`;
37
+ if (!options.credentialScopes) {
38
+ options.credentialScopes = ["https://management.azure.com/.default"];
39
+ }
40
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
41
+ userAgentPrefix
42
+ }, baseUri: options.endpoint || "https://management.azure.com" });
43
+ super(optionsWithDefaults);
44
+ // Parameter assignments
45
+ this.subscriptionId = subscriptionId;
46
+ // Assigning values to Constant parameters
47
+ this.$host = options.$host || "https://management.azure.com";
48
+ this.apiVersion = options.apiVersion || "2020-08-01";
49
+ this.operations = new OperationsImpl(this);
50
+ this.adminKeys = new AdminKeysImpl(this);
51
+ this.queryKeys = new QueryKeysImpl(this);
52
+ this.services = new ServicesImpl(this);
53
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
54
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
55
+ this.sharedPrivateLinkResources = new SharedPrivateLinkResourcesImpl(this);
56
+ }
57
+ }
58
+ //# sourceMappingURL=searchManagementClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchManagementClient.js","sourceRoot":"","sources":["../../src/searchManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,cAAc,CAAC;AAYtB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA8C;QAE9C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM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,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,0BAA0B,GAAG,IAAI,8BAA8B,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,0BAA0B,GAAG,IAAI,8BAA8B,CAAC,IAAI,CAAC,CAAC;IAC7E,CAAC;CASF"}
@@ -0,0 +1,4 @@
1
+ export declare const testPollingOptions: {
2
+ updateIntervalInMs: number | undefined;
3
+ };
4
+ //# sourceMappingURL=search_examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search_examples.d.ts","sourceRoot":"","sources":["../../test/search_examples.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
@@ -0,0 +1,163 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncValues, __awaiter } from "tslib";
9
+ import { env, record, isPlaybackMode } from "@azure-tools/test-recorder";
10
+ import * as assert from "assert";
11
+ import { ClientSecretCredential } from "@azure/identity";
12
+ import { SearchManagementClient } from "../src/searchManagementClient";
13
+ const recorderEnvSetup = {
14
+ replaceableVariables: {
15
+ AZURE_CLIENT_ID: "azure_client_id",
16
+ AZURE_CLIENT_SECRET: "azure_client_secret",
17
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
18
+ SUBSCRIPTION_ID: "azure_subscription_id"
19
+ },
20
+ customizationsOnRecordings: [
21
+ (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
22
+ ],
23
+ queryParametersToSkip: []
24
+ };
25
+ export const testPollingOptions = {
26
+ updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
27
+ };
28
+ describe("Search test", () => {
29
+ let recorder;
30
+ let subscriptionId;
31
+ let client;
32
+ let location;
33
+ let resourceGroup;
34
+ let searchServiceName;
35
+ let keyname;
36
+ beforeEach(function () {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ recorder = record(this, recorderEnvSetup);
39
+ subscriptionId = env.SUBSCRIPTION_ID;
40
+ // This is an example of how the environment variables are used
41
+ const credential = new ClientSecretCredential(env.AZURE_TENANT_ID, env.AZURE_CLIENT_ID, env.AZURE_CLIENT_SECRET);
42
+ client = new SearchManagementClient(credential, subscriptionId);
43
+ location = "eastus";
44
+ resourceGroup = "myjstest";
45
+ searchServiceName = "myjssearchservicexx";
46
+ keyname = "testjskey";
47
+ });
48
+ });
49
+ afterEach(function () {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ yield recorder.stop();
52
+ });
53
+ });
54
+ it("services create test", function () {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const res = yield client.services.beginCreateOrUpdateAndWait(resourceGroup, searchServiceName, {
57
+ location: location,
58
+ replicaCount: 1,
59
+ partitionCount: 1,
60
+ hostingMode: "default",
61
+ sku: {
62
+ name: "standard"
63
+ }
64
+ });
65
+ assert.equal(res.name, searchServiceName);
66
+ });
67
+ });
68
+ it("services get test", function () {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const res = yield client.services.get(resourceGroup, searchServiceName);
71
+ assert.equal(res.name, searchServiceName);
72
+ });
73
+ });
74
+ it("services list test", function () {
75
+ var e_1, _a;
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const resArray = new Array();
78
+ try {
79
+ for (var _b = __asyncValues(client.services.listByResourceGroup(resourceGroup)), _c; _c = yield _b.next(), !_c.done;) {
80
+ let item = _c.value;
81
+ resArray.push(item);
82
+ }
83
+ }
84
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
85
+ finally {
86
+ try {
87
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
88
+ }
89
+ finally { if (e_1) throw e_1.error; }
90
+ }
91
+ assert.equal(resArray.length, 1);
92
+ });
93
+ });
94
+ it("queryKeys create test", function () {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ const res = yield client.queryKeys.create(resourceGroup, searchServiceName, keyname);
97
+ assert.notEqual(res.key, "");
98
+ });
99
+ });
100
+ it("queryKeys list test", function () {
101
+ var e_2, _a;
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const resArray = new Array();
104
+ try {
105
+ for (var _b = __asyncValues(client.queryKeys.listBySearchService(resourceGroup, searchServiceName)), _c; _c = yield _b.next(), !_c.done;) {
106
+ let item = _c.value;
107
+ resArray.push(item);
108
+ }
109
+ }
110
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
111
+ finally {
112
+ try {
113
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
114
+ }
115
+ finally { if (e_2) throw e_2.error; }
116
+ }
117
+ assert.equal(resArray.length, 2);
118
+ });
119
+ });
120
+ it("queryKeys delete test", function () {
121
+ var e_3, _a;
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const res = yield client.queryKeys.delete(resourceGroup, searchServiceName, keyname);
124
+ const resArray = new Array();
125
+ try {
126
+ for (var _b = __asyncValues(client.queryKeys.listBySearchService(resourceGroup, searchServiceName)), _c; _c = yield _b.next(), !_c.done;) {
127
+ let item = _c.value;
128
+ resArray.push(item);
129
+ }
130
+ }
131
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
132
+ finally {
133
+ try {
134
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
135
+ }
136
+ finally { if (e_3) throw e_3.error; }
137
+ }
138
+ assert.equal(resArray.length, 2);
139
+ });
140
+ });
141
+ it("services delete test", function () {
142
+ var e_4, _a;
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const res = yield client.services.delete(resourceGroup, searchServiceName);
145
+ const resArray = new Array();
146
+ try {
147
+ for (var _b = __asyncValues(client.services.listByResourceGroup(resourceGroup)), _c; _c = yield _b.next(), !_c.done;) {
148
+ let item = _c.value;
149
+ resArray.push(item);
150
+ }
151
+ }
152
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
153
+ finally {
154
+ try {
155
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
156
+ }
157
+ finally { if (e_4) throw e_4.error; }
158
+ }
159
+ assert.equal(resArray.length, 0);
160
+ });
161
+ });
162
+ });
163
+ //# sourceMappingURL=search_examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search_examples.js","sourceRoot":"","sources":["../../test/search_examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,MAAM,EAIN,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EAAE;QACpB,eAAe,EAAE,iBAAiB;QAClC,mBAAmB,EAAE,qBAAqB;QAC1C,eAAe,EAAE,sCAAsC;QACvD,eAAe,EAAE,uBAAuB;KACzC;IACD,0BAA0B,EAAE;QAC1B,CAAC,SAAc,EAAO,EAAE,CACtB,SAAS,CAAC,OAAO,CACf,yBAAyB,EACzB,+BAA+B,CAChC;KACJ;IACD,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CACrD,CAAC;AAEF,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,QAAkB,CAAC;IACvB,IAAI,cAAsB,CAAC;IAC3B,IAAI,MAA8B,CAAC;IACnC,IAAI,QAAgB,CAAC;IACrB,I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