@azure/arm-operationalinsights 9.0.1-alpha.20250718.1 → 9.0.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 (211) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +255 -120
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operationalInsightsManagementClient.js +34 -5
  6. package/dist/browser/operationalInsightsManagementClient.js.map +1 -1
  7. package/dist/browser/operations/availableServiceTiers.js +1 -0
  8. package/dist/browser/operations/availableServiceTiers.js.map +1 -1
  9. package/dist/browser/operations/clusters.js +78 -97
  10. package/dist/browser/operations/clusters.js.map +1 -1
  11. package/dist/browser/operations/dataExports.js +10 -27
  12. package/dist/browser/operations/dataExports.js.map +1 -1
  13. package/dist/browser/operations/dataSources.js +23 -40
  14. package/dist/browser/operations/dataSources.js.map +1 -1
  15. package/dist/browser/operations/deletedWorkspaces.js +19 -53
  16. package/dist/browser/operations/deletedWorkspaces.js.map +1 -1
  17. package/dist/browser/operations/gateways.js +1 -0
  18. package/dist/browser/operations/gateways.js.map +1 -1
  19. package/dist/browser/operations/intelligencePacks.js +1 -0
  20. package/dist/browser/operations/intelligencePacks.js.map +1 -1
  21. package/dist/browser/operations/linkedServices.js +32 -39
  22. package/dist/browser/operations/linkedServices.js.map +1 -1
  23. package/dist/browser/operations/linkedStorageAccounts.js +10 -27
  24. package/dist/browser/operations/linkedStorageAccounts.js.map +1 -1
  25. package/dist/browser/operations/managementGroups.js +10 -27
  26. package/dist/browser/operations/managementGroups.js.map +1 -1
  27. package/dist/browser/operations/operationStatuses.js +1 -0
  28. package/dist/browser/operations/operationStatuses.js.map +1 -1
  29. package/dist/browser/operations/operations.js +23 -40
  30. package/dist/browser/operations/operations.js.map +1 -1
  31. package/dist/browser/operations/queries.js +45 -79
  32. package/dist/browser/operations/queries.js.map +1 -1
  33. package/dist/browser/operations/queryPacks.js +45 -79
  34. package/dist/browser/operations/queryPacks.js.map +1 -1
  35. package/dist/browser/operations/savedSearches.js +1 -0
  36. package/dist/browser/operations/savedSearches.js.map +1 -1
  37. package/dist/browser/operations/schemaOperations.js +1 -0
  38. package/dist/browser/operations/schemaOperations.js.map +1 -1
  39. package/dist/browser/operations/sharedKeysOperations.js +1 -0
  40. package/dist/browser/operations/sharedKeysOperations.js.map +1 -1
  41. package/dist/browser/operations/storageInsightConfigs.js +23 -40
  42. package/dist/browser/operations/storageInsightConfigs.js.map +1 -1
  43. package/dist/browser/operations/tables.js +43 -45
  44. package/dist/browser/operations/tables.js.map +1 -1
  45. package/dist/browser/operations/usages.js +10 -27
  46. package/dist/browser/operations/usages.js.map +1 -1
  47. package/dist/browser/operations/workspacePurge.js +1 -0
  48. package/dist/browser/operations/workspacePurge.js.map +1 -1
  49. package/dist/browser/operations/workspaces.js +41 -65
  50. package/dist/browser/operations/workspaces.js.map +1 -1
  51. package/dist/browser/pagingHelper.js +2 -4
  52. package/dist/browser/pagingHelper.js.map +1 -1
  53. package/dist/commonjs/lroImpl.js +11 -3
  54. package/dist/commonjs/lroImpl.js.map +1 -1
  55. package/dist/commonjs/models/mappers.js +255 -120
  56. package/dist/commonjs/models/mappers.js.map +1 -1
  57. package/dist/commonjs/operationalInsightsManagementClient.js +34 -5
  58. package/dist/commonjs/operationalInsightsManagementClient.js.map +1 -1
  59. package/dist/commonjs/operations/availableServiceTiers.js +1 -0
  60. package/dist/commonjs/operations/availableServiceTiers.js.map +1 -1
  61. package/dist/commonjs/operations/clusters.js +78 -96
  62. package/dist/commonjs/operations/clusters.js.map +1 -1
  63. package/dist/commonjs/operations/dataExports.js +10 -26
  64. package/dist/commonjs/operations/dataExports.js.map +1 -1
  65. package/dist/commonjs/operations/dataSources.js +23 -39
  66. package/dist/commonjs/operations/dataSources.js.map +1 -1
  67. package/dist/commonjs/operations/deletedWorkspaces.js +19 -52
  68. package/dist/commonjs/operations/deletedWorkspaces.js.map +1 -1
  69. package/dist/commonjs/operations/gateways.js +1 -0
  70. package/dist/commonjs/operations/gateways.js.map +1 -1
  71. package/dist/commonjs/operations/intelligencePacks.js +1 -0
  72. package/dist/commonjs/operations/intelligencePacks.js.map +1 -1
  73. package/dist/commonjs/operations/linkedServices.js +32 -38
  74. package/dist/commonjs/operations/linkedServices.js.map +1 -1
  75. package/dist/commonjs/operations/linkedStorageAccounts.js +10 -26
  76. package/dist/commonjs/operations/linkedStorageAccounts.js.map +1 -1
  77. package/dist/commonjs/operations/managementGroups.js +10 -26
  78. package/dist/commonjs/operations/managementGroups.js.map +1 -1
  79. package/dist/commonjs/operations/operationStatuses.js +1 -0
  80. package/dist/commonjs/operations/operationStatuses.js.map +1 -1
  81. package/dist/commonjs/operations/operations.js +23 -39
  82. package/dist/commonjs/operations/operations.js.map +1 -1
  83. package/dist/commonjs/operations/queries.js +45 -78
  84. package/dist/commonjs/operations/queries.js.map +1 -1
  85. package/dist/commonjs/operations/queryPacks.js +45 -78
  86. package/dist/commonjs/operations/queryPacks.js.map +1 -1
  87. package/dist/commonjs/operations/savedSearches.js +1 -0
  88. package/dist/commonjs/operations/savedSearches.js.map +1 -1
  89. package/dist/commonjs/operations/schemaOperations.js +1 -0
  90. package/dist/commonjs/operations/schemaOperations.js.map +1 -1
  91. package/dist/commonjs/operations/sharedKeysOperations.js +1 -0
  92. package/dist/commonjs/operations/sharedKeysOperations.js.map +1 -1
  93. package/dist/commonjs/operations/storageInsightConfigs.js +23 -39
  94. package/dist/commonjs/operations/storageInsightConfigs.js.map +1 -1
  95. package/dist/commonjs/operations/tables.js +43 -44
  96. package/dist/commonjs/operations/tables.js.map +1 -1
  97. package/dist/commonjs/operations/usages.js +10 -26
  98. package/dist/commonjs/operations/usages.js.map +1 -1
  99. package/dist/commonjs/operations/workspacePurge.js +1 -0
  100. package/dist/commonjs/operations/workspacePurge.js.map +1 -1
  101. package/dist/commonjs/operations/workspaces.js +41 -64
  102. package/dist/commonjs/operations/workspaces.js.map +1 -1
  103. package/dist/commonjs/pagingHelper.js +2 -4
  104. package/dist/commonjs/pagingHelper.js.map +1 -1
  105. package/dist/commonjs/tsdoc-metadata.json +11 -11
  106. package/dist/esm/lroImpl.js +11 -3
  107. package/dist/esm/lroImpl.js.map +1 -1
  108. package/dist/esm/models/mappers.js +255 -120
  109. package/dist/esm/models/mappers.js.map +1 -1
  110. package/dist/esm/operationalInsightsManagementClient.js +34 -5
  111. package/dist/esm/operationalInsightsManagementClient.js.map +1 -1
  112. package/dist/esm/operations/availableServiceTiers.js +1 -0
  113. package/dist/esm/operations/availableServiceTiers.js.map +1 -1
  114. package/dist/esm/operations/clusters.js +78 -97
  115. package/dist/esm/operations/clusters.js.map +1 -1
  116. package/dist/esm/operations/dataExports.js +10 -27
  117. package/dist/esm/operations/dataExports.js.map +1 -1
  118. package/dist/esm/operations/dataSources.js +23 -40
  119. package/dist/esm/operations/dataSources.js.map +1 -1
  120. package/dist/esm/operations/deletedWorkspaces.js +19 -53
  121. package/dist/esm/operations/deletedWorkspaces.js.map +1 -1
  122. package/dist/esm/operations/gateways.js +1 -0
  123. package/dist/esm/operations/gateways.js.map +1 -1
  124. package/dist/esm/operations/intelligencePacks.js +1 -0
  125. package/dist/esm/operations/intelligencePacks.js.map +1 -1
  126. package/dist/esm/operations/linkedServices.js +32 -39
  127. package/dist/esm/operations/linkedServices.js.map +1 -1
  128. package/dist/esm/operations/linkedStorageAccounts.js +10 -27
  129. package/dist/esm/operations/linkedStorageAccounts.js.map +1 -1
  130. package/dist/esm/operations/managementGroups.js +10 -27
  131. package/dist/esm/operations/managementGroups.js.map +1 -1
  132. package/dist/esm/operations/operationStatuses.js +1 -0
  133. package/dist/esm/operations/operationStatuses.js.map +1 -1
  134. package/dist/esm/operations/operations.js +23 -40
  135. package/dist/esm/operations/operations.js.map +1 -1
  136. package/dist/esm/operations/queries.js +45 -79
  137. package/dist/esm/operations/queries.js.map +1 -1
  138. package/dist/esm/operations/queryPacks.js +45 -79
  139. package/dist/esm/operations/queryPacks.js.map +1 -1
  140. package/dist/esm/operations/savedSearches.js +1 -0
  141. package/dist/esm/operations/savedSearches.js.map +1 -1
  142. package/dist/esm/operations/schemaOperations.js +1 -0
  143. package/dist/esm/operations/schemaOperations.js.map +1 -1
  144. package/dist/esm/operations/sharedKeysOperations.js +1 -0
  145. package/dist/esm/operations/sharedKeysOperations.js.map +1 -1
  146. package/dist/esm/operations/storageInsightConfigs.js +23 -40
  147. package/dist/esm/operations/storageInsightConfigs.js.map +1 -1
  148. package/dist/esm/operations/tables.js +43 -45
  149. package/dist/esm/operations/tables.js.map +1 -1
  150. package/dist/esm/operations/usages.js +10 -27
  151. package/dist/esm/operations/usages.js.map +1 -1
  152. package/dist/esm/operations/workspacePurge.js +1 -0
  153. package/dist/esm/operations/workspacePurge.js.map +1 -1
  154. package/dist/esm/operations/workspaces.js +41 -65
  155. package/dist/esm/operations/workspaces.js.map +1 -1
  156. package/dist/esm/pagingHelper.js +2 -4
  157. package/dist/esm/pagingHelper.js.map +1 -1
  158. package/dist/react-native/lroImpl.js +11 -3
  159. package/dist/react-native/lroImpl.js.map +1 -1
  160. package/dist/react-native/models/mappers.js +255 -120
  161. package/dist/react-native/models/mappers.js.map +1 -1
  162. package/dist/react-native/operationalInsightsManagementClient.js +34 -5
  163. package/dist/react-native/operationalInsightsManagementClient.js.map +1 -1
  164. package/dist/react-native/operations/availableServiceTiers.js +1 -0
  165. package/dist/react-native/operations/availableServiceTiers.js.map +1 -1
  166. package/dist/react-native/operations/clusters.js +78 -97
  167. package/dist/react-native/operations/clusters.js.map +1 -1
  168. package/dist/react-native/operations/dataExports.js +10 -27
  169. package/dist/react-native/operations/dataExports.js.map +1 -1
  170. package/dist/react-native/operations/dataSources.js +23 -40
  171. package/dist/react-native/operations/dataSources.js.map +1 -1
  172. package/dist/react-native/operations/deletedWorkspaces.js +19 -53
  173. package/dist/react-native/operations/deletedWorkspaces.js.map +1 -1
  174. package/dist/react-native/operations/gateways.js +1 -0
  175. package/dist/react-native/operations/gateways.js.map +1 -1
  176. package/dist/react-native/operations/intelligencePacks.js +1 -0
  177. package/dist/react-native/operations/intelligencePacks.js.map +1 -1
  178. package/dist/react-native/operations/linkedServices.js +32 -39
  179. package/dist/react-native/operations/linkedServices.js.map +1 -1
  180. package/dist/react-native/operations/linkedStorageAccounts.js +10 -27
  181. package/dist/react-native/operations/linkedStorageAccounts.js.map +1 -1
  182. package/dist/react-native/operations/managementGroups.js +10 -27
  183. package/dist/react-native/operations/managementGroups.js.map +1 -1
  184. package/dist/react-native/operations/operationStatuses.js +1 -0
  185. package/dist/react-native/operations/operationStatuses.js.map +1 -1
  186. package/dist/react-native/operations/operations.js +23 -40
  187. package/dist/react-native/operations/operations.js.map +1 -1
  188. package/dist/react-native/operations/queries.js +45 -79
  189. package/dist/react-native/operations/queries.js.map +1 -1
  190. package/dist/react-native/operations/queryPacks.js +45 -79
  191. package/dist/react-native/operations/queryPacks.js.map +1 -1
  192. package/dist/react-native/operations/savedSearches.js +1 -0
  193. package/dist/react-native/operations/savedSearches.js.map +1 -1
  194. package/dist/react-native/operations/schemaOperations.js +1 -0
  195. package/dist/react-native/operations/schemaOperations.js.map +1 -1
  196. package/dist/react-native/operations/sharedKeysOperations.js +1 -0
  197. package/dist/react-native/operations/sharedKeysOperations.js.map +1 -1
  198. package/dist/react-native/operations/storageInsightConfigs.js +23 -40
  199. package/dist/react-native/operations/storageInsightConfigs.js.map +1 -1
  200. package/dist/react-native/operations/tables.js +43 -45
  201. package/dist/react-native/operations/tables.js.map +1 -1
  202. package/dist/react-native/operations/usages.js +10 -27
  203. package/dist/react-native/operations/usages.js.map +1 -1
  204. package/dist/react-native/operations/workspacePurge.js +1 -0
  205. package/dist/react-native/operations/workspacePurge.js.map +1 -1
  206. package/dist/react-native/operations/workspaces.js +41 -65
  207. package/dist/react-native/operations/workspaces.js.map +1 -1
  208. package/dist/react-native/pagingHelper.js +2 -4
  209. package/dist/react-native/pagingHelper.js.map +1 -1
  210. package/package.json +2 -2
  211. package/review/arm-operationalinsights-node.api.md +1758 -1758
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /// <reference lib="esnext.asynciterable" />
18
18
  /** Class containing LinkedServices operations. */
