@azure/arm-servicemap 3.0.0-alpha.20250619.1 → 3.0.0-alpha.20250718.2

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 (83) hide show
  1. package/dist/browser/models/mappers.js +251 -113
  2. package/dist/browser/models/mappers.js.map +1 -1
  3. package/dist/browser/operations/clientGroups.js +23 -40
  4. package/dist/browser/operations/clientGroups.js.map +1 -1
  5. package/dist/browser/operations/machineGroups.js +23 -40
  6. package/dist/browser/operations/machineGroups.js.map +1 -1
  7. package/dist/browser/operations/machines.js +111 -196
  8. package/dist/browser/operations/machines.js.map +1 -1
  9. package/dist/browser/operations/maps.js +1 -0
  10. package/dist/browser/operations/maps.js.map +1 -1
  11. package/dist/browser/operations/ports.js +45 -79
  12. package/dist/browser/operations/ports.js.map +1 -1
  13. package/dist/browser/operations/processes.js +45 -79
  14. package/dist/browser/operations/processes.js.map +1 -1
  15. package/dist/browser/operations/summaries.js +1 -0
  16. package/dist/browser/operations/summaries.js.map +1 -1
  17. package/dist/browser/pagingHelper.js +2 -4
  18. package/dist/browser/pagingHelper.js.map +1 -1
  19. package/dist/browser/serviceMap.js +20 -5
  20. package/dist/browser/serviceMap.js.map +1 -1
  21. package/dist/commonjs/models/mappers.js +251 -113
  22. package/dist/commonjs/models/mappers.js.map +1 -1
  23. package/dist/commonjs/operations/clientGroups.js +23 -39
  24. package/dist/commonjs/operations/clientGroups.js.map +1 -1
  25. package/dist/commonjs/operations/machineGroups.js +23 -39
  26. package/dist/commonjs/operations/machineGroups.js.map +1 -1
  27. package/dist/commonjs/operations/machines.js +111 -195
  28. package/dist/commonjs/operations/machines.js.map +1 -1
  29. package/dist/commonjs/operations/maps.js +1 -0
  30. package/dist/commonjs/operations/maps.js.map +1 -1
  31. package/dist/commonjs/operations/ports.js +45 -78
  32. package/dist/commonjs/operations/ports.js.map +1 -1
  33. package/dist/commonjs/operations/processes.js +45 -78
  34. package/dist/commonjs/operations/processes.js.map +1 -1
  35. package/dist/commonjs/operations/summaries.js +1 -0
  36. package/dist/commonjs/operations/summaries.js.map +1 -1
  37. package/dist/commonjs/pagingHelper.js +2 -4
  38. package/dist/commonjs/pagingHelper.js.map +1 -1
  39. package/dist/commonjs/serviceMap.js +20 -5
  40. package/dist/commonjs/serviceMap.js.map +1 -1
  41. package/dist/commonjs/tsdoc-metadata.json +11 -11
  42. package/dist/esm/models/mappers.js +251 -113
  43. package/dist/esm/models/mappers.js.map +1 -1
  44. package/dist/esm/operations/clientGroups.js +23 -40
  45. package/dist/esm/operations/clientGroups.js.map +1 -1
  46. package/dist/esm/operations/machineGroups.js +23 -40
  47. package/dist/esm/operations/machineGroups.js.map +1 -1
  48. package/dist/esm/operations/machines.js +111 -196
  49. package/dist/esm/operations/machines.js.map +1 -1
  50. package/dist/esm/operations/maps.js +1 -0
  51. package/dist/esm/operations/maps.js.map +1 -1
  52. package/dist/esm/operations/ports.js +45 -79
  53. package/dist/esm/operations/ports.js.map +1 -1
  54. package/dist/esm/operations/processes.js +45 -79
  55. package/dist/esm/operations/processes.js.map +1 -1
  56. package/dist/esm/operations/summaries.js +1 -0
  57. package/dist/esm/operations/summaries.js.map +1 -1
  58. package/dist/esm/pagingHelper.js +2 -4
  59. package/dist/esm/pagingHelper.js.map +1 -1
  60. package/dist/esm/serviceMap.js +20 -5
  61. package/dist/esm/serviceMap.js.map +1 -1
  62. package/dist/react-native/models/mappers.js +251 -113
  63. package/dist/react-native/models/mappers.js.map +1 -1
  64. package/dist/react-native/operations/clientGroups.js +23 -40
  65. package/dist/react-native/operations/clientGroups.js.map +1 -1
  66. package/dist/react-native/operations/machineGroups.js +23 -40
  67. package/dist/react-native/operations/machineGroups.js.map +1 -1
  68. package/dist/react-native/operations/machines.js +111 -196
  69. package/dist/react-native/operations/machines.js.map +1 -1
  70. package/dist/react-native/operations/maps.js +1 -0
  71. package/dist/react-native/operations/maps.js.map +1 -1
  72. package/dist/react-native/operations/ports.js +45 -79
  73. package/dist/react-native/operations/ports.js.map +1 -1
  74. package/dist/react-native/operations/processes.js +45 -79
  75. package/dist/react-native/operations/processes.js.map +1 -1
  76. package/dist/react-native/operations/summaries.js +1 -0
  77. package/dist/react-native/operations/summaries.js.map +1 -1
  78. package/dist/react-native/pagingHelper.js +2 -4
  79. package/dist/react-native/pagingHelper.js.map +1 -1
  80. package/dist/react-native/serviceMap.js +20 -5
  81. package/dist/react-native/serviceMap.js.map +1 -1
  82. package/package.json +2 -2
  83. /package/review/{arm-servicemap.api.md → arm-servicemap-node.api.md} +0 -0
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing MachineGroups operations. */
18
18
  class MachineGroupsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class MachineGroups class.
