@azure/arm-automanage 1.0.3-alpha.20250718.1 → 1.0.3-alpha.20250721.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 (123) hide show
  1. package/dist/browser/automanageClient.js +25 -5
  2. package/dist/browser/automanageClient.js.map +1 -1
  3. package/dist/browser/models/mappers.js +65 -29
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/bestPractices.js +10 -27
  6. package/dist/browser/operations/bestPractices.js.map +1 -1
  7. package/dist/browser/operations/bestPracticesVersions.js +10 -27
  8. package/dist/browser/operations/bestPracticesVersions.js.map +1 -1
  9. package/dist/browser/operations/configurationProfileAssignments.js +46 -131
  10. package/dist/browser/operations/configurationProfileAssignments.js.map +1 -1
  11. package/dist/browser/operations/configurationProfileHCIAssignments.js +1 -0
  12. package/dist/browser/operations/configurationProfileHCIAssignments.js.map +1 -1
  13. package/dist/browser/operations/configurationProfileHcrpAssignments.js +1 -0
  14. package/dist/browser/operations/configurationProfileHcrpAssignments.js.map +1 -1
  15. package/dist/browser/operations/configurationProfiles.js +19 -53
  16. package/dist/browser/operations/configurationProfiles.js.map +1 -1
  17. package/dist/browser/operations/configurationProfilesVersions.js +10 -27
  18. package/dist/browser/operations/configurationProfilesVersions.js.map +1 -1
  19. package/dist/browser/operations/hCIReports.js +10 -27
  20. package/dist/browser/operations/hCIReports.js.map +1 -1
  21. package/dist/browser/operations/hcrpReports.js +10 -27
  22. package/dist/browser/operations/hcrpReports.js.map +1 -1
  23. package/dist/browser/operations/operations.js +10 -27
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/reports.js +10 -27
  26. package/dist/browser/operations/reports.js.map +1 -1
  27. package/dist/browser/operations/servicePrincipals.js +10 -27
  28. package/dist/browser/operations/servicePrincipals.js.map +1 -1
  29. package/dist/browser/pagingHelper.js +2 -4
  30. package/dist/browser/pagingHelper.js.map +1 -1
  31. package/dist/commonjs/automanageClient.js +25 -5
  32. package/dist/commonjs/automanageClient.js.map +1 -1
  33. package/dist/commonjs/models/mappers.js +65 -29
  34. package/dist/commonjs/models/mappers.js.map +1 -1
  35. package/dist/commonjs/operations/bestPractices.js +10 -26
  36. package/dist/commonjs/operations/bestPractices.js.map +1 -1
  37. package/dist/commonjs/operations/bestPracticesVersions.js +10 -26
  38. package/dist/commonjs/operations/bestPracticesVersions.js.map +1 -1
  39. package/dist/commonjs/operations/configurationProfileAssignments.js +46 -130
  40. package/dist/commonjs/operations/configurationProfileAssignments.js.map +1 -1
  41. package/dist/commonjs/operations/configurationProfileHCIAssignments.js +1 -0
  42. package/dist/commonjs/operations/configurationProfileHCIAssignments.js.map +1 -1
  43. package/dist/commonjs/operations/configurationProfileHcrpAssignments.js +1 -0
  44. package/dist/commonjs/operations/configurationProfileHcrpAssignments.js.map +1 -1
  45. package/dist/commonjs/operations/configurationProfiles.js +19 -52
  46. package/dist/commonjs/operations/configurationProfiles.js.map +1 -1
  47. package/dist/commonjs/operations/configurationProfilesVersions.js +10 -26
  48. package/dist/commonjs/operations/configurationProfilesVersions.js.map +1 -1
  49. package/dist/commonjs/operations/hCIReports.js +10 -26
  50. package/dist/commonjs/operations/hCIReports.js.map +1 -1
  51. package/dist/commonjs/operations/hcrpReports.js +10 -26
  52. package/dist/commonjs/operations/hcrpReports.js.map +1 -1
  53. package/dist/commonjs/operations/operations.js +10 -26
  54. package/dist/commonjs/operations/operations.js.map +1 -1
  55. package/dist/commonjs/operations/reports.js +10 -26
  56. package/dist/commonjs/operations/reports.js.map +1 -1
  57. package/dist/commonjs/operations/servicePrincipals.js +10 -26
  58. package/dist/commonjs/operations/servicePrincipals.js.map +1 -1
  59. package/dist/commonjs/pagingHelper.js +2 -4
  60. package/dist/commonjs/pagingHelper.js.map +1 -1
  61. package/dist/commonjs/tsdoc-metadata.json +11 -11
  62. package/dist/esm/automanageClient.js +25 -5
  63. package/dist/esm/automanageClient.js.map +1 -1
  64. package/dist/esm/models/mappers.js +65 -29
  65. package/dist/esm/models/mappers.js.map +1 -1
  66. package/dist/esm/operations/bestPractices.js +10 -27
  67. package/dist/esm/operations/bestPractices.js.map +1 -1
  68. package/dist/esm/operations/bestPracticesVersions.js +10 -27
  69. package/dist/esm/operations/bestPracticesVersions.js.map +1 -1
  70. package/dist/esm/operations/configurationProfileAssignments.js +46 -131
  71. package/dist/esm/operations/configurationProfileAssignments.js.map +1 -1
  72. package/dist/esm/operations/configurationProfileHCIAssignments.js +1 -0
  73. package/dist/esm/operations/configurationProfileHCIAssignments.js.map +1 -1
  74. package/dist/esm/operations/configurationProfileHcrpAssignments.js +1 -0
  75. package/dist/esm/operations/configurationProfileHcrpAssignments.js.map +1 -1
  76. package/dist/esm/operations/configurationProfiles.js +19 -53
  77. package/dist/esm/operations/configurationProfiles.js.map +1 -1
  78. package/dist/esm/operations/configurationProfilesVersions.js +10 -27
  79. package/dist/esm/operations/configurationProfilesVersions.js.map +1 -1
  80. package/dist/esm/operations/hCIReports.js +10 -27
  81. package/dist/esm/operations/hCIReports.js.map +1 -1
  82. package/dist/esm/operations/hcrpReports.js +10 -27
  83. package/dist/esm/operations/hcrpReports.js.map +1 -1
  84. package/dist/esm/operations/operations.js +10 -27
  85. package/dist/esm/operations/operations.js.map +1 -1
  86. package/dist/esm/operations/reports.js +10 -27
  87. package/dist/esm/operations/reports.js.map +1 -1
  88. package/dist/esm/operations/servicePrincipals.js +10 -27
  89. package/dist/esm/operations/servicePrincipals.js.map +1 -1
  90. package/dist/esm/pagingHelper.js +2 -4
  91. package/dist/esm/pagingHelper.js.map +1 -1
  92. package/dist/react-native/automanageClient.js +25 -5
  93. package/dist/react-native/automanageClient.js.map +1 -1
  94. package/dist/react-native/models/mappers.js +65 -29
  95. package/dist/react-native/models/mappers.js.map +1 -1
  96. package/dist/react-native/operations/bestPractices.js +10 -27
  97. package/dist/react-native/operations/bestPractices.js.map +1 -1
  98. package/dist/react-native/operations/bestPracticesVersions.js +10 -27
  99. package/dist/react-native/operations/bestPracticesVersions.js.map +1 -1
  100. package/dist/react-native/operations/configurationProfileAssignments.js +46 -131
  101. package/dist/react-native/operations/configurationProfileAssignments.js.map +1 -1
  102. package/dist/react-native/operations/configurationProfileHCIAssignments.js +1 -0
  103. package/dist/react-native/operations/configurationProfileHCIAssignments.js.map +1 -1
  104. package/dist/react-native/operations/configurationProfileHcrpAssignments.js +1 -0
  105. package/dist/react-native/operations/configurationProfileHcrpAssignments.js.map +1 -1
  106. package/dist/react-native/operations/configurationProfiles.js +19 -53
  107. package/dist/react-native/operations/configurationProfiles.js.map +1 -1
  108. package/dist/react-native/operations/configurationProfilesVersions.js +10 -27
  109. package/dist/react-native/operations/configurationProfilesVersions.js.map +1 -1
  110. package/dist/react-native/operations/hCIReports.js +10 -27
  111. package/dist/react-native/operations/hCIReports.js.map +1 -1
  112. package/dist/react-native/operations/hcrpReports.js +10 -27
  113. package/dist/react-native/operations/hcrpReports.js.map +1 -1
  114. package/dist/react-native/operations/operations.js +10 -27
  115. package/dist/react-native/operations/operations.js.map +1 -1
  116. package/dist/react-native/operations/reports.js +10 -27
  117. package/dist/react-native/operations/reports.js.map +1 -1
  118. package/dist/react-native/operations/servicePrincipals.js +10 -27
  119. package/dist/react-native/operations/servicePrincipals.js.map +1 -1
  120. package/dist/react-native/pagingHelper.js +2 -4
  121. package/dist/react-native/pagingHelper.js.map +1 -1
  122. package/package.json +2 -2
  123. package/review/arm-automanage-node.api.md +590 -590
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MA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,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,4CAA4C;IAClD,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,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\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: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available Automanage 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 result = await this._list(options);\n yield result.value || [];\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 Automanage 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// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Automanage/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,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,CA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CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\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: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available Automanage 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 result = await this._list(options);\n yield result.value || [];\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 Automanage 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// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Automanage/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\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 Reports operations. */
17
17
  class ReportsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Reports class.
