@azure/arm-resourcehealth 4.1.0-alpha.20250619.1 → 4.1.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/browser/microsoftResourceHealth.js +23 -5
  2. package/dist/browser/microsoftResourceHealth.js.map +1 -1
  3. package/dist/browser/models/mappers.js +124 -59
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/availabilityStatuses.js +67 -118
  6. package/dist/browser/operations/availabilityStatuses.js.map +1 -1
  7. package/dist/browser/operations/childAvailabilityStatuses.js +23 -40
  8. package/dist/browser/operations/childAvailabilityStatuses.js.map +1 -1
  9. package/dist/browser/operations/childResources.js +23 -40
  10. package/dist/browser/operations/childResources.js.map +1 -1
  11. package/dist/browser/operations/emergingIssues.js +23 -40
  12. package/dist/browser/operations/emergingIssues.js.map +1 -1
  13. package/dist/browser/operations/eventOperations.js +1 -0
  14. package/dist/browser/operations/eventOperations.js.map +1 -1
  15. package/dist/browser/operations/eventsOperations.js +67 -118
  16. package/dist/browser/operations/eventsOperations.js.map +1 -1
  17. package/dist/browser/operations/impactedResources.js +45 -79
  18. package/dist/browser/operations/impactedResources.js.map +1 -1
  19. package/dist/browser/operations/metadata.js +23 -40
  20. package/dist/browser/operations/metadata.js.map +1 -1
  21. package/dist/browser/operations/operations.js +1 -0
  22. package/dist/browser/operations/operations.js.map +1 -1
  23. package/dist/browser/operations/securityAdvisoryImpactedResources.js +45 -79
  24. package/dist/browser/operations/securityAdvisoryImpactedResources.js.map +1 -1
  25. package/dist/browser/pagingHelper.js +2 -4
  26. package/dist/browser/pagingHelper.js.map +1 -1
  27. package/dist/commonjs/microsoftResourceHealth.js +23 -5
  28. package/dist/commonjs/microsoftResourceHealth.js.map +1 -1
  29. package/dist/commonjs/models/mappers.js +124 -59
  30. package/dist/commonjs/models/mappers.js.map +1 -1
  31. package/dist/commonjs/operations/availabilityStatuses.js +67 -117
  32. package/dist/commonjs/operations/availabilityStatuses.js.map +1 -1
  33. package/dist/commonjs/operations/childAvailabilityStatuses.js +23 -39
  34. package/dist/commonjs/operations/childAvailabilityStatuses.js.map +1 -1
  35. package/dist/commonjs/operations/childResources.js +23 -39
  36. package/dist/commonjs/operations/childResources.js.map +1 -1
  37. package/dist/commonjs/operations/emergingIssues.js +23 -39
  38. package/dist/commonjs/operations/emergingIssues.js.map +1 -1
  39. package/dist/commonjs/operations/eventOperations.js +1 -0
  40. package/dist/commonjs/operations/eventOperations.js.map +1 -1
  41. package/dist/commonjs/operations/eventsOperations.js +67 -117
  42. package/dist/commonjs/operations/eventsOperations.js.map +1 -1
  43. package/dist/commonjs/operations/impactedResources.js +45 -78
  44. package/dist/commonjs/operations/impactedResources.js.map +1 -1
  45. package/dist/commonjs/operations/metadata.js +23 -39
  46. package/dist/commonjs/operations/metadata.js.map +1 -1
  47. package/dist/commonjs/operations/operations.js +1 -0
  48. package/dist/commonjs/operations/operations.js.map +1 -1
  49. package/dist/commonjs/operations/securityAdvisoryImpactedResources.js +45 -78
  50. package/dist/commonjs/operations/securityAdvisoryImpactedResources.js.map +1 -1
  51. package/dist/commonjs/pagingHelper.js +2 -4
  52. package/dist/commonjs/pagingHelper.js.map +1 -1
  53. package/dist/commonjs/tsdoc-metadata.json +11 -11
  54. package/dist/esm/microsoftResourceHealth.js +23 -5
  55. package/dist/esm/microsoftResourceHealth.js.map +1 -1
  56. package/dist/esm/models/mappers.js +124 -59
  57. package/dist/esm/models/mappers.js.map +1 -1
  58. package/dist/esm/operations/availabilityStatuses.js +67 -118
  59. package/dist/esm/operations/availabilityStatuses.js.map +1 -1
  60. package/dist/esm/operations/childAvailabilityStatuses.js +23 -40
  61. package/dist/esm/operations/childAvailabilityStatuses.js.map +1 -1
  62. package/dist/esm/operations/childResources.js +23 -40
  63. package/dist/esm/operations/childResources.js.map +1 -1
  64. package/dist/esm/operations/emergingIssues.js +23 -40
  65. package/dist/esm/operations/emergingIssues.js.map +1 -1
  66. package/dist/esm/operations/eventOperations.js +1 -0
  67. package/dist/esm/operations/eventOperations.js.map +1 -1
  68. package/dist/esm/operations/eventsOperations.js +67 -118
  69. package/dist/esm/operations/eventsOperations.js.map +1 -1
  70. package/dist/esm/operations/impactedResources.js +45 -79
  71. package/dist/esm/operations/impactedResources.js.map +1 -1
  72. package/dist/esm/operations/metadata.js +23 -40
  73. package/dist/esm/operations/metadata.js.map +1 -1
  74. package/dist/esm/operations/operations.js +1 -0
  75. package/dist/esm/operations/operations.js.map +1 -1
  76. package/dist/esm/operations/securityAdvisoryImpactedResources.js +45 -79
  77. package/dist/esm/operations/securityAdvisoryImpactedResources.js.map +1 -1
  78. package/dist/esm/pagingHelper.js +2 -4
  79. package/dist/esm/pagingHelper.js.map +1 -1
  80. package/dist/react-native/microsoftResourceHealth.js +23 -5
  81. package/dist/react-native/microsoftResourceHealth.js.map +1 -1
  82. package/dist/react-native/models/mappers.js +124 -59
  83. package/dist/react-native/models/mappers.js.map +1 -1
  84. package/dist/react-native/operations/availabilityStatuses.js +67 -118
  85. package/dist/react-native/operations/availabilityStatuses.js.map +1 -1
  86. package/dist/react-native/operations/childAvailabilityStatuses.js +23 -40
  87. package/dist/react-native/operations/childAvailabilityStatuses.js.map +1 -1
  88. package/dist/react-native/operations/childResources.js +23 -40
  89. package/dist/react-native/operations/childResources.js.map +1 -1
  90. package/dist/react-native/operations/emergingIssues.js +23 -40
  91. package/dist/react-native/operations/emergingIssues.js.map +1 -1
  92. package/dist/react-native/operations/eventOperations.js +1 -0
  93. package/dist/react-native/operations/eventOperations.js.map +1 -1
  94. package/dist/react-native/operations/eventsOperations.js +67 -118
  95. package/dist/react-native/operations/eventsOperations.js.map +1 -1
  96. package/dist/react-native/operations/impactedResources.js +45 -79
  97. package/dist/react-native/operations/impactedResources.js.map +1 -1
  98. package/dist/react-native/operations/metadata.js +23 -40
  99. package/dist/react-native/operations/metadata.js.map +1 -1
  100. package/dist/react-native/operations/operations.js +1 -0
  101. package/dist/react-native/operations/operations.js.map +1 -1
  102. package/dist/react-native/operations/securityAdvisoryImpactedResources.js +45 -79
  103. package/dist/react-native/operations/securityAdvisoryImpactedResources.js.map +1 -1
  104. package/dist/react-native/pagingHelper.js +2 -4
  105. package/dist/react-native/pagingHelper.js.map +1 -1
  106. package/package.json +2 -2
  107. /package/review/{arm-resourcehealth.api.md → arm-resourcehealth-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 Metadata operations. */
18
18
  class MetadataImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Metadata class.
21
22
  * @param client Reference to the service client
@@ -37,52 +38,35 @@ class MetadataImpl {
37
38
  return this;
38
39
  },
39
40
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
41
42
  throw new Error("maxPageSize is not supported by this operation.");
42
43
  }
