@azure/arm-selfhelp 1.0.0-alpha.20230428.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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/index.js +1434 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.js +66 -0
- package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/diagnosticsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/diagnosticsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/diagnosticsCreateSample.js +37 -0
- package/dist-esm/samples-dev/diagnosticsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/diagnosticsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/diagnosticsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/diagnosticsGetSample.js +37 -0
- package/dist-esm/samples-dev/diagnosticsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/discoverySolutionListSample.d.ts +2 -0
- package/dist-esm/samples-dev/discoverySolutionListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/discoverySolutionListSample.js +57 -0
- package/dist-esm/samples-dev/discoverySolutionListSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +56 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/src/helpRP.d.ts +20 -0
- package/dist-esm/src/helpRP.d.ts.map +1 -0
- package/dist-esm/src/helpRP.js +96 -0
- package/dist-esm/src/helpRP.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +435 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +72 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +20 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +585 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +13 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +117 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/diagnostics.d.ts +53 -0
- package/dist-esm/src/operations/diagnostics.d.ts.map +1 -0
- package/dist-esm/src/operations/diagnostics.js +180 -0
- package/dist-esm/src/operations/diagnostics.js.map +1 -0
- package/dist-esm/src/operations/discoverySolution.d.ts +50 -0
- package/dist-esm/src/operations/discoverySolution.d.ts.map +1 -0
- package/dist-esm/src/operations/discoverySolution.js +160 -0
- package/dist-esm/src/operations/discoverySolution.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +4 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +11 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +138 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/diagnostics.d.ts +45 -0
- package/dist-esm/src/operationsInterfaces/diagnostics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/diagnostics.js +9 -0
- package/dist-esm/src/operationsInterfaces/diagnostics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts +19 -0
- package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/discoverySolution.js +9 -0
- package/dist-esm/src/operationsInterfaces/discoverySolution.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/selfhelp_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/selfhelp_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/selfhelp_operations_test.spec.js +62 -0
- package/dist-esm/test/selfhelp_operations_test.spec.js.map +1 -0
- package/package.json +123 -0
- package/review/arm-selfhelp.api.md +310 -0
- package/rollup.config.js +122 -0
- package/src/helpRP.ts +144 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +485 -0
- package/src/models/mappers.ts +619 -0
- package/src/models/parameters.ts +136 -0
- package/src/operations/diagnostics.ts +249 -0
- package/src/operations/discoverySolution.ts +179 -0
- package/src/operations/index.ts +11 -0
- package/src/operations/operations.ts +149 -0
- package/src/operationsInterfaces/diagnostics.ts +80 -0
- package/src/operationsInterfaces/discoverySolution.ts +34 -0
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-selfhelp.d.ts +579 -0
- package/types/tsdoc-metadata.json +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1434 @@
|
|
|
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
|
+
var coreLro = require('@azure/core-lro');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
const pageMap = new WeakMap();
|
|
39
|
+
/**
|
|
40
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
41
|
+
* returns a continuation token that can be used to begin paging from
|
|
42
|
+
* that point later.
|
|
43
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
45
|
+
*/
|
|
46
|
+
function getContinuationToken(page) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (typeof page !== "object" || page === null) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
52
|
+
}
|
|
53
|
+
function setContinuationToken(page, continuationToken) {
|
|
54
|
+
var _a;
|
|
55
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
59
|
+
pageInfo.continuationToken = continuationToken;
|
|
60
|
+
pageMap.set(page, pageInfo);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Copyright (c) Microsoft Corporation.
|
|
65
|
+
* Licensed under the MIT License.
|
|
66
|
+
*
|
|
67
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
68
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
69
|
+
*/
|
|
70
|
+
/** Known values of {@link Origin} that the service accepts. */
|
|
71
|
+
exports.KnownOrigin = void 0;
|
|
72
|
+
(function (KnownOrigin) {
|
|
73
|
+
/** User */
|
|
74
|
+
KnownOrigin["User"] = "user";
|
|
75
|
+
/** System */
|
|
76
|
+
KnownOrigin["System"] = "system";
|
|
77
|
+
/** UserSystem */
|
|
78
|
+
KnownOrigin["UserSystem"] = "user,system";
|
|
79
|
+
})(exports.KnownOrigin || (exports.KnownOrigin = {}));
|
|
80
|
+
/** Known values of {@link ActionType} that the service accepts. */
|
|
81
|
+
exports.KnownActionType = void 0;
|
|
82
|
+
(function (KnownActionType) {
|
|
83
|
+
/** Internal */
|
|
84
|
+
KnownActionType["Internal"] = "Internal";
|
|
85
|
+
})(exports.KnownActionType || (exports.KnownActionType = {}));
|
|
86
|
+
/** Known values of {@link ProvisioningState} that the service accepts. */
|
|
87
|
+
exports.KnownProvisioningState = void 0;
|
|
88
|
+
(function (KnownProvisioningState) {
|
|
89
|
+
/** All Diagnostics in the Batch succeeded. */
|
|
90
|
+
KnownProvisioningState["Succeeded"] = "Succeeded";
|
|
91
|
+
/** Some Diagnostics are still running or failed. */
|
|
92
|
+
KnownProvisioningState["PartialComplete"] = "PartialComplete";
|
|
93
|
+
/** All Diagnostics failed to run. */
|
|
94
|
+
KnownProvisioningState["Failed"] = "Failed";
|
|
95
|
+
/** When Diagnostic request gets canceled. */
|
|
96
|
+
KnownProvisioningState["Canceled"] = "Canceled";
|
|
97
|
+
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
|
|
98
|
+
/** Known values of {@link Status} that the service accepts. */
|
|
99
|
+
exports.KnownStatus = void 0;
|
|
100
|
+
(function (KnownStatus) {
|
|
101
|
+
/** Diagnostic creation failed. */
|
|
102
|
+
KnownStatus["Failed"] = "Failed";
|
|
103
|
+
/** Request is missing required inputs to run. */
|
|
104
|
+
KnownStatus["MissingInputs"] = "MissingInputs";
|
|
105
|
+
/** Diagnostic is still running. */
|
|
106
|
+
KnownStatus["Running"] = "Running";
|
|
107
|
+
/** Diagnostic creation succeeded. */
|
|
108
|
+
KnownStatus["Succeeded"] = "Succeeded";
|
|
109
|
+
/** Diagnostic was timed out. */
|
|
110
|
+
KnownStatus["Timeout"] = "Timeout";
|
|
111
|
+
})(exports.KnownStatus || (exports.KnownStatus = {}));
|
|
112
|
+
/** Known values of {@link ImportanceLevel} that the service accepts. */
|
|
113
|
+
exports.KnownImportanceLevel = void 0;
|
|
114
|
+
(function (KnownImportanceLevel) {
|
|
115
|
+
/** A critical insight has been found after running the diagnostic. */
|
|
116
|
+
KnownImportanceLevel["Critical"] = "Critical";
|
|
117
|
+
/** A warning insight has been found after running the diagnostic. */
|
|
118
|
+
KnownImportanceLevel["Warning"] = "Warning";
|
|
119
|
+
/** An information insight has been found after running the diagnostic. */
|
|
120
|
+
KnownImportanceLevel["Information"] = "Information";
|
|
121
|
+
})(exports.KnownImportanceLevel || (exports.KnownImportanceLevel = {}));
|
|
122
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
123
|
+
exports.KnownCreatedByType = void 0;
|
|
124
|
+
(function (KnownCreatedByType) {
|
|
125
|
+
/** User */
|
|
126
|
+
KnownCreatedByType["User"] = "User";
|
|
127
|
+
/** Application */
|
|
128
|
+
KnownCreatedByType["Application"] = "Application";
|
|
129
|
+
/** ManagedIdentity */
|
|
130
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
131
|
+
/** Key */
|
|
132
|
+
KnownCreatedByType["Key"] = "Key";
|
|
133
|
+
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
* Copyright (c) Microsoft Corporation.
|
|
137
|
+
* Licensed under the MIT License.
|
|
138
|
+
*
|
|
139
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
140
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
141
|
+
*/
|
|
142
|
+
const OperationListResult = {
|
|
143
|
+
type: {
|
|
144
|
+
name: "Composite",
|
|
145
|
+
className: "OperationListResult",
|
|
146
|
+
modelProperties: {
|
|
147
|
+
value: {
|
|
148
|
+
serializedName: "value",
|
|
149
|
+
readOnly: true,
|
|
150
|
+
type: {
|
|
151
|
+
name: "Sequence",
|
|
152
|
+
element: {
|
|
153
|
+
type: {
|
|
154
|
+
name: "Composite",
|
|
155
|
+
className: "Operation"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
nextLink: {
|
|
161
|
+
serializedName: "nextLink",
|
|
162
|
+
readOnly: true,
|
|
163
|
+
type: {
|
|
164
|
+
name: "String"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const Operation = {
|
|
171
|
+
type: {
|
|
172
|
+
name: "Composite",
|
|
173
|
+
className: "Operation",
|
|
174
|
+
modelProperties: {
|
|
175
|
+
name: {
|
|
176
|
+
serializedName: "name",
|
|
177
|
+
readOnly: true,
|
|
178
|
+
type: {
|
|
179
|
+
name: "String"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
isDataAction: {
|
|
183
|
+
serializedName: "isDataAction",
|
|
184
|
+
readOnly: true,
|
|
185
|
+
type: {
|
|
186
|
+
name: "Boolean"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
display: {
|
|
190
|
+
serializedName: "display",
|
|
191
|
+
type: {
|
|
192
|
+
name: "Composite",
|
|
193
|
+
className: "OperationDisplay"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
origin: {
|
|
197
|
+
serializedName: "origin",
|
|
198
|
+
readOnly: true,
|
|
199
|
+
type: {
|
|
200
|
+
name: "String"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
actionType: {
|
|
204
|
+
serializedName: "actionType",
|
|
205
|
+
readOnly: true,
|
|
206
|
+
type: {
|
|
207
|
+
name: "String"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
const OperationDisplay = {
|
|
214
|
+
type: {
|
|
215
|
+
name: "Composite",
|
|
216
|
+
className: "OperationDisplay",
|
|
217
|
+
modelProperties: {
|
|
218
|
+
provider: {
|
|
219
|
+
serializedName: "provider",
|
|
220
|
+
readOnly: true,
|
|
221
|
+
type: {
|
|
222
|
+
name: "String"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
resource: {
|
|
226
|
+
serializedName: "resource",
|
|
227
|
+
readOnly: true,
|
|
228
|
+
type: {
|
|
229
|
+
name: "String"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
operation: {
|
|
233
|
+
serializedName: "operation",
|
|
234
|
+
readOnly: true,
|
|
235
|
+
type: {
|
|
236
|
+
name: "String"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
description: {
|
|
240
|
+
serializedName: "description",
|
|
241
|
+
readOnly: true,
|
|
242
|
+
type: {
|
|
243
|
+
name: "String"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
const ErrorResponse = {
|
|
250
|
+
type: {
|
|
251
|
+
name: "Composite",
|
|
252
|
+
className: "ErrorResponse",
|
|
253
|
+
modelProperties: {
|
|
254
|
+
error: {
|
|
255
|
+
serializedName: "error",
|
|
256
|
+
type: {
|
|
257
|
+
name: "Composite",
|
|
258
|
+
className: "ErrorDetail"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const ErrorDetail = {
|
|
265
|
+
type: {
|
|
266
|
+
name: "Composite",
|
|
267
|
+
className: "ErrorDetail",
|
|
268
|
+
modelProperties: {
|
|
269
|
+
code: {
|
|
270
|
+
serializedName: "code",
|
|
271
|
+
readOnly: true,
|
|
272
|
+
type: {
|
|
273
|
+
name: "String"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
message: {
|
|
277
|
+
serializedName: "message",
|
|
278
|
+
readOnly: true,
|
|
279
|
+
type: {
|
|
280
|
+
name: "String"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
target: {
|
|
284
|
+
serializedName: "target",
|
|
285
|
+
readOnly: true,
|
|
286
|
+
type: {
|
|
287
|
+
name: "String"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
details: {
|
|
291
|
+
serializedName: "details",
|
|
292
|
+
readOnly: true,
|
|
293
|
+
type: {
|
|
294
|
+
name: "Sequence",
|
|
295
|
+
element: {
|
|
296
|
+
type: {
|
|
297
|
+
name: "Composite",
|
|
298
|
+
className: "ErrorDetail"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
additionalInfo: {
|
|
304
|
+
serializedName: "additionalInfo",
|
|
305
|
+
readOnly: true,
|
|
306
|
+
type: {
|
|
307
|
+
name: "Sequence",
|
|
308
|
+
element: {
|
|
309
|
+
type: {
|
|
310
|
+
name: "Composite",
|
|
311
|
+
className: "ErrorAdditionalInfo"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
const ErrorAdditionalInfo = {
|
|
320
|
+
type: {
|
|
321
|
+
name: "Composite",
|
|
322
|
+
className: "ErrorAdditionalInfo",
|
|
323
|
+
modelProperties: {
|
|
324
|
+
type: {
|
|
325
|
+
serializedName: "type",
|
|
326
|
+
readOnly: true,
|
|
327
|
+
type: {
|
|
328
|
+
name: "String"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
info: {
|
|
332
|
+
serializedName: "info",
|
|
333
|
+
readOnly: true,
|
|
334
|
+
type: {
|
|
335
|
+
name: "Dictionary",
|
|
336
|
+
value: { type: { name: "any" } }
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
const CheckNameAvailabilityRequest = {
|
|
343
|
+
type: {
|
|
344
|
+
name: "Composite",
|
|
345
|
+
className: "CheckNameAvailabilityRequest",
|
|
346
|
+
modelProperties: {
|
|
347
|
+
name: {
|
|
348
|
+
serializedName: "name",
|
|
349
|
+
type: {
|
|
350
|
+
name: "String"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
type: {
|
|
354
|
+
serializedName: "type",
|
|
355
|
+
type: {
|
|
356
|
+
name: "String"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const CheckNameAvailabilityResponse = {
|
|
363
|
+
type: {
|
|
364
|
+
name: "Composite",
|
|
365
|
+
className: "CheckNameAvailabilityResponse",
|
|
366
|
+
modelProperties: {
|
|
367
|
+
nameAvailable: {
|
|
368
|
+
serializedName: "nameAvailable",
|
|
369
|
+
type: {
|
|
370
|
+
name: "Boolean"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
reason: {
|
|
374
|
+
serializedName: "reason",
|
|
375
|
+
type: {
|
|
376
|
+
name: "String"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
message: {
|
|
380
|
+
serializedName: "message",
|
|
381
|
+
type: {
|
|
382
|
+
name: "String"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
const DiagnosticInvocation = {
|
|
389
|
+
type: {
|
|
390
|
+
name: "Composite",
|
|
391
|
+
className: "DiagnosticInvocation",
|
|
392
|
+
modelProperties: {
|
|
393
|
+
solutionId: {
|
|
394
|
+
serializedName: "solutionId",
|
|
395
|
+
type: {
|
|
396
|
+
name: "String"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
additionalParameters: {
|
|
400
|
+
serializedName: "additionalParameters",
|
|
401
|
+
type: {
|
|
402
|
+
name: "Dictionary",
|
|
403
|
+
value: { type: { name: "String" } }
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
const Diagnostic = {
|
|
410
|
+
type: {
|
|
411
|
+
name: "Composite",
|
|
412
|
+
className: "Diagnostic",
|
|
413
|
+
modelProperties: {
|
|
414
|
+
solutionId: {
|
|
415
|
+
serializedName: "solutionId",
|
|
416
|
+
type: {
|
|
417
|
+
name: "String"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
status: {
|
|
421
|
+
serializedName: "status",
|
|
422
|
+
type: {
|
|
423
|
+
name: "String"
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
insights: {
|
|
427
|
+
serializedName: "insights",
|
|
428
|
+
type: {
|
|
429
|
+
name: "Sequence",
|
|
430
|
+
element: {
|
|
431
|
+
type: {
|
|
432
|
+
name: "Composite",
|
|
433
|
+
className: "Insight"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
error: {
|
|
439
|
+
serializedName: "error",
|
|
440
|
+
type: {
|
|
441
|
+
name: "Composite",
|
|
442
|
+
className: "ErrorModel"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
const Insight = {
|
|
449
|
+
type: {
|
|
450
|
+
name: "Composite",
|
|
451
|
+
className: "Insight",
|
|
452
|
+
modelProperties: {
|
|
453
|
+
id: {
|
|
454
|
+
serializedName: "id",
|
|
455
|
+
type: {
|
|
456
|
+
name: "String"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
title: {
|
|
460
|
+
serializedName: "title",
|
|
461
|
+
type: {
|
|
462
|
+
name: "String"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
results: {
|
|
466
|
+
serializedName: "results",
|
|
467
|
+
type: {
|
|
468
|
+
name: "String"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
importanceLevel: {
|
|
472
|
+
serializedName: "importanceLevel",
|
|
473
|
+
type: {
|
|
474
|
+
name: "String"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
const ErrorModel = {
|
|
481
|
+
type: {
|
|
482
|
+
name: "Composite",
|
|
483
|
+
className: "ErrorModel",
|
|
484
|
+
modelProperties: {
|
|
485
|
+
code: {
|
|
486
|
+
serializedName: "code",
|
|
487
|
+
readOnly: true,
|
|
488
|
+
type: {
|
|
489
|
+
name: "String"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
type: {
|
|
493
|
+
serializedName: "type",
|
|
494
|
+
readOnly: true,
|
|
495
|
+
type: {
|
|
496
|
+
name: "String"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
message: {
|
|
500
|
+
serializedName: "message",
|
|
501
|
+
readOnly: true,
|
|
502
|
+
type: {
|
|
503
|
+
name: "String"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
details: {
|
|
507
|
+
serializedName: "details",
|
|
508
|
+
type: {
|
|
509
|
+
name: "Sequence",
|
|
510
|
+
element: {
|
|
511
|
+
type: {
|
|
512
|
+
name: "Composite",
|
|
513
|
+
className: "ErrorModel"
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
const Resource = {
|
|
522
|
+
type: {
|
|
523
|
+
name: "Composite",
|
|
524
|
+
className: "Resource",
|
|
525
|
+
modelProperties: {
|
|
526
|
+
id: {
|
|
527
|
+
serializedName: "id",
|
|
528
|
+
readOnly: true,
|
|
529
|
+
type: {
|
|
530
|
+
name: "String"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
name: {
|
|
534
|
+
serializedName: "name",
|
|
535
|
+
readOnly: true,
|
|
536
|
+
type: {
|
|
537
|
+
name: "String"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
type: {
|
|
541
|
+
serializedName: "type",
|
|
542
|
+
readOnly: true,
|
|
543
|
+
type: {
|
|
544
|
+
name: "String"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
systemData: {
|
|
548
|
+
serializedName: "systemData",
|
|
549
|
+
type: {
|
|
550
|
+
name: "Composite",
|
|
551
|
+
className: "SystemData"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
const SystemData = {
|
|
558
|
+
type: {
|
|
559
|
+
name: "Composite",
|
|
560
|
+
className: "SystemData",
|
|
561
|
+
modelProperties: {
|
|
562
|
+
createdBy: {
|
|
563
|
+
serializedName: "createdBy",
|
|
564
|
+
type: {
|
|
565
|
+
name: "String"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
createdByType: {
|
|
569
|
+
serializedName: "createdByType",
|
|
570
|
+
type: {
|
|
571
|
+
name: "String"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
createdAt: {
|
|
575
|
+
serializedName: "createdAt",
|
|
576
|
+
type: {
|
|
577
|
+
name: "DateTime"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
lastModifiedBy: {
|
|
581
|
+
serializedName: "lastModifiedBy",
|
|
582
|
+
type: {
|
|
583
|
+
name: "String"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
lastModifiedByType: {
|
|
587
|
+
serializedName: "lastModifiedByType",
|
|
588
|
+
type: {
|
|
589
|
+
name: "String"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
lastModifiedAt: {
|
|
593
|
+
serializedName: "lastModifiedAt",
|
|
594
|
+
type: {
|
|
595
|
+
name: "DateTime"
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
const DiscoveryResponse = {
|
|
602
|
+
type: {
|
|
603
|
+
name: "Composite",
|
|
604
|
+
className: "DiscoveryResponse",
|
|
605
|
+
modelProperties: {
|
|
606
|
+
value: {
|
|
607
|
+
serializedName: "value",
|
|
608
|
+
type: {
|
|
609
|
+
name: "Sequence",
|
|
610
|
+
element: {
|
|
611
|
+
type: {
|
|
612
|
+
name: "Composite",
|
|
613
|
+
className: "SolutionMetadataResource"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
nextLink: {
|
|
619
|
+
serializedName: "nextLink",
|
|
620
|
+
type: {
|
|
621
|
+
name: "String"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
const ProxyResource = {
|
|
628
|
+
type: {
|
|
629
|
+
name: "Composite",
|
|
630
|
+
className: "ProxyResource",
|
|
631
|
+
modelProperties: Object.assign({}, Resource.type.modelProperties)
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
const DiagnosticResource = {
|
|
635
|
+
type: {
|
|
636
|
+
name: "Composite",
|
|
637
|
+
className: "DiagnosticResource",
|
|
638
|
+
modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { globalParameters: {
|
|
639
|
+
serializedName: "properties.globalParameters",
|
|
640
|
+
type: {
|
|
641
|
+
name: "Dictionary",
|
|
642
|
+
value: { type: { name: "String" } }
|
|
643
|
+
}
|
|
644
|
+
}, insights: {
|
|
645
|
+
serializedName: "properties.insights",
|
|
646
|
+
type: {
|
|
647
|
+
name: "Sequence",
|
|
648
|
+
element: {
|
|
649
|
+
type: {
|
|
650
|
+
name: "Composite",
|
|
651
|
+
className: "DiagnosticInvocation"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}, acceptedAt: {
|
|
656
|
+
serializedName: "properties.acceptedAt",
|
|
657
|
+
readOnly: true,
|
|
658
|
+
type: {
|
|
659
|
+
name: "String"
|
|
660
|
+
}
|
|
661
|
+
}, provisioningState: {
|
|
662
|
+
serializedName: "properties.provisioningState",
|
|
663
|
+
readOnly: true,
|
|
664
|
+
type: {
|
|
665
|
+
name: "String"
|
|
666
|
+
}
|
|
667
|
+
}, diagnostics: {
|
|
668
|
+
serializedName: "properties.diagnostics",
|
|
669
|
+
readOnly: true,
|
|
670
|
+
type: {
|
|
671
|
+
name: "Sequence",
|
|
672
|
+
element: {
|
|
673
|
+
type: {
|
|
674
|
+
name: "Composite",
|
|
675
|
+
className: "Diagnostic"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
} })
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
const SolutionMetadataResource = {
|
|
683
|
+
type: {
|
|
684
|
+
name: "Composite",
|
|
685
|
+
className: "SolutionMetadataResource",
|
|
686
|
+
modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { solutionId: {
|
|
687
|
+
serializedName: "properties.solutionId",
|
|
688
|
+
type: {
|
|
689
|
+
name: "String"
|
|
690
|
+
}
|
|
691
|
+
}, solutionType: {
|
|
692
|
+
serializedName: "properties.solutionType",
|
|
693
|
+
type: {
|
|
694
|
+
name: "String"
|
|
695
|
+
}
|
|
696
|
+
}, description: {
|
|
697
|
+
serializedName: "properties.description",
|
|
698
|
+
type: {
|
|
699
|
+
name: "String"
|
|
700
|
+
}
|
|
701
|
+
}, requiredParameterSets: {
|
|
702
|
+
serializedName: "properties.requiredParameterSets",
|
|
703
|
+
type: {
|
|
704
|
+
name: "Sequence",
|
|
705
|
+
element: {
|
|
706
|
+
type: {
|
|
707
|
+
name: "Sequence",
|
|
708
|
+
element: {
|
|
709
|
+
type: {
|
|
710
|
+
name: "String"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
} })
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
721
|
+
__proto__: null,
|
|
722
|
+
OperationListResult: OperationListResult,
|
|
723
|
+
Operation: Operation,
|
|
724
|
+
OperationDisplay: OperationDisplay,
|
|
725
|
+
ErrorResponse: ErrorResponse,
|
|
726
|
+
ErrorDetail: ErrorDetail,
|
|
727
|
+
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
|
728
|
+
CheckNameAvailabilityRequest: CheckNameAvailabilityRequest,
|
|
729
|
+
CheckNameAvailabilityResponse: CheckNameAvailabilityResponse,
|
|
730
|
+
DiagnosticInvocation: DiagnosticInvocation,
|
|
731
|
+
Diagnostic: Diagnostic,
|
|
732
|
+
Insight: Insight,
|
|
733
|
+
ErrorModel: ErrorModel,
|
|
734
|
+
Resource: Resource,
|
|
735
|
+
SystemData: SystemData,
|
|
736
|
+
DiscoveryResponse: DiscoveryResponse,
|
|
737
|
+
ProxyResource: ProxyResource,
|
|
738
|
+
DiagnosticResource: DiagnosticResource,
|
|
739
|
+
SolutionMetadataResource: SolutionMetadataResource
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
/*
|
|
743
|
+
* Copyright (c) Microsoft Corporation.
|
|
744
|
+
* Licensed under the MIT License.
|
|
745
|
+
*
|
|
746
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
747
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
748
|
+
*/
|
|
749
|
+
const accept = {
|
|
750
|
+
parameterPath: "accept",
|
|
751
|
+
mapper: {
|
|
752
|
+
defaultValue: "application/json",
|
|
753
|
+
isConstant: true,
|
|
754
|
+
serializedName: "Accept",
|
|
755
|
+
type: {
|
|
756
|
+
name: "String"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
const $host = {
|
|
761
|
+
parameterPath: "$host",
|
|
762
|
+
mapper: {
|
|
763
|
+
serializedName: "$host",
|
|
764
|
+
required: true,
|
|
765
|
+
type: {
|
|
766
|
+
name: "String"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
skipEncoding: true
|
|
770
|
+
};
|
|
771
|
+
const apiVersion = {
|
|
772
|
+
parameterPath: "apiVersion",
|
|
773
|
+
mapper: {
|
|
774
|
+
defaultValue: "2023-01-01-preview",
|
|
775
|
+
isConstant: true,
|
|
776
|
+
serializedName: "api-version",
|
|
777
|
+
type: {
|
|
778
|
+
name: "String"
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
const nextLink = {
|
|
783
|
+
parameterPath: "nextLink",
|
|
784
|
+
mapper: {
|
|
785
|
+
serializedName: "nextLink",
|
|
786
|
+
required: true,
|
|
787
|
+
type: {
|
|
788
|
+
name: "String"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
skipEncoding: true
|
|
792
|
+
};
|
|
793
|
+
const contentType = {
|
|
794
|
+
parameterPath: ["options", "contentType"],
|
|
795
|
+
mapper: {
|
|
796
|
+
defaultValue: "application/json",
|
|
797
|
+
isConstant: true,
|
|
798
|
+
serializedName: "Content-Type",
|
|
799
|
+
type: {
|
|
800
|
+
name: "String"
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
const checkNameAvailabilityRequest = {
|
|
805
|
+
parameterPath: ["options", "checkNameAvailabilityRequest"],
|
|
806
|
+
mapper: CheckNameAvailabilityRequest
|
|
807
|
+
};
|
|
808
|
+
const scope = {
|
|
809
|
+
parameterPath: "scope",
|
|
810
|
+
mapper: {
|
|
811
|
+
serializedName: "scope",
|
|
812
|
+
required: true,
|
|
813
|
+
type: {
|
|
814
|
+
name: "String"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
skipEncoding: true
|
|
818
|
+
};
|
|
819
|
+
const diagnosticResourceRequest = {
|
|
820
|
+
parameterPath: ["options", "diagnosticResourceRequest"],
|
|
821
|
+
mapper: DiagnosticResource
|
|
822
|
+
};
|
|
823
|
+
const diagnosticsResourceName = {
|
|
824
|
+
parameterPath: "diagnosticsResourceName",
|
|
825
|
+
mapper: {
|
|
826
|
+
constraints: {
|
|
827
|
+
Pattern: new RegExp("^[A-Za-z0-9-+@()_]+$"),
|
|
828
|
+
MaxLength: 100,
|
|
829
|
+
MinLength: 1
|
|
830
|
+
},
|
|
831
|
+
serializedName: "diagnosticsResourceName",
|
|
832
|
+
required: true,
|
|
833
|
+
type: {
|
|
834
|
+
name: "String"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
const filter = {
|
|
839
|
+
parameterPath: ["options", "filter"],
|
|
840
|
+
mapper: {
|
|
841
|
+
serializedName: "$filter",
|
|
842
|
+
type: {
|
|
843
|
+
name: "String"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
skipEncoding: true
|
|
847
|
+
};
|
|
848
|
+
const skiptoken = {
|
|
849
|
+
parameterPath: ["options", "skiptoken"],
|
|
850
|
+
mapper: {
|
|
851
|
+
serializedName: "$skiptoken",
|
|
852
|
+
type: {
|
|
853
|
+
name: "String"
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
/*
|
|
859
|
+
* Copyright (c) Microsoft Corporation.
|
|
860
|
+
* Licensed under the MIT License.
|
|
861
|
+
*
|
|
862
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
863
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
864
|
+
*/
|
|
865
|
+
/// <reference lib="esnext.asynciterable" />
|
|
866
|
+
/** Class containing Operations operations. */
|
|
867
|
+
class OperationsImpl {
|
|
868
|
+
/**
|
|
869
|
+
* Initialize a new instance of the class Operations class.
|
|
870
|
+
* @param client Reference to the service client
|
|
871
|
+
*/
|
|
872
|
+
constructor(client) {
|
|
873
|
+
this.client = client;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Returns list of operations.
|
|
877
|
+
* @param options The options parameters.
|
|
878
|
+
*/
|
|
879
|
+
list(options) {
|
|
880
|
+
const iter = this.listPagingAll(options);
|
|
881
|
+
return {
|
|
882
|
+
next() {
|
|
883
|
+
return iter.next();
|
|
884
|
+
},
|
|
885
|
+
[Symbol.asyncIterator]() {
|
|
886
|
+
return this;
|
|
887
|
+
},
|
|
888
|
+
byPage: (settings) => {
|
|
889
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
890
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
891
|
+
}
|
|
892
|
+
return this.listPagingPage(options, settings);
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
listPagingPage(options, settings) {
|
|
897
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
898
|
+
let result;
|
|
899
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
900
|
+
if (!continuationToken) {
|
|
901
|
+
result = yield tslib.__await(this._list(options));
|
|
902
|
+
let page = result.value || [];
|
|
903
|
+
continuationToken = result.nextLink;
|
|
904
|
+
setContinuationToken(page, continuationToken);
|
|
905
|
+
yield yield tslib.__await(page);
|
|
906
|
+
}
|
|
907
|
+
while (continuationToken) {
|
|
908
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
909
|
+
continuationToken = result.nextLink;
|
|
910
|
+
let page = result.value || [];
|
|
911
|
+
setContinuationToken(page, continuationToken);
|
|
912
|
+
yield yield tslib.__await(page);
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
listPagingAll(options) {
|
|
917
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
918
|
+
var _a, e_1, _b, _c;
|
|
919
|
+
try {
|
|
920
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
921
|
+
_c = _f.value;
|
|
922
|
+
_d = false;
|
|
923
|
+
try {
|
|
924
|
+
const page = _c;
|
|
925
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
926
|
+
}
|
|
927
|
+
finally {
|
|
928
|
+
_d = true;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
933
|
+
finally {
|
|
934
|
+
try {
|
|
935
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
936
|
+
}
|
|
937
|
+
finally { if (e_1) throw e_1.error; }
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Returns list of operations.
|
|
943
|
+
* @param options The options parameters.
|
|
944
|
+
*/
|
|
945
|
+
_list(options) {
|
|
946
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* ListNext
|
|
950
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
951
|
+
* @param options The options parameters.
|
|
952
|
+
*/
|
|
953
|
+
_listNext(nextLink, options) {
|
|
954
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
// Operation Specifications
|
|
958
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
959
|
+
const listOperationSpec$1 = {
|
|
960
|
+
path: "/providers/Microsoft.Help/operations",
|
|
961
|
+
httpMethod: "GET",
|
|
962
|
+
responses: {
|
|
963
|
+
200: {
|
|
964
|
+
bodyMapper: OperationListResult
|
|
965
|
+
},
|
|
966
|
+
default: {
|
|
967
|
+
bodyMapper: ErrorResponse
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
queryParameters: [apiVersion],
|
|
971
|
+
urlParameters: [$host],
|
|
972
|
+
headerParameters: [accept],
|
|
973
|
+
serializer: serializer$2
|
|
974
|
+
};
|
|
975
|
+
const listNextOperationSpec$1 = {
|
|
976
|
+
path: "{nextLink}",
|
|
977
|
+
httpMethod: "GET",
|
|
978
|
+
responses: {
|
|
979
|
+
200: {
|
|
980
|
+
bodyMapper: OperationListResult
|
|
981
|
+
},
|
|
982
|
+
default: {
|
|
983
|
+
bodyMapper: ErrorResponse
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
urlParameters: [$host, nextLink],
|
|
987
|
+
headerParameters: [accept],
|
|
988
|
+
serializer: serializer$2
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
/*
|
|
992
|
+
* Copyright (c) Microsoft Corporation.
|
|
993
|
+
* Licensed under the MIT License.
|
|
994
|
+
*
|
|
995
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
996
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
997
|
+
*/
|
|
998
|
+
function createLroSpec(inputs) {
|
|
999
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
1000
|
+
return {
|
|
1001
|
+
requestMethod: spec.httpMethod,
|
|
1002
|
+
requestPath: spec.path,
|
|
1003
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
1004
|
+
sendPollRequest: (path, options) => {
|
|
1005
|
+
const restSpec = tslib.__rest(spec, ["requestBody"]);
|
|
1006
|
+
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/*
|
|
1012
|
+
* Copyright (c) Microsoft Corporation.
|
|
1013
|
+
* Licensed under the MIT License.
|
|
1014
|
+
*
|
|
1015
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1016
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1017
|
+
*/
|
|
1018
|
+
/** Class containing Diagnostics operations. */
|
|
1019
|
+
class DiagnosticsImpl {
|
|
1020
|
+
/**
|
|
1021
|
+
* Initialize a new instance of the class Diagnostics class.
|
|
1022
|
+
* @param client Reference to the service client
|
|
1023
|
+
*/
|
|
1024
|
+
constructor(client) {
|
|
1025
|
+
this.client = client;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* This API is used to check the uniqueness of a resource name used for a diagnostic check.
|
|
1029
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1030
|
+
* at the moment.
|
|
1031
|
+
* @param options The options parameters.
|
|
1032
|
+
*/
|
|
1033
|
+
checkNameAvailability(scope, options) {
|
|
1034
|
+
return this.client.sendOperationRequest({ scope, options }, checkNameAvailabilityOperationSpec);
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Diagnostics tells you precisely the root cause of the issue and how to address it. You can get
|
|
1038
|
+
* diagnostics once you discover and identify the relevant solution for your Azure issue.<br/><br/> You
|
|
1039
|
+
* can create diagnostics using the ‘solutionId’ from Solution Discovery API response and
|
|
1040
|
+
* ‘additionalParameters’ <br/><br/> <b>Note: </b>‘requiredParameterSets’ from Solutions Discovery API
|
|
1041
|
+
* response must be passed via ‘additionalParameters’ as an input to Diagnostics API
|
|
1042
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1043
|
+
* at the moment.
|
|
1044
|
+
* @param diagnosticsResourceName Unique resource name for insight resources
|
|
1045
|
+
* @param options The options parameters.
|
|
1046
|
+
*/
|
|
1047
|
+
beginCreate(scope, diagnosticsResourceName, options) {
|
|
1048
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1049
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1050
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1051
|
+
});
|
|
1052
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1053
|
+
var _a;
|
|
1054
|
+
let currentRawResponse = undefined;
|
|
1055
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1056
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1057
|
+
currentRawResponse = rawResponse;
|
|
1058
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1059
|
+
};
|
|
1060
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1061
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1062
|
+
return {
|
|
1063
|
+
flatResponse,
|
|
1064
|
+
rawResponse: {
|
|
1065
|
+
statusCode: currentRawResponse.status,
|
|
1066
|
+
body: currentRawResponse.parsedBody,
|
|
1067
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
});
|
|
1071
|
+
const lro = createLroSpec({
|
|
1072
|
+
sendOperationFn,
|
|
1073
|
+
args: { scope, diagnosticsResourceName, options },
|
|
1074
|
+
spec: createOperationSpec
|
|
1075
|
+
});
|
|
1076
|
+
const poller = yield coreLro.createHttpPoller(lro, {
|
|
1077
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1078
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1079
|
+
resourceLocationConfig: "azure-async-operation"
|
|
1080
|
+
});
|
|
1081
|
+
yield poller.poll();
|
|
1082
|
+
return poller;
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Diagnostics tells you precisely the root cause of the issue and how to address it. You can get
|
|
1087
|
+
* diagnostics once you discover and identify the relevant solution for your Azure issue.<br/><br/> You
|
|
1088
|
+
* can create diagnostics using the ‘solutionId’ from Solution Discovery API response and
|
|
1089
|
+
* ‘additionalParameters’ <br/><br/> <b>Note: </b>‘requiredParameterSets’ from Solutions Discovery API
|
|
1090
|
+
* response must be passed via ‘additionalParameters’ as an input to Diagnostics API
|
|
1091
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1092
|
+
* at the moment.
|
|
1093
|
+
* @param diagnosticsResourceName Unique resource name for insight resources
|
|
1094
|
+
* @param options The options parameters.
|
|
1095
|
+
*/
|
|
1096
|
+
beginCreateAndWait(scope, diagnosticsResourceName, options) {
|
|
1097
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1098
|
+
const poller = yield this.beginCreate(scope, diagnosticsResourceName, options);
|
|
1099
|
+
return poller.pollUntilDone();
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
|
|
1104
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1105
|
+
* at the moment.
|
|
1106
|
+
* @param diagnosticsResourceName Unique resource name for insight resources
|
|
1107
|
+
* @param options The options parameters.
|
|
1108
|
+
*/
|
|
1109
|
+
get(scope, diagnosticsResourceName, options) {
|
|
1110
|
+
return this.client.sendOperationRequest({ scope, diagnosticsResourceName, options }, getOperationSpec);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
// Operation Specifications
|
|
1114
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1115
|
+
const checkNameAvailabilityOperationSpec = {
|
|
1116
|
+
path: "/{scope}/providers/Microsoft.Help/checkNameAvailability",
|
|
1117
|
+
httpMethod: "POST",
|
|
1118
|
+
responses: {
|
|
1119
|
+
200: {
|
|
1120
|
+
bodyMapper: CheckNameAvailabilityResponse
|
|
1121
|
+
},
|
|
1122
|
+
default: {
|
|
1123
|
+
bodyMapper: ErrorResponse
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
requestBody: checkNameAvailabilityRequest,
|
|
1127
|
+
queryParameters: [apiVersion],
|
|
1128
|
+
urlParameters: [$host, scope],
|
|
1129
|
+
headerParameters: [accept, contentType],
|
|
1130
|
+
mediaType: "json",
|
|
1131
|
+
serializer: serializer$1
|
|
1132
|
+
};
|
|
1133
|
+
const createOperationSpec = {
|
|
1134
|
+
path: "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
|
|
1135
|
+
httpMethod: "PUT",
|
|
1136
|
+
responses: {
|
|
1137
|
+
200: {
|
|
1138
|
+
bodyMapper: DiagnosticResource
|
|
1139
|
+
},
|
|
1140
|
+
201: {
|
|
1141
|
+
bodyMapper: DiagnosticResource
|
|
1142
|
+
},
|
|
1143
|
+
202: {
|
|
1144
|
+
bodyMapper: DiagnosticResource
|
|
1145
|
+
},
|
|
1146
|
+
204: {
|
|
1147
|
+
bodyMapper: DiagnosticResource
|
|
1148
|
+
},
|
|
1149
|
+
default: {
|
|
1150
|
+
bodyMapper: ErrorResponse
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
requestBody: diagnosticResourceRequest,
|
|
1154
|
+
queryParameters: [apiVersion],
|
|
1155
|
+
urlParameters: [
|
|
1156
|
+
$host,
|
|
1157
|
+
scope,
|
|
1158
|
+
diagnosticsResourceName
|
|
1159
|
+
],
|
|
1160
|
+
headerParameters: [accept, contentType],
|
|
1161
|
+
mediaType: "json",
|
|
1162
|
+
serializer: serializer$1
|
|
1163
|
+
};
|
|
1164
|
+
const getOperationSpec = {
|
|
1165
|
+
path: "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
|
|
1166
|
+
httpMethod: "GET",
|
|
1167
|
+
responses: {
|
|
1168
|
+
200: {
|
|
1169
|
+
bodyMapper: DiagnosticResource
|
|
1170
|
+
},
|
|
1171
|
+
default: {
|
|
1172
|
+
bodyMapper: ErrorResponse
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
queryParameters: [apiVersion],
|
|
1176
|
+
urlParameters: [
|
|
1177
|
+
$host,
|
|
1178
|
+
scope,
|
|
1179
|
+
diagnosticsResourceName
|
|
1180
|
+
],
|
|
1181
|
+
headerParameters: [accept],
|
|
1182
|
+
serializer: serializer$1
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
/*
|
|
1186
|
+
* Copyright (c) Microsoft Corporation.
|
|
1187
|
+
* Licensed under the MIT License.
|
|
1188
|
+
*
|
|
1189
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1190
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1191
|
+
*/
|
|
1192
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1193
|
+
/** Class containing DiscoverySolution operations. */
|
|
1194
|
+
class DiscoverySolutionImpl {
|
|
1195
|
+
/**
|
|
1196
|
+
* Initialize a new instance of the class DiscoverySolution class.
|
|
1197
|
+
* @param client Reference to the service client
|
|
1198
|
+
*/
|
|
1199
|
+
constructor(client) {
|
|
1200
|
+
this.client = client;
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Solutions Discovery is the initial point of entry within Help API, which helps you identify the
|
|
1204
|
+
* relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR
|
|
1205
|
+
* resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant
|
|
1206
|
+
* diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this
|
|
1207
|
+
* [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/>
|
|
1208
|
+
* <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via
|
|
1209
|
+
* ‘additionalParameters’ as an input to Diagnostics API.
|
|
1210
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1211
|
+
* at the moment.
|
|
1212
|
+
* @param options The options parameters.
|
|
1213
|
+
*/
|
|
1214
|
+
list(scope, options) {
|
|
1215
|
+
const iter = this.listPagingAll(scope, options);
|
|
1216
|
+
return {
|
|
1217
|
+
next() {
|
|
1218
|
+
return iter.next();
|
|
1219
|
+
},
|
|
1220
|
+
[Symbol.asyncIterator]() {
|
|
1221
|
+
return this;
|
|
1222
|
+
},
|
|
1223
|
+
byPage: (settings) => {
|
|
1224
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1225
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1226
|
+
}
|
|
1227
|
+
return this.listPagingPage(scope, options, settings);
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
listPagingPage(scope, options, settings) {
|
|
1232
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1233
|
+
let result;
|
|
1234
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1235
|
+
if (!continuationToken) {
|
|
1236
|
+
result = yield tslib.__await(this._list(scope, options));
|
|
1237
|
+
let page = result.value || [];
|
|
1238
|
+
continuationToken = result.nextLink;
|
|
1239
|
+
setContinuationToken(page, continuationToken);
|
|
1240
|
+
yield yield tslib.__await(page);
|
|
1241
|
+
}
|
|
1242
|
+
while (continuationToken) {
|
|
1243
|
+
result = yield tslib.__await(this._listNext(scope, continuationToken, options));
|
|
1244
|
+
continuationToken = result.nextLink;
|
|
1245
|
+
let page = result.value || [];
|
|
1246
|
+
setContinuationToken(page, continuationToken);
|
|
1247
|
+
yield yield tslib.__await(page);
|
|
1248
|
+
}
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
listPagingAll(scope, options) {
|
|
1252
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1253
|
+
var _a, e_1, _b, _c;
|
|
1254
|
+
try {
|
|
1255
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(scope, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
1256
|
+
_c = _f.value;
|
|
1257
|
+
_d = false;
|
|
1258
|
+
try {
|
|
1259
|
+
const page = _c;
|
|
1260
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1261
|
+
}
|
|
1262
|
+
finally {
|
|
1263
|
+
_d = true;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1268
|
+
finally {
|
|
1269
|
+
try {
|
|
1270
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
1271
|
+
}
|
|
1272
|
+
finally { if (e_1) throw e_1.error; }
|
|
1273
|
+
}
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Solutions Discovery is the initial point of entry within Help API, which helps you identify the
|
|
1278
|
+
* relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR
|
|
1279
|
+
* resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant
|
|
1280
|
+
* diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this
|
|
1281
|
+
* [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/>
|
|
1282
|
+
* <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via
|
|
1283
|
+
* ‘additionalParameters’ as an input to Diagnostics API.
|
|
1284
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1285
|
+
* at the moment.
|
|
1286
|
+
* @param options The options parameters.
|
|
1287
|
+
*/
|
|
1288
|
+
_list(scope, options) {
|
|
1289
|
+
return this.client.sendOperationRequest({ scope, options }, listOperationSpec);
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* ListNext
|
|
1293
|
+
* @param scope This is an extension resource provider and only resource level extension is supported
|
|
1294
|
+
* at the moment.
|
|
1295
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1296
|
+
* @param options The options parameters.
|
|
1297
|
+
*/
|
|
1298
|
+
_listNext(scope, nextLink, options) {
|
|
1299
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
// Operation Specifications
|
|
1303
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1304
|
+
const listOperationSpec = {
|
|
1305
|
+
path: "/{scope}/providers/Microsoft.Help/discoverySolutions",
|
|
1306
|
+
httpMethod: "GET",
|
|
1307
|
+
responses: {
|
|
1308
|
+
200: {
|
|
1309
|
+
bodyMapper: DiscoveryResponse
|
|
1310
|
+
},
|
|
1311
|
+
default: {
|
|
1312
|
+
bodyMapper: ErrorResponse
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
queryParameters: [
|
|
1316
|
+
apiVersion,
|
|
1317
|
+
filter,
|
|
1318
|
+
skiptoken
|
|
1319
|
+
],
|
|
1320
|
+
urlParameters: [$host, scope],
|
|
1321
|
+
headerParameters: [accept],
|
|
1322
|
+
serializer
|
|
1323
|
+
};
|
|
1324
|
+
const listNextOperationSpec = {
|
|
1325
|
+
path: "{nextLink}",
|
|
1326
|
+
httpMethod: "GET",
|
|
1327
|
+
responses: {
|
|
1328
|
+
200: {
|
|
1329
|
+
bodyMapper: DiscoveryResponse
|
|
1330
|
+
},
|
|
1331
|
+
default: {
|
|
1332
|
+
bodyMapper: ErrorResponse
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
urlParameters: [$host, nextLink, scope],
|
|
1336
|
+
headerParameters: [accept],
|
|
1337
|
+
serializer
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
/*
|
|
1341
|
+
* Copyright (c) Microsoft Corporation.
|
|
1342
|
+
* Licensed under the MIT License.
|
|
1343
|
+
*
|
|
1344
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1345
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1346
|
+
*/
|
|
1347
|
+
class HelpRP extends coreClient__namespace.ServiceClient {
|
|
1348
|
+
/**
|
|
1349
|
+
* Initializes a new instance of the HelpRP class.
|
|
1350
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1351
|
+
* @param options The parameter options
|
|
1352
|
+
*/
|
|
1353
|
+
constructor(credentials, options) {
|
|
1354
|
+
var _a, _b, _c;
|
|
1355
|
+
if (credentials === undefined) {
|
|
1356
|
+
throw new Error("'credentials' cannot be null");
|
|
1357
|
+
}
|
|
1358
|
+
// Initializing default values for options
|
|
1359
|
+
if (!options) {
|
|
1360
|
+
options = {};
|
|
1361
|
+
}
|
|
1362
|
+
const defaults = {
|
|
1363
|
+
requestContentType: "application/json; charset=utf-8",
|
|
1364
|
+
credential: credentials
|
|
1365
|
+
};
|
|
1366
|
+
const packageDetails = `azsdk-js-arm-selfhelp/1.0.0-beta.1`;
|
|
1367
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1368
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1369
|
+
: `${packageDetails}`;
|
|
1370
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1371
|
+
userAgentPrefix
|
|
1372
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1373
|
+
super(optionsWithDefaults);
|
|
1374
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1375
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1376
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1377
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1378
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1379
|
+
}
|
|
1380
|
+
if (!options ||
|
|
1381
|
+
!options.pipeline ||
|
|
1382
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1383
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1384
|
+
this.pipeline.removePolicy({
|
|
1385
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1386
|
+
});
|
|
1387
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1388
|
+
credential: credentials,
|
|
1389
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1390
|
+
challengeCallbacks: {
|
|
1391
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1392
|
+
}
|
|
1393
|
+
}));
|
|
1394
|
+
}
|
|
1395
|
+
// Assigning values to Constant parameters
|
|
1396
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
1397
|
+
this.apiVersion = options.apiVersion || "2023-01-01-preview";
|
|
1398
|
+
this.operations = new OperationsImpl(this);
|
|
1399
|
+
this.diagnostics = new DiagnosticsImpl(this);
|
|
1400
|
+
this.discoverySolution = new DiscoverySolutionImpl(this);
|
|
1401
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1402
|
+
}
|
|
1403
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1404
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1405
|
+
if (!apiVersion) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
const apiVersionPolicy = {
|
|
1409
|
+
name: "CustomApiVersionPolicy",
|
|
1410
|
+
sendRequest(request, next) {
|
|
1411
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1412
|
+
const param = request.url.split("?");
|
|
1413
|
+
if (param.length > 1) {
|
|
1414
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1415
|
+
if (item.indexOf("api-version") > -1) {
|
|
1416
|
+
return "api-version=" + apiVersion;
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
return item;
|
|
1420
|
+
}
|
|
1421
|
+
});
|
|
1422
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1423
|
+
}
|
|
1424
|
+
return next(request);
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
exports.HelpRP = HelpRP;
|
|
1433
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1434
|
+
//# sourceMappingURL=index.js.map
|