19
19
  class LinkedServicesImpl {
20
+ client;
20
21
  /**
21
22
  * Initialize a new instance of the class LinkedServices class.
22
23
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class LinkedServicesImpl {
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.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
47
48
  }
48
49
  };
49
50
  }
50
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
52
+ let result;
53
+ result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
54
+ yield result.value || [];
56
55
  }
57
- listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, 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 *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
57
+ for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Create or update a linked service.
@@ -87,14 +71,19 @@ class LinkedServicesImpl {
87
71
  return this.client.sendOperationRequest(args, spec);
88
72
  };
89
73
  const sendOperation = async (args, spec) => {
90
- var _a;
91
74
  let currentRawResponse = undefined;
92
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
75
+ const providedCallback = args.options?.onResponse;
93
76
  const callback = (rawResponse, flatResponse) => {
94
77
  currentRawResponse = rawResponse;
95
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
78
+ providedCallback?.(rawResponse, flatResponse);
79
+ };
80
+ const updatedArgs = {
81
+ ...args,
82
+ options: {
83
+ ...args.options,
84
+ onResponse: callback
85
+ }
96
86
  };
97
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
98
87
  const flatResponse = await directSendOperation(updatedArgs, spec);
99
88
  return {
100
89
  flatResponse,
@@ -113,8 +102,8 @@ class LinkedServicesImpl {
113
102
  options
114
103
  }, createOrUpdateOperationSpec);
115
104
  const poller = new core_lro_1.LroEngine(lro, {
116
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
117
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
105
+ resumeFrom: options?.resumeFrom,
106
+ intervalInMs: options?.updateIntervalInMs
118
107
  });
119
108
  await poller.poll();
120
109
  return poller;
@@ -143,14 +132,19 @@ class LinkedServicesImpl {
143
132
  return this.client.sendOperationRequest(args, spec);
144
133
  };
145
134
  const sendOperation = async (args, spec) => {
146
- var _a;
147
135
  let currentRawResponse = undefined;
148
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
136
+ const providedCallback = args.options?.onResponse;
149
137
  const callback = (rawResponse, flatResponse) => {
150
138
  currentRawResponse = rawResponse;
151
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
139
+ providedCallback?.(rawResponse, flatResponse);
140
+ };
141
+ const updatedArgs = {
142
+ ...args,
143
+ options: {
144
+ ...args.options,
145
+ onResponse: callback
146
+ }
152
147
  };
153
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
154
148
  const flatResponse = await directSendOperation(updatedArgs, spec);
155
149
  return {
156
150
  flatResponse,
@@ -163,8 +157,8 @@ class LinkedServicesImpl {
163
157
  };
164
158
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, workspaceName, linkedServiceName, options }, deleteOperationSpec);
165
159
  const poller = new core_lro_1.LroEngine(lro, {
166
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
167
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
160
+ resumeFrom: options?.resumeFrom,
161
+ intervalInMs: options?.updateIntervalInMs
168
162
  });
169
163
  await poller.poll();
170
164
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"linkedServices.js","sourceRoot":"","sources":["../../../src/operations/linkedServices.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAA4E;AAC5E,8CAAwC;AAaxC,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAAqD;QAErD,MAAM,IAAI,GAAG,IAAI,CAAC,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,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0KAA0K;IAC5K,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,sJAAsJ;IACxJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;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 { LinkedServices } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkedService,\n LinkedServicesListByWorkspaceOptionalParams,\n LinkedServicesListByWorkspaceResponse,\n LinkedServicesCreateOrUpdateOptionalParams,\n LinkedServicesCreateOrUpdateResponse,\n LinkedServicesDeleteOptionalParams,\n LinkedServicesDeleteResponse,\n LinkedServicesGetOptionalParams,\n LinkedServicesGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedServices operations. */\nexport class LinkedServicesImpl implements LinkedServices {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedServices class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\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.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedService[]> {\n let result: LinkedServicesListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesCreateOrUpdateResponse>,\n LinkedServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<LinkedServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesDeleteResponse>,\n LinkedServicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n { resourceGroupName, workspaceName, linkedServiceName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<LinkedServicesDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesGetOptionalParams\n ): Promise<LinkedServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, linkedServiceName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): Promise<LinkedServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedServiceListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"linkedServices.js","sourceRoot":"","sources":["../../../src/operations/linkedServices.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAA4E;AAC5E,8CAAwC;AAaxC,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAAqD;QAErD,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,aAAa,EACb,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,IA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,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,sJAAsJ;IACxJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;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 { LinkedServices } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkedService,\n LinkedServicesListByWorkspaceOptionalParams,\n LinkedServicesListByWorkspaceResponse,\n LinkedServicesCreateOrUpdateOptionalParams,\n LinkedServicesCreateOrUpdateResponse,\n LinkedServicesDeleteOptionalParams,\n LinkedServicesDeleteResponse,\n LinkedServicesGetOptionalParams,\n LinkedServicesGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedServices operations. */\nexport class LinkedServicesImpl implements LinkedServices {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedServices class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\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.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedService[]> {\n let result: LinkedServicesListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesCreateOrUpdateResponse>,\n LinkedServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<LinkedServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesDeleteResponse>,\n LinkedServicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n { resourceGroupName, workspaceName, linkedServiceName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<LinkedServicesDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesGetOptionalParams\n ): Promise<LinkedServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, linkedServiceName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): Promise<LinkedServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedServiceListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing LinkedStorageAccounts operations. */
17
17
  class LinkedStorageAccountsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class LinkedStorageAccounts class.
20
21
  * @param client Reference to the service client
@@ -39,39 +40,22 @@ class LinkedStorageAccountsImpl {
39
40
  return this;
40
41
  },
41
42
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
43
44
  throw new Error("maxPageSize is not supported by this operation.");
44
45
  }
45
46
  return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
46
47
  }
47
48
  };