43
44
  return this.listPagingPage(options, settings);
44
45
  }
45
46
  };
46
47
  }
47
- listPagingPage(options, settings) {
48
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield tslib_1.__await(this._list(options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
- yield yield tslib_1.__await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield yield tslib_1.__await(page);
64
- }
65
- });
48
+ async *listPagingPage(options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listNext(continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
+ yield page;
64
+ }
66
65
  }
67
- listPagingAll(options) {
68
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
66
+ async *listPagingAll(options) {
67
+ for await (const page of this.listPagingPage(options)) {
68
+ yield* page;
69
+ }
86
70
  }
87
71
  /**
88
72
  * Gets the list of metadata entities.
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/operations/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAA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ACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,qDAAqD;IAC3D,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;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,IAAI,CAAC;IAClD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Metadata } 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n MetadataEntity,\n MetadataListNextOptionalParams,\n MetadataListOptionalParams,\n MetadataListResponse,\n MetadataGetEntityOptionalParams,\n MetadataGetEntityResponse,\n MetadataListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Metadata operations. */\nexport class MetadataImpl implements Metadata {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class Metadata class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Gets the list of metadata entities.\n * @param options The options parameters.\n */\n public list(\n options?: MetadataListOptionalParams\n ): PagedAsyncIterableIterator<MetadataEntity> {\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?: MetadataListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<MetadataEntity[]> {\n let result: MetadataListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: MetadataListOptionalParams\n ): AsyncIterableIterator<MetadataEntity> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the list of metadata entities.\n * @param options The options parameters.\n */\n private _list(\n options?: MetadataListOptionalParams\n ): Promise<MetadataListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets the list of metadata entities.\n * @param name Name of metadata entity.\n * @param options The options parameters.\n */\n getEntity(\n name: string,\n options?: MetadataGetEntityOptionalParams\n ): Promise<MetadataGetEntityResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getEntityOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: MetadataListNextOptionalParams\n ): Promise<MetadataListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceHealth/metadata\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntityListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getEntityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceHealth/metadata/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntity\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntityListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/operations/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,4CAA4C;A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,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,qDAAqD;IAC3D,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;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,IAAI,CAAC;IAClD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Metadata } 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n MetadataEntity,\n MetadataListNextOptionalParams,\n MetadataListOptionalParams,\n MetadataListResponse,\n MetadataGetEntityOptionalParams,\n MetadataGetEntityResponse,\n MetadataListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Metadata operations. */\nexport class MetadataImpl implements Metadata {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class Metadata class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Gets the list of metadata entities.\n * @param options The options parameters.\n */\n public list(\n options?: MetadataListOptionalParams\n ): PagedAsyncIterableIterator<MetadataEntity> {\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?: MetadataListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<MetadataEntity[]> {\n let result: MetadataListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: MetadataListOptionalParams\n ): AsyncIterableIterator<MetadataEntity> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the list of metadata entities.\n * @param options The options parameters.\n */\n private _list(\n options?: MetadataListOptionalParams\n ): Promise<MetadataListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets the list of metadata entities.\n * @param name Name of metadata entity.\n * @param options The options parameters.\n */\n getEntity(\n name: string,\n options?: MetadataGetEntityOptionalParams\n ): Promise<MetadataGetEntityResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getEntityOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: MetadataListNextOptionalParams\n ): Promise<MetadataListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceHealth/metadata\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntityListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getEntityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceHealth/metadata/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntity\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetadataEntityListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing Operations operations. */
16
16
  class OperationsImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class Operations class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AApBD,wCAoBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,gDAAgD;IACtD,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 { 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Lists available operations for the resourcehealth resource provider\n * @param options The options parameters.\n */\n 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.ResourceHealth/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;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AApBD,wCAoBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,gDAAgD;IACtD,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 { 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Lists available operations for the resourcehealth resource provider\n * @param options The options parameters.\n */\n 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.ResourceHealth/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"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing SecurityAdvisoryImpactedResources operations. */
18
18
  class SecurityAdvisoryImpactedResourcesImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class SecurityAdvisoryImpactedResources class.
21
22
  * @param client Reference to the service client
@@ -38,52 +39,35 @@ class SecurityAdvisoryImpactedResourcesImpl {
38
39
  return this;
39
40
  },
40
41
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
42
43
  throw new Error("maxPageSize is not supported by this operation.");
43
44
  }
44
45
  return this.listBySubscriptionIdAndEventIdPagingPage(eventTrackingId, options, settings);
45
46
  }
46
47
  };
47
48
  }
