@azure/arm-kusto 8.2.1-alpha.20250717.1 → 8.2.1-alpha.20250730.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 (163) hide show
  1. package/dist/browser/kustoManagementClient.js +29 -5
  2. package/dist/browser/kustoManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +443 -211
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/attachedDatabaseConfigurations.js +32 -39
  8. package/dist/browser/operations/attachedDatabaseConfigurations.js.map +1 -1
  9. package/dist/browser/operations/clusterPrincipalAssignments.js +32 -39
  10. package/dist/browser/operations/clusterPrincipalAssignments.js.map +1 -1
  11. package/dist/browser/operations/clusters.js +228 -321
  12. package/dist/browser/operations/clusters.js.map +1 -1
  13. package/dist/browser/operations/dataConnections.js +54 -51
  14. package/dist/browser/operations/dataConnections.js.map +1 -1
  15. package/dist/browser/operations/databaseOperations.js +1 -0
  16. package/dist/browser/operations/databaseOperations.js.map +1 -1
  17. package/dist/browser/operations/databasePrincipalAssignments.js +32 -39
  18. package/dist/browser/operations/databasePrincipalAssignments.js.map +1 -1
  19. package/dist/browser/operations/databases.js +65 -84
  20. package/dist/browser/operations/databases.js.map +1 -1
  21. package/dist/browser/operations/managedPrivateEndpoints.js +43 -45
  22. package/dist/browser/operations/managedPrivateEndpoints.js.map +1 -1
  23. package/dist/browser/operations/operations.js +23 -40
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/operationsResults.js +1 -0
  26. package/dist/browser/operations/operationsResults.js.map +1 -1
  27. package/dist/browser/operations/operationsResultsLocation.js +1 -0
  28. package/dist/browser/operations/operationsResultsLocation.js.map +1 -1
  29. package/dist/browser/operations/privateEndpointConnections.js +32 -39
  30. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  31. package/dist/browser/operations/privateLinkResources.js +10 -27
  32. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  33. package/dist/browser/operations/sandboxCustomImages.js +43 -45
  34. package/dist/browser/operations/sandboxCustomImages.js.map +1 -1
  35. package/dist/browser/operations/scripts.js +43 -45
  36. package/dist/browser/operations/scripts.js.map +1 -1
  37. package/dist/browser/operations/skus.js +10 -27
  38. package/dist/browser/operations/skus.js.map +1 -1
  39. package/dist/browser/pagingHelper.js +2 -4
  40. package/dist/browser/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/kustoManagementClient.js +29 -5
  42. package/dist/commonjs/kustoManagementClient.js.map +1 -1
  43. package/dist/commonjs/lroImpl.js +7 -3
  44. package/dist/commonjs/lroImpl.js.map +1 -1
  45. package/dist/commonjs/models/mappers.js +443 -211
  46. package/dist/commonjs/models/mappers.js.map +1 -1
  47. package/dist/commonjs/operations/attachedDatabaseConfigurations.js +32 -38
  48. package/dist/commonjs/operations/attachedDatabaseConfigurations.js.map +1 -1
  49. package/dist/commonjs/operations/clusterPrincipalAssignments.js +32 -38
  50. package/dist/commonjs/operations/clusterPrincipalAssignments.js.map +1 -1
  51. package/dist/commonjs/operations/clusters.js +228 -320
  52. package/dist/commonjs/operations/clusters.js.map +1 -1
  53. package/dist/commonjs/operations/dataConnections.js +54 -50
  54. package/dist/commonjs/operations/dataConnections.js.map +1 -1
  55. package/dist/commonjs/operations/databaseOperations.js +1 -0
  56. package/dist/commonjs/operations/databaseOperations.js.map +1 -1
  57. package/dist/commonjs/operations/databasePrincipalAssignments.js +32 -38
  58. package/dist/commonjs/operations/databasePrincipalAssignments.js.map +1 -1
  59. package/dist/commonjs/operations/databases.js +65 -83
  60. package/dist/commonjs/operations/databases.js.map +1 -1
  61. package/dist/commonjs/operations/managedPrivateEndpoints.js +43 -44
  62. package/dist/commonjs/operations/managedPrivateEndpoints.js.map +1 -1
  63. package/dist/commonjs/operations/operations.js +23 -39
  64. package/dist/commonjs/operations/operations.js.map +1 -1
  65. package/dist/commonjs/operations/operationsResults.js +1 -0
  66. package/dist/commonjs/operations/operationsResults.js.map +1 -1
  67. package/dist/commonjs/operations/operationsResultsLocation.js +1 -0
  68. package/dist/commonjs/operations/operationsResultsLocation.js.map +1 -1
  69. package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
  70. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  71. package/dist/commonjs/operations/privateLinkResources.js +10 -26
  72. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  73. package/dist/commonjs/operations/sandboxCustomImages.js +43 -44
  74. package/dist/commonjs/operations/sandboxCustomImages.js.map +1 -1
  75. package/dist/commonjs/operations/scripts.js +43 -44
  76. package/dist/commonjs/operations/scripts.js.map +1 -1
  77. package/dist/commonjs/operations/skus.js +10 -26
  78. package/dist/commonjs/operations/skus.js.map +1 -1
  79. package/dist/commonjs/pagingHelper.js +2 -4
  80. package/dist/commonjs/pagingHelper.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/kustoManagementClient.js +29 -5
  83. package/dist/esm/kustoManagementClient.js.map +1 -1
  84. package/dist/esm/lroImpl.js +7 -3
  85. package/dist/esm/lroImpl.js.map +1 -1
  86. package/dist/esm/models/mappers.js +443 -211
  87. package/dist/esm/models/mappers.js.map +1 -1
  88. package/dist/esm/operations/attachedDatabaseConfigurations.js +32 -39
  89. package/dist/esm/operations/attachedDatabaseConfigurations.js.map +1 -1
  90. package/dist/esm/operations/clusterPrincipalAssignments.js +32 -39
  91. package/dist/esm/operations/clusterPrincipalAssignments.js.map +1 -1
  92. package/dist/esm/operations/clusters.js +228 -321
  93. package/dist/esm/operations/clusters.js.map +1 -1
  94. package/dist/esm/operations/dataConnections.js +54 -51
  95. package/dist/esm/operations/dataConnections.js.map +1 -1
  96. package/dist/esm/operations/databaseOperations.js +1 -0
  97. package/dist/esm/operations/databaseOperations.js.map +1 -1
  98. package/dist/esm/operations/databasePrincipalAssignments.js +32 -39
  99. package/dist/esm/operations/databasePrincipalAssignments.js.map +1 -1
  100. package/dist/esm/operations/databases.js +65 -84
  101. package/dist/esm/operations/databases.js.map +1 -1
  102. package/dist/esm/operations/managedPrivateEndpoints.js +43 -45
  103. package/dist/esm/operations/managedPrivateEndpoints.js.map +1 -1
  104. package/dist/esm/operations/operations.js +23 -40
  105. package/dist/esm/operations/operations.js.map +1 -1
  106. package/dist/esm/operations/operationsResults.js +1 -0
  107. package/dist/esm/operations/operationsResults.js.map +1 -1
  108. package/dist/esm/operations/operationsResultsLocation.js +1 -0
  109. package/dist/esm/operations/operationsResultsLocation.js.map +1 -1
  110. package/dist/esm/operations/privateEndpointConnections.js +32 -39
  111. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  112. package/dist/esm/operations/privateLinkResources.js +10 -27
  113. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  114. package/dist/esm/operations/sandboxCustomImages.js +43 -45
  115. package/dist/esm/operations/sandboxCustomImages.js.map +1 -1
  116. package/dist/esm/operations/scripts.js +43 -45
  117. package/dist/esm/operations/scripts.js.map +1 -1
  118. package/dist/esm/operations/skus.js +10 -27
  119. package/dist/esm/operations/skus.js.map +1 -1
  120. package/dist/esm/pagingHelper.js +2 -4
  121. package/dist/esm/pagingHelper.js.map +1 -1
  122. package/dist/react-native/kustoManagementClient.js +29 -5
  123. package/dist/react-native/kustoManagementClient.js.map +1 -1
  124. package/dist/react-native/lroImpl.js +7 -3
  125. package/dist/react-native/lroImpl.js.map +1 -1
  126. package/dist/react-native/models/mappers.js +443 -211
  127. package/dist/react-native/models/mappers.js.map +1 -1
  128. package/dist/react-native/operations/attachedDatabaseConfigurations.js +32 -39
  129. package/dist/react-native/operations/attachedDatabaseConfigurations.js.map +1 -1
  130. package/dist/react-native/operations/clusterPrincipalAssignments.js +32 -39
  131. package/dist/react-native/operations/clusterPrincipalAssignments.js.map +1 -1
  132. package/dist/react-native/operations/clusters.js +228 -321
  133. package/dist/react-native/operations/clusters.js.map +1 -1
  134. package/dist/react-native/operations/dataConnections.js +54 -51
  135. package/dist/react-native/operations/dataConnections.js.map +1 -1
  136. package/dist/react-native/operations/databaseOperations.js +1 -0
  137. package/dist/react-native/operations/databaseOperations.js.map +1 -1
  138. package/dist/react-native/operations/databasePrincipalAssignments.js +32 -39
  139. package/dist/react-native/operations/databasePrincipalAssignments.js.map +1 -1
  140. package/dist/react-native/operations/databases.js +65 -84
  141. package/dist/react-native/operations/databases.js.map +1 -1
  142. package/dist/react-native/operations/managedPrivateEndpoints.js +43 -45
  143. package/dist/react-native/operations/managedPrivateEndpoints.js.map +1 -1
  144. package/dist/react-native/operations/operations.js +23 -40
  145. package/dist/react-native/operations/operations.js.map +1 -1
  146. package/dist/react-native/operations/operationsResults.js +1 -0
  147. package/dist/react-native/operations/operationsResults.js.map +1 -1
  148. package/dist/react-native/operations/operationsResultsLocation.js +1 -0
  149. package/dist/react-native/operations/operationsResultsLocation.js.map +1 -1
  150. package/dist/react-native/operations/privateEndpointConnections.js +32 -39
  151. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  152. package/dist/react-native/operations/privateLinkResources.js +10 -27
  153. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  154. package/dist/react-native/operations/sandboxCustomImages.js +43 -45
  155. package/dist/react-native/operations/sandboxCustomImages.js.map +1 -1
  156. package/dist/react-native/operations/scripts.js +43 -45
  157. package/dist/react-native/operations/scripts.js.map +1 -1
  158. package/dist/react-native/operations/skus.js +10 -27
  159. package/dist/react-native/operations/skus.js.map +1 -1
  160. package/dist/react-native/pagingHelper.js +2 -4
  161. package/dist/react-native/pagingHelper.js.map +1 -1
  162. package/package.json +2 -2
  163. package/review/arm-kusto-node.api.md +2342 -2342
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /// <reference lib="esnext.asynciterable" />
18
18
  /** Class containing AttachedDatabaseConfigurations operations. */