48
49
  }
49
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
50
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
51
- let result;
52
- result = yield tslib_1.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
53
- yield yield tslib_1.__await(result.value || []);
54
- });
50
+ async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
51
+ let result;
52
+ result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
53
+ yield result.value || [];
55
54
  }
56
- listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
57
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingAll_1() {
58
- var _a, e_1, _b, _c;
59
- try {
60
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
61
- _c = _f.value;
62
- _d = false;
63
- const page = _c;
64
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
65
- }
66
- }
67
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
68
- finally {
69
- try {
70
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
71
- }
72
- finally { if (e_1) throw e_1.error; }
73
- }
74
- });
55
+ async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
56
+ for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
57
+ yield* page;
58
+ }
75
59
  }
76
60
  /**
77
61
  * Create or Update a link relation between current workspace and a group of storage accounts of a
@@ -1 +1 @@
1
- {"version":3,"file":"linkedStorageAccounts.js","sourceRoot":"","sources":["../../../src/operations/linkedStorageAccounts.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAa,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,aAAa,EACb,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,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,yBAAyB,CACnC,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,yBAAyB,CACtC,iBAAyB,EACzB,a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AAU,CAAC,cAAc;KAC1B;IACD,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,8KAA8K;IAChL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,6JAA6J;IAC/J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;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 { LinkedStorageAccounts } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n LinkedStorageAccountsResource,\n LinkedStorageAccountsListByWorkspaceOptionalParams,\n LinkedStorageAccountsListByWorkspaceResponse,\n DataSourceType,\n LinkedStorageAccountsCreateOrUpdateOptionalParams,\n LinkedStorageAccountsCreateOrUpdateResponse,\n LinkedStorageAccountsDeleteOptionalParams,\n LinkedStorageAccountsGetOptionalParams,\n LinkedStorageAccountsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedStorageAccounts operations. */\nexport class LinkedStorageAccountsImpl implements LinkedStorageAccounts {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedStorageAccounts class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedStorageAccountsResource> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\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.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedStorageAccountsResource[]> {\n let result: LinkedStorageAccountsListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedStorageAccountsResource> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or Update a link relation between current workspace and a group of storage accounts of a\n * specific data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param parameters The parameters required to create or update linked storage accounts.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n parameters: LinkedStorageAccountsResource,\n options?: LinkedStorageAccountsCreateOrUpdateOptionalParams\n ): Promise<LinkedStorageAccountsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Deletes all linked storage accounts of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all linked storage account of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsGetOptionalParams\n ): Promise<LinkedStorageAccountsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): Promise<LinkedStorageAccountsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"linkedStorageAccounts.js","sourceRoot":"","sources":["../../../src/operations/linkedStorageAccounts.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAa,yBAAyB;IACnB,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,aAAa,EACb,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,QAA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;IACtB,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,8KAA8K;IAChL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,6JAA6J;IAC/J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;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 { LinkedStorageAccounts } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n LinkedStorageAccountsResource,\n LinkedStorageAccountsListByWorkspaceOptionalParams,\n LinkedStorageAccountsListByWorkspaceResponse,\n DataSourceType,\n LinkedStorageAccountsCreateOrUpdateOptionalParams,\n LinkedStorageAccountsCreateOrUpdateResponse,\n LinkedStorageAccountsDeleteOptionalParams,\n LinkedStorageAccountsGetOptionalParams,\n LinkedStorageAccountsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedStorageAccounts operations. */\nexport class LinkedStorageAccountsImpl implements LinkedStorageAccounts {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedStorageAccounts class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedStorageAccountsResource> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\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.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedStorageAccountsResource[]> {\n let result: LinkedStorageAccountsListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedStorageAccountsResource> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or Update a link relation between current workspace and a group of storage accounts of a\n * specific data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param parameters The parameters required to create or update linked storage accounts.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n parameters: LinkedStorageAccountsResource,\n options?: LinkedStorageAccountsCreateOrUpdateOptionalParams\n ): Promise<LinkedStorageAccountsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Deletes all linked storage accounts of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all linked storage account of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsGetOptionalParams\n ): Promise<LinkedStorageAccountsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): Promise<LinkedStorageAccountsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing ManagementGroups operations. */
17
17
  class ManagementGroupsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class ManagementGroups class.
20
21
  * @param client Reference to the service client
@@ -38,39 +39,22 @@ class ManagementGroupsImpl {
38
39
  return this;
39
40
  },
40
41
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
42
43
  throw new Error("maxPageSize is not supported by this operation.");
43
44
  }
