@azure/arm-confluent 2.0.0 → 3.0.0-beta.1

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