@azure/arm-search 1.3.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 (199) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +21 -21
  3. package/README.md +98 -96
  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/dist-esm/src/index.js +12 -0
  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/dist-esm/src/models/mappers.js +1013 -0
  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/dist-esm/src/models/parameters.js +182 -0
  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/dist-esm/src/operations/index.d.ts +8 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/dist-esm/src/operations/index.js +15 -0
  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/dist-esm/src/operationsInterfaces/adminKeys.js +9 -0
  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/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 +50 -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 +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/dist-esm/src/operationsInterfaces/services.js +9 -0
  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 +70 -34
  101. package/review/arm-search.api.md +600 -0
  102. package/rollup.config.js +184 -27
  103. package/src/index.ts +12 -0
  104. package/src/lroImpl.ts +34 -0
  105. package/src/models/index.ts +837 -0
  106. package/src/models/mappers.ts +1092 -0
  107. package/src/models/parameters.ts +213 -0
  108. package/src/operations/adminKeys.ts +122 -0
  109. package/{lib → src}/operations/index.ts +6 -5
  110. package/src/operations/operations.ts +98 -0
  111. package/src/operations/privateEndpointConnections.ts +363 -0
  112. package/src/operations/privateLinkResources.ts +139 -0
  113. package/src/operations/queryKeys.ts +288 -0
  114. package/src/operations/services.ts +606 -0
  115. package/src/operations/sharedPrivateLinkResources.ts +525 -0
  116. package/src/operationsInterfaces/adminKeys.ts +48 -0
  117. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +7 -6
  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 +104 -0
  125. package/tsconfig.json +4 -4
  126. package/types/arm-search.d.ts +1104 -0
  127. package/types/tsdoc-metadata.json +11 -0
  128. package/dist/arm-search.js +0 -1329
  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 +0 -11
  135. package/esm/models/adminKeysMappers.js.map +0 -1
  136. package/esm/models/index.d.ts +0 -788
  137. package/esm/models/index.d.ts.map +0 -1
  138. package/esm/models/index.js +0 -10
  139. package/esm/models/index.js.map +0 -1
  140. package/esm/models/mappers.d.ts +0 -18
  141. package/esm/models/mappers.d.ts.map +0 -1
  142. package/esm/models/mappers.js +0 -438
  143. package/esm/models/mappers.js.map +0 -1
  144. package/esm/models/operationsMappers.d.ts +0 -2
  145. package/esm/models/operationsMappers.d.ts.map +0 -1
  146. package/esm/models/operationsMappers.js +0 -11
  147. package/esm/models/operationsMappers.js.map +0 -1
  148. package/esm/models/parameters.d.ts +0 -11
  149. package/esm/models/parameters.d.ts.map +0 -1
  150. package/esm/models/parameters.js +0 -107
  151. package/esm/models/parameters.js.map +0 -1
  152. package/esm/models/queryKeysMappers.d.ts +0 -2
  153. package/esm/models/queryKeysMappers.d.ts.map +0 -1
  154. package/esm/models/queryKeysMappers.js +0 -11
  155. package/esm/models/queryKeysMappers.js.map +0 -1
  156. package/esm/models/servicesMappers.d.ts +0 -2
  157. package/esm/models/servicesMappers.d.ts.map +0 -1
  158. package/esm/models/servicesMappers.js +0 -11
  159. package/esm/models/servicesMappers.js.map +0 -1
  160. package/esm/operations/adminKeys.d.ts +0 -74
  161. package/esm/operations/adminKeys.d.ts.map +0 -1
  162. package/esm/operations/adminKeys.js +0 -93
  163. package/esm/operations/adminKeys.js.map +0 -1
  164. package/esm/operations/index.d.ts +0 -5
  165. package/esm/operations/index.d.ts.map +0 -1
  166. package/esm/operations/index.js.map +0 -1
  167. package/esm/operations/operations.d.ts +0 -28
  168. package/esm/operations/operations.d.ts.map +0 -1
  169. package/esm/operations/operations.js +0 -51
  170. package/esm/operations/operations.js.map +0 -1
  171. package/esm/operations/queryKeys.d.ts +0 -102
  172. package/esm/operations/queryKeys.d.ts.map +0 -1
  173. package/esm/operations/queryKeys.js +0 -127
  174. package/esm/operations/queryKeys.js.map +0 -1
  175. package/esm/operations/services.d.ts +0 -174
  176. package/esm/operations/services.d.ts.map +0 -1
  177. package/esm/operations/services.js +0 -268
  178. package/esm/operations/services.js.map +0 -1
  179. package/esm/searchManagementClient.d.ts +0 -22
  180. package/esm/searchManagementClient.d.ts.map +0 -1
  181. package/esm/searchManagementClient.js +0 -37
  182. package/esm/searchManagementClient.js.map +0 -1
  183. package/esm/searchManagementClientContext.d.ts +0 -17
  184. package/esm/searchManagementClientContext.d.ts.map +0 -1
  185. package/esm/searchManagementClientContext.js +0 -57
  186. package/esm/searchManagementClientContext.js.map +0 -1
  187. package/lib/models/adminKeysMappers.ts +0 -15
  188. package/lib/models/index.ts +0 -842
  189. package/lib/models/mappers.ts +0 -462
  190. package/lib/models/operationsMappers.ts +0 -17
  191. package/lib/models/parameters.ts +0 -109
  192. package/lib/models/queryKeysMappers.ts +0 -16
  193. package/lib/models/servicesMappers.ts +0 -22
  194. package/lib/operations/adminKeys.ts +0 -167
  195. package/lib/operations/operations.ts +0 -74
  196. package/lib/operations/queryKeys.ts +0 -234
  197. package/lib/operations/services.ts +0 -439
  198. package/lib/searchManagementClient.ts +0 -49
  199. package/lib/searchManagementClientContext.ts +0 -63