44
45
  return this.listPagingPage(resourceGroupName, workspaceName, options, settings);
45
46
  }
46
47
  };
47
48
  }
48
- listPagingPage(resourceGroupName, workspaceName, options, _settings) {
49
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
50
- let result;
51
- result = yield tslib_1.__await(this._list(resourceGroupName, workspaceName, options));
52
- yield yield tslib_1.__await(result.value || []);
53
- });
49
+ async *listPagingPage(resourceGroupName, workspaceName, options, _settings) {
50
+ let result;
51
+ result = await this._list(resourceGroupName, workspaceName, options);
52
+ yield result.value || [];
54
53
  }
55
- listPagingAll(resourceGroupName, workspaceName, options) {
56
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
57
- var _a, e_1, _b, _c;
58
- try {
59
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
60
- _c = _f.value;
61
- _d = false;
62
- const page = _c;
63
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
64
- }
65
- }
66
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
- finally {
68
- try {
69
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
70
- }
71
- finally { if (e_1) throw e_1.error; }
72
- }
73
- });
54
+ async *listPagingAll(resourceGroupName, workspaceName, options) {
55
+ for await (const page of this.listPagingPage(resourceGroupName, workspaceName, options)) {
56
+ yield* page;
57
+ }
74
58
  }
75
59
  /**
76
60
  * Gets a list of management groups connected to a workspace.
@@ -1 +1 @@
1
- {"version":3,"file":"managementGroups.js","sourceRoot":"","sources":["../../../src/operations/managementGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IAG/B;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACz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BAAyB,EACzB,aAAqB,EACrB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,EAAE,EAC7C,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AArFD,oDAqFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EACF,wJAAwJ;IAC1J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mCAAmC;SACxD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;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 { ManagementGroups } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n ManagementGroup,\n ManagementGroupsListOptionalParams,\n ManagementGroupsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ManagementGroups operations. */\nexport class ManagementGroupsImpl implements ManagementGroups {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class ManagementGroups class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): PagedAsyncIterableIterator<ManagementGroup> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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 workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ManagementGroup[]> {\n let result: ManagementGroupsListResponse;\n result = await this._list(resourceGroupName, workspaceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): AsyncIterableIterator<ManagementGroup> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): Promise<ManagementGroupsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WorkspaceListManagementGroupsResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"managementGroups.js","sourceRoot":"","sources":["../../../src/operations/managementGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,aAAqB,EACrB,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3E,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,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,iBAAyB,EACzB,aAAqB,EACrB,OAA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*\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 { ManagementGroups } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n ManagementGroup,\n ManagementGroupsListOptionalParams,\n ManagementGroupsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ManagementGroups operations. */\nexport class ManagementGroupsImpl implements ManagementGroups {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class ManagementGroups class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): PagedAsyncIterableIterator<ManagementGroup> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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 workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ManagementGroup[]> {\n let result: ManagementGroupsListResponse;\n result = await this._list(resourceGroupName, workspaceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): AsyncIterableIterator<ManagementGroup> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): Promise<ManagementGroupsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WorkspaceListManagementGroupsResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing OperationStatuses operations. */
16
16
  class OperationStatusesImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class OperationStatuses class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"operationStatuses.js","sourceRoot":"","sources":["../../../src/operations/operationStatuses.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,qDAAqD;AACrD,MAAa,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,QAAgB,EAChB,gBAAwB,EACxB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,EACvC,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AA3BD,sDA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,mIAAmI;IACrI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;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 { OperationStatuses } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n OperationStatusesGetOptionalParams,\n OperationStatusesGetResponse\n} from \"../models/index.js\";\n\n/** Class containing OperationStatuses operations. */\nexport class OperationStatusesImpl implements OperationStatuses {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class OperationStatuses class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the status of a long running azure asynchronous operation.\n * @param location The region name of operation.\n * @param asyncOperationId The operation Id.\n * @param options The options parameters.\n */\n get(\n location: string,\n asyncOperationId: string,\n options?: OperationStatusesGetOptionalParams\n ): Promise<OperationStatusesGetResponse> {\n return this.client.sendOperationRequest(\n { location, asyncOperationId, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationStatus\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.asyncOperationId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"operationStatuses.js","sourceRoot":"","sources":["../../../src/operations/operationStatuses.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,qDAAqD;AACrD,MAAa,qBAAqB;IACf,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,QAAgB,EAChB,gBAAwB,EACxB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,EACvC,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AA3BD,sDA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,mIAAmI;IACrI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;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 { OperationStatuses } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n OperationStatusesGetOptionalParams,\n OperationStatusesGetResponse\n} from \"../models/index.js\";\n\n/** Class containing OperationStatuses operations. */\nexport class OperationStatusesImpl implements OperationStatuses {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class OperationStatuses class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the status of a long running azure asynchronous operation.\n * @param location The region name of operation.\n * @param asyncOperationId The operation Id.\n * @param options The options parameters.\n */\n get(\n location: string,\n asyncOperationId: string,\n options?: OperationStatusesGetOptionalParams\n ): Promise<OperationStatusesGetResponse> {\n return this.client.sendOperationRequest(\n { location, asyncOperationId, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationStatus\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.asyncOperationId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing Operations operations. */
18
18
  class OperationsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Operations class.
21
22
  * @param client Reference to the service client
@@ -37,52 +38,35 @@ class OperationsImpl {
37
38
  return this;
38
39
  },
39
40
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
41
42
  throw new Error("maxPageSize is not supported by this operation.");
42
43
  }
43
44
  return this.listPagingPage(options, settings);
44
45
  }
45
46
  };
46
47
  }
47
- listPagingPage(options, settings) {
48
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield tslib_1.__await(this._list(options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
- yield yield tslib_1.__await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield yield tslib_1.__await(page);
64
- }
65
- });
48
+ async *listPagingPage(options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listNext(continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
+ yield page;
64
+ }
66
65
  }
67
- listPagingAll(options) {
68
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
66
+ async *listPagingAll(options) {
67
+ for await (const page of this.listPagingPage(options)) {
68
+ yield* page;
69
+ }
86
70
  }
87
71
  /**
88
72
  * Lists all of the available OperationalInsights Rest API operations.
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aA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I,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available OperationalInsights Rest API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(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(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available OperationalInsights Rest API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.OperationalInsights/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion3],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAsC,EACtC,QAAuB;QAEvB,IAAI,MAA8B,CAAC;QACnC,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAC9B,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;YACpC,IAAA,sCAAo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E,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } 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 { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available OperationalInsights Rest API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(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(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available OperationalInsights Rest API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.OperationalInsights/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion3],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}