20
21
  * @param client Reference to the service client
@@ -39,39 +40,22 @@ class ReportsImpl {
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.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, settings);
46
47
  }
47
48
  };
48
49
  }
49
- listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, _settings) {
50
- return tslib_1.__asyncGenerator(this, arguments, function* listByConfigurationProfileAssignmentsPagingPage_1() {
51
- let result;
52
- result = yield tslib_1.__await(this._listByConfigurationProfileAssignments(resourceGroupName, configurationProfileAssignmentName, vmName, options));
53
- yield yield tslib_1.__await(result.value || []);
54
- });
50
+ async *listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, _settings) {
51
+ let result;
52
+ result = await this._listByConfigurationProfileAssignments(resourceGroupName, configurationProfileAssignmentName, vmName, options);
53
+ yield result.value || [];
55
54
  }
56
- listByConfigurationProfileAssignmentsPagingAll(resourceGroupName, configurationProfileAssignmentName, vmName, options) {
57
- return tslib_1.__asyncGenerator(this, arguments, function* listByConfigurationProfileAssignmentsPagingAll_1() {
58
- var _a, e_1, _b, _c;
59
- try {
60
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, 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 *listByConfigurationProfileAssignmentsPagingAll(resourceGroupName, configurationProfileAssignmentName, vmName, options) {
56
+ for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options)) {
57
+ yield* page;
58
+ }
75
59
  }
76
60
  /**
77
61
  * Get information about a report associated with a configuration profile assignment run
@@ -1 +1 @@
1
- {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../src/operations/reports.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,qCAAqC,CAC1C,iBAAyB,EACzB,kCAA0C,EAC1C,MAAc,EACd,OAAoE;QAEpE,MAAM,IAAI,GAAG,IAAI,CAAC,8CAA8C,CAC9D,iBAAiB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;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;KAClB;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 { Reports } 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Report,\n ReportsListByConfigurationProfileAssignmentsOptionalParams,\n ReportsListByConfigurationProfileAssignmentsResponse,\n ReportsGetOptionalParams,\n ReportsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reports operations. */\nexport class ReportsImpl implements Reports {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Reports class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n public listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): PagedAsyncIterableIterator<Report> {\n const iter = this.listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\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.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Report[]> {\n let result: ReportsListByConfigurationProfileAssignmentsResponse;\n result = await this._listByConfigurationProfileAssignments(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): AsyncIterableIterator<Report> {\n for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get information about a report associated with a configuration profile assignment run\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param reportName The report name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n reportName: string,\n vmName: string,\n options?: ReportsGetOptionalParams\n ): Promise<ReportsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n reportName,\n vmName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n private _listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): Promise<ReportsListByConfigurationProfileAssignmentsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n },\n listByConfigurationProfileAssignmentsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports/{reportName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Report\n },\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.configurationProfileAssignmentName,\n Parameters.vmName,\n Parameters.reportName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConfigurationProfileAssignmentsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReportList\n },\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.configurationProfileAssignmentName,\n Parameters.vmName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../src/operations/reports.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,qCAAqC,CAC1C,iBAAyB,EACzB,kCAA0C,EAC1C,MAAc,EACd,OAAoE;QAEpE,MAAM,IAAI,GAAG,IAAI,CAAC,8CAA8C,CAC9D,iBAAiB,EACjB,kCAAkC,EAClC,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,+CAA+C,CACzD,iBAAiB,EACjB,kCAAkC,EAClC,MAAM,EACN,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,+CAA+C,CAC5D,iBAAyB,EACzB,kCAA0C,EAC1C,MAAc,EACd,OAAoE,EACpE,SAAwB;QAExB,IAAI,MAA4D,CAAC;QACjE,MAAM,GAAG,MAAM,IAAI,CAAC,sCAAsC,CACxD,iBAAiB,EACjB,kCAAkC,EAClC,MAAM,EACN,OAAO,CACR,CAAC;QACF,MAAM,MAAM,CAAC,KAAK,IAAI,E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AAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kDAAkD,GAA6B;IACnF,IAAI,EACF,qOAAqO;IACvO,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;KAClB;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 { Reports } 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Report,\n ReportsListByConfigurationProfileAssignmentsOptionalParams,\n ReportsListByConfigurationProfileAssignmentsResponse,\n ReportsGetOptionalParams,\n ReportsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reports operations. */\nexport class ReportsImpl implements Reports {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Reports class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n public listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): PagedAsyncIterableIterator<Report> {\n const iter = this.listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\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.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Report[]> {\n let result: ReportsListByConfigurationProfileAssignmentsResponse;\n result = await this._listByConfigurationProfileAssignments(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): AsyncIterableIterator<Report> {\n for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get information about a report associated with a configuration profile assignment run\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param reportName The report name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n reportName: string,\n vmName: string,\n options?: ReportsGetOptionalParams\n ): Promise<ReportsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n reportName,\n vmName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n private _listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): Promise<ReportsListByConfigurationProfileAssignmentsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n },\n listByConfigurationProfileAssignmentsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports/{reportName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Report\n },\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.configurationProfileAssignmentName,\n Parameters.vmName,\n Parameters.reportName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConfigurationProfileAssignmentsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReportList\n },\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.configurationProfileAssignmentName,\n Parameters.vmName\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 ServicePrincipals operations. */
17
17
  class ServicePrincipalsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class ServicePrincipals class.