21
22
  * @param client Reference to the service client
@@ -39,52 +40,35 @@ class MachineGroupsImpl {
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
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield tslib_1.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
- yield yield tslib_1.__await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield tslib_1.__await(this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
- yield yield tslib_1.__await(page);
66
- }
67
- });
50
+ async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
+ yield page;
66
+ }
68
67
  }
69
- listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
70
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- 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) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
68
+ async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
69
+ for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
70
+ yield* page;
71
+ }
88
72
  }
89
73
  /**
90
74
  * Returns all machine groups during the specified time interval.
@@ -1 +1 @@
1
- {"version":3,"file":"machineGroups.js","sourceRoot":"","sources":["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B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,QAAQ;KACpB;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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { MachineGroups } 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 { ServiceMap } from \"../serviceMap.js\";\nimport {\n MachineGroup,\n MachineGroupsListByWorkspaceNextOptionalParams,\n MachineGroupsListByWorkspaceOptionalParams,\n MachineGroupsListByWorkspaceResponse,\n MachineGroupsCreateOptionalParams,\n MachineGroupsCreateResponse,\n MachineGroupsGetOptionalParams,\n MachineGroupsGetResponse,\n MachineGroupsUpdateOptionalParams,\n MachineGroupsUpdateResponse,\n MachineGroupsDeleteOptionalParams,\n MachineGroupsListByWorkspaceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MachineGroups operations. */\nexport class MachineGroupsImpl implements MachineGroups {\n private readonly client: ServiceMap;\n\n /**\n * Initialize a new instance of the class MachineGroups class.\n * @param client Reference to the service client\n */\n constructor(client: ServiceMap) {\n this.client = client;\n }\n\n /**\n * Returns all machine groups during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<MachineGroup> {\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?: MachineGroupsListByWorkspaceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<MachineGroup[]> {\n let result: MachineGroupsListByWorkspaceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByWorkspaceNext(\n resourceGroupName,\n workspaceName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<MachineGroup> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Returns all machine groups during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): Promise<MachineGroupsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n\n /**\n * Creates a new machine group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroup Machine Group resource to create.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n workspaceName: string,\n machineGroup: MachineGroup,\n options?: MachineGroupsCreateOptionalParams\n ): Promise<MachineGroupsCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroup, options },\n createOperationSpec\n );\n }\n\n /**\n * Returns the specified machine group as it existed during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n options?: MachineGroupsGetOptionalParams\n ): Promise<MachineGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroupName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates a machine group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param machineGroup Machine Group resource to update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n machineGroup: MachineGroup,\n options?: MachineGroupsUpdateOptionalParams\n ): Promise<MachineGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n machineGroupName,\n machineGroup,\n options\n },\n updateOperationSpec\n );\n }\n\n /**\n * Deletes the specified Machine Group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n options?: MachineGroupsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroupName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListByWorkspaceNext\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.\n * @param options The options parameters.\n */\n private _listByWorkspaceNext(\n resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: MachineGroupsListByWorkspaceNextOptionalParams\n ): Promise<MachineGroupsListByWorkspaceNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listByWorkspaceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroupCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.machineGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.machineGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\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}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroupCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"machineGroups.js","sourceRoot":"","sources":["../../../src/operations/machineGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IACX,MAAM,CAAa;IAEpC;;;OAGG;IACH,YAAY,MAAkB;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAAoD;QAEpD,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,CA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AC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EACF,4LAA4L;IAC9L,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,QAAQ;KACpB;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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { MachineGroups } 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 { ServiceMap } from \"../serviceMap.js\";\nimport {\n MachineGroup,\n MachineGroupsListByWorkspaceNextOptionalParams,\n MachineGroupsListByWorkspaceOptionalParams,\n MachineGroupsListByWorkspaceResponse,\n MachineGroupsCreateOptionalParams,\n MachineGroupsCreateResponse,\n MachineGroupsGetOptionalParams,\n MachineGroupsGetResponse,\n MachineGroupsUpdateOptionalParams,\n MachineGroupsUpdateResponse,\n MachineGroupsDeleteOptionalParams,\n MachineGroupsListByWorkspaceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MachineGroups operations. */\nexport class MachineGroupsImpl implements MachineGroups {\n private readonly client: ServiceMap;\n\n /**\n * Initialize a new instance of the class MachineGroups class.\n * @param client Reference to the service client\n */\n constructor(client: ServiceMap) {\n this.client = client;\n }\n\n /**\n * Returns all machine groups during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<MachineGroup> {\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?: MachineGroupsListByWorkspaceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<MachineGroup[]> {\n let result: MachineGroupsListByWorkspaceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByWorkspaceNext(\n resourceGroupName,\n workspaceName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<MachineGroup> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Returns all machine groups during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: MachineGroupsListByWorkspaceOptionalParams\n ): Promise<MachineGroupsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n\n /**\n * Creates a new machine group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroup Machine Group resource to create.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n workspaceName: string,\n machineGroup: MachineGroup,\n options?: MachineGroupsCreateOptionalParams\n ): Promise<MachineGroupsCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroup, options },\n createOperationSpec\n );\n }\n\n /**\n * Returns the specified machine group as it existed during the specified time interval.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n options?: MachineGroupsGetOptionalParams\n ): Promise<MachineGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroupName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates a machine group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param machineGroup Machine Group resource to update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n machineGroup: MachineGroup,\n options?: MachineGroupsUpdateOptionalParams\n ): Promise<MachineGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n machineGroupName,\n machineGroup,\n options\n },\n updateOperationSpec\n );\n }\n\n /**\n * Deletes the specified Machine Group.\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param machineGroupName Machine Group resource name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n machineGroupName: string,\n options?: MachineGroupsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, machineGroupName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListByWorkspaceNext\n * @param resourceGroupName Resource group name within the specified subscriptionId.\n * @param workspaceName OMS workspace containing the resources of interest.\n * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.\n * @param options The options parameters.\n */\n private _listByWorkspaceNext(\n resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: MachineGroupsListByWorkspaceNextOptionalParams\n ): Promise<MachineGroupsListByWorkspaceNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listByWorkspaceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroupCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.machineGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroup\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.machineGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\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}/features/serviceMap/machineGroups/{machineGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.machineGroupName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MachineGroupCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.nextLink\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 Machines operations. */
18
18
  class MachinesImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Machines class.
21
22
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class MachinesImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
49
50
  }
