@azure/arm-chaos 1.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 (204) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +3725 -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/samples-dev/capabilitiesCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.js +36 -0
  11. package/dist-esm/samples-dev/capabilitiesCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/capabilitiesDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/capabilitiesDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/capabilitiesDeleteSample.js +35 -0
  15. package/dist-esm/samples-dev/capabilitiesDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/capabilitiesGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/capabilitiesGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/capabilitiesGetSample.js +35 -0
  19. package/dist-esm/samples-dev/capabilitiesGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/capabilitiesListSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/capabilitiesListSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/capabilitiesListSample.js +48 -0
  23. package/dist-esm/samples-dev/capabilitiesListSample.js.map +1 -0
  24. package/dist-esm/samples-dev/capabilityTypesGetSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/capabilityTypesGetSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/capabilityTypesGetSample.js +32 -0
  27. package/dist-esm/samples-dev/capabilityTypesGetSample.js.map +1 -0
  28. package/dist-esm/samples-dev/capabilityTypesListSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/capabilityTypesListSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/capabilityTypesListSample.js +45 -0
  31. package/dist-esm/samples-dev/capabilityTypesListSample.js.map +1 -0
  32. package/dist-esm/samples-dev/experimentsCancelSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/experimentsCancelSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/experimentsCancelSample.js +31 -0
  35. package/dist-esm/samples-dev/experimentsCancelSample.js.map +1 -0
  36. package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.js +66 -0
  39. package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/experimentsDeleteSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/experimentsDeleteSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/experimentsDeleteSample.js +31 -0
  43. package/dist-esm/samples-dev/experimentsDeleteSample.js.map +1 -0
  44. package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.js +32 -0
  47. package/dist-esm/samples-dev/experimentsGetExecutionDetailsSample.js.map +1 -0
  48. package/dist-esm/samples-dev/experimentsGetSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/experimentsGetSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/experimentsGetSample.js +31 -0
  51. package/dist-esm/samples-dev/experimentsGetSample.js.map +1 -0
  52. package/dist-esm/samples-dev/experimentsGetStatusSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/experimentsGetStatusSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/experimentsGetStatusSample.js +32 -0
  55. package/dist-esm/samples-dev/experimentsGetStatusSample.js.map +1 -0
  56. package/dist-esm/samples-dev/experimentsListAllSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/experimentsListAllSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/experimentsListAllSample.js +45 -0
  59. package/dist-esm/samples-dev/experimentsListAllSample.js.map +1 -0
  60. package/dist-esm/samples-dev/experimentsListAllStatusesSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/experimentsListAllStatusesSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/experimentsListAllStatusesSample.js +45 -0
  63. package/dist-esm/samples-dev/experimentsListAllStatusesSample.js.map +1 -0
  64. package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.js +45 -0
  67. package/dist-esm/samples-dev/experimentsListExecutionDetailsSample.js.map +1 -0
  68. package/dist-esm/samples-dev/experimentsListSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/experimentsListSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/experimentsListSample.js +46 -0
  71. package/dist-esm/samples-dev/experimentsListSample.js.map +1 -0
  72. package/dist-esm/samples-dev/experimentsStartSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/experimentsStartSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/experimentsStartSample.js +31 -0
  75. package/dist-esm/samples-dev/experimentsStartSample.js.map +1 -0
  76. package/dist-esm/samples-dev/targetTypesGetSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/targetTypesGetSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/targetTypesGetSample.js +31 -0
  79. package/dist-esm/samples-dev/targetTypesGetSample.js.map +1 -0
  80. package/dist-esm/samples-dev/targetTypesListSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/targetTypesListSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/targetTypesListSample.js +46 -0
  83. package/dist-esm/samples-dev/targetTypesListSample.js.map +1 -0
  84. package/dist-esm/samples-dev/targetsCreateOrUpdateSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/targetsCreateOrUpdateSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/targetsCreateOrUpdateSample.js +41 -0
  87. package/dist-esm/samples-dev/targetsCreateOrUpdateSample.js.map +1 -0
  88. package/dist-esm/samples-dev/targetsDeleteSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/targetsDeleteSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/targetsDeleteSample.js +34 -0
  91. package/dist-esm/samples-dev/targetsDeleteSample.js.map +1 -0
  92. package/dist-esm/samples-dev/targetsGetSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/targetsGetSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/targetsGetSample.js +34 -0
  95. package/dist-esm/samples-dev/targetsGetSample.js.map +1 -0
  96. package/dist-esm/samples-dev/targetsListSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/targetsListSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/targetsListSample.js +49 -0
  99. package/dist-esm/samples-dev/targetsListSample.js.map +1 -0
  100. package/dist-esm/src/chaosManagementClient.d.ts +25 -0
  101. package/dist-esm/src/chaosManagementClient.d.ts.map +1 -0
  102. package/dist-esm/src/chaosManagementClient.js +108 -0
  103. package/dist-esm/src/chaosManagementClient.js.map +1 -0
  104. package/dist-esm/src/index.d.ts +5 -0
  105. package/dist-esm/src/index.d.ts.map +1 -0
  106. package/dist-esm/src/index.js +12 -0
  107. package/dist-esm/src/index.js.map +1 -0
  108. package/dist-esm/src/models/index.d.ts +980 -0
  109. package/dist-esm/src/models/index.d.ts.map +1 -0
  110. package/dist-esm/src/models/index.js +36 -0
  111. package/dist-esm/src/models/index.js.map +1 -0
  112. package/dist-esm/src/models/mappers.d.ts +50 -0
  113. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  114. package/dist-esm/src/models/mappers.js +1530 -0
  115. package/dist-esm/src/models/mappers.js.map +1 -0
  116. package/dist-esm/src/models/parameters.d.ts +25 -0
  117. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  118. package/dist-esm/src/models/parameters.js +264 -0
  119. package/dist-esm/src/models/parameters.js.map +1 -0
  120. package/dist-esm/src/operations/capabilities.d.ts +81 -0
  121. package/dist-esm/src/operations/capabilities.d.ts.map +1 -0
  122. package/dist-esm/src/operations/capabilities.js +308 -0
  123. package/dist-esm/src/operations/capabilities.js.map +1 -0
  124. package/dist-esm/src/operations/capabilityTypes.d.ts +46 -0
  125. package/dist-esm/src/operations/capabilityTypes.d.ts.map +1 -0
  126. package/dist-esm/src/operations/capabilityTypes.js +169 -0
  127. package/dist-esm/src/operations/capabilityTypes.js.map +1 -0
  128. package/dist-esm/src/operations/experiments.d.ts +153 -0
  129. package/dist-esm/src/operations/experiments.d.ts.map +1 -0
  130. package/dist-esm/src/operations/experiments.js +687 -0
  131. package/dist-esm/src/operations/experiments.js.map +1 -0
  132. package/dist-esm/src/operations/index.d.ts +7 -0
  133. package/dist-esm/src/operations/index.d.ts.map +1 -0
  134. package/dist-esm/src/operations/index.js +14 -0
  135. package/dist-esm/src/operations/index.js.map +1 -0
  136. package/dist-esm/src/operations/operations.d.ts +32 -0
  137. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  138. package/dist-esm/src/operations/operations.js +120 -0
  139. package/dist-esm/src/operations/operations.js.map +1 -0
  140. package/dist-esm/src/operations/targetTypes.d.ts +42 -0
  141. package/dist-esm/src/operations/targetTypes.d.ts.map +1 -0
  142. package/dist-esm/src/operations/targetTypes.js +162 -0
  143. package/dist-esm/src/operations/targetTypes.js.map +1 -0
  144. package/dist-esm/src/operations/targets.d.ts +75 -0
  145. package/dist-esm/src/operations/targets.d.ts.map +1 -0
  146. package/dist-esm/src/operations/targets.js +292 -0
  147. package/dist-esm/src/operations/targets.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/capabilities.d.ts +50 -0
  149. package/dist-esm/src/operationsInterfaces/capabilities.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/capabilities.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/capabilities.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/capabilityTypes.d.ts +21 -0
  153. package/dist-esm/src/operationsInterfaces/capabilityTypes.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/capabilityTypes.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/capabilityTypes.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/experiments.d.ts +83 -0
  157. package/dist-esm/src/operationsInterfaces/experiments.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/experiments.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/experiments.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
  161. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/index.js +14 -0
  163. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  165. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/targetTypes.d.ts +19 -0
  169. package/dist-esm/src/operationsInterfaces/targetTypes.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/targetTypes.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/targetTypes.js.map +1 -0
  172. package/dist-esm/src/operationsInterfaces/targets.d.ts +46 -0
  173. package/dist-esm/src/operationsInterfaces/targets.d.ts.map +1 -0
  174. package/dist-esm/src/operationsInterfaces/targets.js +9 -0
  175. package/dist-esm/src/operationsInterfaces/targets.js.map +1 -0
  176. package/dist-esm/test/chaos_examples.spec.d.ts +4 -0
  177. package/dist-esm/test/chaos_examples.spec.d.ts.map +1 -0
  178. package/dist-esm/test/chaos_examples.spec.js +261 -0
  179. package/dist-esm/test/chaos_examples.spec.js.map +1 -0
  180. package/package.json +120 -0
  181. package/review/arm-chaos.api.md +682 -0
  182. package/rollup.config.js +122 -0
  183. package/src/chaosManagementClient.ts +165 -0
  184. package/src/index.ts +12 -0
  185. package/src/models/index.ts +1111 -0
  186. package/src/models/mappers.ts +1640 -0
  187. package/src/models/parameters.ts +302 -0
  188. package/src/operations/capabilities.ts +435 -0
  189. package/src/operations/capabilityTypes.ts +221 -0
  190. package/src/operations/experiments.ts +892 -0
  191. package/src/operations/index.ts +14 -0
  192. package/src/operations/operations.ts +137 -0
  193. package/src/operations/targetTypes.ts +199 -0
  194. package/src/operations/targets.ts +406 -0
  195. package/src/operationsInterfaces/capabilities.ts +99 -0
  196. package/src/operationsInterfaces/capabilityTypes.ts +44 -0
  197. package/src/operationsInterfaces/experiments.ts +157 -0
  198. package/src/operationsInterfaces/index.ts +14 -0
  199. package/src/operationsInterfaces/operations.ts +22 -0
  200. package/src/operationsInterfaces/targetTypes.ts +40 -0
  201. package/src/operationsInterfaces/targets.ts +91 -0
  202. package/tsconfig.json +33 -0
  203. package/types/arm-chaos.d.ts +1337 -0
  204. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,3725 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