20
21
  * @param client Reference to the service client
@@ -36,39 +37,22 @@ class ServicePrincipalsImpl {
36
37
  return this;
37
38
  },
38
39
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
40
41
  throw new Error("maxPageSize is not supported by this operation.");
41
42
  }
42
43
  return this.listBySubscriptionPagingPage(options, settings);
43
44
  }
44
45
  };
45
46
  }
46
- listBySubscriptionPagingPage(options, _settings) {
47
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
48
- let result;
49
- result = yield tslib_1.__await(this._listBySubscription(options));
50
- yield yield tslib_1.__await(result.value || []);
51
- });
47
+ async *listBySubscriptionPagingPage(options, _settings) {
48
+ let result;
49
+ result = await this._listBySubscription(options);
50
+ yield result.value || [];
52
51
  }
53
- listBySubscriptionPagingAll(options) {
54
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
55
- var _a, e_1, _b, _c;
56
- try {
57
- for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
58
- _c = _f.value;
59
- _d = false;
60
- const page = _c;
61
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
62
- }
63
- }
64
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
65
- finally {
66
- try {
67
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
68
- }
69
- finally { if (e_1) throw e_1.error; }
70
- }
71
- });
52
+ async *listBySubscriptionPagingAll(options) {
53
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
54
+ yield* page;
55
+ }
72
56
  }
