@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,33 +3,81 @@
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";
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";
11
21
 
12
- export const acceptLanguage: msRest.OperationParameter = {
13
- parameterPath: "acceptLanguage",
22
+ export const accept: OperationParameter = {
23
+ parameterPath: "accept",
14
24
  mapper: {
15
- serializedName: "accept-language",
16
- defaultValue: 'en-US',
25
+ defaultValue: "application/json",
26
+ isConstant: true,
27
+ serializedName: "Accept",
17
28
  type: {
18
29
  name: "String"
19
30
  }
20
31
  }
21
32
  };
22
- export const apiVersion: msRest.OperationQueryParameter = {
23
- parameterPath: "apiVersion",
33
+
34
+ export const $host: OperationURLParameter = {
35
+ parameterPath: "$host",
24
36
  mapper: {
37
+ serializedName: "$host",
25
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,
26
51
  serializedName: "api-version",
27
52
  type: {
28
53
  name: "String"
29
54
  }
30
55
  }
31
56
  };
32
- export const clientRequestId: msRest.OperationParameter = {
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 = {
33
81
  parameterPath: [
34
82
  "options",
35
83
  "searchManagementRequestOptions",
@@ -42,96 +90,122 @@ export const clientRequestId: msRest.OperationParameter = {
42
90
  }
43
91
  }
44
92
  };
45
- export const key: msRest.OperationURLParameter = {
46
- parameterPath: "key",
93
+
94
+ export const subscriptionId: OperationURLParameter = {
95
+ parameterPath: "subscriptionId",
47
96
  mapper: {
97
+ serializedName: "subscriptionId",
48
98
  required: true,
49
- serializedName: "key",
50
99
  type: {
51
100
  name: "String"
52
101
  }
53
102
  }
54
103
  };
55
- export const keyKind: msRest.OperationURLParameter = {
104
+
105
+ export const keyKind: OperationURLParameter = {
56
106
  parameterPath: "keyKind",
57
107
  mapper: {
58
- required: true,
59
108
  serializedName: "keyKind",
109
+ required: true,
60
110
  type: {
61
111
  name: "Enum",
62
- allowedValues: [
63
- "primary",
64
- "secondary"
65
- ]
112
+ allowedValues: ["primary", "secondary"]
66
113
  }
67
114
  }
68
115
  };
69
- export const name: msRest.OperationURLParameter = {
116
+
117
+ export const name: OperationURLParameter = {
70
118
  parameterPath: "name",
71
119
  mapper: {
72
- required: true,
73
120
  serializedName: "name",
121
+ required: true,
74
122
  type: {
75
123
  name: "String"
76
124
  }
77
125
  }
78
126
  };
79
- export const nextPageLink: msRest.OperationURLParameter = {
80
- parameterPath: "nextPageLink",
127
+
128
+ export const key: OperationURLParameter = {
129
+ parameterPath: "key",
81
130
  mapper: {
131
+ serializedName: "key",
82
132
  required: true,
83
- serializedName: "nextLink",
84
133
  type: {
85
134
  name: "String"
86
135
  }
87
- },
88
- skipEncoding: true
136
+ }
89
137
  };
90
- export const privateEndpointConnectionName: msRest.OperationURLParameter = {
91
- parameterPath: "privateEndpointConnectionName",
138
+
139
+ export const nextLink: OperationURLParameter = {
140
+ parameterPath: "nextLink",
92
141
  mapper: {
142
+ serializedName: "nextLink",
93
143
  required: true,
94
- serializedName: "privateEndpointConnectionName",
95
144
  type: {
96
145
  name: "String"
97
146
  }
98
- }
147
+ },
148
+ skipEncoding: true
99
149
  };
100
- export const resourceGroupName: msRest.OperationURLParameter = {
101
- parameterPath: "resourceGroupName",
150
+
151
+ export const contentType: OperationParameter = {
152
+ parameterPath: ["options", "contentType"],
102
153
  mapper: {
103
- required: true,
104
- serializedName: "resourceGroupName",
154
+ defaultValue: "application/json",
155
+ isConstant: true,
156
+ serializedName: "Content-Type",
105
157
  type: {
106
158
  name: "String"
107
159
  }
108
160
  }
109
161
  };
110
- export const searchServiceName: msRest.OperationURLParameter = {
111
- parameterPath: "searchServiceName",
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",
112
190
  mapper: {
191
+ serializedName: "privateEndpointConnectionName",
113
192
  required: true,
114
- serializedName: "searchServiceName",
115
193
  type: {
116
194
  name: "String"
117
195
  }
118
196
  }
119
197
  };
120
- export const sharedPrivateLinkResourceName: msRest.OperationURLParameter = {
198
+
199
+ export const sharedPrivateLinkResource: OperationParameter = {
200
+ parameterPath: "sharedPrivateLinkResource",
201
+ mapper: SharedPrivateLinkResourceMapper
202
+ };
203
+
204
+ export const sharedPrivateLinkResourceName: OperationURLParameter = {
121
205
  parameterPath: "sharedPrivateLinkResourceName",
122
206
  mapper: {
123
- required: true,
124
207
  serializedName: "sharedPrivateLinkResourceName",
125
- type: {
126
- name: "String"
127
- }
128
- }
129
- };
130
- export const subscriptionId: msRest.OperationURLParameter = {
131
- parameterPath: "subscriptionId",
132
- mapper: {
133
208
  required: true,
134
- serializedName: "subscriptionId",
135
209
  type: {
136
210
  name: "String"
137
211
  }
@@ -3,130 +3,82 @@
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/adminKeysMappers";
9
+ import { AdminKeys } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
13
12
  import * as Parameters from "../models/parameters";
14
- import { SearchManagementClientContext } from "../searchManagementClientContext";
13
+ import { SearchManagementClient } from "../searchManagementClient";
14
+ import {
15
+ AdminKeysGetOptionalParams,
16
+ AdminKeysGetResponse,
17
+ AdminKeyKind,
18
+ AdminKeysRegenerateOptionalParams,
19
+ AdminKeysRegenerateResponse
20
+ } from "../models";
15
21
 
16
- /** Class representing a AdminKeys. */
17
- export class AdminKeys {
18
- private readonly client: SearchManagementClientContext;
22
+ /** Class containing AdminKeys operations. */
23
+ export class AdminKeysImpl implements AdminKeys {
24
+ private readonly client: SearchManagementClient;
19
25
 
20
26
  /**
21
- * Create a AdminKeys.
22
- * @param {SearchManagementClientContext} client Reference to the service client.
27
+ * Initialize a new instance of the class AdminKeys class.
28
+ * @param client Reference to the service client
23
29
  */
24
- constructor(client: SearchManagementClientContext) {
30
+ constructor(client: SearchManagementClient) {
25
31
  this.client = client;
26
32
  }
27
33
 
28
34
  /**
29
35
  * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
30
36
  * @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.
37
+ * obtain this value from the Azure Resource Manager API or the portal.
32
38
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
33
- * specified resource group.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.AdminKeysGetResponse>
39
+ * specified resource group.
40
+ * @param options The options parameters.
36
41
  */
37
- get(resourceGroupName: string, searchServiceName: string, options?: Models.AdminKeysGetOptionalParams): Promise<Models.AdminKeysGetResponse>;
38
- /**
39
- * @param resourceGroupName The name of the resource group within the current subscription. You can
40
- * obtain this value from the Azure Resource Manager API or the portal.
41
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
42
- * specified resource group.
43
- * @param callback The callback
44
- */
45
- get(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
46
- /**
47
- * @param resourceGroupName The name of the resource group within the current subscription. You can
48
- * obtain this value from the Azure Resource Manager API or the portal.
49
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
50
- * specified resource group.
51
- * @param options The optional parameters
52
- * @param callback The callback
53
- */
54
- get(resourceGroupName: string, searchServiceName: string, options: Models.AdminKeysGetOptionalParams, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
55
- get(resourceGroupName: string, searchServiceName: string, options?: Models.AdminKeysGetOptionalParams | msRest.ServiceCallback<Models.AdminKeyResult>, callback?: msRest.ServiceCallback<Models.AdminKeyResult>): Promise<Models.AdminKeysGetResponse> {
42
+ get(
43
+ resourceGroupName: string,
44
+ searchServiceName: string,
45
+ options?: AdminKeysGetOptionalParams
46
+ ): Promise<AdminKeysGetResponse> {
56
47
  return this.client.sendOperationRequest(
57
- {
58
- resourceGroupName,
59
- searchServiceName,
60
- options
61
- },
62
- getOperationSpec,
63
- callback) as Promise<Models.AdminKeysGetResponse>;
48
+ { resourceGroupName, searchServiceName, options },
49
+ getOperationSpec
50
+ );
64
51
  }
65
52
 
66
53
  /**
67
54
  * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a
68
55
  * time.
69
56
  * @param resourceGroupName The name of the resource group within the current subscription. You can
70
- * obtain this value from the Azure Resource Manager API or the portal.
57
+ * obtain this value from the Azure Resource Manager API or the portal.
71
58
  * @param searchServiceName The name of the Azure Cognitive Search service associated with the
72
- * specified resource group.
73
- * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and
74
- * 'secondary'. Possible values include: 'primary', 'secondary'
75
- * @param [options] The optional parameters
76
- * @returns Promise<Models.AdminKeysRegenerateResponse>
59
+ * specified resource group.
60
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
61
+ * @param options The options parameters.
77
62
  */
78
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options?: Models.AdminKeysRegenerateOptionalParams): Promise<Models.AdminKeysRegenerateResponse>;
79
- /**
80
- * @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 keyKind Specifies which key to regenerate. Valid values include 'primary' and
85
- * 'secondary'. Possible values include: 'primary', 'secondary'
86
- * @param callback The callback
87
- */
88
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
89
- /**
90
- * @param resourceGroupName The name of the resource group within the current subscription. You can
91
- * obtain this value from the Azure Resource Manager API or the portal.
92
- * @param searchServiceName The name of the Azure Cognitive Search service associated with the
93
- * specified resource group.
94
- * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and
95
- * 'secondary'. Possible values include: 'primary', 'secondary'
96
- * @param options The optional parameters
97
- * @param callback The callback
98
- */
99
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options: Models.AdminKeysRegenerateOptionalParams, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
100
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options?: Models.AdminKeysRegenerateOptionalParams | msRest.ServiceCallback<Models.AdminKeyResult>, callback?: msRest.ServiceCallback<Models.AdminKeyResult>): Promise<Models.AdminKeysRegenerateResponse> {
63
+ regenerate(
64
+ resourceGroupName: string,
65
+ searchServiceName: string,
66
+ keyKind: AdminKeyKind,
67
+ options?: AdminKeysRegenerateOptionalParams
68
+ ): Promise<AdminKeysRegenerateResponse> {
101
69
  return this.client.sendOperationRequest(
102
- {
103
- resourceGroupName,
104
- searchServiceName,
105
- keyKind,
106
- options
107
- },
108
- regenerateOperationSpec,
109
- callback) as Promise<Models.AdminKeysRegenerateResponse>;
70
+ { resourceGroupName, searchServiceName, keyKind, options },
71
+ regenerateOperationSpec
72
+ );
110
73
  }
111
74
  }
112
-
113
75
  // Operation Specifications
114
- const serializer = new msRest.Serializer(Mappers);
115
- const getOperationSpec: msRest.OperationSpec = {
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",
116
81
  httpMethod: "POST",
117
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys",
118
- urlParameters: [
119
- Parameters.resourceGroupName,
120
- Parameters.searchServiceName,
121
- Parameters.subscriptionId
122
- ],
123
- queryParameters: [
124
- Parameters.apiVersion
125
- ],
126
- headerParameters: [
127
- Parameters.acceptLanguage,
128
- Parameters.clientRequestId
129
- ],
130
82
  responses: {
131
83
  200: {
132
84
  bodyMapper: Mappers.AdminKeyResult
@@ -135,25 +87,20 @@ const getOperationSpec: msRest.OperationSpec = {
135
87
  bodyMapper: Mappers.CloudError
136
88
  }
137
89
  },
138
- serializer
139
- };
140
-
141
- const regenerateOperationSpec: msRest.OperationSpec = {
142
- httpMethod: "POST",
143
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}",
90
+ queryParameters: [Parameters.apiVersion],
144
91
  urlParameters: [
92
+ Parameters.$host,
145
93
  Parameters.resourceGroupName,
146
94
  Parameters.searchServiceName,
147
- Parameters.keyKind,
148
95
  Parameters.subscriptionId
149
96
  ],
150
- queryParameters: [
151
- Parameters.apiVersion
152
- ],
153
- headerParameters: [
154
- Parameters.acceptLanguage,
155
- Parameters.clientRequestId
156
- ],
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",
157
104
  responses: {
158
105
  200: {
159
106
  bodyMapper: Mappers.AdminKeyResult
@@ -162,5 +109,14 @@ const regenerateOperationSpec: msRest.OperationSpec = {
162
109
  bodyMapper: Mappers.CloudError
163
110
  }
164
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],
165
121
  serializer
166
122
  };
@@ -3,8 +3,7 @@
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
9
  export * from "./operations";
@@ -3,64 +3,86 @@
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/operationsMappers";
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
13
  import * as Parameters from "../models/parameters";
14
- import { SearchManagementClientContext } from "../searchManagementClientContext";
14
+ import { SearchManagementClient } from "../searchManagementClient";
15
+ import {
16
+ Operation,
17
+ OperationsListOptionalParams,
18
+ OperationsListResponse
19
+ } from "../models";
15
20
 
16
- /** Class representing a Operations. */
17
- export class Operations {
18
- private readonly client: SearchManagementClientContext;
21
+ /// <reference lib="esnext.asynciterable" />
22
+ /** Class containing Operations operations. */
23
+ export class OperationsImpl implements Operations {
24
+ private readonly client: SearchManagementClient;
19
25
 
20
26
  /**
21
- * Create a Operations.
22
- * @param {SearchManagementClientContext} client Reference to the service client.
27
+ * Initialize a new instance of the class Operations class.
28
+ * @param client Reference to the service client
23
29
  */
24
- constructor(client: SearchManagementClientContext) {
30
+ constructor(client: SearchManagementClient) {
25
31
  this.client = client;
26
32
  }
27
33
 
28
34
  /**
29
35
  * Lists all of the available REST API operations of the Microsoft.Search provider.
30
- * @param [options] The optional parameters
31
- * @returns Promise<Models.OperationsListResponse>
36
+ * @param options The options parameters.
32
37
  */
33
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
34
- /**
35
- * @param callback The callback
36
- */
37
- list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
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
+
38
70
  /**
39
- * @param options The optional parameters
40
- * @param callback The callback
71
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
72
+ * @param options The options parameters.
41
73
  */
42
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
43
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
44
- return this.client.sendOperationRequest(
45
- {
46
- options
47
- },
48
- listOperationSpec,
49
- callback) as Promise<Models.OperationsListResponse>;
74
+ private _list(
75
+ options?: OperationsListOptionalParams
76
+ ): Promise<OperationsListResponse> {
77
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
50
78
  }
51
79
  }
52
-
53
80
  // Operation Specifications
54
- const serializer = new msRest.Serializer(Mappers);
55
- const listOperationSpec: msRest.OperationSpec = {
81
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
82
+
83
+ const listOperationSpec: coreClient.OperationSpec = {
84
+ path: "/providers/Microsoft.Search/operations",
56
85
  httpMethod: "GET",
57
- path: "providers/Microsoft.Search/operations",
58
- queryParameters: [
59
- Parameters.apiVersion
60
- ],
61
- headerParameters: [
62
- Parameters.acceptLanguage
63
- ],
64
86
  responses: {
65
87
  200: {
66
88
  bodyMapper: Mappers.OperationListResult
@@ -69,5 +91,8 @@ const listOperationSpec: msRest.OperationSpec = {
69
91
  bodyMapper: Mappers.CloudError
70
92
  }
71
93
  },
94
+ queryParameters: [Parameters.apiVersion],
95
+ urlParameters: [Parameters.$host],
96
+ headerParameters: [Parameters.accept],
72
97
  serializer
73
98
  };