28
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
29
+
30
+ /*
31
+ * Copyright (c) Microsoft Corporation.
32
+ * Licensed under the MIT License.
33
+ *
34
+ * Code generated by Microsoft (R) AutoRest Code Generator.
35
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
36
+ */
37
+ /** Known values of {@link CreatedByType} that the service accepts. */
38
+ exports.KnownCreatedByType = void 0;
39
+ (function (KnownCreatedByType) {
40
+ /** User */
41
+ KnownCreatedByType["User"] = "User";
42
+ /** Application */
43
+ KnownCreatedByType["Application"] = "Application";
44
+ /** ManagedIdentity */
45
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
46
+ /** Key */
47
+ KnownCreatedByType["Key"] = "Key";
48
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
49
+ /** Known values of {@link Origin} that the service accepts. */
50
+ exports.KnownOrigin = void 0;
51
+ (function (KnownOrigin) {
52
+ /** User */
53
+ KnownOrigin["User"] = "user";
54
+ /** System */
55
+ KnownOrigin["System"] = "system";
56
+ /** UserSystem */
57
+ KnownOrigin["UserSystem"] = "user,system";
58
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
59
+ /** Known values of {@link ActionType} that the service accepts. */
60
+ exports.KnownActionType = void 0;
61
+ (function (KnownActionType) {
62
+ /** Internal */
63
+ KnownActionType["Internal"] = "Internal";
64
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
65
+
66
+ /*
67
+ * Copyright (c) Microsoft Corporation.
68
+ * Licensed under the MIT License.
69
+ *
70
+ * Code generated by Microsoft (R) AutoRest Code Generator.
71
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
72
+ */
73
+ const CapabilityListResult = {
74
+ type: {
75
+ name: "Composite",
76
+ className: "CapabilityListResult",
77
+ modelProperties: {
78
+ value: {
79
+ serializedName: "value",
80
+ readOnly: true,
81
+ type: {
82
+ name: "Sequence",
83
+ element: {
84
+ type: {
85
+ name: "Composite",
86
+ className: "Capability"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ nextLink: {
92
+ constraints: {
93
+ MaxLength: 2048
94
+ },
95
+ serializedName: "nextLink",
96
+ readOnly: true,
97
+ nullable: true,
98
+ type: {
99
+ name: "String"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ };
105
+ const SystemData = {
106
+ type: {
107
+ name: "Composite",
108
+ className: "SystemData",
109
+ modelProperties: {
110
+ createdBy: {
111
+ serializedName: "createdBy",
112
+ type: {
113
+ name: "String"
114
+ }
115
+ },
116
+ createdByType: {
117
+ serializedName: "createdByType",
118
+ type: {
119
+ name: "String"
120
+ }
121
+ },
122
+ createdAt: {
123
+ serializedName: "createdAt",
124
+ type: {
125
+ name: "DateTime"
126
+ }
127
+ },
128
+ lastModifiedBy: {
129
+ serializedName: "lastModifiedBy",
130
+ type: {
131
+ name: "String"
132
+ }
133
+ },
134
+ lastModifiedByType: {
135
+ serializedName: "lastModifiedByType",
136
+ type: {
137
+ name: "String"
138
+ }
139
+ },
140
+ lastModifiedAt: {
141
+ serializedName: "lastModifiedAt",
142
+ type: {
143
+ name: "DateTime"
144
+ }
145
+ }
146
+ }
147
+ }
148
+ };
149
+ const Resource = {
150
+ type: {
151
+ name: "Composite",
152
+ className: "Resource",
153
+ modelProperties: {
154
+ id: {
155
+ serializedName: "id",
156
+ readOnly: true,
157
+ type: {
158
+ name: "String"
159
+ }
160
+ },
161
+ name: {
162
+ serializedName: "name",
163
+ readOnly: true,
164
+ type: {
165
+ name: "String"
166
+ }
167
+ },
168
+ type: {
169
+ serializedName: "type",
170
+ readOnly: true,
171
+ type: {
172
+ name: "String"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ };
178
+ const ErrorResponse = {
179
+ type: {
180
+ name: "Composite",
181
+ className: "ErrorResponse",
182
+ modelProperties: {
183
+ error: {
184
+ serializedName: "error",
185
+ type: {
186
+ name: "Composite",
187
+ className: "ErrorDetail"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ };
193
+ const ErrorDetail = {
194
+ type: {
195
+ name: "Composite",
196
+ className: "ErrorDetail",
197
+ modelProperties: {
198
+ code: {
199
+ serializedName: "code",
200
+ readOnly: true,
201
+ type: {
202
+ name: "String"
203
+ }
204
+ },
205
+ message: {
206
+ serializedName: "message",
207
+ readOnly: true,
208
+ type: {
209
+ name: "String"
210
+ }
211
+ },
212
+ target: {
213
+ serializedName: "target",
214
+ readOnly: true,
215
+ type: {
216
+ name: "String"
217
+ }
218
+ },
219
+ details: {
220
+ serializedName: "details",
221
+ readOnly: true,
222
+ type: {
223
+ name: "Sequence",
224
+ element: {
225
+ type: {
226
+ name: "Composite",
227
+ className: "ErrorDetail"
228
+ }
229
+ }
230
+ }
231
+ },
232
+ additionalInfo: {
233
+ serializedName: "additionalInfo",
234
+ readOnly: true,
235
+ type: {
236
+ name: "Sequence",
237
+ element: {
238
+ type: {
239
+ name: "Composite",
240
+ className: "ErrorAdditionalInfo"
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ };
248
+ const ErrorAdditionalInfo = {
249
+ type: {
250
+ name: "Composite",
251
+ className: "ErrorAdditionalInfo",
252
+ modelProperties: {
253
+ type: {
254
+ serializedName: "type",
255
+ readOnly: true,
256
+ type: {
257
+ name: "String"
258
+ }
259
+ },
260
+ info: {
261
+ serializedName: "info",
262
+ readOnly: true,
263
+ type: {
264
+ name: "Dictionary",
265
+ value: { type: { name: "any" } }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ };
271
+ const ExperimentListResult = {
272
+ type: {
273
+ name: "Composite",
274
+ className: "ExperimentListResult",
275
+ modelProperties: {
276
+ value: {
277
+ serializedName: "value",
278
+ readOnly: true,
279
+ type: {
280
+ name: "Sequence",
281
+ element: {
282
+ type: {
283
+ name: "Composite",
284
+ className: "Experiment"
285
+ }
286
+ }
287
+ }
288
+ },
289
+ nextLink: {
290
+ constraints: {
291
+ MaxLength: 2048
292
+ },
293
+ serializedName: "nextLink",
294
+ readOnly: true,
295
+ nullable: true,
296
+ type: {
297
+ name: "String"
298
+ }
299
+ }
300
+ }
301
+ }
302
+ };
303
+ const ResourceIdentity = {
304
+ type: {
305
+ name: "Composite",
306
+ className: "ResourceIdentity",
307
+ modelProperties: {
308
+ type: {
309
+ serializedName: "type",
310
+ required: true,
311
+ type: {
312
+ name: "Enum",
313
+ allowedValues: ["None", "SystemAssigned"]
314
+ }
315
+ },
316
+ principalId: {
317
+ constraints: {
318
+ Pattern: new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
319
+ },
320
+ serializedName: "principalId",
321
+ readOnly: true,
322
+ type: {
323
+ name: "String"
324
+ }
325
+ },
326
+ tenantId: {
327
+ constraints: {
328
+ Pattern: new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
329
+ },
330
+ serializedName: "tenantId",
331
+ readOnly: true,
332
+ type: {
333
+ name: "String"
334
+ }
335
+ }
336
+ }
337
+ }
338
+ };
339
+ const Step = {
340
+ type: {
341
+ name: "Composite",
342
+ className: "Step",
343
+ modelProperties: {
344
+ name: {
345
+ constraints: {
346
+ MinLength: 1
347
+ },
348
+ serializedName: "name",
349
+ required: true,
350
+ type: {
351
+ name: "String"
352
+ }
353
+ },
354
+ branches: {
355
+ constraints: {
356
+ MinItems: 1
357
+ },
358
+ serializedName: "branches",
359
+ required: true,
360
+ type: {
361
+ name: "Sequence",
362
+ element: {
363
+ type: {
364
+ name: "Composite",
365
+ className: "Branch"
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
372
+ };
373
+ const Branch = {
374
+ type: {
375
+ name: "Composite",
376
+ className: "Branch",
377
+ modelProperties: {
378
+ name: {
379
+ constraints: {
380
+ MinLength: 1
381
+ },
382
+ serializedName: "name",
383
+ required: true,
384
+ type: {
385
+ name: "String"
386
+ }
387
+ },
388
+ actions: {
389
+ constraints: {
390
+ MinItems: 1
391
+ },
392
+ serializedName: "actions",
393
+ required: true,
394
+ type: {
395
+ name: "Sequence",
396
+ element: {
397
+ type: {
398
+ name: "Composite",
399
+ className: "Action"
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+ };
407
+ const Action = {
408
+ type: {
409
+ name: "Composite",
410
+ className: "Action",
411
+ uberParent: "Action",
412
+ polymorphicDiscriminator: {
413
+ serializedName: "type",
414
+ clientName: "type"
415
+ },
416
+ modelProperties: {
417
+ type: {
418
+ serializedName: "type",
419
+ required: true,
420
+ type: {
421
+ name: "String"
422
+ }
423
+ },
424
+ name: {
425
+ constraints: {
426
+ MaxLength: 2048
427
+ },
428
+ serializedName: "name",
429
+ required: true,
430
+ type: {
431
+ name: "String"
432
+ }
433
+ }
434
+ }
435
+ }
436
+ };
437
+ const Selector = {
438
+ type: {
439
+ name: "Composite",
440
+ className: "Selector",
441
+ modelProperties: {
442
+ type: {
443
+ serializedName: "type",
444
+ required: true,
445
+ type: {
446
+ name: "Enum",
447
+ allowedValues: ["Percent", "Random", "Tag", "List"]
448
+ }
449
+ },
450
+ id: {
451
+ constraints: {
452
+ MinLength: 1
453
+ },
454
+ serializedName: "id",
455
+ required: true,
456
+ type: {
457
+ name: "String"
458
+ }
459
+ },
460
+ targets: {
461
+ constraints: {
462
+ MinItems: 1
463
+ },
464
+ serializedName: "targets",
465
+ required: true,
466
+ type: {
467
+ name: "Sequence",
468
+ element: {
469
+ type: {
470
+ name: "Composite",
471
+ className: "TargetReference"
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
478
+ };
479
+ const TargetReference = {
480
+ type: {
481
+ name: "Composite",
482
+ className: "TargetReference",
483
+ modelProperties: {
484
+ type: {
485
+ defaultValue: "ChaosTarget",
486
+ isConstant: true,
487
+ serializedName: "type",
488
+ type: {
489
+ name: "String"
490
+ }
491
+ },
492
+ id: {
493
+ constraints: {
494
+ Pattern: new RegExp("^\\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\\/[a-zA-Z0-9_\\-\\.\\(\\)]*[a-zA-Z0-9_\\-\\(\\)]\\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\\/[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\/[a-zA-Z0-9_\\-\\.]+\\/[a-zA-Z0-9_\\-\\.]+\\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\\.[Cc][Hh][Aa][Oo][Ss]\\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\\/[a-zA-Z0-9_\\-\\.]+$")
495
+ },
496
+ serializedName: "id",
497
+ required: true,
498
+ type: {
499
+ name: "String"
500
+ }
501
+ }
502
+ }
503
+ }
504
+ };
505
+ const ExperimentCancelOperationResult = {
506
+ type: {
507
+ name: "Composite",
508
+ className: "ExperimentCancelOperationResult",
509
+ modelProperties: {
510
+ name: {
511
+ serializedName: "name",
512
+ readOnly: true,
513
+ type: {
514
+ name: "String"
515
+ }
516
+ },
517
+ statusUrl: {
518
+ constraints: {
519
+ MaxLength: 2048
520
+ },
521
+ serializedName: "statusUrl",
522
+ readOnly: true,
523
+ type: {
524
+ name: "String"
525
+ }
526
+ }
527
+ }
528
+ }
529
+ };
530
+ const ExperimentStartOperationResult = {
531
+ type: {
532
+ name: "Composite",
533
+ className: "ExperimentStartOperationResult",
534
+ modelProperties: {
535
+ name: {
536
+ serializedName: "name",
537
+ readOnly: true,
538
+ type: {
539
+ name: "String"
540
+ }
541
+ },
542
+ statusUrl: {
543
+ constraints: {
544
+ MaxLength: 2048
545
+ },
546
+ serializedName: "statusUrl",
547
+ readOnly: true,
548
+ type: {
549
+ name: "String"
550
+ }
551
+ }
552
+ }
553
+ }
554
+ };
555
+ const ExperimentStatusListResult = {
556
+ type: {
557
+ name: "Composite",
558
+ className: "ExperimentStatusListResult",
559
+ modelProperties: {
560
+ value: {
561
+ serializedName: "value",
562
+ readOnly: true,
563
+ type: {
564
+ name: "Sequence",
565
+ element: {
566
+ type: {
567
+ name: "Composite",
568
+ className: "ExperimentStatus"
569
+ }
570
+ }
571
+ }
572
+ },
573
+ nextLink: {
574
+ constraints: {
575
+ MaxLength: 2048
576
+ },
577
+ serializedName: "nextLink",
578
+ readOnly: true,
579
+ nullable: true,
580
+ type: {
581
+ name: "String"
582
+ }
583
+ }
584
+ }
585
+ }
586
+ };
587
+ const ExperimentStatus = {
588
+ type: {
589
+ name: "Composite",
590
+ className: "ExperimentStatus",
591
+ modelProperties: {
592
+ type: {
593
+ serializedName: "type",
594
+ readOnly: true,
595
+ type: {
596
+ name: "String"
597
+ }
598
+ },
599
+ id: {
600
+ serializedName: "id",
601
+ readOnly: true,
602
+ type: {
603
+ name: "String"
604
+ }
605
+ },
606
+ name: {
607
+ serializedName: "name",
608
+ readOnly: true,
609
+ type: {
610
+ name: "String"
611
+ }
612
+ },
613
+ status: {
614
+ serializedName: "properties.status",
615
+ readOnly: true,
616
+ type: {
617
+ name: "String"
618
+ }
619
+ },
620
+ createdDateUtc: {
621
+ serializedName: "properties.createdDateUtc",
622
+ readOnly: true,
623
+ type: {
624
+ name: "DateTime"
625
+ }
626
+ },
627
+ endDateUtc: {
628
+ serializedName: "properties.endDateUtc",
629
+ readOnly: true,
630
+ nullable: true,
631
+ type: {
632
+ name: "DateTime"
633
+ }
634
+ }
635
+ }
636
+ }
637
+ };
638
+ const ExperimentExecutionDetailsListResult = {
639
+ type: {
640
+ name: "Composite",
641
+ className: "ExperimentExecutionDetailsListResult",
642
+ modelProperties: {
643
+ value: {
644
+ serializedName: "value",
645
+ readOnly: true,
646
+ type: {
647
+ name: "Sequence",
648
+ element: {
649
+ type: {
650
+ name: "Composite",
651
+ className: "ExperimentExecutionDetails"
652
+ }
653
+ }
654
+ }
655
+ },
656
+ nextLink: {
657
+ constraints: {
658
+ MaxLength: 2048
659
+ },
660
+ serializedName: "nextLink",
661
+ readOnly: true,
662
+ nullable: true,
663
+ type: {
664
+ name: "String"
665
+ }
666
+ }
667
+ }
668
+ }
669
+ };
670
+ const ExperimentExecutionDetails = {
671
+ type: {
672
+ name: "Composite",
673
+ className: "ExperimentExecutionDetails",
674
+ modelProperties: {
675
+ type: {
676
+ serializedName: "type",
677
+ readOnly: true,
678
+ type: {
679
+ name: "String"
680
+ }
681
+ },
682
+ id: {
683
+ serializedName: "id",
684
+ readOnly: true,
685
+ type: {
686
+ name: "String"
687
+ }
688
+ },
689
+ name: {
690
+ serializedName: "name",
691
+ readOnly: true,
692
+ type: {
693
+ name: "String"
694
+ }
695
+ },
696
+ experimentId: {
697
+ serializedName: "properties.experimentId",
698
+ readOnly: true,
699
+ type: {
700
+ name: "String"
701
+ }
702
+ },
703
+ status: {
704
+ serializedName: "properties.status",
705
+ readOnly: true,
706
+ type: {
707
+ name: "String"
708
+ }
709
+ },
710
+ failureReason: {
711
+ serializedName: "properties.failureReason",
712
+ readOnly: true,
713
+ type: {
714
+ name: "String"
715
+ }
716
+ },
717
+ createdDateTime: {
718
+ serializedName: "properties.createdDateTime",
719
+ readOnly: true,
720
+ type: {
721
+ name: "DateTime"
722
+ }
723
+ },
724
+ lastActionDateTime: {
725
+ serializedName: "properties.lastActionDateTime",
726
+ readOnly: true,
727
+ type: {
728
+ name: "DateTime"
729
+ }
730
+ },
731
+ startDateTime: {
732
+ serializedName: "properties.startDateTime",
733
+ readOnly: true,
734
+ type: {
735
+ name: "DateTime"
736
+ }
737
+ },
738
+ stopDateTime: {
739
+ serializedName: "properties.stopDateTime",
740
+ readOnly: true,
741
+ type: {
742
+ name: "DateTime"
743
+ }
744
+ },
745
+ runInformation: {
746
+ serializedName: "properties.runInformation",
747
+ type: {
748
+ name: "Composite",
749
+ className: "ExperimentExecutionDetailsPropertiesRunInformation"
750
+ }
751
+ }
752
+ }
753
+ }
754
+ };
755
+ const ExperimentExecutionDetailsPropertiesRunInformation = {
756
+ type: {
757
+ name: "Composite",
758
+ className: "ExperimentExecutionDetailsPropertiesRunInformation",
759
+ modelProperties: {
760
+ steps: {
761
+ serializedName: "steps",
762
+ readOnly: true,
763
+ type: {
764
+ name: "Sequence",
765
+ element: {
766
+ type: {
767
+ name: "Composite",
768
+ className: "StepStatus"
769
+ }
770
+ }
771
+ }
772
+ }
773
+ }
774
+ }
775
+ };
776
+ const StepStatus = {
777
+ type: {
778
+ name: "Composite",
779
+ className: "StepStatus",
780
+ modelProperties: {
781
+ stepName: {
782
+ serializedName: "stepName",
783
+ readOnly: true,
784
+ type: {
785
+ name: "String"
786
+ }
787
+ },
788
+ stepId: {
789
+ serializedName: "stepId",
790
+ readOnly: true,
791
+ type: {
792
+ name: "String"
793
+ }
794
+ },
795
+ status: {
796
+ serializedName: "status",
797
+ readOnly: true,
798
+ type: {
799
+ name: "String"
800
+ }
801
+ },
802
+ branches: {
803
+ serializedName: "branches",
804
+ readOnly: true,
805
+ type: {
806
+ name: "Sequence",
807
+ element: {
808
+ type: {
809
+ name: "Composite",
810
+ className: "BranchStatus"
811
+ }
812
+ }
813
+ }
814
+ }
815
+ }
816
+ }
817
+ };
818
+ const BranchStatus = {
819
+ type: {
820
+ name: "Composite",
821
+ className: "BranchStatus",
822
+ modelProperties: {
823
+ branchName: {
824
+ serializedName: "branchName",
825
+ readOnly: true,
826
+ type: {
827
+ name: "String"
828
+ }
829
+ },
830
+ branchId: {
831
+ serializedName: "branchId",
832
+ readOnly: true,
833
+ type: {
834
+ name: "String"
835
+ }
836
+ },
837
+ status: {
838
+ serializedName: "status",
839
+ readOnly: true,
840
+ type: {
841
+ name: "String"
842
+ }
843
+ },
844
+ actions: {
845
+ serializedName: "actions",
846
+ readOnly: true,
847
+ type: {
848
+ name: "Sequence",
849
+ element: {
850
+ type: {
851
+ name: "Composite",
852
+ className: "ActionStatus"
853
+ }
854
+ }
855
+ }
856
+ }
857
+ }
858
+ }
859
+ };
860
+ const ActionStatus = {
861
+ type: {
862
+ name: "Composite",
863
+ className: "ActionStatus",
864
+ modelProperties: {
865
+ actionName: {
866
+ serializedName: "actionName",
867
+ readOnly: true,
868
+ type: {
869
+ name: "String"
870
+ }
871
+ },
872
+ actionId: {
873
+ serializedName: "actionId",
874
+ readOnly: true,
875
+ type: {
876
+ name: "String"
877
+ }
878
+ },
879
+ status: {
880
+ serializedName: "status",
881
+ readOnly: true,
882
+ type: {
883
+ name: "String"
884
+ }
885
+ },
886
+ startTime: {
887
+ serializedName: "startTime",
888
+ readOnly: true,
889
+ type: {
890
+ name: "DateTime"
891
+ }
892
+ },
893
+ endTime: {
894
+ serializedName: "endTime",
895
+ readOnly: true,
896
+ type: {
897
+ name: "DateTime"
898
+ }
899
+ },
900
+ targets: {
901
+ serializedName: "targets",
902
+ readOnly: true,
903
+ type: {
904
+ name: "Sequence",
905
+ element: {
906
+ type: {
907
+ name: "Composite",
908
+ className: "ExperimentExecutionActionTargetDetailsProperties"
909
+ }
910
+ }
911
+ }
912
+ }
913
+ }
914
+ }
915
+ };
916
+ const ExperimentExecutionActionTargetDetailsProperties = {
917
+ type: {
918
+ name: "Composite",
919
+ className: "ExperimentExecutionActionTargetDetailsProperties",
920
+ modelProperties: {
921
+ status: {
922
+ serializedName: "status",
923
+ readOnly: true,
924
+ type: {
925
+ name: "String"
926
+ }
927
+ },
928
+ target: {
929
+ serializedName: "target",
930
+ readOnly: true,
931
+ type: {
932
+ name: "String"
933
+ }
934
+ },
935
+ targetFailedTime: {
936
+ serializedName: "targetFailedTime",
937
+ readOnly: true,
938
+ nullable: true,
939
+ type: {
940
+ name: "DateTime"
941
+ }
942
+ },
943
+ targetCompletedTime: {
944
+ serializedName: "targetCompletedTime",
945
+ readOnly: true,
946
+ nullable: true,
947
+ type: {
948
+ name: "DateTime"
949
+ }
950
+ },
951
+ error: {
952
+ serializedName: "error",
953
+ type: {
954
+ name: "Composite",
955
+ className: "ExperimentExecutionActionTargetDetailsError"
956
+ }
957
+ }
958
+ }
959
+ }
960
+ };
961
+ const ExperimentExecutionActionTargetDetailsError = {
962
+ type: {
963
+ name: "Composite",
964
+ className: "ExperimentExecutionActionTargetDetailsError",
965
+ modelProperties: {
966
+ code: {
967
+ serializedName: "code",
968
+ readOnly: true,
969
+ type: {
970
+ name: "String"
971
+ }
972
+ },
973
+ message: {
974
+ serializedName: "message",
975
+ readOnly: true,
976
+ type: {
977
+ name: "String"
978
+ }
979
+ }
980
+ }
981
+ }
982
+ };
983
+ const OperationListResult = {
984
+ type: {
985
+ name: "Composite",
986
+ className: "OperationListResult",
987
+ modelProperties: {
988
+ value: {
989
+ serializedName: "value",
990
+ readOnly: true,
991
+ type: {
992
+ name: "Sequence",
993
+ element: {
994
+ type: {
995
+ name: "Composite",
996
+ className: "Operation"
997
+ }
998
+ }
999
+ }
1000
+ },
1001
+ nextLink: {
1002
+ serializedName: "nextLink",
1003
+ readOnly: true,
1004
+ type: {
1005
+ name: "String"
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ };
1011
+ const Operation = {
1012
+ type: {
1013
+ name: "Composite",
1014
+ className: "Operation",
1015
+ modelProperties: {
1016
+ name: {
1017
+ serializedName: "name",
1018
+ readOnly: true,
1019
+ type: {
1020
+ name: "String"
1021
+ }
1022
+ },
1023
+ isDataAction: {
1024
+ serializedName: "isDataAction",
1025
+ readOnly: true,
1026
+ type: {
1027
+ name: "Boolean"
1028
+ }
1029
+ },
1030
+ display: {
1031
+ serializedName: "display",
1032
+ type: {
1033
+ name: "Composite",
1034
+ className: "OperationDisplay"
1035
+ }
1036
+ },
1037
+ origin: {
1038
+ serializedName: "origin",
1039
+ readOnly: true,
1040
+ type: {
1041
+ name: "String"
1042
+ }
1043
+ },
1044
+ actionType: {
1045
+ serializedName: "actionType",
1046
+ readOnly: true,
1047
+ type: {
1048
+ name: "String"
1049
+ }
1050
+ }
1051
+ }
1052
+ }
1053
+ };
1054
+ const OperationDisplay = {
1055
+ type: {
1056
+ name: "Composite",
1057
+ className: "OperationDisplay",
1058
+ modelProperties: {
1059
+ provider: {
1060
+ serializedName: "provider",
1061
+ readOnly: true,
1062
+ type: {
1063
+ name: "String"
1064
+ }
1065
+ },
1066
+ resource: {
1067
+ serializedName: "resource",
1068
+ readOnly: true,
1069
+ type: {
1070
+ name: "String"
1071
+ }
1072
+ },
1073
+ operation: {
1074
+ serializedName: "operation",
1075
+ readOnly: true,
1076
+ type: {
1077
+ name: "String"
1078
+ }
1079
+ },
1080
+ description: {
1081
+ serializedName: "description",
1082
+ readOnly: true,
1083
+ type: {
1084
+ name: "String"
1085
+ }
1086
+ }
1087
+ }
1088
+ }
1089
+ };
1090
+ const TargetListResult = {
1091
+ type: {
1092
+ name: "Composite",
1093
+ className: "TargetListResult",
1094
+ modelProperties: {
1095
+ value: {
1096
+ serializedName: "value",
1097
+ readOnly: true,
1098
+ type: {
1099
+ name: "Sequence",
1100
+ element: {
1101
+ type: {
1102
+ name: "Composite",
1103
+ className: "Target"
1104
+ }
1105
+ }
1106
+ }
1107
+ },
1108
+ nextLink: {
1109
+ constraints: {
1110
+ MaxLength: 2048
1111
+ },
1112
+ serializedName: "nextLink",
1113
+ readOnly: true,
1114
+ nullable: true,
1115
+ type: {
1116
+ name: "String"
1117
+ }
1118
+ }
1119
+ }
1120
+ }
1121
+ };
1122
+ const TargetTypeListResult = {
1123
+ type: {
1124
+ name: "Composite",
1125
+ className: "TargetTypeListResult",
1126
+ modelProperties: {
1127
+ value: {
1128
+ serializedName: "value",
1129
+ readOnly: true,
1130
+ type: {
1131
+ name: "Sequence",
1132
+ element: {
1133
+ type: {
1134
+ name: "Composite",
1135
+ className: "TargetType"
1136
+ }
1137
+ }
1138
+ }
1139
+ },
1140
+ nextLink: {
1141
+ constraints: {
1142
+ MaxLength: 2048
1143
+ },
1144
+ serializedName: "nextLink",
1145
+ readOnly: true,
1146
+ nullable: true,
1147
+ type: {
1148
+ name: "String"
1149
+ }
1150
+ }
1151
+ }
1152
+ }
1153
+ };
1154
+ const CapabilityTypeListResult = {
1155
+ type: {
1156
+ name: "Composite",
1157
+ className: "CapabilityTypeListResult",
1158
+ modelProperties: {
1159
+ value: {
1160
+ serializedName: "value",
1161
+ readOnly: true,
1162
+ type: {
1163
+ name: "Sequence",
1164
+ element: {
1165
+ type: {
1166
+ name: "Composite",
1167
+ className: "CapabilityType"
1168
+ }
1169
+ }
1170
+ }
1171
+ },
1172
+ nextLink: {
1173
+ constraints: {
1174
+ MaxLength: 2048
1175
+ },
1176
+ serializedName: "nextLink",
1177
+ readOnly: true,
1178
+ nullable: true,
1179
+ type: {
1180
+ name: "String"
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ };
1186
+ const CapabilityTypePropertiesRuntimeProperties = {
1187
+ type: {
1188
+ name: "Composite",
1189
+ className: "CapabilityTypePropertiesRuntimeProperties",
1190
+ modelProperties: {
1191
+ kind: {
1192
+ serializedName: "kind",
1193
+ readOnly: true,
1194
+ type: {
1195
+ name: "String"
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ };
1201
+ const KeyValuePair = {
1202
+ type: {
1203
+ name: "Composite",
1204
+ className: "KeyValuePair",
1205
+ modelProperties: {
1206
+ key: {
1207
+ constraints: {
1208
+ MinLength: 1
1209
+ },
1210
+ serializedName: "key",
1211
+ required: true,
1212
+ type: {
1213
+ name: "String"
1214
+ }
1215
+ },
1216
+ value: {
1217
+ constraints: {
1218
+ MinLength: 1
1219
+ },
1220
+ serializedName: "value",
1221
+ required: true,
1222
+ type: {
1223
+ name: "String"
1224
+ }
1225
+ }
1226
+ }
1227
+ }
1228
+ };
1229
+ const Capability = {
1230
+ type: {
1231
+ name: "Composite",
1232
+ className: "Capability",
1233
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
1234
+ serializedName: "systemData",
1235
+ type: {
1236
+ name: "Composite",
1237
+ className: "SystemData"
1238
+ }
1239
+ }, publisher: {
1240
+ serializedName: "properties.publisher",
1241
+ readOnly: true,
1242
+ type: {
1243
+ name: "String"
1244
+ }
1245
+ }, targetType: {
1246
+ serializedName: "properties.targetType",
1247
+ readOnly: true,
1248
+ type: {
1249
+ name: "String"
1250
+ }
1251
+ }, description: {
1252
+ serializedName: "properties.description",
1253
+ readOnly: true,
1254
+ type: {
1255
+ name: "String"
1256
+ }
1257
+ }, parametersSchema: {
1258
+ constraints: {
1259
+ MaxLength: 2048
1260
+ },
1261
+ serializedName: "properties.parametersSchema",
1262
+ readOnly: true,
1263
+ type: {
1264
+ name: "String"
1265
+ }
1266
+ }, urn: {
1267
+ constraints: {
1268
+ MaxLength: 2048
1269
+ },
1270
+ serializedName: "properties.urn",
1271
+ readOnly: true,
1272
+ type: {
1273
+ name: "String"
1274
+ }
1275
+ } })
1276
+ }
1277
+ };
1278
+ const TrackedResource = {
1279
+ type: {
1280
+ name: "Composite",
1281
+ className: "TrackedResource",
1282
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1283
+ serializedName: "tags",
1284
+ type: {
1285
+ name: "Dictionary",
1286
+ value: { type: { name: "String" } }
1287
+ }
1288
+ }, location: {
1289
+ serializedName: "location",
1290
+ required: true,
1291
+ type: {
1292
+ name: "String"
1293
+ }
1294
+ } })
1295
+ }
1296
+ };
1297
+ const Target = {
1298
+ type: {
1299
+ name: "Composite",
1300
+ className: "Target",
1301
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
1302
+ serializedName: "systemData",
1303
+ type: {
1304
+ name: "Composite",
1305
+ className: "SystemData"
1306
+ }
1307
+ }, location: {
1308
+ serializedName: "location",
1309
+ type: {
1310
+ name: "String"
1311
+ }
1312
+ }, properties: {
1313
+ serializedName: "properties",
1314
+ required: true,
1315
+ type: {
1316
+ name: "Dictionary",
1317
+ value: { type: { name: "any" } }
1318
+ }
1319
+ } })
1320
+ }
1321
+ };
1322
+ const TargetType = {
1323
+ type: {
1324
+ name: "Composite",
1325
+ className: "TargetType",
1326
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
1327
+ serializedName: "systemData",
1328
+ type: {
1329
+ name: "Composite",
1330
+ className: "SystemData"
1331
+ }
1332
+ }, location: {
1333
+ serializedName: "location",
1334
+ type: {
1335
+ name: "String"
1336
+ }
1337
+ }, displayName: {
1338
+ serializedName: "properties.displayName",
1339
+ readOnly: true,
1340
+ type: {
1341
+ name: "String"
1342
+ }
1343
+ }, description: {
1344
+ serializedName: "properties.description",
1345
+ readOnly: true,
1346
+ type: {
1347
+ name: "String"
1348
+ }
1349
+ }, propertiesSchema: {
1350
+ constraints: {
1351
+ MaxLength: 2048
1352
+ },
1353
+ serializedName: "properties.propertiesSchema",
1354
+ readOnly: true,
1355
+ type: {
1356
+ name: "String"
1357
+ }
1358
+ }, resourceTypes: {
1359
+ serializedName: "properties.resourceTypes",
1360
+ readOnly: true,
1361
+ type: {
1362
+ name: "Sequence",
1363
+ element: {
1364
+ type: {
1365
+ name: "String"
1366
+ }
1367
+ }
1368
+ }
1369
+ } })
1370
+ }
1371
+ };
1372
+ const CapabilityType = {
1373
+ type: {
1374
+ name: "Composite",
1375
+ className: "CapabilityType",
1376
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { systemData: {
1377
+ serializedName: "systemData",
1378
+ type: {
1379
+ name: "Composite",
1380
+ className: "SystemData"
1381
+ }
1382
+ }, location: {
1383
+ serializedName: "location",
1384
+ type: {
1385
+ name: "String"
1386
+ }
1387
+ }, publisher: {
1388
+ serializedName: "properties.publisher",
1389
+ readOnly: true,
1390
+ type: {
1391
+ name: "String"
1392
+ }
1393
+ }, targetType: {
1394
+ serializedName: "properties.targetType",
1395
+ readOnly: true,
1396
+ type: {
1397
+ name: "String"
1398
+ }
1399
+ }, displayName: {
1400
+ serializedName: "properties.displayName",
1401
+ readOnly: true,
1402
+ type: {
1403
+ name: "String"
1404
+ }
1405
+ }, description: {
1406
+ serializedName: "properties.description",
1407
+ readOnly: true,
1408
+ type: {
1409
+ name: "String"
1410
+ }
1411
+ }, parametersSchema: {
1412
+ constraints: {
1413
+ MaxLength: 2048
1414
+ },
1415
+ serializedName: "properties.parametersSchema",
1416
+ readOnly: true,
1417
+ type: {
1418
+ name: "String"
1419
+ }
1420
+ }, urn: {
1421
+ constraints: {
1422
+ MaxLength: 2048
1423
+ },
1424
+ serializedName: "properties.urn",
1425
+ readOnly: true,
1426
+ type: {
1427
+ name: "String"
1428
+ }
1429
+ }, kind: {
1430
+ serializedName: "properties.kind",
1431
+ readOnly: true,
1432
+ type: {
1433
+ name: "String"
1434
+ }
1435
+ }, runtimeProperties: {
1436
+ serializedName: "properties.runtimeProperties",
1437
+ type: {
1438
+ name: "Composite",
1439
+ className: "CapabilityTypePropertiesRuntimeProperties"
1440
+ }
1441
+ } })
1442
+ }
1443
+ };
1444
+ const DelayAction = {
1445
+ serializedName: "delay",
1446
+ type: {
1447
+ name: "Composite",
1448
+ className: "DelayAction",
1449
+ uberParent: "Action",
1450
+ polymorphicDiscriminator: Action.type.polymorphicDiscriminator,
1451
+ modelProperties: Object.assign(Object.assign({}, Action.type.modelProperties), { duration: {
1452
+ constraints: {
1453
+ Pattern: new RegExp("^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$")
1454
+ },
1455
+ serializedName: "duration",
1456
+ required: true,
1457
+ type: {
1458
+ name: "String"
1459
+ }
1460
+ } })
1461
+ }
1462
+ };
1463
+ const DiscreteAction = {
1464
+ serializedName: "discrete",
1465
+ type: {
1466
+ name: "Composite",
1467
+ className: "DiscreteAction",
1468
+ uberParent: "Action",
1469
+ polymorphicDiscriminator: Action.type.polymorphicDiscriminator,
1470
+ modelProperties: Object.assign(Object.assign({}, Action.type.modelProperties), { parameters: {
1471
+ serializedName: "parameters",
1472
+ required: true,
1473
+ type: {
1474
+ name: "Sequence",
1475
+ element: {
1476
+ type: {
1477
+ name: "Composite",
1478
+ className: "KeyValuePair"
1479
+ }
1480
+ }
1481
+ }
1482
+ }, selectorId: {
1483
+ constraints: {
1484
+ MinLength: 1
1485
+ },
1486
+ serializedName: "selectorId",
1487
+ required: true,
1488
+ type: {
1489
+ name: "String"
1490
+ }
1491
+ } })
1492
+ }
1493
+ };
1494
+ const ContinuousAction = {
1495
+ serializedName: "continuous",
1496
+ type: {
1497
+ name: "Composite",
1498
+ className: "ContinuousAction",
1499
+ uberParent: "Action",
1500
+ polymorphicDiscriminator: Action.type.polymorphicDiscriminator,
1501
+ modelProperties: Object.assign(Object.assign({}, Action.type.modelProperties), { duration: {
1502
+ constraints: {
1503
+ Pattern: new RegExp("^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$")
1504
+ },
1505
+ serializedName: "duration",
1506
+ required: true,
1507
+ type: {
1508
+ name: "String"
1509
+ }
1510
+ }, parameters: {
1511
+ serializedName: "parameters",
1512
+ required: true,
1513
+ type: {
1514
+ name: "Sequence",
1515
+ element: {
1516
+ type: {
1517
+ name: "Composite",
1518
+ className: "KeyValuePair"
1519
+ }
1520
+ }
1521
+ }
1522
+ }, selectorId: {
1523
+ constraints: {
1524
+ MinLength: 1
1525
+ },
1526
+ serializedName: "selectorId",
1527
+ required: true,
1528
+ type: {
1529
+ name: "String"
1530
+ }
1531
+ } })
1532
+ }
1533
+ };
1534
+ const Experiment = {
1535
+ type: {
1536
+ name: "Composite",
1537
+ className: "Experiment",
1538
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
1539
+ serializedName: "systemData",
1540
+ type: {
1541
+ name: "Composite",
1542
+ className: "SystemData"
1543
+ }
1544
+ }, identity: {
1545
+ serializedName: "identity",
1546
+ type: {
1547
+ name: "Composite",
1548
+ className: "ResourceIdentity"
1549
+ }
1550
+ }, steps: {
1551
+ constraints: {
1552
+ MinItems: 1
1553
+ },
1554
+ serializedName: "properties.steps",
1555
+ required: true,
1556
+ type: {
1557
+ name: "Sequence",
1558
+ element: {
1559
+ type: {
1560
+ name: "Composite",
1561
+ className: "Step"
1562
+ }
1563
+ }
1564
+ }
1565
+ }, selectors: {
1566
+ constraints: {
1567
+ MinItems: 1
1568
+ },
1569
+ serializedName: "properties.selectors",
1570
+ required: true,
1571
+ type: {
1572
+ name: "Sequence",
1573
+ element: {
1574
+ type: {
1575
+ name: "Composite",
1576
+ className: "Selector"
1577
+ }
1578
+ }
1579
+ }
1580
+ }, startOnCreation: {
1581
+ serializedName: "properties.startOnCreation",
1582
+ nullable: true,
1583
+ type: {
1584
+ name: "Boolean"
1585
+ }
1586
+ } })
1587
+ }
1588
+ };
1589
+ let discriminators = {
1590
+ Action: Action,
1591
+ "Action.delay": DelayAction,
1592
+ "Action.discrete": DiscreteAction,
1593
+ "Action.continuous": ContinuousAction
1594
+ };
1595
+
1596
+ var Mappers = /*#__PURE__*/Object.freeze({
1597
+ __proto__: null,
1598
+ CapabilityListResult: CapabilityListResult,
1599
+ SystemData: SystemData,
1600
+ Resource: Resource,
1601
+ ErrorResponse: ErrorResponse,
1602
+ ErrorDetail: ErrorDetail,
1603
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1604
+ ExperimentListResult: ExperimentListResult,
1605
+ ResourceIdentity: ResourceIdentity,
1606
+ Step: Step,
1607
+ Branch: Branch,
1608
+ Action: Action,
1609
+ Selector: Selector,
1610
+ TargetReference: TargetReference,
1611
+ ExperimentCancelOperationResult: ExperimentCancelOperationResult,
1612
+ ExperimentStartOperationResult: ExperimentStartOperationResult,
1613
+ ExperimentStatusListResult: ExperimentStatusListResult,
1614
+ ExperimentStatus: ExperimentStatus,
1615
+ ExperimentExecutionDetailsListResult: ExperimentExecutionDetailsListResult,
1616
+ ExperimentExecutionDetails: ExperimentExecutionDetails,
1617
+ ExperimentExecutionDetailsPropertiesRunInformation: ExperimentExecutionDetailsPropertiesRunInformation,
1618
+ StepStatus: StepStatus,
1619
+ BranchStatus: BranchStatus,
1620
+ ActionStatus: ActionStatus,
1621
+ ExperimentExecutionActionTargetDetailsProperties: ExperimentExecutionActionTargetDetailsProperties,
1622
+ ExperimentExecutionActionTargetDetailsError: ExperimentExecutionActionTargetDetailsError,
1623
+ OperationListResult: OperationListResult,
1624
+ Operation: Operation,
1625
+ OperationDisplay: OperationDisplay,
1626
+ TargetListResult: TargetListResult,
1627
+ TargetTypeListResult: TargetTypeListResult,
1628
+ CapabilityTypeListResult: CapabilityTypeListResult,
1629
+ CapabilityTypePropertiesRuntimeProperties: CapabilityTypePropertiesRuntimeProperties,
1630
+ KeyValuePair: KeyValuePair,
1631
+ Capability: Capability,
1632
+ TrackedResource: TrackedResource,
1633
+ Target: Target,
1634
+ TargetType: TargetType,
1635
+ CapabilityType: CapabilityType,
1636
+ DelayAction: DelayAction,
1637
+ DiscreteAction: DiscreteAction,
1638
+ ContinuousAction: ContinuousAction,
1639
+ Experiment: Experiment,
1640
+ discriminators: discriminators
1641
+ });
1642
+
1643
+ /*
1644
+ * Copyright (c) Microsoft Corporation.
1645
+ * Licensed under the MIT License.
1646
+ *
1647
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1648
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1649
+ */
1650
+ const accept = {
1651
+ parameterPath: "accept",
1652
+ mapper: {
1653
+ defaultValue: "application/json",
1654
+ isConstant: true,
1655
+ serializedName: "Accept",
1656
+ type: {
1657
+ name: "String"
1658
+ }
1659
+ }
1660
+ };
1661
+ const $host = {
1662
+ parameterPath: "$host",
1663
+ mapper: {
1664
+ serializedName: "$host",
1665
+ required: true,
1666
+ type: {
1667
+ name: "String"
1668
+ }
1669
+ },
1670
+ skipEncoding: true
1671
+ };
1672
+ const apiVersion = {
1673
+ parameterPath: "apiVersion",
1674
+ mapper: {
1675
+ defaultValue: "2022-07-01-preview",
1676
+ isConstant: true,
1677
+ serializedName: "api-version",
1678
+ type: {
1679
+ name: "String"
1680
+ }
1681
+ }
1682
+ };
1683
+ const subscriptionId = {
1684
+ parameterPath: "subscriptionId",
1685
+ mapper: {
1686
+ constraints: {
1687
+ Pattern: new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
1688
+ },
1689
+ serializedName: "subscriptionId",
1690
+ required: true,
1691
+ type: {
1692
+ name: "String"
1693
+ }
1694
+ }
1695
+ };
1696
+ const resourceGroupName = {
1697
+ parameterPath: "resourceGroupName",
1698
+ mapper: {
1699
+ constraints: {
1700
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.\\(\\)]*[a-zA-Z0-9_\\-\\(\\)]$")
1701
+ },
1702
+ serializedName: "resourceGroupName",
1703
+ required: true,
1704
+ type: {
1705
+ name: "String"
1706
+ }
1707
+ }
1708
+ };
1709
+ const parentProviderNamespace = {
1710
+ parameterPath: "parentProviderNamespace",
1711
+ mapper: {
1712
+ constraints: {
1713
+ Pattern: new RegExp("^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+$")
1714
+ },
1715
+ serializedName: "parentProviderNamespace",
1716
+ required: true,
1717
+ type: {
1718
+ name: "String"
1719
+ }
1720
+ }
1721
+ };
1722
+ const parentResourceType = {
1723
+ parameterPath: "parentResourceType",
1724
+ mapper: {
1725
+ constraints: {
1726
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
1727
+ },
1728
+ serializedName: "parentResourceType",
1729
+ required: true,
1730
+ type: {
1731
+ name: "String"
1732
+ }
1733
+ }
1734
+ };
1735
+ const parentResourceName = {
1736
+ parameterPath: "parentResourceName",
1737
+ mapper: {
1738
+ constraints: {
1739
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
1740
+ },
1741
+ serializedName: "parentResourceName",
1742
+ required: true,
1743
+ type: {
1744
+ name: "String"
1745
+ }
1746
+ }
1747
+ };
1748
+ const targetName = {
1749
+ parameterPath: "targetName",
1750
+ mapper: {
1751
+ constraints: {
1752
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
1753
+ },
1754
+ serializedName: "targetName",
1755
+ required: true,
1756
+ type: {
1757
+ name: "String"
1758
+ }
1759
+ }
1760
+ };
1761
+ const continuationToken = {
1762
+ parameterPath: ["options", "continuationToken"],
1763
+ mapper: {
1764
+ serializedName: "continuationToken",
1765
+ type: {
1766
+ name: "String"
1767
+ }
1768
+ }
1769
+ };
1770
+ const capabilityName = {
1771
+ parameterPath: "capabilityName",
1772
+ mapper: {
1773
+ constraints: {
1774
+ Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$")
1775
+ },
1776
+ serializedName: "capabilityName",
1777
+ required: true,
1778
+ type: {
1779
+ name: "String"
1780
+ }
1781
+ }
1782
+ };
1783
+ const contentType = {
1784
+ parameterPath: ["options", "contentType"],
1785
+ mapper: {
1786
+ defaultValue: "application/json",
1787
+ isConstant: true,
1788
+ serializedName: "Content-Type",
1789
+ type: {
1790
+ name: "String"
1791
+ }
1792
+ }
1793
+ };
1794
+ const capability = {
1795
+ parameterPath: "capability",
1796
+ mapper: Capability
1797
+ };
1798
+ const nextLink = {
1799
+ parameterPath: "nextLink",
1800
+ mapper: {
1801
+ serializedName: "nextLink",
1802
+ required: true,
1803
+ type: {
1804
+ name: "String"
1805
+ }
1806
+ },
1807
+ skipEncoding: true
1808
+ };
1809
+ const running = {
1810
+ parameterPath: ["options", "running"],
1811
+ mapper: {
1812
+ serializedName: "running",
1813
+ type: {
1814
+ name: "Boolean"
1815
+ }
1816
+ }
1817
+ };
1818
+ const experimentName = {
1819
+ parameterPath: "experimentName",
1820
+ mapper: {
1821
+ constraints: {
1822
+ Pattern: new RegExp("^[^<>%&:?#/\\\\]+$"),
1823
+ MinLength: 1
1824
+ },
1825
+ serializedName: "experimentName",
1826
+ required: true,
1827
+ type: {
1828
+ name: "String"
1829
+ }
1830
+ }
1831
+ };
1832
+ const experiment = {
1833
+ parameterPath: "experiment",
1834
+ mapper: Experiment
1835
+ };
1836
+ const statusId = {
1837
+ parameterPath: "statusId",
1838
+ mapper: {
1839
+ constraints: {
1840
+ Pattern: new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
1841
+ },
1842
+ serializedName: "statusId",
1843
+ required: true,
1844
+ type: {
1845
+ name: "String"
1846
+ }
1847
+ }
1848
+ };
1849
+ const executionDetailsId = {
1850
+ parameterPath: "executionDetailsId",
1851
+ mapper: {
1852
+ constraints: {
1853
+ Pattern: new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
1854
+ },
1855
+ serializedName: "executionDetailsId",
1856
+ required: true,
1857
+ type: {
1858
+ name: "String"
1859
+ }
1860
+ }
1861
+ };
1862
+ const target = {
1863
+ parameterPath: "target",
1864
+ mapper: Target
1865
+ };
1866
+ const locationName = {
1867
+ parameterPath: "locationName",
1868
+ mapper: {
1869
+ constraints: {
1870
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
1871
+ },
1872
+ serializedName: "locationName",
1873
+ required: true,
1874
+ type: {
1875
+ name: "String"
1876
+ }
1877
+ }
1878
+ };
1879
+ const targetTypeName = {
1880
+ parameterPath: "targetTypeName",
1881
+ mapper: {
1882
+ constraints: {
1883
+ Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
1884
+ },
1885
+ serializedName: "targetTypeName",
1886
+ required: true,
1887
+ type: {
1888
+ name: "String"
1889
+ }
1890
+ }
1891
+ };
1892
+ const capabilityTypeName = {
1893
+ parameterPath: "capabilityTypeName",
1894
+ mapper: {
1895
+ constraints: {
1896
+ Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$")
1897
+ },
1898
+ serializedName: "capabilityTypeName",
1899
+ required: true,
1900
+ type: {
1901
+ name: "String"
1902
+ }
1903
+ }
1904
+ };
1905
+
1906
+ /*
1907
+ * Copyright (c) Microsoft Corporation.
1908
+ * Licensed under the MIT License.
1909
+ *
1910
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1911
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1912
+ */
1913
+ /// <reference lib="esnext.asynciterable" />
1914
+ /** Class containing Capabilities operations. */
1915
+ class CapabilitiesImpl {
1916
+ /**
1917
+ * Initialize a new instance of the class Capabilities class.
1918
+ * @param client Reference to the service client
1919
+ */
1920
+ constructor(client) {
1921
+ this.client = client;
1922
+ }
1923
+ /**
1924
+ * Get a list of Capability resources that extend a Target resource..
1925
+ * @param resourceGroupName String that represents an Azure resource group.
1926
+ * @param parentProviderNamespace String that represents a resource provider namespace.
1927
+ * @param parentResourceType String that represents a resource type.
1928
+ * @param parentResourceName String that represents a resource name.
1929
+ * @param targetName String that represents a Target resource name.
1930
+ * @param options The options parameters.
1931
+ */
1932
+ list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
1933
+ const iter = this.listPagingAll(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options);
1934
+ return {
1935
+ next() {
1936
+ return iter.next();
1937
+ },
1938
+ [Symbol.asyncIterator]() {
1939
+ return this;
1940
+ },
1941
+ byPage: () => {
1942
+ return this.listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options);
1943
+ }
1944
+ };
1945
+ }
1946
+ listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
1947
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1948
+ let result = yield tslib.__await(this._list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options));
1949
+ yield yield tslib.__await(result.value || []);
1950
+ let continuationToken = result.nextLink;
1951
+ while (continuationToken) {
1952
+ result = yield tslib.__await(this._listNext(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, continuationToken, options));
1953
+ continuationToken = result.nextLink;
1954
+ yield yield tslib.__await(result.value || []);
1955
+ }
1956
+ });
1957
+ }
1958
+ listPagingAll(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
1959
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1960
+ var e_1, _a;
1961
+ try {
1962
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1963
+ const page = _c.value;
1964
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1965
+ }
1966
+ }
1967
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1968
+ finally {
1969
+ try {
1970
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1971
+ }
1972
+ finally { if (e_1) throw e_1.error; }
1973
+ }
1974
+ });
1975
+ }
1976
+ /**
1977
+ * Get a list of Capability resources that extend a Target resource..
1978
+ * @param resourceGroupName String that represents an Azure resource group.
1979
+ * @param parentProviderNamespace String that represents a resource provider namespace.
1980
+ * @param parentResourceType String that represents a resource type.
1981
+ * @param parentResourceName String that represents a resource name.
1982
+ * @param targetName String that represents a Target resource name.
1983
+ * @param options The options parameters.
1984
+ */
1985
+ _list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
1986
+ return this.client.sendOperationRequest({
1987
+ resourceGroupName,
1988
+ parentProviderNamespace,
1989
+ parentResourceType,
1990
+ parentResourceName,
1991
+ targetName,
1992
+ options
1993
+ }, listOperationSpec$4);
1994
+ }
1995
+ /**
1996
+ * Get a Capability resource that extends a Target resource.
1997
+ * @param resourceGroupName String that represents an Azure resource group.
1998
+ * @param parentProviderNamespace String that represents a resource provider namespace.
1999
+ * @param parentResourceType String that represents a resource type.
2000
+ * @param parentResourceName String that represents a resource name.
2001
+ * @param targetName String that represents a Target resource name.
2002
+ * @param capabilityName String that represents a Capability resource name.
2003
+ * @param options The options parameters.
2004
+ */
2005
+ get(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName, options) {
2006
+ return this.client.sendOperationRequest({
2007
+ resourceGroupName,
2008
+ parentProviderNamespace,
2009
+ parentResourceType,
2010
+ parentResourceName,
2011
+ targetName,
2012
+ capabilityName,
2013
+ options
2014
+ }, getOperationSpec$4);
2015
+ }
2016
+ /**
2017
+ * Delete a Capability that extends a Target resource.
2018
+ * @param resourceGroupName String that represents an Azure resource group.
2019
+ * @param parentProviderNamespace String that represents a resource provider namespace.
2020
+ * @param parentResourceType String that represents a resource type.
2021
+ * @param parentResourceName String that represents a resource name.
2022
+ * @param targetName String that represents a Target resource name.
2023
+ * @param capabilityName String that represents a Capability resource name.
2024
+ * @param options The options parameters.
2025
+ */
2026
+ delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName, options) {
2027
+ return this.client.sendOperationRequest({
2028
+ resourceGroupName,
2029
+ parentProviderNamespace,
2030
+ parentResourceType,
2031
+ parentResourceName,
2032
+ targetName,
2033
+ capabilityName,
2034
+ options
2035
+ }, deleteOperationSpec$2);
2036
+ }
2037
+ /**
2038
+ * Create or update a Capability resource that extends a Target resource.
2039
+ * @param resourceGroupName String that represents an Azure resource group.
2040
+ * @param parentProviderNamespace String that represents a resource provider namespace.
2041
+ * @param parentResourceType String that represents a resource type.
2042
+ * @param parentResourceName String that represents a resource name.
2043
+ * @param targetName String that represents a Target resource name.
2044
+ * @param capabilityName String that represents a Capability resource name.
2045
+ * @param capability Capability resource to be created or updated.
2046
+ * @param options The options parameters.
2047
+ */
2048
+ createOrUpdate(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName, capability, options) {
2049
+ return this.client.sendOperationRequest({
2050
+ resourceGroupName,
2051
+ parentProviderNamespace,
2052
+ parentResourceType,
2053
+ parentResourceName,
2054
+ targetName,
2055
+ capabilityName,
2056
+ capability,
2057
+ options
2058
+ }, createOrUpdateOperationSpec$2);
2059
+ }
2060
+ /**
2061
+ * ListNext
2062
+ * @param resourceGroupName String that represents an Azure resource group.
2063
+ * @param parentProviderNamespace String that represents a resource provider namespace.
2064
+ * @param parentResourceType String that represents a resource type.
2065
+ * @param parentResourceName String that represents a resource name.
2066
+ * @param targetName String that represents a Target resource name.
2067
+ * @param nextLink The nextLink from the previous successful call to the List method.
2068
+ * @param options The options parameters.
2069
+ */
2070
+ _listNext(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, nextLink, options) {
2071
+ return this.client.sendOperationRequest({
2072
+ resourceGroupName,
2073
+ parentProviderNamespace,
2074
+ parentResourceType,
2075
+ parentResourceName,
2076
+ targetName,
2077
+ nextLink,
2078
+ options
2079
+ }, listNextOperationSpec$4);
2080
+ }
2081
+ }
2082
+ // Operation Specifications
2083
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2084
+ const listOperationSpec$4 = {
2085
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities",
2086
+ httpMethod: "GET",
2087
+ responses: {
2088
+ 200: {
2089
+ bodyMapper: CapabilityListResult
2090
+ },
2091
+ default: {
2092
+ bodyMapper: ErrorResponse
2093
+ }
2094
+ },
2095
+ queryParameters: [apiVersion, continuationToken],
2096
+ urlParameters: [
2097
+ $host,
2098
+ subscriptionId,
2099
+ resourceGroupName,
2100
+ parentProviderNamespace,
2101
+ parentResourceType,
2102
+ parentResourceName,
2103
+ targetName
2104
+ ],
2105
+ headerParameters: [accept],
2106
+ serializer: serializer$5
2107
+ };
2108
+ const getOperationSpec$4 = {
2109
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
2110
+ httpMethod: "GET",
2111
+ responses: {
2112
+ 200: {
2113
+ bodyMapper: Capability
2114
+ },
2115
+ default: {
2116
+ bodyMapper: ErrorResponse
2117
+ }
2118
+ },
2119
+ queryParameters: [apiVersion],
2120
+ urlParameters: [
2121
+ $host,
2122
+ subscriptionId,
2123
+ resourceGroupName,
2124
+ parentProviderNamespace,
2125
+ parentResourceType,
2126
+ parentResourceName,
2127
+ targetName,
2128
+ capabilityName
2129
+ ],
2130
+ headerParameters: [accept],
2131
+ serializer: serializer$5
2132
+ };
2133
+ const deleteOperationSpec$2 = {
2134
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
2135
+ httpMethod: "DELETE",
2136
+ responses: {
2137
+ 200: {},
2138
+ 204: {},
2139
+ default: {
2140
+ bodyMapper: ErrorResponse
2141
+ }
2142
+ },
2143
+ queryParameters: [apiVersion],
2144
+ urlParameters: [
2145
+ $host,
2146
+ subscriptionId,
2147
+ resourceGroupName,
2148
+ parentProviderNamespace,
2149
+ parentResourceType,
2150
+ parentResourceName,
2151
+ targetName,
2152
+ capabilityName
2153
+ ],
2154
+ headerParameters: [accept],
2155
+ serializer: serializer$5
2156
+ };
2157
+ const createOrUpdateOperationSpec$2 = {
2158
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
2159
+ httpMethod: "PUT",
2160
+ responses: {
2161
+ 200: {
2162
+ bodyMapper: Capability
2163
+ },
2164
+ default: {
2165
+ bodyMapper: ErrorResponse
2166
+ }
2167
+ },
2168
+ requestBody: capability,
2169
+ queryParameters: [apiVersion],
2170
+ urlParameters: [
2171
+ $host,
2172
+ subscriptionId,
2173
+ resourceGroupName,
2174
+ parentProviderNamespace,
2175
+ parentResourceType,
2176
+ parentResourceName,
2177
+ targetName,
2178
+ capabilityName
2179
+ ],
2180
+ headerParameters: [accept, contentType],
2181
+ mediaType: "json",
2182
+ serializer: serializer$5
2183
+ };
2184
+ const listNextOperationSpec$4 = {
2185
+ path: "{nextLink}",
2186
+ httpMethod: "GET",
2187
+ responses: {
2188
+ 200: {
2189
+ bodyMapper: CapabilityListResult
2190
+ },
2191
+ default: {
2192
+ bodyMapper: ErrorResponse
2193
+ }
2194
+ },
2195
+ queryParameters: [apiVersion, continuationToken],
2196
+ urlParameters: [
2197
+ $host,
2198
+ subscriptionId,
2199
+ resourceGroupName,
2200
+ parentProviderNamespace,
2201
+ parentResourceType,
2202
+ parentResourceName,
2203
+ targetName,
2204
+ nextLink
2205
+ ],
2206
+ headerParameters: [accept],
2207
+ serializer: serializer$5
2208
+ };
2209
+
2210
+ /*
2211
+ * Copyright (c) Microsoft Corporation.
2212
+ * Licensed under the MIT License.
2213
+ *
2214
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2215
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2216
+ */
2217
+ /// <reference lib="esnext.asynciterable" />
2218
+ /** Class containing Experiments operations. */
2219
+ class ExperimentsImpl {
2220
+ /**
2221
+ * Initialize a new instance of the class Experiments class.
2222
+ * @param client Reference to the service client
2223
+ */
2224
+ constructor(client) {
2225
+ this.client = client;
2226
+ }
2227
+ /**
2228
+ * Get a list of Experiment resources in a subscription.
2229
+ * @param options The options parameters.
2230
+ */
2231
+ listAll(options) {
2232
+ const iter = this.listAllPagingAll(options);
2233
+ return {
2234
+ next() {
2235
+ return iter.next();
2236
+ },
2237
+ [Symbol.asyncIterator]() {
2238
+ return this;
2239
+ },
2240
+ byPage: () => {
2241
+ return this.listAllPagingPage(options);
2242
+ }
2243
+ };
2244
+ }
2245
+ listAllPagingPage(options) {
2246
+ return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
2247
+ let result = yield tslib.__await(this._listAll(options));
2248
+ yield yield tslib.__await(result.value || []);
2249
+ let continuationToken = result.nextLink;
2250
+ while (continuationToken) {
2251
+ result = yield tslib.__await(this._listAllNext(continuationToken, options));
2252
+ continuationToken = result.nextLink;
2253
+ yield yield tslib.__await(result.value || []);
2254
+ }
2255
+ });
2256
+ }
2257
+ listAllPagingAll(options) {
2258
+ return tslib.__asyncGenerator(this, arguments, function* listAllPagingAll_1() {
2259
+ var e_1, _a;
2260
+ try {
2261
+ for (var _b = tslib.__asyncValues(this.listAllPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2262
+ const page = _c.value;
2263
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2264
+ }
2265
+ }
2266
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2267
+ finally {
2268
+ try {
2269
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2270
+ }
2271
+ finally { if (e_1) throw e_1.error; }
2272
+ }
2273
+ });
2274
+ }
2275
+ /**
2276
+ * Get a list of Experiment resources in a resource group.
2277
+ * @param resourceGroupName String that represents an Azure resource group.
2278
+ * @param options The options parameters.
2279
+ */
2280
+ list(resourceGroupName, options) {
2281
+ const iter = this.listPagingAll(resourceGroupName, options);
2282
+ return {
2283
+ next() {
2284
+ return iter.next();
2285
+ },
2286
+ [Symbol.asyncIterator]() {
2287
+ return this;
2288
+ },
2289
+ byPage: () => {
2290
+ return this.listPagingPage(resourceGroupName, options);
2291
+ }
2292
+ };
2293
+ }
2294
+ listPagingPage(resourceGroupName, options) {
2295
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2296
+ let result = yield tslib.__await(this._list(resourceGroupName, options));
2297
+ yield yield tslib.__await(result.value || []);
2298
+ let continuationToken = result.nextLink;
2299
+ while (continuationToken) {
2300
+ result = yield tslib.__await(this._listNext(resourceGroupName, continuationToken, options));
2301
+ continuationToken = result.nextLink;
2302
+ yield yield tslib.__await(result.value || []);
2303
+ }
2304
+ });
2305
+ }
2306
+ listPagingAll(resourceGroupName, options) {
2307
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2308
+ var e_2, _a;
2309
+ try {
2310
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2311
+ const page = _c.value;
2312
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2313
+ }
2314
+ }
2315
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2316
+ finally {
2317
+ try {
2318
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2319
+ }
2320
+ finally { if (e_2) throw e_2.error; }
2321
+ }
2322
+ });
2323
+ }
2324
+ /**
2325
+ * Get a list of statuses of a Experiment resource.
2326
+ * @param resourceGroupName String that represents an Azure resource group.
2327
+ * @param experimentName String that represents a Experiment resource name.
2328
+ * @param options The options parameters.
2329
+ */
2330
+ listAllStatuses(resourceGroupName, experimentName, options) {
2331
+ const iter = this.listAllStatusesPagingAll(resourceGroupName, experimentName, options);
2332
+ return {
2333
+ next() {
2334
+ return iter.next();
2335
+ },
2336
+ [Symbol.asyncIterator]() {
2337
+ return this;
2338
+ },
2339
+ byPage: () => {
2340
+ return this.listAllStatusesPagingPage(resourceGroupName, experimentName, options);
2341
+ }
2342
+ };
2343
+ }
2344
+ listAllStatusesPagingPage(resourceGroupName, experimentName, options) {
2345
+ return tslib.__asyncGenerator(this, arguments, function* listAllStatusesPagingPage_1() {
2346
+ let result = yield tslib.__await(this._listAllStatuses(resourceGroupName, experimentName, options));
2347
+ yield yield tslib.__await(result.value || []);
2348
+ let continuationToken = result.nextLink;
2349
+ while (continuationToken) {
2350
+ result = yield tslib.__await(this._listAllStatusesNext(resourceGroupName, experimentName, continuationToken, options));
2351
+ continuationToken = result.nextLink;
2352
+ yield yield tslib.__await(result.value || []);
2353
+ }
2354
+ });
2355
+ }
2356
+ listAllStatusesPagingAll(resourceGroupName, experimentName, options) {
2357
+ return tslib.__asyncGenerator(this, arguments, function* listAllStatusesPagingAll_1() {
2358
+ var e_3, _a;
2359
+ try {
2360
+ for (var _b = tslib.__asyncValues(this.listAllStatusesPagingPage(resourceGroupName, experimentName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2361
+ const page = _c.value;
2362
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2363
+ }
2364
+ }
2365
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2366
+ finally {
2367
+ try {
2368
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2369
+ }
2370
+ finally { if (e_3) throw e_3.error; }
2371
+ }
2372
+ });
2373
+ }
2374
+ /**
2375
+ * Get a list of execution details of a Experiment resource.
2376
+ * @param resourceGroupName String that represents an Azure resource group.
2377
+ * @param experimentName String that represents a Experiment resource name.
2378
+ * @param options The options parameters.
2379
+ */
2380
+ listExecutionDetails(resourceGroupName, experimentName, options) {
2381
+ const iter = this.listExecutionDetailsPagingAll(resourceGroupName, experimentName, options);
2382
+ return {
2383
+ next() {
2384
+ return iter.next();
2385
+ },
2386
+ [Symbol.asyncIterator]() {
2387
+ return this;
2388
+ },
2389
+ byPage: () => {
2390
+ return this.listExecutionDetailsPagingPage(resourceGroupName, experimentName, options);
2391
+ }
2392
+ };
2393
+ }
2394
+ listExecutionDetailsPagingPage(resourceGroupName, experimentName, options) {
2395
+ return tslib.__asyncGenerator(this, arguments, function* listExecutionDetailsPagingPage_1() {
2396
+ let result = yield tslib.__await(this._listExecutionDetails(resourceGroupName, experimentName, options));
2397
+ yield yield tslib.__await(result.value || []);
2398
+ let continuationToken = result.nextLink;
2399
+ while (continuationToken) {
2400
+ result = yield tslib.__await(this._listExecutionDetailsNext(resourceGroupName, experimentName, continuationToken, options));
2401
+ continuationToken = result.nextLink;
2402
+ yield yield tslib.__await(result.value || []);
2403
+ }
2404
+ });
2405
+ }
2406
+ listExecutionDetailsPagingAll(resourceGroupName, experimentName, options) {
2407
+ return tslib.__asyncGenerator(this, arguments, function* listExecutionDetailsPagingAll_1() {
2408
+ var e_4, _a;
2409
+ try {
2410
+ for (var _b = tslib.__asyncValues(this.listExecutionDetailsPagingPage(resourceGroupName, experimentName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2411
+ const page = _c.value;
2412
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2413
+ }
2414
+ }
2415
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
2416
+ finally {
2417
+ try {
2418
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2419
+ }
2420
+ finally { if (e_4) throw e_4.error; }
2421
+ }
2422
+ });
2423
+ }
2424
+ /**
2425
+ * Get a list of Experiment resources in a subscription.
2426
+ * @param options The options parameters.
2427
+ */
2428
+ _listAll(options) {
2429
+ return this.client.sendOperationRequest({ options }, listAllOperationSpec$1);
2430
+ }
2431
+ /**
2432
+ * Get a list of Experiment resources in a resource group.
2433
+ * @param resourceGroupName String that represents an Azure resource group.
2434
+ * @param options The options parameters.
2435
+ */
2436
+ _list(resourceGroupName, options) {
2437
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec$3);
2438
+ }
2439
+ /**
2440
+ * Delete a Experiment resource.
2441
+ * @param resourceGroupName String that represents an Azure resource group.
2442
+ * @param experimentName String that represents a Experiment resource name.
2443
+ * @param options The options parameters.
2444
+ */
2445
+ delete(resourceGroupName, experimentName, options) {
2446
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, deleteOperationSpec$1);
2447
+ }
2448
+ /**
2449
+ * Get a Experiment resource.
2450
+ * @param resourceGroupName String that represents an Azure resource group.
2451
+ * @param experimentName String that represents a Experiment resource name.
2452
+ * @param options The options parameters.
2453
+ */
2454
+ get(resourceGroupName, experimentName, options) {
2455
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, getOperationSpec$3);
2456
+ }
2457
+ /**
2458
+ * Create or update a Experiment resource.
2459
+ * @param resourceGroupName String that represents an Azure resource group.
2460
+ * @param experimentName String that represents a Experiment resource name.
2461
+ * @param experiment Experiment resource to be created or updated.
2462
+ * @param options The options parameters.
2463
+ */
2464
+ createOrUpdate(resourceGroupName, experimentName, experiment, options) {
2465
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, experiment, options }, createOrUpdateOperationSpec$1);
2466
+ }
2467
+ /**
2468
+ * Cancel a running Experiment resource.
2469
+ * @param resourceGroupName String that represents an Azure resource group.
2470
+ * @param experimentName String that represents a Experiment resource name.
2471
+ * @param options The options parameters.
2472
+ */
2473
+ cancel(resourceGroupName, experimentName, options) {
2474
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, cancelOperationSpec);
2475
+ }
2476
+ /**
2477
+ * Start a Experiment resource.
2478
+ * @param resourceGroupName String that represents an Azure resource group.
2479
+ * @param experimentName String that represents a Experiment resource name.
2480
+ * @param options The options parameters.
2481
+ */
2482
+ start(resourceGroupName, experimentName, options) {
2483
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, startOperationSpec);
2484
+ }
2485
+ /**
2486
+ * Get a list of statuses of a Experiment resource.
2487
+ * @param resourceGroupName String that represents an Azure resource group.
2488
+ * @param experimentName String that represents a Experiment resource name.
2489
+ * @param options The options parameters.
2490
+ */
2491
+ _listAllStatuses(resourceGroupName, experimentName, options) {
2492
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, listAllStatusesOperationSpec);
2493
+ }
2494
+ /**
2495
+ * Get a status of a Experiment resource.
2496
+ * @param resourceGroupName String that represents an Azure resource group.
2497
+ * @param experimentName String that represents a Experiment resource name.
2498
+ * @param statusId GUID that represents a Experiment status.
2499
+ * @param options The options parameters.
2500
+ */
2501
+ getStatus(resourceGroupName, experimentName, statusId, options) {
2502
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, statusId, options }, getStatusOperationSpec);
2503
+ }
2504
+ /**
2505
+ * Get a list of execution details of a Experiment resource.
2506
+ * @param resourceGroupName String that represents an Azure resource group.
2507
+ * @param experimentName String that represents a Experiment resource name.
2508
+ * @param options The options parameters.
2509
+ */
2510
+ _listExecutionDetails(resourceGroupName, experimentName, options) {
2511
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, options }, listExecutionDetailsOperationSpec);
2512
+ }
2513
+ /**
2514
+ * Get an execution detail of a Experiment resource.
2515
+ * @param resourceGroupName String that represents an Azure resource group.
2516
+ * @param experimentName String that represents a Experiment resource name.
2517
+ * @param executionDetailsId GUID that represents a Experiment execution detail.
2518
+ * @param options The options parameters.
2519
+ */
2520
+ getExecutionDetails(resourceGroupName, experimentName, executionDetailsId, options) {
2521
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, executionDetailsId, options }, getExecutionDetailsOperationSpec);
2522
+ }
2523
+ /**
2524
+ * ListAllNext
2525
+ * @param nextLink The nextLink from the previous successful call to the ListAll method.
2526
+ * @param options The options parameters.
2527
+ */
2528
+ _listAllNext(nextLink, options) {
2529
+ return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec$1);
2530
+ }
2531
+ /**
2532
+ * ListNext
2533
+ * @param resourceGroupName String that represents an Azure resource group.
2534
+ * @param nextLink The nextLink from the previous successful call to the List method.
2535
+ * @param options The options parameters.
2536
+ */
2537
+ _listNext(resourceGroupName, nextLink, options) {
2538
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listNextOperationSpec$3);
2539
+ }
2540
+ /**
2541
+ * ListAllStatusesNext
2542
+ * @param resourceGroupName String that represents an Azure resource group.
2543
+ * @param experimentName String that represents a Experiment resource name.
2544
+ * @param nextLink The nextLink from the previous successful call to the ListAllStatuses method.
2545
+ * @param options The options parameters.
2546
+ */
2547
+ _listAllStatusesNext(resourceGroupName, experimentName, nextLink, options) {
2548
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, nextLink, options }, listAllStatusesNextOperationSpec);
2549
+ }
2550
+ /**
2551
+ * ListExecutionDetailsNext
2552
+ * @param resourceGroupName String that represents an Azure resource group.
2553
+ * @param experimentName String that represents a Experiment resource name.
2554
+ * @param nextLink The nextLink from the previous successful call to the ListExecutionDetails method.
2555
+ * @param options The options parameters.
2556
+ */
2557
+ _listExecutionDetailsNext(resourceGroupName, experimentName, nextLink, options) {
2558
+ return this.client.sendOperationRequest({ resourceGroupName, experimentName, nextLink, options }, listExecutionDetailsNextOperationSpec);
2559
+ }
2560
+ }
2561
+ // Operation Specifications
2562
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2563
+ const listAllOperationSpec$1 = {
2564
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments",
2565
+ httpMethod: "GET",
2566
+ responses: {
2567
+ 200: {
2568
+ bodyMapper: ExperimentListResult
2569
+ },
2570
+ default: {
2571
+ bodyMapper: ErrorResponse
2572
+ }
2573
+ },
2574
+ queryParameters: [
2575
+ apiVersion,
2576
+ continuationToken,
2577
+ running
2578
+ ],
2579
+ urlParameters: [$host, subscriptionId],
2580
+ headerParameters: [accept],
2581
+ serializer: serializer$4
2582
+ };
2583
+ const listOperationSpec$3 = {
2584
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments",
2585
+ httpMethod: "GET",
2586
+ responses: {
2587
+ 200: {
2588
+ bodyMapper: ExperimentListResult
2589
+ },
2590
+ default: {
2591
+ bodyMapper: ErrorResponse
2592
+ }
2593
+ },
2594
+ queryParameters: [
2595
+ apiVersion,
2596
+ continuationToken,
2597
+ running
2598
+ ],
2599
+ urlParameters: [
2600
+ $host,
2601
+ subscriptionId,
2602
+ resourceGroupName
2603
+ ],
2604
+ headerParameters: [accept],
2605
+ serializer: serializer$4
2606
+ };
2607
+ const deleteOperationSpec$1 = {
2608
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
2609
+ httpMethod: "DELETE",
2610
+ responses: {
2611
+ 200: {},
2612
+ 204: {},
2613
+ default: {
2614
+ bodyMapper: ErrorResponse
2615
+ }
2616
+ },
2617
+ queryParameters: [apiVersion],
2618
+ urlParameters: [
2619
+ $host,
2620
+ subscriptionId,
2621
+ resourceGroupName,
2622
+ experimentName
2623
+ ],
2624
+ headerParameters: [accept],
2625
+ serializer: serializer$4
2626
+ };
2627
+ const getOperationSpec$3 = {
2628
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
2629
+ httpMethod: "GET",
2630
+ responses: {
2631
+ 200: {
2632
+ bodyMapper: Experiment
2633
+ },
2634
+ default: {
2635
+ bodyMapper: ErrorResponse
2636
+ }
2637
+ },
2638
+ queryParameters: [apiVersion],
2639
+ urlParameters: [
2640
+ $host,
2641
+ subscriptionId,
2642
+ resourceGroupName,
2643
+ experimentName
2644
+ ],
2645
+ headerParameters: [accept],
2646
+ serializer: serializer$4
2647
+ };
2648
+ const createOrUpdateOperationSpec$1 = {
2649
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}",
2650
+ httpMethod: "PUT",
2651
+ responses: {
2652
+ 200: {
2653
+ bodyMapper: Experiment
2654
+ },
2655
+ default: {
2656
+ bodyMapper: ErrorResponse
2657
+ }
2658
+ },
2659
+ requestBody: experiment,
2660
+ queryParameters: [apiVersion],
2661
+ urlParameters: [
2662
+ $host,
2663
+ subscriptionId,
2664
+ resourceGroupName,
2665
+ experimentName
2666
+ ],
2667
+ headerParameters: [accept, contentType],
2668
+ mediaType: "json",
2669
+ serializer: serializer$4
2670
+ };
2671
+ const cancelOperationSpec = {
2672
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel",
2673
+ httpMethod: "POST",
2674
+ responses: {
2675
+ 202: {
2676
+ bodyMapper: ExperimentCancelOperationResult
2677
+ },
2678
+ default: {
2679
+ bodyMapper: ErrorResponse
2680
+ }
2681
+ },
2682
+ queryParameters: [apiVersion],
2683
+ urlParameters: [
2684
+ $host,
2685
+ subscriptionId,
2686
+ resourceGroupName,
2687
+ experimentName
2688
+ ],
2689
+ headerParameters: [accept],
2690
+ serializer: serializer$4
2691
+ };
2692
+ const startOperationSpec = {
2693
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start",
2694
+ httpMethod: "POST",
2695
+ responses: {
2696
+ 202: {
2697
+ bodyMapper: ExperimentStartOperationResult
2698
+ },
2699
+ default: {
2700
+ bodyMapper: ErrorResponse
2701
+ }
2702
+ },
2703
+ queryParameters: [apiVersion],
2704
+ urlParameters: [
2705
+ $host,
2706
+ subscriptionId,
2707
+ resourceGroupName,
2708
+ experimentName
2709
+ ],
2710
+ headerParameters: [accept],
2711
+ serializer: serializer$4
2712
+ };
2713
+ const listAllStatusesOperationSpec = {
2714
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses",
2715
+ httpMethod: "GET",
2716
+ responses: {
2717
+ 200: {
2718
+ bodyMapper: ExperimentStatusListResult
2719
+ },
2720
+ default: {
2721
+ bodyMapper: ErrorResponse
2722
+ }
2723
+ },
2724
+ queryParameters: [apiVersion],
2725
+ urlParameters: [
2726
+ $host,
2727
+ subscriptionId,
2728
+ resourceGroupName,
2729
+ experimentName
2730
+ ],
2731
+ headerParameters: [accept],
2732
+ serializer: serializer$4
2733
+ };
2734
+ const getStatusOperationSpec = {
2735
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses/{statusId}",
2736
+ httpMethod: "GET",
2737
+ responses: {
2738
+ 200: {
2739
+ bodyMapper: ExperimentStatus
2740
+ },
2741
+ default: {
2742
+ bodyMapper: ErrorResponse
2743
+ }
2744
+ },
2745
+ queryParameters: [apiVersion],
2746
+ urlParameters: [
2747
+ $host,
2748
+ subscriptionId,
2749
+ resourceGroupName,
2750
+ experimentName,
2751
+ statusId
2752
+ ],
2753
+ headerParameters: [accept],
2754
+ serializer: serializer$4
2755
+ };
2756
+ const listExecutionDetailsOperationSpec = {
2757
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails",
2758
+ httpMethod: "GET",
2759
+ responses: {
2760
+ 200: {
2761
+ bodyMapper: ExperimentExecutionDetailsListResult
2762
+ },
2763
+ default: {
2764
+ bodyMapper: ErrorResponse
2765
+ }
2766
+ },
2767
+ queryParameters: [apiVersion],
2768
+ urlParameters: [
2769
+ $host,
2770
+ subscriptionId,
2771
+ resourceGroupName,
2772
+ experimentName
2773
+ ],
2774
+ headerParameters: [accept],
2775
+ serializer: serializer$4
2776
+ };
2777
+ const getExecutionDetailsOperationSpec = {
2778
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails/{executionDetailsId}",
2779
+ httpMethod: "GET",
2780
+ responses: {
2781
+ 200: {
2782
+ bodyMapper: ExperimentExecutionDetails
2783
+ },
2784
+ default: {
2785
+ bodyMapper: ErrorResponse
2786
+ }
2787
+ },
2788
+ queryParameters: [apiVersion],
2789
+ urlParameters: [
2790
+ $host,
2791
+ subscriptionId,
2792
+ resourceGroupName,
2793
+ experimentName,
2794
+ executionDetailsId
2795
+ ],
2796
+ headerParameters: [accept],
2797
+ serializer: serializer$4
2798
+ };
2799
+ const listAllNextOperationSpec$1 = {
2800
+ path: "{nextLink}",
2801
+ httpMethod: "GET",
2802
+ responses: {
2803
+ 200: {
2804
+ bodyMapper: ExperimentListResult
2805
+ },
2806
+ default: {
2807
+ bodyMapper: ErrorResponse
2808
+ }
2809
+ },
2810
+ queryParameters: [
2811
+ apiVersion,
2812
+ continuationToken,
2813
+ running
2814
+ ],
2815
+ urlParameters: [
2816
+ $host,
2817
+ subscriptionId,
2818
+ nextLink
2819
+ ],
2820
+ headerParameters: [accept],
2821
+ serializer: serializer$4
2822
+ };
2823
+ const listNextOperationSpec$3 = {
2824
+ path: "{nextLink}",
2825
+ httpMethod: "GET",
2826
+ responses: {
2827
+ 200: {
2828
+ bodyMapper: ExperimentListResult
2829
+ },
2830
+ default: {
2831
+ bodyMapper: ErrorResponse
2832
+ }
2833
+ },
2834
+ queryParameters: [
2835
+ apiVersion,
2836
+ continuationToken,
2837
+ running
2838
+ ],
2839
+ urlParameters: [
2840
+ $host,
2841
+ subscriptionId,
2842
+ resourceGroupName,
2843
+ nextLink
2844
+ ],
2845
+ headerParameters: [accept],
2846
+ serializer: serializer$4
2847
+ };
2848
+ const listAllStatusesNextOperationSpec = {
2849
+ path: "{nextLink}",
2850
+ httpMethod: "GET",
2851
+ responses: {
2852
+ 200: {
2853
+ bodyMapper: ExperimentStatusListResult
2854
+ },
2855
+ default: {
2856
+ bodyMapper: ErrorResponse
2857
+ }
2858
+ },
2859
+ queryParameters: [apiVersion],
2860
+ urlParameters: [
2861
+ $host,
2862
+ subscriptionId,
2863
+ resourceGroupName,
2864
+ nextLink,
2865
+ experimentName
2866
+ ],
2867
+ headerParameters: [accept],
2868
+ serializer: serializer$4
2869
+ };
2870
+ const listExecutionDetailsNextOperationSpec = {
2871
+ path: "{nextLink}",
2872
+ httpMethod: "GET",
2873
+ responses: {
2874
+ 200: {
2875
+ bodyMapper: ExperimentExecutionDetailsListResult
2876
+ },
2877
+ default: {
2878
+ bodyMapper: ErrorResponse
2879
+ }
2880
+ },
2881
+ queryParameters: [apiVersion],
2882
+ urlParameters: [
2883
+ $host,
2884
+ subscriptionId,
2885
+ resourceGroupName,
2886
+ nextLink,
2887
+ experimentName
2888
+ ],
2889
+ headerParameters: [accept],
2890
+ serializer: serializer$4
2891
+ };
2892
+
2893
+ /*
2894
+ * Copyright (c) Microsoft Corporation.
2895
+ * Licensed under the MIT License.
2896
+ *
2897
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2898
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2899
+ */
2900
+ /// <reference lib="esnext.asynciterable" />
2901
+ /** Class containing Operations operations. */
2902
+ class OperationsImpl {
2903
+ /**
2904
+ * Initialize a new instance of the class Operations class.
2905
+ * @param client Reference to the service client
2906
+ */
2907
+ constructor(client) {
2908
+ this.client = client;
2909
+ }
2910
+ /**
2911
+ * Get a list all available Operations.
2912
+ * @param options The options parameters.
2913
+ */
2914
+ listAll(options) {
2915
+ const iter = this.listAllPagingAll(options);
2916
+ return {
2917
+ next() {
2918
+ return iter.next();
2919
+ },
2920
+ [Symbol.asyncIterator]() {
2921
+ return this;
2922
+ },
2923
+ byPage: () => {
2924
+ return this.listAllPagingPage(options);
2925
+ }
2926
+ };
2927
+ }
2928
+ listAllPagingPage(options) {
2929
+ return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
2930
+ let result = yield tslib.__await(this._listAll(options));
2931
+ yield yield tslib.__await(result.value || []);
2932
+ let continuationToken = result.nextLink;
2933
+ while (continuationToken) {
2934
+ result = yield tslib.__await(this._listAllNext(continuationToken, options));
2935
+ continuationToken = result.nextLink;
2936
+ yield yield tslib.__await(result.value || []);
2937
+ }
2938
+ });
2939
+ }
2940
+ listAllPagingAll(options) {
2941
+ return tslib.__asyncGenerator(this, arguments, function* listAllPagingAll_1() {
2942
+ var e_1, _a;
2943
+ try {
2944
+ for (var _b = tslib.__asyncValues(this.listAllPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2945
+ const page = _c.value;
2946
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2947
+ }
2948
+ }
2949
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2950
+ finally {
2951
+ try {
2952
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2953
+ }
2954
+ finally { if (e_1) throw e_1.error; }
2955
+ }
2956
+ });
2957
+ }
2958
+ /**
2959
+ * Get a list all available Operations.
2960
+ * @param options The options parameters.
2961
+ */
2962
+ _listAll(options) {
2963
+ return this.client.sendOperationRequest({ options }, listAllOperationSpec);
2964
+ }
2965
+ /**
2966
+ * ListAllNext
2967
+ * @param nextLink The nextLink from the previous successful call to the ListAll method.
2968
+ * @param options The options parameters.
2969
+ */
2970
+ _listAllNext(nextLink, options) {
2971
+ return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec);
2972
+ }
2973
+ }
2974
+ // Operation Specifications
2975
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2976
+ const listAllOperationSpec = {
2977
+ path: "/providers/Microsoft.Chaos/operations",
2978
+ httpMethod: "GET",
2979
+ responses: {
2980
+ 200: {
2981
+ bodyMapper: OperationListResult
2982
+ },
2983
+ default: {
2984
+ bodyMapper: ErrorResponse
2985
+ }
2986
+ },
2987
+ queryParameters: [apiVersion],
2988
+ urlParameters: [$host],
2989
+ headerParameters: [accept],
2990
+ serializer: serializer$3
2991
+ };
2992
+ const listAllNextOperationSpec = {
2993
+ path: "{nextLink}",
2994
+ httpMethod: "GET",
2995
+ responses: {
2996
+ 200: {
2997
+ bodyMapper: OperationListResult
2998
+ },
2999
+ default: {
3000
+ bodyMapper: ErrorResponse
3001
+ }
3002
+ },
3003
+ queryParameters: [apiVersion],
3004
+ urlParameters: [$host, nextLink],
3005
+ headerParameters: [accept],
3006
+ serializer: serializer$3
3007
+ };
3008
+
3009
+ /*
3010
+ * Copyright (c) Microsoft Corporation.
3011
+ * Licensed under the MIT License.
3012
+ *
3013
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3014
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3015
+ */
3016
+ /// <reference lib="esnext.asynciterable" />
3017
+ /** Class containing Targets operations. */
3018
+ class TargetsImpl {
3019
+ /**
3020
+ * Initialize a new instance of the class Targets class.
3021
+ * @param client Reference to the service client
3022
+ */
3023
+ constructor(client) {
3024
+ this.client = client;
3025
+ }
3026
+ /**
3027
+ * Get a list of Target resources that extend a tracked regional resource.
3028
+ * @param resourceGroupName String that represents an Azure resource group.
3029
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3030
+ * @param parentResourceType String that represents a resource type.
3031
+ * @param parentResourceName String that represents a resource name.
3032
+ * @param options The options parameters.
3033
+ */
3034
+ list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options) {
3035
+ const iter = this.listPagingAll(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options);
3036
+ return {
3037
+ next() {
3038
+ return iter.next();
3039
+ },
3040
+ [Symbol.asyncIterator]() {
3041
+ return this;
3042
+ },
3043
+ byPage: () => {
3044
+ return this.listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options);
3045
+ }
3046
+ };
3047
+ }
3048
+ listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options) {
3049
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3050
+ let result = yield tslib.__await(this._list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options));
3051
+ yield yield tslib.__await(result.value || []);
3052
+ let continuationToken = result.nextLink;
3053
+ while (continuationToken) {
3054
+ result = yield tslib.__await(this._listNext(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, continuationToken, options));
3055
+ continuationToken = result.nextLink;
3056
+ yield yield tslib.__await(result.value || []);
3057
+ }
3058
+ });
3059
+ }
3060
+ listPagingAll(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options) {
3061
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3062
+ var e_1, _a;
3063
+ try {
3064
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3065
+ const page = _c.value;
3066
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3067
+ }
3068
+ }
3069
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3070
+ finally {
3071
+ try {
3072
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3073
+ }
3074
+ finally { if (e_1) throw e_1.error; }
3075
+ }
3076
+ });
3077
+ }
3078
+ /**
3079
+ * Get a list of Target resources that extend a tracked regional resource.
3080
+ * @param resourceGroupName String that represents an Azure resource group.
3081
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3082
+ * @param parentResourceType String that represents a resource type.
3083
+ * @param parentResourceName String that represents a resource name.
3084
+ * @param options The options parameters.
3085
+ */
3086
+ _list(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, options) {
3087
+ return this.client.sendOperationRequest({
3088
+ resourceGroupName,
3089
+ parentProviderNamespace,
3090
+ parentResourceType,
3091
+ parentResourceName,
3092
+ options
3093
+ }, listOperationSpec$2);
3094
+ }
3095
+ /**
3096
+ * Get a Target resource that extends a tracked regional resource.
3097
+ * @param resourceGroupName String that represents an Azure resource group.
3098
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3099
+ * @param parentResourceType String that represents a resource type.
3100
+ * @param parentResourceName String that represents a resource name.
3101
+ * @param targetName String that represents a Target resource name.
3102
+ * @param options The options parameters.
3103
+ */
3104
+ get(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
3105
+ return this.client.sendOperationRequest({
3106
+ resourceGroupName,
3107
+ parentProviderNamespace,
3108
+ parentResourceType,
3109
+ parentResourceName,
3110
+ targetName,
3111
+ options
3112
+ }, getOperationSpec$2);
3113
+ }
3114
+ /**
3115
+ * Delete a Target resource that extends a tracked regional resource.
3116
+ * @param resourceGroupName String that represents an Azure resource group.
3117
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3118
+ * @param parentResourceType String that represents a resource type.
3119
+ * @param parentResourceName String that represents a resource name.
3120
+ * @param targetName String that represents a Target resource name.
3121
+ * @param options The options parameters.
3122
+ */
3123
+ delete(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, options) {
3124
+ return this.client.sendOperationRequest({
3125
+ resourceGroupName,
3126
+ parentProviderNamespace,
3127
+ parentResourceType,
3128
+ parentResourceName,
3129
+ targetName,
3130
+ options
3131
+ }, deleteOperationSpec);
3132
+ }
3133
+ /**
3134
+ * Create or update a Target resource that extends a tracked regional resource.
3135
+ * @param resourceGroupName String that represents an Azure resource group.
3136
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3137
+ * @param parentResourceType String that represents a resource type.
3138
+ * @param parentResourceName String that represents a resource name.
3139
+ * @param targetName String that represents a Target resource name.
3140
+ * @param target Target resource to be created or updated.
3141
+ * @param options The options parameters.
3142
+ */
3143
+ createOrUpdate(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, target, options) {
3144
+ return this.client.sendOperationRequest({
3145
+ resourceGroupName,
3146
+ parentProviderNamespace,
3147
+ parentResourceType,
3148
+ parentResourceName,
3149
+ targetName,
3150
+ target,
3151
+ options
3152
+ }, createOrUpdateOperationSpec);
3153
+ }
3154
+ /**
3155
+ * ListNext
3156
+ * @param resourceGroupName String that represents an Azure resource group.
3157
+ * @param parentProviderNamespace String that represents a resource provider namespace.
3158
+ * @param parentResourceType String that represents a resource type.
3159
+ * @param parentResourceName String that represents a resource name.
3160
+ * @param nextLink The nextLink from the previous successful call to the List method.
3161
+ * @param options The options parameters.
3162
+ */
3163
+ _listNext(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, nextLink, options) {
3164
+ return this.client.sendOperationRequest({
3165
+ resourceGroupName,
3166
+ parentProviderNamespace,
3167
+ parentResourceType,
3168
+ parentResourceName,
3169
+ nextLink,
3170
+ options
3171
+ }, listNextOperationSpec$2);
3172
+ }
3173
+ }
3174
+ // Operation Specifications
3175
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3176
+ const listOperationSpec$2 = {
3177
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets",
3178
+ httpMethod: "GET",
3179
+ responses: {
3180
+ 200: {
3181
+ bodyMapper: TargetListResult
3182
+ },
3183
+ default: {
3184
+ bodyMapper: ErrorResponse
3185
+ }
3186
+ },
3187
+ queryParameters: [apiVersion, continuationToken],
3188
+ urlParameters: [
3189
+ $host,
3190
+ subscriptionId,
3191
+ resourceGroupName,
3192
+ parentProviderNamespace,
3193
+ parentResourceType,
3194
+ parentResourceName
3195
+ ],
3196
+ headerParameters: [accept],
3197
+ serializer: serializer$2
3198
+ };
3199
+ const getOperationSpec$2 = {
3200
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
3201
+ httpMethod: "GET",
3202
+ responses: {
3203
+ 200: {
3204
+ bodyMapper: Target
3205
+ },
3206
+ default: {
3207
+ bodyMapper: ErrorResponse
3208
+ }
3209
+ },
3210
+ queryParameters: [apiVersion],
3211
+ urlParameters: [
3212
+ $host,
3213
+ subscriptionId,
3214
+ resourceGroupName,
3215
+ parentProviderNamespace,
3216
+ parentResourceType,
3217
+ parentResourceName,
3218
+ targetName
3219
+ ],
3220
+ headerParameters: [accept],
3221
+ serializer: serializer$2
3222
+ };
3223
+ const deleteOperationSpec = {
3224
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
3225
+ httpMethod: "DELETE",
3226
+ responses: {
3227
+ 200: {},
3228
+ 204: {},
3229
+ default: {
3230
+ bodyMapper: ErrorResponse
3231
+ }
3232
+ },
3233
+ queryParameters: [apiVersion],
3234
+ urlParameters: [
3235
+ $host,
3236
+ subscriptionId,
3237
+ resourceGroupName,
3238
+ parentProviderNamespace,
3239
+ parentResourceType,
3240
+ parentResourceName,
3241
+ targetName
3242
+ ],
3243
+ headerParameters: [accept],
3244
+ serializer: serializer$2
3245
+ };
3246
+ const createOrUpdateOperationSpec = {
3247
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
3248
+ httpMethod: "PUT",
3249
+ responses: {
3250
+ 200: {
3251
+ bodyMapper: Target
3252
+ },
3253
+ default: {
3254
+ bodyMapper: ErrorResponse
3255
+ }
3256
+ },
3257
+ requestBody: target,
3258
+ queryParameters: [apiVersion],
3259
+ urlParameters: [
3260
+ $host,
3261
+ subscriptionId,
3262
+ resourceGroupName,
3263
+ parentProviderNamespace,
3264
+ parentResourceType,
3265
+ parentResourceName,
3266
+ targetName
3267
+ ],
3268
+ headerParameters: [accept, contentType],
3269
+ mediaType: "json",
3270
+ serializer: serializer$2
3271
+ };
3272
+ const listNextOperationSpec$2 = {
3273
+ path: "{nextLink}",
3274
+ httpMethod: "GET",
3275
+ responses: {
3276
+ 200: {
3277
+ bodyMapper: TargetListResult
3278
+ },
3279
+ default: {
3280
+ bodyMapper: ErrorResponse
3281
+ }
3282
+ },
3283
+ queryParameters: [apiVersion, continuationToken],
3284
+ urlParameters: [
3285
+ $host,
3286
+ subscriptionId,
3287
+ resourceGroupName,
3288
+ parentProviderNamespace,
3289
+ parentResourceType,
3290
+ parentResourceName,
3291
+ nextLink
3292
+ ],
3293
+ headerParameters: [accept],
3294
+ serializer: serializer$2
3295
+ };
3296
+
3297
+ /*
3298
+ * Copyright (c) Microsoft Corporation.
3299
+ * Licensed under the MIT License.
3300
+ *
3301
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3302
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3303
+ */
3304
+ /// <reference lib="esnext.asynciterable" />
3305
+ /** Class containing TargetTypes operations. */
3306
+ class TargetTypesImpl {
3307
+ /**
3308
+ * Initialize a new instance of the class TargetTypes class.
3309
+ * @param client Reference to the service client
3310
+ */
3311
+ constructor(client) {
3312
+ this.client = client;
3313
+ }
3314
+ /**
3315
+ * Get a list of Target Type resources for given location.
3316
+ * @param locationName String that represents a Location resource name.
3317
+ * @param options The options parameters.
3318
+ */
3319
+ list(locationName, options) {
3320
+ const iter = this.listPagingAll(locationName, options);
3321
+ return {
3322
+ next() {
3323
+ return iter.next();
3324
+ },
3325
+ [Symbol.asyncIterator]() {
3326
+ return this;
3327
+ },
3328
+ byPage: () => {
3329
+ return this.listPagingPage(locationName, options);
3330
+ }
3331
+ };
3332
+ }
3333
+ listPagingPage(locationName, options) {
3334
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3335
+ let result = yield tslib.__await(this._list(locationName, options));
3336
+ yield yield tslib.__await(result.value || []);
3337
+ let continuationToken = result.nextLink;
3338
+ while (continuationToken) {
3339
+ result = yield tslib.__await(this._listNext(locationName, continuationToken, options));
3340
+ continuationToken = result.nextLink;
3341
+ yield yield tslib.__await(result.value || []);
3342
+ }
3343
+ });
3344
+ }
3345
+ listPagingAll(locationName, options) {
3346
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3347
+ var e_1, _a;
3348
+ try {
3349
+ for (var _b = tslib.__asyncValues(this.listPagingPage(locationName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3350
+ const page = _c.value;
3351
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3352
+ }
3353
+ }
3354
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3355
+ finally {
3356
+ try {
3357
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3358
+ }
3359
+ finally { if (e_1) throw e_1.error; }
3360
+ }
3361
+ });
3362
+ }
3363
+ /**
3364
+ * Get a list of Target Type resources for given location.
3365
+ * @param locationName String that represents a Location resource name.
3366
+ * @param options The options parameters.
3367
+ */
3368
+ _list(locationName, options) {
3369
+ return this.client.sendOperationRequest({ locationName, options }, listOperationSpec$1);
3370
+ }
3371
+ /**
3372
+ * Get a Target Type resources for given location.
3373
+ * @param locationName String that represents a Location resource name.
3374
+ * @param targetTypeName String that represents a Target Type resource name.
3375
+ * @param options The options parameters.
3376
+ */
3377
+ get(locationName, targetTypeName, options) {
3378
+ return this.client.sendOperationRequest({ locationName, targetTypeName, options }, getOperationSpec$1);
3379
+ }
3380
+ /**
3381
+ * ListNext
3382
+ * @param locationName String that represents a Location resource name.
3383
+ * @param nextLink The nextLink from the previous successful call to the List method.
3384
+ * @param options The options parameters.
3385
+ */
3386
+ _listNext(locationName, nextLink, options) {
3387
+ return this.client.sendOperationRequest({ locationName, nextLink, options }, listNextOperationSpec$1);
3388
+ }
3389
+ }
3390
+ // Operation Specifications
3391
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3392
+ const listOperationSpec$1 = {
3393
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes",
3394
+ httpMethod: "GET",
3395
+ responses: {
3396
+ 200: {
3397
+ bodyMapper: TargetTypeListResult
3398
+ },
3399
+ default: {
3400
+ bodyMapper: ErrorResponse
3401
+ }
3402
+ },
3403
+ queryParameters: [apiVersion, continuationToken],
3404
+ urlParameters: [
3405
+ $host,
3406
+ subscriptionId,
3407
+ locationName
3408
+ ],
3409
+ headerParameters: [accept],
3410
+ serializer: serializer$1
3411
+ };
3412
+ const getOperationSpec$1 = {
3413
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}",
3414
+ httpMethod: "GET",
3415
+ responses: {
3416
+ 200: {
3417
+ bodyMapper: TargetType
3418
+ },
3419
+ default: {
3420
+ bodyMapper: ErrorResponse
3421
+ }
3422
+ },
3423
+ queryParameters: [apiVersion],
3424
+ urlParameters: [
3425
+ $host,
3426
+ subscriptionId,
3427
+ locationName,
3428
+ targetTypeName
3429
+ ],
3430
+ headerParameters: [accept],
3431
+ serializer: serializer$1
3432
+ };
3433
+ const listNextOperationSpec$1 = {
3434
+ path: "{nextLink}",
3435
+ httpMethod: "GET",
3436
+ responses: {
3437
+ 200: {
3438
+ bodyMapper: TargetTypeListResult
3439
+ },
3440
+ default: {
3441
+ bodyMapper: ErrorResponse
3442
+ }
3443
+ },
3444
+ queryParameters: [apiVersion, continuationToken],
3445
+ urlParameters: [
3446
+ $host,
3447
+ subscriptionId,
3448
+ nextLink,
3449
+ locationName
3450
+ ],
3451
+ headerParameters: [accept],
3452
+ serializer: serializer$1
3453
+ };
3454
+
3455
+ /*
3456
+ * Copyright (c) Microsoft Corporation.
3457
+ * Licensed under the MIT License.
3458
+ *
3459
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3460
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3461
+ */
3462
+ /// <reference lib="esnext.asynciterable" />
3463
+ /** Class containing CapabilityTypes operations. */
3464
+ class CapabilityTypesImpl {
3465
+ /**
3466
+ * Initialize a new instance of the class CapabilityTypes class.
3467
+ * @param client Reference to the service client
3468
+ */
3469
+ constructor(client) {
3470
+ this.client = client;
3471
+ }
3472
+ /**
3473
+ * Get a list of Capability Type resources for given Target Type and location.
3474
+ * @param locationName String that represents a Location resource name.
3475
+ * @param targetTypeName String that represents a Target Type resource name.
3476
+ * @param options The options parameters.
3477
+ */
3478
+ list(locationName, targetTypeName, options) {
3479
+ const iter = this.listPagingAll(locationName, targetTypeName, options);
3480
+ return {
3481
+ next() {
3482
+ return iter.next();
3483
+ },
3484
+ [Symbol.asyncIterator]() {
3485
+ return this;
3486
+ },
3487
+ byPage: () => {
3488
+ return this.listPagingPage(locationName, targetTypeName, options);
3489
+ }
3490
+ };
3491
+ }
3492
+ listPagingPage(locationName, targetTypeName, options) {
3493
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3494
+ let result = yield tslib.__await(this._list(locationName, targetTypeName, options));
3495
+ yield yield tslib.__await(result.value || []);
3496
+ let continuationToken = result.nextLink;
3497
+ while (continuationToken) {
3498
+ result = yield tslib.__await(this._listNext(locationName, targetTypeName, continuationToken, options));
3499
+ continuationToken = result.nextLink;
3500
+ yield yield tslib.__await(result.value || []);
3501
+ }
3502
+ });
3503
+ }
3504
+ listPagingAll(locationName, targetTypeName, options) {
3505
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3506
+ var e_1, _a;
3507
+ try {
3508
+ for (var _b = tslib.__asyncValues(this.listPagingPage(locationName, targetTypeName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3509
+ const page = _c.value;
3510
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3511
+ }
3512
+ }
3513
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3514
+ finally {
3515
+ try {
3516
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3517
+ }
3518
+ finally { if (e_1) throw e_1.error; }
3519
+ }
3520
+ });
3521
+ }
3522
+ /**
3523
+ * Get a list of Capability Type resources for given Target Type and location.
3524
+ * @param locationName String that represents a Location resource name.
3525
+ * @param targetTypeName String that represents a Target Type resource name.
3526
+ * @param options The options parameters.
3527
+ */
3528
+ _list(locationName, targetTypeName, options) {
3529
+ return this.client.sendOperationRequest({ locationName, targetTypeName, options }, listOperationSpec);
3530
+ }
3531
+ /**
3532
+ * Get a Capability Type resource for given Target Type and location.
3533
+ * @param locationName String that represents a Location resource name.
3534
+ * @param targetTypeName String that represents a Target Type resource name.
3535
+ * @param capabilityTypeName String that represents a Capability Type resource name.
3536
+ * @param options The options parameters.
3537
+ */
3538
+ get(locationName, targetTypeName, capabilityTypeName, options) {
3539
+ return this.client.sendOperationRequest({ locationName, targetTypeName, capabilityTypeName, options }, getOperationSpec);
3540
+ }
3541
+ /**
3542
+ * ListNext
3543
+ * @param locationName String that represents a Location resource name.
3544
+ * @param targetTypeName String that represents a Target Type resource name.
3545
+ * @param nextLink The nextLink from the previous successful call to the List method.
3546
+ * @param options The options parameters.
3547
+ */
3548
+ _listNext(locationName, targetTypeName, nextLink, options) {
3549
+ return this.client.sendOperationRequest({ locationName, targetTypeName, nextLink, options }, listNextOperationSpec);
3550
+ }
3551
+ }
3552
+ // Operation Specifications
3553
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3554
+ const listOperationSpec = {
3555
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes",
3556
+ httpMethod: "GET",
3557
+ responses: {
3558
+ 200: {
3559
+ bodyMapper: CapabilityTypeListResult
3560
+ },
3561
+ default: {
3562
+ bodyMapper: ErrorResponse
3563
+ }
3564
+ },
3565
+ queryParameters: [apiVersion, continuationToken],
3566
+ urlParameters: [
3567
+ $host,
3568
+ subscriptionId,
3569
+ locationName,
3570
+ targetTypeName
3571
+ ],
3572
+ headerParameters: [accept],
3573
+ serializer
3574
+ };
3575
+ const getOperationSpec = {
3576
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}",
3577
+ httpMethod: "GET",
3578
+ responses: {
3579
+ 200: {
3580
+ bodyMapper: CapabilityType
3581
+ },
3582
+ default: {
3583
+ bodyMapper: ErrorResponse
3584
+ }
3585
+ },
3586
+ queryParameters: [apiVersion],
3587
+ urlParameters: [
3588
+ $host,
3589
+ subscriptionId,
3590
+ locationName,
3591
+ targetTypeName,
3592
+ capabilityTypeName
3593
+ ],
3594
+ headerParameters: [accept],
3595
+ serializer
3596
+ };
3597
+ const listNextOperationSpec = {
3598
+ path: "{nextLink}",
3599
+ httpMethod: "GET",
3600
+ responses: {
3601
+ 200: {
3602
+ bodyMapper: CapabilityTypeListResult
3603
+ },
3604
+ default: {
3605
+ bodyMapper: ErrorResponse
3606
+ }
3607
+ },
3608
+ queryParameters: [apiVersion, continuationToken],
3609
+ urlParameters: [
3610
+ $host,
3611
+ subscriptionId,
3612
+ nextLink,
3613
+ locationName,
3614
+ targetTypeName
3615
+ ],
3616
+ headerParameters: [accept],
3617
+ serializer
3618
+ };
3619
+
3620
+ /*
3621
+ * Copyright (c) Microsoft Corporation.
3622
+ * Licensed under the MIT License.
3623
+ *
3624
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3625
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3626
+ */
3627
+ class ChaosManagementClient extends coreClient__namespace.ServiceClient {
3628
+ /**
3629
+ * Initializes a new instance of the ChaosManagementClient class.
3630
+ * @param credentials Subscription credentials which uniquely identify client subscription.
3631
+ * @param subscriptionId GUID that represents an Azure subscription ID.
3632
+ * @param options The parameter options
3633
+ */
3634
+ constructor(credentials, subscriptionId, options) {
3635
+ var _a, _b;
3636
+ if (credentials === undefined) {
3637
+ throw new Error("'credentials' cannot be null");
3638
+ }
3639
+ if (subscriptionId === undefined) {
3640
+ throw new Error("'subscriptionId' cannot be null");
3641
+ }
3642
+ // Initializing default values for options
3643
+ if (!options) {
3644
+ options = {};
3645
+ }
3646
+ const defaults = {
3647
+ requestContentType: "application/json; charset=utf-8",
3648
+ credential: credentials
3649
+ };
3650
+ const packageDetails = `azsdk-js-arm-chaos/1.0.0-beta.1`;
3651
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3652
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3653
+ : `${packageDetails}`;
3654
+ if (!options.credentialScopes) {
3655
+ options.credentialScopes = ["https://management.azure.com/.default"];
3656
+ }
3657
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3658
+ userAgentPrefix
3659
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3660
+ super(optionsWithDefaults);
3661
+ let bearerTokenAuthenticationPolicyFound = false;
3662
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3663
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3664
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3665
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3666
+ }
3667
+ if (!options ||
3668
+ !options.pipeline ||
3669
+ options.pipeline.getOrderedPolicies().length == 0 ||
3670
+ !bearerTokenAuthenticationPolicyFound) {
3671
+ this.pipeline.removePolicy({
3672
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3673
+ });
3674
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3675
+ credential: credentials,
3676
+ scopes: `${optionsWithDefaults.credentialScopes}`,
3677
+ challengeCallbacks: {
3678
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3679
+ }
3680
+ }));
3681
+ }
3682
+ // Parameter assignments
3683
+ this.subscriptionId = subscriptionId;
3684
+ // Assigning values to Constant parameters
3685
+ this.$host = options.$host || "https://management.azure.com";
3686
+ this.apiVersion = options.apiVersion || "2022-07-01-preview";
3687
+ this.capabilities = new CapabilitiesImpl(this);
3688
+ this.experiments = new ExperimentsImpl(this);
3689
+ this.operations = new OperationsImpl(this);
3690
+ this.targets = new TargetsImpl(this);
3691
+ this.targetTypes = new TargetTypesImpl(this);
3692
+ this.capabilityTypes = new CapabilityTypesImpl(this);
3693
+ this.addCustomApiVersionPolicy(options.apiVersion);
3694
+ }
3695
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3696
+ addCustomApiVersionPolicy(apiVersion) {
3697
+ if (!apiVersion) {
3698
+ return;
3699
+ }
3700
+ const apiVersionPolicy = {
3701
+ name: "CustomApiVersionPolicy",
3702
+ sendRequest(request, next) {
3703
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3704
+ const param = request.url.split("?");
3705
+ if (param.length > 1) {
3706
+ const newParams = param[1].split("&").map((item) => {
3707
+ if (item.indexOf("api-version") > -1) {
3708
+ return "api-version=" + apiVersion;
3709
+ }
3710
+ else {
3711
+ return item;
3712
+ }
3713
+ });
3714
+ request.url = param[0] + "?" + newParams.join("&");
3715
+ }
3716
+ return next(request);
3717
+ });
3718
+ }
3719
+ };
3720
+ this.pipeline.addPolicy(apiVersionPolicy);
3721
+ }
3722
+ }
3723
+
3724
+ exports.ChaosManagementClient = ChaosManagementClient;
3725
+ //# sourceMappingURL=index.js.map