73
57
  /**
74
58
  * Get the Automanage AAD first party Application Service Principal details for the subscription id.
@@ -1 +1 @@
1
- {"version":3,"file":"servicePrincipals.js","sourceRoot":"","sources":["../../../src/operations/servicePrincipals.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAa,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,kBAAkB,CACvB,OAA2D;QAE3D,MAAM,IAAI,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;QACvD,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,4BAA4B,CAAC,OA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IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0FAA0F;IAC5F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,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 { ServicePrincipals } 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n ServicePrincipal,\n ServicePrincipalsListBySubscriptionOptionalParams,\n ServicePrincipalsListBySubscriptionResponse,\n ServicePrincipalsGetOptionalParams,\n ServicePrincipalsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServicePrincipals operations. */\nexport class ServicePrincipalsImpl implements ServicePrincipals {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class ServicePrincipals class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<ServicePrincipal> {\n const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: ServicePrincipalsListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ServicePrincipal[]> {\n let result: ServicePrincipalsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<ServicePrincipal> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): Promise<ServicePrincipalsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n get(\n options?: ServicePrincipalsGetOptionalParams\n ): Promise<ServicePrincipalsGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipalListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipal\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"servicePrincipals.js","sourceRoot":"","sources":["../../../src/operations/servicePrincipals.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAa,qBAAqB;IACf,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,kBAAkB,CACvB,OAA2D;QAE3D,MAAM,IAAI,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;QACvD,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,4BAA4B,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC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AAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0FAA0F;IAC5F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,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 { ServicePrincipals } 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 { AutomanageClient } from \"../automanageClient.js\";\nimport {\n ServicePrincipal,\n ServicePrincipalsListBySubscriptionOptionalParams,\n ServicePrincipalsListBySubscriptionResponse,\n ServicePrincipalsGetOptionalParams,\n ServicePrincipalsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServicePrincipals operations. */\nexport class ServicePrincipalsImpl implements ServicePrincipals {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class ServicePrincipals class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<ServicePrincipal> {\n const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: ServicePrincipalsListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ServicePrincipal[]> {\n let result: ServicePrincipalsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<ServicePrincipal> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): Promise<ServicePrincipalsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n get(\n options?: ServicePrincipalsGetOptionalParams\n ): Promise<ServicePrincipalsGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipalListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipal\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -18,18 +18,16 @@ const pageMap = new WeakMap();
18
18
  * @returns The continuation token that can be passed into byPage() during future calls.
19
19
  */
20
20
  function getContinuationToken(page) {
21
- var _a;
22
21
  if (typeof page !== "object" || page === null) {
23
22
  return undefined;
24
23
  }
25
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
24
+ return pageMap.get(page)?.continuationToken;
26
25
  }
27
26
  function setContinuationToken(page, continuationToken) {
28
- var _a;
29
27
  if (typeof page !== "object" || page === null || !continuationToken) {
30
28
  return;
31
29
  }
32
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
30
+ const pageInfo = pageMap.get(page) ?? {};
33
31
  pageInfo.continuationToken = continuationToken;
34
32
  pageMap.set(page, pageInfo);
35
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -1,11 +1,11 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.8"
9
- }
10
- ]
11
- }
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.52.8"
9
+ }
10
+ ]
11
+ }
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { BestPracticesImpl, BestPracticesVersionsImpl, ConfigurationProfilesImpl, ConfigurationProfilesVersionsImpl, ConfigurationProfileAssignmentsImpl, OperationsImpl, ReportsImpl, ServicePrincipalsImpl, ConfigurationProfileHcrpAssignmentsImpl, HcrpReportsImpl, ConfigurationProfileHCIAssignmentsImpl, HCIReportsImpl } from "./operations/index.js";
11
11
  export class AutomanageClient extends coreClient.ServiceClient {
12
+ $host;
13
+ apiVersion;
14
+ subscriptionId;
12
15
  /**
13
16
  * Initializes a new instance of the AutomanageClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -16,7 +19,6 @@ export class AutomanageClient extends coreClient.ServiceClient {
16
19
  * @param options The parameter options
17
20
  */
18
21
  constructor(credentials, subscriptionId, options) {
19
- var _a, _b, _c;
20
22
  if (credentials === undefined) {
21
23
  throw new Error("'credentials' cannot be null");
22
24
  }
@@ -35,12 +37,17 @@ export class AutomanageClient extends coreClient.ServiceClient {
35
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
39
  : `${packageDetails}`;
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
40
+ const optionsWithDefaults = {
41
+ ...defaults,
42
+ ...options,
43
+ userAgentOptions: {
39
44
  userAgentPrefix
40
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
45
+ },
46
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
47
+ };
41
48
  super(optionsWithDefaults);
42
49
  let bearerTokenAuthenticationPolicyFound = false;
43
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
50
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
44
51
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
45
52
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
46
53
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -54,7 +61,8 @@ export class AutomanageClient extends coreClient.ServiceClient {
54
61
  });
55
62
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
56
63
  credential: credentials,
57
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
64
+ scopes: optionsWithDefaults.credentialScopes ??
65
+ `${optionsWithDefaults.endpoint}/.default`,
58
66
  challengeCallbacks: {
59
67
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
60
68
  }
@@ -104,5 +112,17 @@ export class AutomanageClient extends coreClient.ServiceClient {
104
112
  };
105
113
  this.pipeline.addPolicy(apiVersionPolicy);
106
114
  }
115
+ bestPractices;
116
+ bestPracticesVersions;
117
+ configurationProfiles;
118
+ configurationProfilesVersions;
119
+ configurationProfileAssignments;
120
+ operations;
121
+ reports;
122
+ servicePrincipals;
123
+ configurationProfileHcrpAssignments;
124
+ hcrpReports;
125
+ configurationProfileHCIAssignments;
126
+ hCIReports;
107
127
  }