@@ -0,0 +1,213 @@
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
+
9
+ import {
10
+ OperationParameter,
11
+ OperationURLParameter,
12
+ OperationQueryParameter
13
+ } from "@azure/core-client";
14
+ import {
15
+ SearchService as SearchServiceMapper,
16
+ SearchServiceUpdate as SearchServiceUpdateMapper,
17
+ CheckNameAvailabilityInput as CheckNameAvailabilityInputMapper,
18
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper,
19
+ SharedPrivateLinkResource as SharedPrivateLinkResourceMapper
20
+ } from "../models/mappers";
21
+
22
+ export const accept: OperationParameter = {
23
+ parameterPath: "accept",
24
+ mapper: {
25
+ defaultValue: "application/json",
26
+ isConstant: true,
27
+ serializedName: "Accept",
28
+ type: {
29
+ name: "String"
30
+ }
31
+ }
32
+ };
33
+
34
+ export const $host: OperationURLParameter = {
35
+ parameterPath: "$host",
36
+ mapper: {
37
+ serializedName: "$host",
38
+ required: true,
39
+ type: {
40
+ name: "String"
41
+ }
42
+ },
43
+ skipEncoding: true
44
+ };
45
+
46
+ export const apiVersion: OperationQueryParameter = {
47
+ parameterPath: "apiVersion",
48
+ mapper: {
49
+ defaultValue: "2020-08-01",
50
+ isConstant: true,
51
+ serializedName: "api-version",
52
+ type: {
53
+ name: "String"
54
+ }
55
+ }
56
+ };
57
+
58
+ export const resourceGroupName: OperationURLParameter = {
59
+ parameterPath: "resourceGroupName",
60
+ mapper: {
61
+ serializedName: "resourceGroupName",
62
+ required: true,
63
+ type: {
64
+ name: "String"
65
+ }
66
+ }
67
+ };
68
+
69
+ export const searchServiceName: OperationURLParameter = {
70
+ parameterPath: "searchServiceName",
71
+ mapper: {
72
+ serializedName: "searchServiceName",
73
+ required: true,
74
+ type: {
75
+ name: "String"
76
+ }
77
+ }
78
+ };
79
+
80
+ export const clientRequestId: OperationParameter = {
81
+ parameterPath: [
82
+ "options",
83
+ "searchManagementRequestOptions",
84
+ "clientRequestId"
85
+ ],
86
+ mapper: {
87
+ serializedName: "x-ms-client-request-id",
88
+ type: {
89
+ name: "Uuid"
90
+ }
91
+ }
92
+ };
93
+
94
+ export const subscriptionId: OperationURLParameter = {
95
+ parameterPath: "subscriptionId",
96
+ mapper: {
97
+ serializedName: "subscriptionId",
98
+ required: true,
99
+ type: {
100
+ name: "String"
101
+ }
102
+ }
103
+ };
104
+
105
+ export const keyKind: OperationURLParameter = {
106
+ parameterPath: "keyKind",
107
+ mapper: {
108
+ serializedName: "keyKind",
109
+ required: true,
110
+ type: {
111
+ name: "Enum",
112
+ allowedValues: ["primary", "secondary"]
113
+ }
114
+ }
115
+ };
116
+
117
+ export const name: OperationURLParameter = {
118
+ parameterPath: "name",
119
+ mapper: {
120
+ serializedName: "name",
121
+ required: true,
122
+ type: {
123
+ name: "String"
124
+ }
125
+ }
126
+ };
127
+
128
+ export const key: OperationURLParameter = {
129
+ parameterPath: "key",
130
+ mapper: {
131
+ serializedName: "key",
132
+ required: true,
133
+ type: {
134
+ name: "String"
135
+ }
136
+ }
137
+ };
138
+
139
+ export const nextLink: OperationURLParameter = {
140
+ parameterPath: "nextLink",
141
+ mapper: {
142
+ serializedName: "nextLink",
143
+ required: true,
144
+ type: {
145
+ name: "String"
146
+ }
147
+ },
148
+ skipEncoding: true
149
+ };
150
+
151
+ export const contentType: OperationParameter = {
152
+ parameterPath: ["options", "contentType"],
153
+ mapper: {
154
+ defaultValue: "application/json",
155
+ isConstant: true,
156
+ serializedName: "Content-Type",
157
+ type: {
158
+ name: "String"
159
+ }
160
+ }
161
+ };
162
+
163
+ export const service: OperationParameter = {
164
+ parameterPath: "service",
165
+ mapper: SearchServiceMapper
166
+ };
167
+
168
+ export const service1: OperationParameter = {
169
+ parameterPath: "service",
170
+ mapper: SearchServiceUpdateMapper
171
+ };
172
+
173
+ export const name1: OperationParameter = {
174
+ parameterPath: "name",
175
+ mapper: CheckNameAvailabilityInputMapper
176
+ };
177
+
178
+ export const typeParam: OperationParameter = {
179
+ parameterPath: "typeParam",
180
+ mapper: CheckNameAvailabilityInputMapper
181
+ };
182
+
183
+ export const privateEndpointConnection: OperationParameter = {
184
+ parameterPath: "privateEndpointConnection",
185
+ mapper: PrivateEndpointConnectionMapper
186
+ };
187
+
188
+ export const privateEndpointConnectionName: OperationURLParameter = {
189
+ parameterPath: "privateEndpointConnectionName",
190
+ mapper: {
191
+ serializedName: "privateEndpointConnectionName",
192
+ required: true,
193
+ type: {
194
+ name: "String"
195
+ }
196
+ }
197
+ };
198
+
199
+ export const sharedPrivateLinkResource: OperationParameter = {
200
+ parameterPath: "sharedPrivateLinkResource",
201
+ mapper: SharedPrivateLinkResourceMapper
202
+ };
203
+
204
+ export const sharedPrivateLinkResourceName: OperationURLParameter = {
205
+ parameterPath: "sharedPrivateLinkResourceName",
206
+ mapper: {
207
+ serializedName: "sharedPrivateLinkResourceName",
208
+ required: true,
209
+ type: {
210
+ name: "String"
211
+ }
212
+ }
213
+ };
@@ -0,0 +1,122 @@
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
+
9
+ import { AdminKeys } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { SearchManagementClient } from "../searchManagementClient";
14
+ import {
15
+ AdminKeysGetOptionalParams,
16
+ AdminKeysGetResponse,
17
+ AdminKeyKind,
18
+ AdminKeysRegenerateOptionalParams,
19
+ AdminKeysRegenerateResponse
20
+ } from "../models";
21
+
22
+ /** Class containing AdminKeys operations. */
23
+ export class AdminKeysImpl implements AdminKeys {
24
+ private readonly client: SearchManagementClient;
25
+
26
+ /**
27
+ * Initialize a new instance of the class AdminKeys class.
28
+ * @param client Reference to the service client
29
+ */
30
+ constructor(client: SearchManagementClient) {
31
+ this.client = client;
32
+ }
33
+
34
+ /**
35
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
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 associated with the
39
+ * specified resource group.
40
+ * @param options The options parameters.
41
+ */
42
+ get(
43
+ resourceGroupName: string,
44
+ searchServiceName: string,
45
+ options?: AdminKeysGetOptionalParams
46
+ ): Promise<AdminKeysGetResponse> {
47
+ return this.client.sendOperationRequest(
48
+ { resourceGroupName, searchServiceName, options },
49
+ getOperationSpec
50
+ );
51
+ }
52
+
53
+ /**
54
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a
55
+ * time.
56
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
57
+ * obtain this value from the Azure Resource Manager API or the portal.
58
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
59
+ * specified resource group.
60
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
61
+ * @param options The options parameters.
62
+ */
63
+ regenerate(
64
+ resourceGroupName: string,
65
+ searchServiceName: string,
66
+ keyKind: AdminKeyKind,
67
+ options?: AdminKeysRegenerateOptionalParams
68
+ ): Promise<AdminKeysRegenerateResponse> {
69
+ return this.client.sendOperationRequest(
70
+ { resourceGroupName, searchServiceName, keyKind, options },
71
+ regenerateOperationSpec
72
+ );
73
+ }
74
+ }
75
+ // Operation Specifications
76
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
77
+
78
+ const getOperationSpec: coreClient.OperationSpec = {
79
+ path:
80
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys",
81
+ httpMethod: "POST",
82
+ responses: {
83
+ 200: {
84
+ bodyMapper: Mappers.AdminKeyResult
85
+ },
86
+ default: {
87
+ bodyMapper: Mappers.CloudError
88
+ }
89
+ },
90
+ queryParameters: [Parameters.apiVersion],
91
+ urlParameters: [
92
+ Parameters.$host,
93
+ Parameters.resourceGroupName,
94
+ Parameters.searchServiceName,
95
+ Parameters.subscriptionId
96
+ ],
97
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
98
+ serializer
99
+ };
100
+ const regenerateOperationSpec: coreClient.OperationSpec = {
101
+ path:
102
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}",
103
+ httpMethod: "POST",
104
+ responses: {
105
+ 200: {
106
+ bodyMapper: Mappers.AdminKeyResult
107
+ },
108
+ default: {
109
+ bodyMapper: Mappers.CloudError
110
+ }
111
+ },
112
+ queryParameters: [Parameters.apiVersion],
113
+ urlParameters: [
114
+ Parameters.$host,
115
+ Parameters.resourceGroupName,
116
+ Parameters.searchServiceName,
117
+ Parameters.subscriptionId,
118
+ Parameters.keyKind
119
+ ],
120
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
121
+ serializer
122
+ };
@@ -1,14 +1,15 @@
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
9
  export * from "./operations";