48
- listBySubscriptionIdAndEventIdPagingPage(eventTrackingId, options, settings) {
49
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionIdAndEventIdPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield tslib_1.__await(this._listBySubscriptionIdAndEventId(eventTrackingId, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
- yield yield tslib_1.__await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield tslib_1.__await(this._listBySubscriptionIdAndEventIdNext(eventTrackingId, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
- yield yield tslib_1.__await(page);
65
- }
66
- });
49
+ async *listBySubscriptionIdAndEventIdPagingPage(eventTrackingId, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listBySubscriptionIdAndEventId(eventTrackingId, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listBySubscriptionIdAndEventIdNext(eventTrackingId, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
+ yield page;
65
+ }
67
66
  }
68
- listBySubscriptionIdAndEventIdPagingAll(eventTrackingId, options) {
69
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionIdAndEventIdPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionIdAndEventIdPagingPage(eventTrackingId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
67
+ async *listBySubscriptionIdAndEventIdPagingAll(eventTrackingId, options) {
68
+ for await (const page of this.listBySubscriptionIdAndEventIdPagingPage(eventTrackingId, options)) {
69
+ yield* page;
70
+ }
87
71
  }
88
72
  /**
89
73
  * Lists impacted resources in the tenant by an event (Security Advisory).
@@ -100,52 +84,35 @@ class SecurityAdvisoryImpactedResourcesImpl {
100
84
  return this;
101
85
  },
102
86
  byPage: (settings) => {
103
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
87
+ if (settings?.maxPageSize) {
104
88
  throw new Error("maxPageSize is not supported by this operation.");
105
89
  }
106
90
  return this.listByTenantIdAndEventIdPagingPage(eventTrackingId, options, settings);
107
91
  }
108
92
  };
109
93
  }
110
- listByTenantIdAndEventIdPagingPage(eventTrackingId, options, settings) {
111
- return tslib_1.__asyncGenerator(this, arguments, function* listByTenantIdAndEventIdPagingPage_1() {
112
- let result;
113
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
114
- if (!continuationToken) {
115
- result = yield tslib_1.__await(this._listByTenantIdAndEventId(eventTrackingId, options));
116
- let page = result.value || [];
117
- continuationToken = result.nextLink;
118
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
119
- yield yield tslib_1.__await(page);
120
- }
121
- while (continuationToken) {
122
- result = yield tslib_1.__await(this._listByTenantIdAndEventIdNext(eventTrackingId, continuationToken, options));
123
- continuationToken = result.nextLink;
124
- let page = result.value || [];
125
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
126
- yield yield tslib_1.__await(page);
127
- }
128
- });
94
+ async *listByTenantIdAndEventIdPagingPage(eventTrackingId, options, settings) {
95
+ let result;
96
+ let continuationToken = settings?.continuationToken;
97
+ if (!continuationToken) {
98
+ result = await this._listByTenantIdAndEventId(eventTrackingId, options);
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
102
+ yield page;
103
+ }
104
+ while (continuationToken) {
105
+ result = await this._listByTenantIdAndEventIdNext(eventTrackingId, continuationToken, options);
106
+ continuationToken = result.nextLink;
107
+ let page = result.value || [];
108
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
109
+ yield page;
110
+ }
129
111
  }
130
- listByTenantIdAndEventIdPagingAll(eventTrackingId, options) {
131
- return tslib_1.__asyncGenerator(this, arguments, function* listByTenantIdAndEventIdPagingAll_1() {
132
- var _a, e_2, _b, _c;
133
- try {
134
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByTenantIdAndEventIdPagingPage(eventTrackingId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
135
- _c = _f.value;
136
- _d = false;
137
- const page = _c;
138
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
139
- }
140
- }
141
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
142
- finally {
143
- try {
144
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
145
- }
146
- finally { if (e_2) throw e_2.error; }
147
- }
148
- });
112
+ async *listByTenantIdAndEventIdPagingAll(eventTrackingId, options) {
113
+ for await (const page of this.listByTenantIdAndEventIdPagingPage(eventTrackingId, options)) {
114
+ yield* page;
115
+ }
149
116
  }
150
117
  /**
151
118
  * Lists impacted resources in the subscription by an event (Security Advisory).
@@ -1 +1 @@
1
- {"version":3,"file":"securityAdvisoryImpactedResources.js","sourceRoot":"","sources":["../../../src/operations/securityAdvisoryImpactedResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,qEAAqE;AACrE,MAAa,qCAAqC;IAIhD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,8BAA8B,CACnC,eAAuB,EACvB,OAAuF;QAEvF,MAAM,IAAI,GAAG,IAAI,CAAC,uCAAuC,CACvD,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,I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,MAAM,+CAA+C,GAA6B;IAChF,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;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,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,yCAAyC,GAA6B;IAC1E,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;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 { SecurityAdvisoryImpactedResources } 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n EventImpactedResource,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextOptionalParams,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextOptionalParams,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextResponse,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SecurityAdvisoryImpactedResources operations. */\nexport class SecurityAdvisoryImpactedResourcesImpl\n implements SecurityAdvisoryImpactedResources {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class SecurityAdvisoryImpactedResources class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Lists impacted resources in the subscription by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n public listBySubscriptionIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): PagedAsyncIterableIterator<EventImpactedResource> {\n const iter = this.listBySubscriptionIdAndEventIdPagingAll(\n eventTrackingId,\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.listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventImpactedResource[]> {\n let result: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscriptionIdAndEventId(\n eventTrackingId,\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._listBySubscriptionIdAndEventIdNext(\n eventTrackingId,\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 *listBySubscriptionIdAndEventIdPagingAll(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): AsyncIterableIterator<EventImpactedResource> {\n for await (const page of this.listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists impacted resources in the tenant by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n public listByTenantIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): PagedAsyncIterableIterator<EventImpactedResource> {\n const iter = this.listByTenantIdAndEventIdPagingAll(\n eventTrackingId,\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.listByTenantIdAndEventIdPagingPage(\n eventTrackingId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByTenantIdAndEventIdPagingPage(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventImpactedResource[]> {\n let result: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByTenantIdAndEventId(eventTrackingId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByTenantIdAndEventIdNext(\n eventTrackingId,\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 *listByTenantIdAndEventIdPagingAll(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): AsyncIterableIterator<EventImpactedResource> {\n for await (const page of this.listByTenantIdAndEventIdPagingPage(\n eventTrackingId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists impacted resources in the subscription by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n private _listBySubscriptionIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, options },\n listBySubscriptionIdAndEventIdOperationSpec\n );\n }\n\n /**\n * Lists impacted resources in the tenant by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n private _listByTenantIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, options },\n listByTenantIdAndEventIdOperationSpec\n );\n }\n\n /**\n * ListBySubscriptionIdAndEventIdNext\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param nextLink The nextLink from the previous successful call to the ListBySubscriptionIdAndEventId\n * method.\n * @param options The options parameters.\n */\n private _listBySubscriptionIdAndEventIdNext(\n eventTrackingId: string,\n nextLink: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, nextLink, options },\n listBySubscriptionIdAndEventIdNextOperationSpec\n );\n }\n\n /**\n * ListByTenantIdAndEventIdNext\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param nextLink The nextLink from the previous successful call to the ListByTenantIdAndEventId\n * method.\n * @param options The options parameters.\n */\n private _listByTenantIdAndEventIdNext(\n eventTrackingId: string,\n nextLink: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, nextLink, options },\n listByTenantIdAndEventIdNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionIdAndEventIdOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.eventTrackingId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByTenantIdAndEventIdOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.eventTrackingId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionIdAndEventIdNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.eventTrackingId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByTenantIdAndEventIdNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.eventTrackingId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"securityAdvisoryImpactedResources.js","sourceRoot":"","sources":["../../../src/operations/securityAdvisoryImpactedResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,qEAAqE;AACrE,MAAa,qCAAqC;IAE/B,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,8BAA8B,CACnC,eAAuB,EACvB,OAAuF;QAEvF,MAAM,IAAI,GAAG,IAAI,CAAC,uCAAuC,CACvD,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;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,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,yCAAyC,GAA6B;IAC1E,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;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 { SecurityAdvisoryImpactedResources } 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 { MicrosoftResourceHealth } from \"../microsoftResourceHealth.js\";\nimport {\n EventImpactedResource,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextOptionalParams,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextOptionalParams,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse,\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextResponse,\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SecurityAdvisoryImpactedResources operations. */\nexport class SecurityAdvisoryImpactedResourcesImpl\n implements SecurityAdvisoryImpactedResources {\n private readonly client: MicrosoftResourceHealth;\n\n /**\n * Initialize a new instance of the class SecurityAdvisoryImpactedResources class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftResourceHealth) {\n this.client = client;\n }\n\n /**\n * Lists impacted resources in the subscription by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n public listBySubscriptionIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): PagedAsyncIterableIterator<EventImpactedResource> {\n const iter = this.listBySubscriptionIdAndEventIdPagingAll(\n eventTrackingId,\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.listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventImpactedResource[]> {\n let result: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscriptionIdAndEventId(\n eventTrackingId,\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._listBySubscriptionIdAndEventIdNext(\n eventTrackingId,\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 *listBySubscriptionIdAndEventIdPagingAll(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): AsyncIterableIterator<EventImpactedResource> {\n for await (const page of this.listBySubscriptionIdAndEventIdPagingPage(\n eventTrackingId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists impacted resources in the tenant by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n public listByTenantIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): PagedAsyncIterableIterator<EventImpactedResource> {\n const iter = this.listByTenantIdAndEventIdPagingAll(\n eventTrackingId,\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.listByTenantIdAndEventIdPagingPage(\n eventTrackingId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByTenantIdAndEventIdPagingPage(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventImpactedResource[]> {\n let result: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByTenantIdAndEventId(eventTrackingId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByTenantIdAndEventIdNext(\n eventTrackingId,\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 *listByTenantIdAndEventIdPagingAll(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): AsyncIterableIterator<EventImpactedResource> {\n for await (const page of this.listByTenantIdAndEventIdPagingPage(\n eventTrackingId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists impacted resources in the subscription by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n private _listBySubscriptionIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, options },\n listBySubscriptionIdAndEventIdOperationSpec\n );\n }\n\n /**\n * Lists impacted resources in the tenant by an event (Security Advisory).\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param options The options parameters.\n */\n private _listByTenantIdAndEventId(\n eventTrackingId: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, options },\n listByTenantIdAndEventIdOperationSpec\n );\n }\n\n /**\n * ListBySubscriptionIdAndEventIdNext\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param nextLink The nextLink from the previous successful call to the ListBySubscriptionIdAndEventId\n * method.\n * @param options The options parameters.\n */\n private _listBySubscriptionIdAndEventIdNext(\n eventTrackingId: string,\n nextLink: string,\n options?: SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdNextResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, nextLink, options },\n listBySubscriptionIdAndEventIdNextOperationSpec\n );\n }\n\n /**\n * ListByTenantIdAndEventIdNext\n * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.\n * @param nextLink The nextLink from the previous successful call to the ListByTenantIdAndEventId\n * method.\n * @param options The options parameters.\n */\n private _listByTenantIdAndEventIdNext(\n eventTrackingId: string,\n nextLink: string,\n options?: SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextOptionalParams\n ): Promise<\n SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdNextResponse\n > {\n return this.client.sendOperationRequest(\n { eventTrackingId, nextLink, options },\n listByTenantIdAndEventIdNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionIdAndEventIdOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.eventTrackingId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByTenantIdAndEventIdOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/listSecurityAdvisoryImpactedResources\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.eventTrackingId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionIdAndEventIdNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.eventTrackingId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByTenantIdAndEventIdNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventImpactedResourceListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.eventTrackingId\n ],\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.9"
9
+ }
10
+ ]
11
+ }
@@ -9,8 +9,10 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { AvailabilityStatusesImpl, OperationsImpl, MetadataImpl, ImpactedResourcesImpl, SecurityAdvisoryImpactedResourcesImpl, EventsOperationsImpl, EventOperationsImpl, ChildAvailabilityStatusesImpl, ChildResourcesImpl, EmergingIssuesImpl } from "./operations/index.js";
11
11
  export class MicrosoftResourceHealth extends coreClient.ServiceClient {
12
+ $host;
13
+ apiVersion;
14
+ subscriptionId;
12
15
  constructor(credentials, subscriptionIdOrOptions, options) {
13
- var _a, _b, _c;
14
16
  if (credentials === undefined) {
15
17
  throw new Error("'credentials' cannot be null");
16
18
  }
@@ -33,12 +35,17 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
33
35
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
36
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
37
  : `${packageDetails}`;
36
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
38
+ const optionsWithDefaults = {
39
+ ...defaults,
40
+ ...options,
41
+ userAgentOptions: {
37
42
  userAgentPrefix
38
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
43
+ },
44
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
45
+ };
39
46
  super(optionsWithDefaults);
40
47
  let bearerTokenAuthenticationPolicyFound = false;
41
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
48
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
42
49
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
43
50
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
44
51
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -52,7 +59,8 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
52
59
  });
53
60
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
54
61
  credential: credentials,
55
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
62
+ scopes: optionsWithDefaults.credentialScopes ??
63
+ `${optionsWithDefaults.endpoint}/.default`,
56
64
  challengeCallbacks: {
57
65
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
58
66
  }
@@ -100,5 +108,15 @@ export class MicrosoftResourceHealth extends coreClient.ServiceClient {
100
108
  };
101
109
  this.pipeline.addPolicy(apiVersionPolicy);
102
110
  }
111
+ availabilityStatuses;
112
+ operations;
113
+ metadata;
114
+ impactedResources;
115
+ securityAdvisoryImpactedResources;
116
+ eventsOperations;
117
+ eventOperations;
118
+ childAvailabilityStatuses;
119
+ childResources;
120
+ emergingIssues;
103
121
  }
104
122
  //# sourceMappingURL=microsoftResourceHealth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftResourceHealth.js","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names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,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;CAYF","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 AvailabilityStatusesImpl,\n OperationsImpl,\n MetadataImpl,\n ImpactedResourcesImpl,\n SecurityAdvisoryImpactedResourcesImpl,\n EventsOperationsImpl,\n EventOperationsImpl,\n ChildAvailabilityStatusesImpl,\n ChildResourcesImpl,\n EmergingIssuesImpl\n} from \"./operations/index.js\";\nimport {\n AvailabilityStatuses,\n Operations,\n Metadata,\n ImpactedResources,\n SecurityAdvisoryImpactedResources,\n EventsOperations,\n EventOperations,\n ChildAvailabilityStatuses,\n ChildResources,\n EmergingIssues\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftResourceHealthOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftResourceHealth extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MicrosoftResourceHealth 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?: MicrosoftResourceHealthOptionalParams\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MicrosoftResourceHealthOptionalParams\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MicrosoftResourceHealthOptionalParams | string,\n options?: MicrosoftResourceHealthOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftResourceHealthOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-resourcehealth/4.1.0-beta.2`;\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 || \"2023-10-01-preview\";\n this.availabilityStatuses = new AvailabilityStatusesImpl(this);\n this.operations = new OperationsImpl(this);\n this.metadata = new MetadataImpl(this);\n this.impactedResources = new ImpactedResourcesImpl(this);\n this.securityAdvisoryImpactedResources = new SecurityAdvisoryImpactedResourcesImpl(\n this\n );\n this.eventsOperations = new EventsOperationsImpl(this);\n this.eventOperations = new EventOperationsImpl(this);\n this.childAvailabilityStatuses = new ChildAvailabilityStatusesImpl(this);\n this.childResources = new ChildResourcesImpl(this);\n this.emergingIssues = new EmergingIssuesImpl(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 availabilityStatuses: AvailabilityStatuses;\n operations: Operations;\n metadata: Metadata;\n impactedResources: ImpactedResources;\n securityAdvisoryImpactedResources: SecurityAdvisoryImpactedResources;\n eventsOperations: EventsOperations;\n eventOperations: EventOperations;\n childAvailabilityStatuses: ChildAvailabilityStatuses;\n childResources: ChildResources;\n emergingIssues: EmergingIssues;\n}\n"]}
1
+ {"version":3,"file":"microsoftResourceHealth.js","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,qCAAqC,EACrC,oBAAoB,EACpB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAe/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAwE,EACxE,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM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ACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;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;IAED,oBAAoB,CAAuB;IAC3C,UAAU,CAAa;IACvB,QAAQ,CAAW;IACnB,iBAAiB,CAAoB;IACrC,iCAAiC,CAAoC;IACrE,gBAAgB,CAAmB;IACnC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,cAAc,CAAiB;IAC/B,cAAc,CAAiB;CAChC","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 AvailabilityStatusesImpl,\n OperationsImpl,\n MetadataImpl,\n ImpactedResourcesImpl,\n SecurityAdvisoryImpactedResourcesImpl,\n EventsOperationsImpl,\n EventOperationsImpl,\n ChildAvailabilityStatusesImpl,\n ChildResourcesImpl,\n EmergingIssuesImpl\n} from \"./operations/index.js\";\nimport {\n AvailabilityStatuses,\n Operations,\n Metadata,\n ImpactedResources,\n SecurityAdvisoryImpactedResources,\n EventsOperations,\n EventOperations,\n ChildAvailabilityStatuses,\n ChildResources,\n EmergingIssues\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftResourceHealthOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftResourceHealth extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MicrosoftResourceHealth 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?: MicrosoftResourceHealthOptionalParams\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MicrosoftResourceHealthOptionalParams\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MicrosoftResourceHealthOptionalParams | string,\n options?: MicrosoftResourceHealthOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftResourceHealthOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-resourcehealth/4.1.0-beta.2`;\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 || \"2023-10-01-preview\";\n this.availabilityStatuses = new AvailabilityStatusesImpl(this);\n this.operations = new OperationsImpl(this);\n this.metadata = new MetadataImpl(this);\n this.impactedResources = new ImpactedResourcesImpl(this);\n this.securityAdvisoryImpactedResources = new SecurityAdvisoryImpactedResourcesImpl(\n this\n );\n this.eventsOperations = new EventsOperationsImpl(this);\n this.eventOperations = new EventOperationsImpl(this);\n this.childAvailabilityStatuses = new ChildAvailabilityStatusesImpl(this);\n this.childResources = new ChildResourcesImpl(this);\n this.emergingIssues = new EmergingIssuesImpl(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 availabilityStatuses: AvailabilityStatuses;\n operations: Operations;\n metadata: Metadata;\n impactedResources: ImpactedResources;\n securityAdvisoryImpactedResources: SecurityAdvisoryImpactedResources;\n eventsOperations: EventsOperations;\n eventOperations: EventOperations;\n childAvailabilityStatuses: ChildAvailabilityStatuses;\n childResources: ChildResources;\n emergingIssues: EmergingIssues;\n}\n"]}