108
128
  //# sourceMappingURL=automanageClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"automanageClient.js","sourceRoot":"","sources":["../../src/automanageClient.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AAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAcF","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n BestPracticesImpl,\n BestPracticesVersionsImpl,\n ConfigurationProfilesImpl,\n ConfigurationProfilesVersionsImpl,\n ConfigurationProfileAssignmentsImpl,\n OperationsImpl,\n ReportsImpl,\n ServicePrincipalsImpl,\n ConfigurationProfileHcrpAssignmentsImpl,\n HcrpReportsImpl,\n ConfigurationProfileHCIAssignmentsImpl,\n HCIReportsImpl\n} from \"./operations/index.js\";\nimport {\n BestPractices,\n BestPracticesVersions,\n ConfigurationProfiles,\n ConfigurationProfilesVersions,\n ConfigurationProfileAssignments,\n Operations,\n Reports,\n ServicePrincipals,\n ConfigurationProfileHcrpAssignments,\n HcrpReports,\n ConfigurationProfileHCIAssignments,\n HCIReports\n} from \"./operationsInterfaces/index.js\";\nimport { AutomanageClientOptionalParams } from \"./models/index.js\";\n\nexport class AutomanageClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AutomanageClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AutomanageClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AutomanageClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-automanage/1.0.3`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2022-05-04\";\n this.bestPractices = new BestPracticesImpl(this);\n this.bestPracticesVersions = new BestPracticesVersionsImpl(this);\n this.configurationProfiles = new ConfigurationProfilesImpl(this);\n this.configurationProfilesVersions = new ConfigurationProfilesVersionsImpl(\n this\n );\n this.configurationProfileAssignments = new ConfigurationProfileAssignmentsImpl(\n this\n );\n this.operations = new OperationsImpl(this);\n this.reports = new ReportsImpl(this);\n this.servicePrincipals = new ServicePrincipalsImpl(this);\n this.configurationProfileHcrpAssignments = new ConfigurationProfileHcrpAssignmentsImpl(\n this\n );\n this.hcrpReports = new HcrpReportsImpl(this);\n this.configurationProfileHCIAssignments = new ConfigurationProfileHCIAssignmentsImpl(\n this\n );\n this.hCIReports = new HCIReportsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n bestPractices: BestPractices;\n bestPracticesVersions: BestPracticesVersions;\n configurationProfiles: ConfigurationProfiles;\n configurationProfilesVersions: ConfigurationProfilesVersions;\n configurationProfileAssignments: ConfigurationProfileAssignments;\n operations: Operations;\n reports: Reports;\n servicePrincipals: ServicePrincipals;\n configurationProfileHcrpAssignments: ConfigurationProfileHcrpAssignments;\n hcrpReports: HcrpReports;\n configurationProfileHCIAssignments: ConfigurationProfileHCIAssignments;\n hCIReports: HCIReports;\n}\n"]}