19
19
  class AttachedDatabaseConfigurationsImpl {
20
+ client;
20
21
  /**
21
22
  * Initialize a new instance of the class AttachedDatabaseConfigurations class.
22
23
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class AttachedDatabaseConfigurationsImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listByClusterPagingPage(resourceGroupName, clusterName, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listByClusterPagingPage(resourceGroupName, clusterName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listByClusterPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._listByCluster(resourceGroupName, clusterName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listByClusterPagingPage(resourceGroupName, clusterName, options, _settings) {
52
+ let result;
53
+ result = await this._listByCluster(resourceGroupName, clusterName, options);
54
+ yield result.value || [];
56
55
  }
57
- listByClusterPagingAll(resourceGroupName, clusterName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listByClusterPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByClusterPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listByClusterPagingAll(resourceGroupName, clusterName, options) {
57
+ for await (const page of this.listByClusterPagingPage(resourceGroupName, clusterName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Checks that the attached database configuration resource name is valid and is not already in use.
@@ -121,14 +105,19 @@ class AttachedDatabaseConfigurationsImpl {
121
105
  return this.client.sendOperationRequest(args, spec);
122
106
  };
123
107
  const sendOperationFn = async (args, spec) => {
124
- var _a;
125
108
  let currentRawResponse = undefined;
126
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
109
+ const providedCallback = args.options?.onResponse;
127
110
  const callback = (rawResponse, flatResponse) => {
128
111
  currentRawResponse = rawResponse;
129
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
112
+ providedCallback?.(rawResponse, flatResponse);
113
+ };
114
+ const updatedArgs = {
115
+ ...args,
116
+ options: {
117
+ ...args.options,
118
+ onResponse: callback,
119
+ },
130
120
  };
131
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
132
121
  const flatResponse = await directSendOperation(updatedArgs, spec);
133
122
  return {
134
123
  flatResponse,
@@ -151,8 +140,8 @@ class AttachedDatabaseConfigurationsImpl {
151
140
  spec: createOrUpdateOperationSpec,
152
141
  });
153
142
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
154
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
155
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
143
+ restoreFrom: options?.resumeFrom,
144
+ intervalInMs: options?.updateIntervalInMs,
156
145
  });
157
146
  await poller.poll();
158
147
  return poller;
@@ -181,14 +170,19 @@ class AttachedDatabaseConfigurationsImpl {
181
170
  return this.client.sendOperationRequest(args, spec);
182
171
  };
183
172
  const sendOperationFn = async (args, spec) => {
184
- var _a;
185
173
  let currentRawResponse = undefined;
186
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
174
+ const providedCallback = args.options?.onResponse;
187
175
  const callback = (rawResponse, flatResponse) => {
188
176
  currentRawResponse = rawResponse;
189
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
177
+ providedCallback?.(rawResponse, flatResponse);
178
+ };
179
+ const updatedArgs = {
180
+ ...args,
181
+ options: {
182
+ ...args.options,
183
+ onResponse: callback,
184
+ },
190
185
  };
191
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
192
186
  const flatResponse = await directSendOperation(updatedArgs, spec);
193
187
  return {
194
188
  flatResponse,
@@ -210,8 +204,8 @@ class AttachedDatabaseConfigurationsImpl {
210
204
  spec: deleteOperationSpec,
211
205
  });
212
206
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
213
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
214
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
207
+ restoreFrom: options?.resumeFrom,
208
+ intervalInMs: options?.updateIntervalInMs,
215
209
  });
216
210
  await poller.poll();
217
211
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"attachedDatabaseConfigurations.js","sourceRoot":"","sources":["../../../src/operations/attachedDatabaseConfigurations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,kEAAkE;AAClE,MAAa,kCAAkC;IAK7C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAAmE;QAEnE,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,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AAU,CAAC,cAAc;QACzB,UAAU,CAAC,iCAAiC;KAC7C;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,wLAAwL;IAC9L,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iCAAiC;KAC7C;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AttachedDatabaseConfigurations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { KustoManagementClient } from \"../kustoManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AttachedDatabaseConfiguration,\n AttachedDatabaseConfigurationsListByClusterOptionalParams,\n AttachedDatabaseConfigurationsListByClusterResponse,\n AttachedDatabaseConfigurationsCheckNameRequest,\n AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams,\n AttachedDatabaseConfigurationsCheckNameAvailabilityResponse,\n AttachedDatabaseConfigurationsGetOptionalParams,\n AttachedDatabaseConfigurationsGetResponse,\n AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n AttachedDatabaseConfigurationsCreateOrUpdateResponse,\n AttachedDatabaseConfigurationsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AttachedDatabaseConfigurations operations. */\nexport class AttachedDatabaseConfigurationsImpl\n implements AttachedDatabaseConfigurations\n{\n private readonly client: KustoManagementClient;\n\n /**\n * Initialize a new instance of the class AttachedDatabaseConfigurations class.\n * @param client Reference to the service client\n */\n constructor(client: KustoManagementClient) {\n this.client = client;\n }\n\n /**\n * Returns the list of attached database configurations of the given Kusto cluster.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n public listByCluster(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): PagedAsyncIterableIterator<AttachedDatabaseConfiguration> {\n const iter = this.listByClusterPagingAll(\n resourceGroupName,\n clusterName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByClusterPagingPage(\n resourceGroupName,\n clusterName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByClusterPagingPage(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AttachedDatabaseConfiguration[]> {\n let result: AttachedDatabaseConfigurationsListByClusterResponse;\n result = await this._listByCluster(resourceGroupName, clusterName, options);\n yield result.value || [];\n }\n\n private async *listByClusterPagingAll(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): AsyncIterableIterator<AttachedDatabaseConfiguration> {\n for await (const page of this.listByClusterPagingPage(\n resourceGroupName,\n clusterName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks that the attached database configuration resource name is valid and is not already in use.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param resourceName The name of the resource.\n * @param options The options parameters.\n */\n checkNameAvailability(\n resourceGroupName: string,\n clusterName: string,\n resourceName: AttachedDatabaseConfigurationsCheckNameRequest,\n options?: AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, resourceName, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Returns the list of attached database configurations of the given Kusto cluster.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n private _listByCluster(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsListByClusterResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, options },\n listByClusterOperationSpec,\n );\n }\n\n /**\n * Returns an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsGetOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param parameters The database parameters supplied to the CreateOrUpdate operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n parameters: AttachedDatabaseConfiguration,\n options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AttachedDatabaseConfigurationsCreateOrUpdateResponse>,\n AttachedDatabaseConfigurationsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AttachedDatabaseConfigurationsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AttachedDatabaseConfigurationsCreateOrUpdateResponse,\n OperationState<AttachedDatabaseConfigurationsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param parameters The database parameters supplied to the CreateOrUpdate operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n parameters: AttachedDatabaseConfiguration,\n options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the attached database configuration with the given name.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the attached database configuration with the given name.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurationCheckNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resourceName1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByClusterOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 201: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 202: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 204: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"attachedDatabaseConfigurations.js","sourceRoot":"","sources":["../../../src/operations/attachedDatabaseConfigurations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,kEAAkE;AAClE,MAAa,kCAAkC;IAG5B,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAAmE;QAEnE,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EA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,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iCAAiC;KAC7C;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AttachedDatabaseConfigurations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { KustoManagementClient } from \"../kustoManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AttachedDatabaseConfiguration,\n AttachedDatabaseConfigurationsListByClusterOptionalParams,\n AttachedDatabaseConfigurationsListByClusterResponse,\n AttachedDatabaseConfigurationsCheckNameRequest,\n AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams,\n AttachedDatabaseConfigurationsCheckNameAvailabilityResponse,\n AttachedDatabaseConfigurationsGetOptionalParams,\n AttachedDatabaseConfigurationsGetResponse,\n AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n AttachedDatabaseConfigurationsCreateOrUpdateResponse,\n AttachedDatabaseConfigurationsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AttachedDatabaseConfigurations operations. */\nexport class AttachedDatabaseConfigurationsImpl\n implements AttachedDatabaseConfigurations\n{\n private readonly client: KustoManagementClient;\n\n /**\n * Initialize a new instance of the class AttachedDatabaseConfigurations class.\n * @param client Reference to the service client\n */\n constructor(client: KustoManagementClient) {\n this.client = client;\n }\n\n /**\n * Returns the list of attached database configurations of the given Kusto cluster.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n public listByCluster(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): PagedAsyncIterableIterator<AttachedDatabaseConfiguration> {\n const iter = this.listByClusterPagingAll(\n resourceGroupName,\n clusterName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByClusterPagingPage(\n resourceGroupName,\n clusterName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByClusterPagingPage(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AttachedDatabaseConfiguration[]> {\n let result: AttachedDatabaseConfigurationsListByClusterResponse;\n result = await this._listByCluster(resourceGroupName, clusterName, options);\n yield result.value || [];\n }\n\n private async *listByClusterPagingAll(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): AsyncIterableIterator<AttachedDatabaseConfiguration> {\n for await (const page of this.listByClusterPagingPage(\n resourceGroupName,\n clusterName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks that the attached database configuration resource name is valid and is not already in use.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param resourceName The name of the resource.\n * @param options The options parameters.\n */\n checkNameAvailability(\n resourceGroupName: string,\n clusterName: string,\n resourceName: AttachedDatabaseConfigurationsCheckNameRequest,\n options?: AttachedDatabaseConfigurationsCheckNameAvailabilityOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, resourceName, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Returns the list of attached database configurations of the given Kusto cluster.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n private _listByCluster(\n resourceGroupName: string,\n clusterName: string,\n options?: AttachedDatabaseConfigurationsListByClusterOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsListByClusterResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, options },\n listByClusterOperationSpec,\n );\n }\n\n /**\n * Returns an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsGetOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param parameters The database parameters supplied to the CreateOrUpdate operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n parameters: AttachedDatabaseConfiguration,\n options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AttachedDatabaseConfigurationsCreateOrUpdateResponse>,\n AttachedDatabaseConfigurationsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AttachedDatabaseConfigurationsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AttachedDatabaseConfigurationsCreateOrUpdateResponse,\n OperationState<AttachedDatabaseConfigurationsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates an attached database configuration.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param parameters The database parameters supplied to the CreateOrUpdate operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n parameters: AttachedDatabaseConfiguration,\n options?: AttachedDatabaseConfigurationsCreateOrUpdateOptionalParams,\n ): Promise<AttachedDatabaseConfigurationsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the attached database configuration with the given name.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the attached database configuration with the given name.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param attachedDatabaseConfigurationName The name of the attached database configuration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n clusterName: string,\n attachedDatabaseConfigurationName: string,\n options?: AttachedDatabaseConfigurationsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n clusterName,\n attachedDatabaseConfigurationName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurationCheckNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resourceName1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByClusterOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 201: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 202: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n 204: {\n bodyMapper: Mappers.AttachedDatabaseConfiguration,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.attachedDatabaseConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /// <reference lib="esnext.asynciterable" />
18
18
  /** Class containing ClusterPrincipalAssignments operations. */
19
19
  class ClusterPrincipalAssignmentsImpl {
20
+ client;
20
21
  /**
21
22
  * Initialize a new instance of the class ClusterPrincipalAssignments class.
22
23
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class ClusterPrincipalAssignmentsImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(resourceGroupName, clusterName, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(resourceGroupName, clusterName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(resourceGroupName, clusterName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(resourceGroupName, clusterName, options, _settings) {
52
+ let result;
53
+ result = await this._list(resourceGroupName, clusterName, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(resourceGroupName, clusterName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(resourceGroupName, clusterName, options) {
57
+ for await (const page of this.listPagingPage(resourceGroupName, clusterName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Checks that the principal assignment name is valid and is not already in use.
@@ -107,14 +91,19 @@ class ClusterPrincipalAssignmentsImpl {
107
91
  return this.client.sendOperationRequest(args, spec);
108
92
  };
109
93
  const sendOperationFn = async (args, spec) => {
110
- var _a;
111
94
  let currentRawResponse = undefined;
112
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
95
+ const providedCallback = args.options?.onResponse;
113
96
  const callback = (rawResponse, flatResponse) => {
114
97
  currentRawResponse = rawResponse;
115
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
98
+ providedCallback?.(rawResponse, flatResponse);
99
+ };
100
+ const updatedArgs = {
101
+ ...args,
102
+ options: {
103
+ ...args.options,
104
+ onResponse: callback,
105
+ },
116
106
  };
117
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
118
107
  const flatResponse = await directSendOperation(updatedArgs, spec);
119
108
  return {
120
109
  flatResponse,
@@ -137,8 +126,8 @@ class ClusterPrincipalAssignmentsImpl {
137
126
  spec: createOrUpdateOperationSpec,
138
127
  });
139
128
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
140
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
141
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
129
+ restoreFrom: options?.resumeFrom,
130
+ intervalInMs: options?.updateIntervalInMs,
142
131
  });
143
132
  await poller.poll();
144
133
  return poller;
@@ -167,14 +156,19 @@ class ClusterPrincipalAssignmentsImpl {
167
156
  return this.client.sendOperationRequest(args, spec);
168
157
  };
169
158
  const sendOperationFn = async (args, spec) => {
170
- var _a;
171
159
  let currentRawResponse = undefined;
172
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
160
+ const providedCallback = args.options?.onResponse;
173
161
  const callback = (rawResponse, flatResponse) => {
174
162
  currentRawResponse = rawResponse;
175
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
163
+ providedCallback?.(rawResponse, flatResponse);
164
+ };
165
+ const updatedArgs = {
166
+ ...args,
167
+ options: {
168
+ ...args.options,
169
+ onResponse: callback,
170
+ },
176
171
  };
177
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
178
172
  const flatResponse = await directSendOperation(updatedArgs, spec);
179
173
  return {
180
174
  flatResponse,
@@ -196,8 +190,8 @@ class ClusterPrincipalAssignmentsImpl {
196
190
  spec: deleteOperationSpec,
197
191
  });
198
192
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
199
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
200
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
193
+ restoreFrom: options?.resumeFrom,
194
+ intervalInMs: options?.updateIntervalInMs,
201
195
  });
202
196
  await poller.poll();
203
197
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"clusterPrincipalAssignments.js","sourceRoot":"","sources":["../../../src/operations/clusterPrincipalAssignments.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,+DAA+D;AAC/D,MAAa,+BAA+B;IAK1C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG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AAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,oKAAoK;IAC1K,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,wBAAwB;KACpC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0IAA0I;IAChJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ClusterPrincipalAssignments } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { KustoManagementClient } from \"../kustoManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ClusterPrincipalAssignment,\n ClusterPrincipalAssignmentsListOptionalParams,\n ClusterPrincipalAssignmentsListResponse,\n ClusterPrincipalAssignmentCheckNameRequest,\n ClusterPrincipalAssignmentsCheckNameAvailabilityOptionalParams,\n ClusterPrincipalAssignmentsCheckNameAvailabilityResponse,\n ClusterPrincipalAssignmentsGetOptionalParams,\n ClusterPrincipalAssignmentsGetResponse,\n ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ClusterPrincipalAssignmentsCreateOrUpdateResponse,\n ClusterPrincipalAssignmentsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ClusterPrincipalAssignments operations. */\nexport class ClusterPrincipalAssignmentsImpl\n implements ClusterPrincipalAssignments\n{\n private readonly client: KustoManagementClient;\n\n /**\n * Initialize a new instance of the class ClusterPrincipalAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: KustoManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all Kusto cluster principalAssignments.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): PagedAsyncIterableIterator<ClusterPrincipalAssignment> {\n const iter = this.listPagingAll(resourceGroupName, clusterName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n resourceGroupName,\n clusterName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ClusterPrincipalAssignment[]> {\n let result: ClusterPrincipalAssignmentsListResponse;\n result = await this._list(resourceGroupName, clusterName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): AsyncIterableIterator<ClusterPrincipalAssignment> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n clusterName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks that the principal assignment name is valid and is not already in use.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the principal assignment.\n * @param options The options parameters.\n */\n checkNameAvailability(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: ClusterPrincipalAssignmentCheckNameRequest,\n options?: ClusterPrincipalAssignmentsCheckNameAvailabilityOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, principalAssignmentName, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Gets a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsGetOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, principalAssignmentName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n parameters: ClusterPrincipalAssignment,\n options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ClusterPrincipalAssignmentsCreateOrUpdateResponse>,\n ClusterPrincipalAssignmentsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ClusterPrincipalAssignmentsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n ClusterPrincipalAssignmentsCreateOrUpdateResponse,\n OperationState<ClusterPrincipalAssignmentsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n parameters: ClusterPrincipalAssignment,\n options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Lists all Kusto cluster principalAssignments.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.principalAssignmentName,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 201: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 202: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 204: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignmentListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"clusterPrincipalAssignments.js","sourceRoot":"","sources":["../../../src/operations/clusterPrincipalAssignments.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,+DAA+D;AAC/D,MAAa,+BAA+B;IAGzB,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,WAAmB,EACnB,OAAuD;QAEvD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QACzE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB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AAE,0IAA0I;IAChJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ClusterPrincipalAssignments } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { KustoManagementClient } from \"../kustoManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ClusterPrincipalAssignment,\n ClusterPrincipalAssignmentsListOptionalParams,\n ClusterPrincipalAssignmentsListResponse,\n ClusterPrincipalAssignmentCheckNameRequest,\n ClusterPrincipalAssignmentsCheckNameAvailabilityOptionalParams,\n ClusterPrincipalAssignmentsCheckNameAvailabilityResponse,\n ClusterPrincipalAssignmentsGetOptionalParams,\n ClusterPrincipalAssignmentsGetResponse,\n ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ClusterPrincipalAssignmentsCreateOrUpdateResponse,\n ClusterPrincipalAssignmentsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ClusterPrincipalAssignments operations. */\nexport class ClusterPrincipalAssignmentsImpl\n implements ClusterPrincipalAssignments\n{\n private readonly client: KustoManagementClient;\n\n /**\n * Initialize a new instance of the class ClusterPrincipalAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: KustoManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all Kusto cluster principalAssignments.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): PagedAsyncIterableIterator<ClusterPrincipalAssignment> {\n const iter = this.listPagingAll(resourceGroupName, clusterName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n resourceGroupName,\n clusterName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ClusterPrincipalAssignment[]> {\n let result: ClusterPrincipalAssignmentsListResponse;\n result = await this._list(resourceGroupName, clusterName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): AsyncIterableIterator<ClusterPrincipalAssignment> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n clusterName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks that the principal assignment name is valid and is not already in use.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the principal assignment.\n * @param options The options parameters.\n */\n checkNameAvailability(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: ClusterPrincipalAssignmentCheckNameRequest,\n options?: ClusterPrincipalAssignmentsCheckNameAvailabilityOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, principalAssignmentName, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Gets a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsGetOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, principalAssignmentName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n parameters: ClusterPrincipalAssignment,\n options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ClusterPrincipalAssignmentsCreateOrUpdateResponse>,\n ClusterPrincipalAssignmentsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ClusterPrincipalAssignmentsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n ClusterPrincipalAssignmentsCreateOrUpdateResponse,\n OperationState<ClusterPrincipalAssignmentsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param parameters The Kusto cluster principalAssignment's parameters supplied for the operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n parameters: ClusterPrincipalAssignment,\n options?: ClusterPrincipalAssignmentsCreateOrUpdateOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a Kusto cluster principalAssignment.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param principalAssignmentName The name of the Kusto principalAssignment.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n clusterName: string,\n principalAssignmentName: string,\n options?: ClusterPrincipalAssignmentsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n clusterName,\n principalAssignmentName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Lists all Kusto cluster principalAssignments.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param clusterName The name of the Kusto cluster.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n clusterName: string,\n options?: ClusterPrincipalAssignmentsListOptionalParams,\n ): Promise<ClusterPrincipalAssignmentsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, clusterName, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.principalAssignmentName,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 201: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 202: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n 204: {\n bodyMapper: Mappers.ClusterPrincipalAssignment,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n Parameters.principalAssignmentName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ClusterPrincipalAssignmentListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.clusterName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}