50
51
  };
51
52
  }
52
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- 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) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
72
+ for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Returns a collection of connections terminating or originating at the specified machine
@@ -106,52 +90,35 @@ class MachinesImpl {
106
90
  return this;
107
91
  },
108
92
  byPage: (settings) => {
109
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
93
+ if (settings?.maxPageSize) {
110
94
  throw new Error("maxPageSize is not supported by this operation.");
111
95
  }
112
96
  return this.listConnectionsPagingPage(resourceGroupName, workspaceName, machineName, options, settings);
113
97
  }
114
98
  };
115
99
  }
116
- listConnectionsPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
117
- return tslib_1.__asyncGenerator(this, arguments, function* listConnectionsPagingPage_1() {
118
- let result;
119
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
120
- if (!continuationToken) {
121
- result = yield tslib_1.__await(this._listConnections(resourceGroupName, workspaceName, machineName, options));
122
- let page = result.value || [];
123
- continuationToken = result.nextLink;
124
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
125
- yield yield tslib_1.__await(page);
126
- }
127
- while (continuationToken) {
128
- result = yield tslib_1.__await(this._listConnectionsNext(resourceGroupName, workspaceName, machineName, continuationToken, options));
129
- continuationToken = result.nextLink;
130
- let page = result.value || [];
131
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
132
- yield yield tslib_1.__await(page);
133
- }
134
- });
100
+ async *listConnectionsPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
101
+ let result;
102
+ let continuationToken = settings?.continuationToken;
103
+ if (!continuationToken) {
104
+ result = await this._listConnections(resourceGroupName, workspaceName, machineName, options);
105
+ let page = result.value || [];
106
+ continuationToken = result.nextLink;
107
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
108
+ yield page;
109
+ }
110
+ while (continuationToken) {
111
+ result = await this._listConnectionsNext(resourceGroupName, workspaceName, machineName, continuationToken, options);
112
+ continuationToken = result.nextLink;
113
+ let page = result.value || [];
114
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
115
+ yield page;
116
+ }
135
117
  }