1
+ {"version":3,"file":"automanageClient.js","sourceRoot":"","sources":["../../src/automanageClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,uCAAuC,EACvC,eAAe,EACf,sCAAsC,EACtC,cAAc,EACf,MAAM,uBAAuB,CAAC;AAiB/B,MAAM,OAAO,gBAAiB,SAAQ,UAAU,CAAC,aAAa;IAC5D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAwC;QAExC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE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AAqC;IACvE,UAAU,CAAa;CACxB","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n BestPracticesImpl,\n BestPracticesVersionsImpl,\n ConfigurationProfilesImpl,\n ConfigurationProfilesVersionsImpl,\n ConfigurationProfileAssignmentsImpl,\n OperationsImpl,\n ReportsImpl,\n ServicePrincipalsImpl,\n ConfigurationProfileHcrpAssignmentsImpl,\n HcrpReportsImpl,\n ConfigurationProfileHCIAssignmentsImpl,\n HCIReportsImpl\n} from \"./operations/index.js\";\nimport {\n BestPractices,\n BestPracticesVersions,\n ConfigurationProfiles,\n ConfigurationProfilesVersions,\n ConfigurationProfileAssignments,\n Operations,\n Reports,\n ServicePrincipals,\n ConfigurationProfileHcrpAssignments,\n HcrpReports,\n ConfigurationProfileHCIAssignments,\n HCIReports\n} from \"./operationsInterfaces/index.js\";\nimport { AutomanageClientOptionalParams } from \"./models/index.js\";\n\nexport class AutomanageClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AutomanageClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AutomanageClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AutomanageClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-automanage/1.0.3`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2022-05-04\";\n this.bestPractices = new BestPracticesImpl(this);\n this.bestPracticesVersions = new BestPracticesVersionsImpl(this);\n this.configurationProfiles = new ConfigurationProfilesImpl(this);\n this.configurationProfilesVersions = new ConfigurationProfilesVersionsImpl(\n this\n );\n this.configurationProfileAssignments = new ConfigurationProfileAssignmentsImpl(\n this\n );\n this.operations = new OperationsImpl(this);\n this.reports = new ReportsImpl(this);\n this.servicePrincipals = new ServicePrincipalsImpl(this);\n this.configurationProfileHcrpAssignments = new ConfigurationProfileHcrpAssignmentsImpl(\n this\n );\n this.hcrpReports = new HcrpReportsImpl(this);\n this.configurationProfileHCIAssignments = new ConfigurationProfileHCIAssignmentsImpl(\n this\n );\n this.hCIReports = new HCIReportsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n bestPractices: BestPractices;\n bestPracticesVersions: BestPracticesVersions;\n configurationProfiles: ConfigurationProfiles;\n configurationProfilesVersions: ConfigurationProfilesVersions;\n configurationProfileAssignments: ConfigurationProfileAssignments;\n operations: Operations;\n reports: Reports;\n servicePrincipals: ServicePrincipals;\n configurationProfileHcrpAssignments: ConfigurationProfileHcrpAssignments;\n hcrpReports: HcrpReports;\n configurationProfileHCIAssignments: ConfigurationProfileHCIAssignments;\n hCIReports: HCIReports;\n}\n"]}