12
10
  export * from "./adminKeys";
13
11
  export * from "./queryKeys";
14
12
  export * from "./services";
13
+ export * from "./privateLinkResources";
14
+ export * from "./privateEndpointConnections";
15
+ export * from "./sharedPrivateLinkResources";
@@ -0,0 +1,98 @@
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
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { SearchManagementClient } from "../searchManagementClient";
15
+ import {
16
+ Operation,
17
+ OperationsListOptionalParams,
18
+ OperationsListResponse
19
+ } from "../models";
20
+
21
+ /// <reference lib="esnext.asynciterable" />
22
+ /** Class containing Operations operations. */
23
+ export class OperationsImpl implements Operations {
24
+ private readonly client: SearchManagementClient;
25
+
26
+ /**
27
+ * Initialize a new instance of the class Operations class.
28
+ * @param client Reference to the service client
29
+ */
30
+ constructor(client: SearchManagementClient) {
31
+ this.client = client;
32
+ }
33
+
34
+ /**
35
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
36
+ * @param options The options parameters.
37
+ */
38
+ public list(
39
+ options?: OperationsListOptionalParams
40
+ ): PagedAsyncIterableIterator<Operation> {
41
+ const iter = this.listPagingAll(options);
42
+ return {
43
+ next() {
44
+ return iter.next();
45
+ },
46
+ [Symbol.asyncIterator]() {
47
+ return this;
48
+ },
49
+ byPage: () => {
50
+ return this.listPagingPage(options);
51
+ }
52
+ };
53
+ }
54
+
55
+ private async *listPagingPage(
56
+ options?: OperationsListOptionalParams
57
+ ): AsyncIterableIterator<Operation[]> {
58
+ let result = await this._list(options);
59
+ yield result.value || [];
60
+ }
61
+
62
+ private async *listPagingAll(
63
+ options?: OperationsListOptionalParams
64
+ ): AsyncIterableIterator<Operation> {
65
+ for await (const page of this.listPagingPage(options)) {
66
+ yield* page;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
72
+ * @param options The options parameters.
73
+ */
74
+ private _list(
75
+ options?: OperationsListOptionalParams
76
+ ): Promise<OperationsListResponse> {
77
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
78
+ }
79
+ }
80
+ // Operation Specifications
81
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
82
+
83
+ const listOperationSpec: coreClient.OperationSpec = {
84
+ path: "/providers/Microsoft.Search/operations",
85
+ httpMethod: "GET",
86
+ responses: {
87
+ 200: {
88
+ bodyMapper: Mappers.OperationListResult
89
+ },
90
+ default: {
91
+ bodyMapper: Mappers.CloudError
92
+ }
93
+ },
94
+ queryParameters: [Parameters.apiVersion],
95
+ urlParameters: [Parameters.$host],
96
+ headerParameters: [Parameters.accept],
97
+ serializer
98
+ };