136
- listConnectionsPagingAll(resourceGroupName, workspaceName, machineName, options) {
137
- return tslib_1.__asyncGenerator(this, arguments, function* listConnectionsPagingAll_1() {
138
- var _a, e_2, _b, _c;
139
- try {
140
- for (var _d = true, _e = tslib_1.__asyncValues(this.listConnectionsPagingPage(resourceGroupName, workspaceName, machineName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
141
- _c = _f.value;
142
- _d = false;
143
- const page = _c;
144
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
145
- }
146
- }
147
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
148
- finally {
149
- try {
150
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
151
- }
152
- finally { if (e_2) throw e_2.error; }
153
- }
154
- });
118
+ async *listConnectionsPagingAll(resourceGroupName, workspaceName, machineName, options) {
119
+ for await (const page of this.listConnectionsPagingPage(resourceGroupName, workspaceName, machineName, options)) {
120
+ yield* page;
121
+ }
155
122
  }
156
123
  /**
157
124
  * Returns a collection of processes on the specified machine matching the specified conditions. The
@@ -174,52 +141,35 @@ class MachinesImpl {
174
141
  return this;
175
142
  },
176
143
  byPage: (settings) => {
177
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
144
+ if (settings?.maxPageSize) {
178
145
  throw new Error("maxPageSize is not supported by this operation.");
179
146
  }
180
147
  return this.listProcessesPagingPage(resourceGroupName, workspaceName, machineName, options, settings);
181
148
  }
182
149
  };
183
150
  }
184
- listProcessesPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
185
- return tslib_1.__asyncGenerator(this, arguments, function* listProcessesPagingPage_1() {
186
- let result;
187
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
188
- if (!continuationToken) {
189
- result = yield tslib_1.__await(this._listProcesses(resourceGroupName, workspaceName, machineName, options));
190
- let page = result.value || [];
191
- continuationToken = result.nextLink;
192
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
193
- yield yield tslib_1.__await(page);
194
- }
195
- while (continuationToken) {
196
- result = yield tslib_1.__await(this._listProcessesNext(resourceGroupName, workspaceName, machineName, continuationToken, options));
197
- continuationToken = result.nextLink;
198
- let page = result.value || [];
199
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
200
- yield yield tslib_1.__await(page);
201
- }
202
- });
151
+ async *listProcessesPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
152
+ let result;
153
+ let continuationToken = settings?.continuationToken;
154
+ if (!continuationToken) {
155
+ result = await this._listProcesses(resourceGroupName, workspaceName, machineName, options);
156
+ let page = result.value || [];
157
+ continuationToken = result.nextLink;
158
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
159
+ yield page;
160
+ }
161
+ while (continuationToken) {
162
+ result = await this._listProcessesNext(resourceGroupName, workspaceName, machineName, continuationToken, options);
163
+ continuationToken = result.nextLink;
164
+ let page = result.value || [];
165
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
166
+ yield page;
167
+ }
203
168
  }
204
- listProcessesPagingAll(resourceGroupName, workspaceName, machineName, options) {
205
- return tslib_1.__asyncGenerator(this, arguments, function* listProcessesPagingAll_1() {
206
- var _a, e_3, _b, _c;
207
- try {
208
- for (var _d = true, _e = tslib_1.__asyncValues(this.listProcessesPagingPage(resourceGroupName, workspaceName, machineName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
209
- _c = _f.value;
210
- _d = false;
211
- const page = _c;
212
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
213
- }
214
- }
215
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
216
- finally {
217
- try {
218
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
219
- }
220
- finally { if (e_3) throw e_3.error; }
221
- }
222
- });
169
+ async *listProcessesPagingAll(resourceGroupName, workspaceName, machineName, options) {
170
+ for await (const page of this.listProcessesPagingPage(resourceGroupName, workspaceName, machineName, options)) {
171
+ yield* page;
172
+ }
223
173
  }
224
174
  /**
225
175
  * Returns a collection of live ports on the specified machine during the specified time interval.
@@ -238,52 +188,35 @@ class MachinesImpl {
238
188
  return this;
239
189
  },
240
190
  byPage: (settings) => {
241
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
191
+ if (settings?.maxPageSize) {
242
192
  throw new Error("maxPageSize is not supported by this operation.");
243
193
  }
244
194
  return this.listPortsPagingPage(resourceGroupName, workspaceName, machineName, options, settings);
245
195
  }
246
196
  };
247
197
  }
248
- listPortsPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
249
- return tslib_1.__asyncGenerator(this, arguments, function* listPortsPagingPage_1() {
250
- let result;
251
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
252
- if (!continuationToken) {
253
- result = yield tslib_1.__await(this._listPorts(resourceGroupName, workspaceName, machineName, options));
254
- let page = result.value || [];
255
- continuationToken = result.nextLink;
256
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
257
- yield yield tslib_1.__await(page);
258
- }
259
- while (continuationToken) {
260
- result = yield tslib_1.__await(this._listPortsNext(resourceGroupName, workspaceName, machineName, continuationToken, options));
261
- continuationToken = result.nextLink;
262
- let page = result.value || [];
263
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
264
- yield yield tslib_1.__await(page);
265
- }
266
- });
198
+ async *listPortsPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
199
+ let result;
200
+ let continuationToken = settings?.continuationToken;
201
+ if (!continuationToken) {
202
+ result = await this._listPorts(resourceGroupName, workspaceName, machineName, options);
203
+ let page = result.value || [];
204
+ continuationToken = result.nextLink;
205
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
206
+ yield page;
207
+ }
208
+ while (continuationToken) {
209
+ result = await this._listPortsNext(resourceGroupName, workspaceName, machineName, continuationToken, options);
210
+ continuationToken = result.nextLink;
211
+ let page = result.value || [];
212
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
213
+ yield page;
214
+ }
267
215
  }
268
- listPortsPagingAll(resourceGroupName, workspaceName, machineName, options) {
269
- return tslib_1.__asyncGenerator(this, arguments, function* listPortsPagingAll_1() {
270
- var _a, e_4, _b, _c;
271
- try {
272
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPortsPagingPage(resourceGroupName, workspaceName, machineName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
273
- _c = _f.value;
274
- _d = false;
275
- const page = _c;
276
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
277
- }
278
- }
279
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
280
- finally {
281
- try {
282
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
283
- }
284
- finally { if (e_4) throw e_4.error; }
285
- }
286
- });
216
+ async *listPortsPagingAll(resourceGroupName, workspaceName, machineName, options) {
217
+ for await (const page of this.listPortsPagingPage(resourceGroupName, workspaceName, machineName, options)) {
218
+ yield* page;
219
+ }
287
220
  }
288
221
  /**
289
222
  * Returns a collection of machine groups this machine belongs to during the specified time interval.
@@ -302,52 +235,35 @@ class MachinesImpl {
302
235
  return this;
303
236
  },
304
237
  byPage: (settings) => {
305
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
238
+ if (settings?.maxPageSize) {
306
239
  throw new Error("maxPageSize is not supported by this operation.");
307
240
  }
308
241
  return this.listMachineGroupMembershipPagingPage(resourceGroupName, workspaceName, machineName, options, settings);
309
242
  }
310
243
  };
311
244
  }
312
- listMachineGroupMembershipPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
313
- return tslib_1.__asyncGenerator(this, arguments, function* listMachineGroupMembershipPagingPage_1() {
314
- let result;
315
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
316
- if (!continuationToken) {
317
- result = yield tslib_1.__await(this._listMachineGroupMembership(resourceGroupName, workspaceName, machineName, options));
318
- let page = result.value || [];
319
- continuationToken = result.nextLink;
320
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
321
- yield yield tslib_1.__await(page);
322
- }
323
- while (continuationToken) {
324
- result = yield tslib_1.__await(this._listMachineGroupMembershipNext(resourceGroupName, workspaceName, machineName, continuationToken, options));
325
- continuationToken = result.nextLink;
326
- let page = result.value || [];
327
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
328
- yield yield tslib_1.__await(page);
329
- }
330
- });
245
+ async *listMachineGroupMembershipPagingPage(resourceGroupName, workspaceName, machineName, options, settings) {
246
+ let result;
247
+ let continuationToken = settings?.continuationToken;
248
+ if (!continuationToken) {
249
+ result = await this._listMachineGroupMembership(resourceGroupName, workspaceName, machineName, options);
250
+ let page = result.value || [];
251
+ continuationToken = result.nextLink;
252
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
253
+ yield page;
254
+ }
255
+ while (continuationToken) {
256
+ result = await this._listMachineGroupMembershipNext(resourceGroupName, workspaceName, machineName, continuationToken, options);
257
+ continuationToken = result.nextLink;
258
+ let page = result.value || [];
259
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
260
+ yield page;
261
+ }
331
262
  }
332
- listMachineGroupMembershipPagingAll(resourceGroupName, workspaceName, machineName, options) {
333
- return tslib_1.__asyncGenerator(this, arguments, function* listMachineGroupMembershipPagingAll_1() {
334
- var _a, e_5, _b, _c;
335
- try {
336
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMachineGroupMembershipPagingPage(resourceGroupName, workspaceName, machineName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
337
- _c = _f.value;
338
- _d = false;
339
- const page = _c;
340
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
341
- }
342
- }
343
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
344
- finally {
345
- try {
346
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
347
- }
348
- finally { if (e_5) throw e_5.error; }
349
- }
350
- });
263
+ async *listMachineGroupMembershipPagingAll(resourceGroupName, workspaceName, machineName, options) {
264
+ for await (const page of this.listMachineGroupMembershipPagingPage(resourceGroupName, workspaceName, machineName, options)) {
265
+ yield* page;
266
+ }
351
267
  }
352
268
  /**
353
269
  * Returns a collection of machines matching the specified conditions. The returned collection