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