@azure/arm-datadog 3.1.0-alpha.20250717.1 → 3.1.0-alpha.20250718.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/microsoftDatadogClient.js +20 -5
  4. package/dist/browser/microsoftDatadogClient.js.map +1 -1
  5. package/dist/browser/operations/creationSupported.js +10 -27
  6. package/dist/browser/operations/creationSupported.js.map +1 -1
  7. package/dist/browser/operations/marketplaceAgreements.js +23 -40
  8. package/dist/browser/operations/marketplaceAgreements.js.map +1 -1
  9. package/dist/browser/operations/monitoredSubscriptions.js +43 -45
  10. package/dist/browser/operations/monitoredSubscriptions.js.map +1 -1
  11. package/dist/browser/operations/monitors.js +166 -253
  12. package/dist/browser/operations/monitors.js.map +1 -1
  13. package/dist/browser/operations/operations.js +23 -40
  14. package/dist/browser/operations/operations.js.map +1 -1
  15. package/dist/browser/operations/singleSignOnConfigurations.js +34 -46
  16. package/dist/browser/operations/singleSignOnConfigurations.js.map +1 -1
  17. package/dist/browser/operations/tagRules.js +23 -40
  18. package/dist/browser/operations/tagRules.js.map +1 -1
  19. package/dist/browser/pagingHelper.js +2 -4
  20. package/dist/browser/pagingHelper.js.map +1 -1
  21. package/dist/commonjs/lroImpl.js +7 -3
  22. package/dist/commonjs/lroImpl.js.map +1 -1
  23. package/dist/commonjs/microsoftDatadogClient.js +20 -5
  24. package/dist/commonjs/microsoftDatadogClient.js.map +1 -1
  25. package/dist/commonjs/operations/creationSupported.js +10 -26
  26. package/dist/commonjs/operations/creationSupported.js.map +1 -1
  27. package/dist/commonjs/operations/marketplaceAgreements.js +23 -39
  28. package/dist/commonjs/operations/marketplaceAgreements.js.map +1 -1
  29. package/dist/commonjs/operations/monitoredSubscriptions.js +43 -44
  30. package/dist/commonjs/operations/monitoredSubscriptions.js.map +1 -1
  31. package/dist/commonjs/operations/monitors.js +166 -252
  32. package/dist/commonjs/operations/monitors.js.map +1 -1
  33. package/dist/commonjs/operations/operations.js +23 -39
  34. package/dist/commonjs/operations/operations.js.map +1 -1
  35. package/dist/commonjs/operations/singleSignOnConfigurations.js +34 -45
  36. package/dist/commonjs/operations/singleSignOnConfigurations.js.map +1 -1
  37. package/dist/commonjs/operations/tagRules.js +23 -39
  38. package/dist/commonjs/operations/tagRules.js.map +1 -1
  39. package/dist/commonjs/pagingHelper.js +2 -4
  40. package/dist/commonjs/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/tsdoc-metadata.json +11 -11
  42. package/dist/esm/lroImpl.js +7 -3
  43. package/dist/esm/lroImpl.js.map +1 -1
  44. package/dist/esm/microsoftDatadogClient.js +20 -5
  45. package/dist/esm/microsoftDatadogClient.js.map +1 -1
  46. package/dist/esm/operations/creationSupported.js +10 -27
  47. package/dist/esm/operations/creationSupported.js.map +1 -1
  48. package/dist/esm/operations/marketplaceAgreements.js +23 -40
  49. package/dist/esm/operations/marketplaceAgreements.js.map +1 -1
  50. package/dist/esm/operations/monitoredSubscriptions.js +43 -45
  51. package/dist/esm/operations/monitoredSubscriptions.js.map +1 -1
  52. package/dist/esm/operations/monitors.js +166 -253
  53. package/dist/esm/operations/monitors.js.map +1 -1
  54. package/dist/esm/operations/operations.js +23 -40
  55. package/dist/esm/operations/operations.js.map +1 -1
  56. package/dist/esm/operations/singleSignOnConfigurations.js +34 -46
  57. package/dist/esm/operations/singleSignOnConfigurations.js.map +1 -1
  58. package/dist/esm/operations/tagRules.js +23 -40
  59. package/dist/esm/operations/tagRules.js.map +1 -1
  60. package/dist/esm/pagingHelper.js +2 -4
  61. package/dist/esm/pagingHelper.js.map +1 -1
  62. package/dist/react-native/lroImpl.js +7 -3
  63. package/dist/react-native/lroImpl.js.map +1 -1
  64. package/dist/react-native/microsoftDatadogClient.js +20 -5
  65. package/dist/react-native/microsoftDatadogClient.js.map +1 -1
  66. package/dist/react-native/operations/creationSupported.js +10 -27
  67. package/dist/react-native/operations/creationSupported.js.map +1 -1
  68. package/dist/react-native/operations/marketplaceAgreements.js +23 -40
  69. package/dist/react-native/operations/marketplaceAgreements.js.map +1 -1
  70. package/dist/react-native/operations/monitoredSubscriptions.js +43 -45
  71. package/dist/react-native/operations/monitoredSubscriptions.js.map +1 -1
  72. package/dist/react-native/operations/monitors.js +166 -253
  73. package/dist/react-native/operations/monitors.js.map +1 -1
  74. package/dist/react-native/operations/operations.js +23 -40
  75. package/dist/react-native/operations/operations.js.map +1 -1
  76. package/dist/react-native/operations/singleSignOnConfigurations.js +34 -46
  77. package/dist/react-native/operations/singleSignOnConfigurations.js.map +1 -1
  78. package/dist/react-native/operations/tagRules.js +23 -40
  79. package/dist/react-native/operations/tagRules.js.map +1 -1
  80. package/dist/react-native/pagingHelper.js +2 -4
  81. package/dist/react-native/pagingHelper.js.map +1 -1
  82. package/package.json +2 -2
  83. package/review/arm-datadog-node.api.md +867 -867
@@ -1 +1 @@
1
- {"version":3,"file":"marketplaceAgreements.js","sourceRoot":"","sources":["../../../src/operations/marketplaceAgreements.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAa,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAiD;QAEjD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAA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AE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,IAAI;IAC5B,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,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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,oCAAoC;SACzD;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;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { MarketplaceAgreements } 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 { MicrosoftDatadogClient } from \"../microsoftDatadogClient.js\";\nimport {\n DatadogAgreementResource,\n MarketplaceAgreementsListNextOptionalParams,\n MarketplaceAgreementsListOptionalParams,\n MarketplaceAgreementsListResponse,\n MarketplaceAgreementsCreateOrUpdateOptionalParams,\n MarketplaceAgreementsCreateOrUpdateResponse,\n MarketplaceAgreementsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MarketplaceAgreements operations. */\nexport class MarketplaceAgreementsImpl implements MarketplaceAgreements {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class MarketplaceAgreements class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * List Datadog marketplace agreements in the subscription.\n * @param options The options parameters.\n */\n public list(\n options?: MarketplaceAgreementsListOptionalParams\n ): PagedAsyncIterableIterator<DatadogAgreementResource> {\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?: MarketplaceAgreementsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<DatadogAgreementResource[]> {\n let result: MarketplaceAgreementsListResponse;\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?: MarketplaceAgreementsListOptionalParams\n ): AsyncIterableIterator<DatadogAgreementResource> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List Datadog marketplace agreements in the subscription.\n * @param options The options parameters.\n */\n private _list(\n options?: MarketplaceAgreementsListOptionalParams\n ): Promise<MarketplaceAgreementsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Create Datadog marketplace agreement in the subscription.\n * @param options The options parameters.\n */\n createOrUpdate(\n options?: MarketplaceAgreementsCreateOrUpdateOptionalParams\n ): Promise<MarketplaceAgreementsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { options },\n createOrUpdateOperationSpec\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?: MarketplaceAgreementsListNextOptionalParams\n ): Promise<MarketplaceAgreementsListNextResponse> {\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:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResourceListResponse\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResource\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResourceListResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"marketplaceAgreements.js","sourceRoot":"","sources":["../../../src/operations/marketplaceAgreements.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAa,yBAAyB;IACnB,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAiD;QAEjD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAiD,EACjD,QAAuB;QAEvB,IAAI,MAAyC,CAAC;QAC9C,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YA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;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { MarketplaceAgreements } 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 { MicrosoftDatadogClient } from \"../microsoftDatadogClient.js\";\nimport {\n DatadogAgreementResource,\n MarketplaceAgreementsListNextOptionalParams,\n MarketplaceAgreementsListOptionalParams,\n MarketplaceAgreementsListResponse,\n MarketplaceAgreementsCreateOrUpdateOptionalParams,\n MarketplaceAgreementsCreateOrUpdateResponse,\n MarketplaceAgreementsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MarketplaceAgreements operations. */\nexport class MarketplaceAgreementsImpl implements MarketplaceAgreements {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class MarketplaceAgreements class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * List Datadog marketplace agreements in the subscription.\n * @param options The options parameters.\n */\n public list(\n options?: MarketplaceAgreementsListOptionalParams\n ): PagedAsyncIterableIterator<DatadogAgreementResource> {\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?: MarketplaceAgreementsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<DatadogAgreementResource[]> {\n let result: MarketplaceAgreementsListResponse;\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?: MarketplaceAgreementsListOptionalParams\n ): AsyncIterableIterator<DatadogAgreementResource> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List Datadog marketplace agreements in the subscription.\n * @param options The options parameters.\n */\n private _list(\n options?: MarketplaceAgreementsListOptionalParams\n ): Promise<MarketplaceAgreementsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Create Datadog marketplace agreement in the subscription.\n * @param options The options parameters.\n */\n createOrUpdate(\n options?: MarketplaceAgreementsCreateOrUpdateOptionalParams\n ): Promise<MarketplaceAgreementsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { options },\n createOrUpdateOperationSpec\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?: MarketplaceAgreementsListNextOptionalParams\n ): Promise<MarketplaceAgreementsListNextResponse> {\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:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResourceListResponse\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResource\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatadogAgreementResourceListResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /// <reference lib="esnext.asynciterable" />
18
18
  /** Class containing MonitoredSubscriptions operations. */
19
19
  class MonitoredSubscriptionsImpl {
20
+ client;
20
21
  /**
21
22
  * Initialize a new instance of the class MonitoredSubscriptions class.
22
23
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class MonitoredSubscriptionsImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(resourceGroupName, monitorName, options, settings);
47
48
  }
48
49
  };
49
50
  }
50
- listPagingPage(resourceGroupName, monitorName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(resourceGroupName, monitorName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(resourceGroupName, monitorName, options, _settings) {
52
+ let result;
53
+ result = await this._list(resourceGroupName, monitorName, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(resourceGroupName, monitorName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(resourceGroupName, monitorName, options) {
57
+ for await (const page of this.listPagingPage(resourceGroupName, monitorName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * List the subscriptions currently being monitored by the Datadog monitor resource.
@@ -105,14 +89,19 @@ class MonitoredSubscriptionsImpl {
105
89
  return this.client.sendOperationRequest(args, spec);
106
90
  };
107
91
  const sendOperationFn = async (args, spec) => {
108
- var _a;
109
92
  let currentRawResponse = undefined;
110
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
93
+ const providedCallback = args.options?.onResponse;
111
94
  const callback = (rawResponse, flatResponse) => {
112
95
  currentRawResponse = rawResponse;
113
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
96
+ providedCallback?.(rawResponse, flatResponse);
97
+ };
98
+ const updatedArgs = {
99
+ ...args,
100
+ options: {
101
+ ...args.options,
102
+ onResponse: callback
103
+ }
114
104
  };
115
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
116
105
  const flatResponse = await directSendOperation(updatedArgs, spec);
117
106
  return {
118
107
  flatResponse,
@@ -129,8 +118,8 @@ class MonitoredSubscriptionsImpl {
129
118
  spec: createorUpdateOperationSpec
130
119
  });
131
120
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
132
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
133
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
121
+ restoreFrom: options?.resumeFrom,
122
+ intervalInMs: options?.updateIntervalInMs
134
123
  });
135
124
  await poller.poll();
136
125
  return poller;
@@ -158,14 +147,19 @@ class MonitoredSubscriptionsImpl {
158
147
  return this.client.sendOperationRequest(args, spec);
159
148
  };
160
149
  const sendOperationFn = async (args, spec) => {
161
- var _a;
162
150
  let currentRawResponse = undefined;
163
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
151
+ const providedCallback = args.options?.onResponse;
164
152
  const callback = (rawResponse, flatResponse) => {
165
153
  currentRawResponse = rawResponse;
166
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
154
+ providedCallback?.(rawResponse, flatResponse);
155
+ };
156
+ const updatedArgs = {
157
+ ...args,
158
+ options: {
159
+ ...args.options,
160
+ onResponse: callback
161
+ }
167
162
  };
168
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
169
163
  const flatResponse = await directSendOperation(updatedArgs, spec);
170
164
  return {
171
165
  flatResponse,
@@ -182,8 +176,8 @@ class MonitoredSubscriptionsImpl {
182
176
  spec: updateOperationSpec
183
177
  });
184
178
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
185
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
186
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
179
+ restoreFrom: options?.resumeFrom,
180
+ intervalInMs: options?.updateIntervalInMs
187
181
  });
188
182
  await poller.poll();
189
183
  return poller;
@@ -211,14 +205,19 @@ class MonitoredSubscriptionsImpl {
211
205
  return this.client.sendOperationRequest(args, spec);
212
206
  };
213
207
  const sendOperationFn = async (args, spec) => {
214
- var _a;
215
208
  let currentRawResponse = undefined;
216
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
209
+ const providedCallback = args.options?.onResponse;
217
210
  const callback = (rawResponse, flatResponse) => {
218
211
  currentRawResponse = rawResponse;
219
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
212
+ providedCallback?.(rawResponse, flatResponse);
213
+ };
214
+ const updatedArgs = {
215
+ ...args,
216
+ options: {
217
+ ...args.options,
218
+ onResponse: callback
219
+ }
220
220
  };
221
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
222
221
  const flatResponse = await directSendOperation(updatedArgs, spec);
223
222
  return {
224
223
  flatResponse,
@@ -235,8 +234,8 @@ class MonitoredSubscriptionsImpl {
235
234
  spec: deleteOperationSpec
236
235
  });
237
236
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
238
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
239
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
237
+ restoreFrom: options?.resumeFrom,
238
+ intervalInMs: options?.updateIntervalInMs
240
239
  });
241
240
  await poller.poll();
242
241
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"monitoredSubscriptions.js","sourceRoot":"","sources":["../../../src/operations/monitoredSubscriptions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAA8B;Q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Ae,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,iBAAiB;KAC7B;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 { MonitoredSubscriptions } 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 { MicrosoftDatadogClient } from \"../microsoftDatadogClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n MonitoredSubscriptionProperties,\n MonitoredSubscriptionsListOptionalParams,\n MonitoredSubscriptionsListResponse,\n MonitoredSubscriptionsGetOptionalParams,\n MonitoredSubscriptionsGetResponse,\n MonitoredSubscriptionsCreateorUpdateOptionalParams,\n MonitoredSubscriptionsCreateorUpdateResponse,\n MonitoredSubscriptionsUpdateOptionalParams,\n MonitoredSubscriptionsUpdateResponse,\n MonitoredSubscriptionsDeleteOptionalParams\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MonitoredSubscriptions operations. */\nexport class MonitoredSubscriptionsImpl implements MonitoredSubscriptions {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class MonitoredSubscriptions class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): PagedAsyncIterableIterator<MonitoredSubscriptionProperties> {\n const iter = this.listPagingAll(resourceGroupName, monitorName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n resourceGroupName,\n monitorName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<MonitoredSubscriptionProperties[]> {\n let result: MonitoredSubscriptionsListResponse;\n result = await this._list(resourceGroupName, monitorName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): AsyncIterableIterator<MonitoredSubscriptionProperties> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n monitorName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): Promise<MonitoredSubscriptionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, monitorName, options },\n listOperationSpec\n );\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsGetOptionalParams\n ): Promise<MonitoredSubscriptionsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, monitorName, configurationName, options },\n getOperationSpec\n );\n }\n\n /**\n * Add the subscriptions that should be monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginCreateorUpdate(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsCreateorUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<MonitoredSubscriptionsCreateorUpdateResponse>,\n MonitoredSubscriptionsCreateorUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<MonitoredSubscriptionsCreateorUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: createorUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n MonitoredSubscriptionsCreateorUpdateResponse,\n OperationState<MonitoredSubscriptionsCreateorUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Add the subscriptions that should be monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginCreateorUpdateAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsCreateorUpdateOptionalParams\n ): Promise<MonitoredSubscriptionsCreateorUpdateResponse> {\n const poller = await this.beginCreateorUpdate(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<MonitoredSubscriptionsUpdateResponse>,\n MonitoredSubscriptionsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<MonitoredSubscriptionsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: updateOperationSpec\n });\n const poller = await createHttpPoller<\n MonitoredSubscriptionsUpdateResponse,\n OperationState<MonitoredSubscriptionsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsUpdateOptionalParams\n ): Promise<MonitoredSubscriptionsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName Configuration name\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsDeleteOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName Configuration name\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionPropertiesList\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.monitorName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\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.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createorUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 201: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 202: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 204: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body6,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 201: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 202: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 204: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body6,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"monitoredSubscriptions.js","sourceRoot":"","sources":["../../../src/operations/monitoredSubscriptions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IACpB,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,WAAmB,EACnB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QACzE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,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U,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EACF,kKAAkK;IACpK,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,iBAAiB;KAC7B;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 { MonitoredSubscriptions } 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 { MicrosoftDatadogClient } from \"../microsoftDatadogClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n MonitoredSubscriptionProperties,\n MonitoredSubscriptionsListOptionalParams,\n MonitoredSubscriptionsListResponse,\n MonitoredSubscriptionsGetOptionalParams,\n MonitoredSubscriptionsGetResponse,\n MonitoredSubscriptionsCreateorUpdateOptionalParams,\n MonitoredSubscriptionsCreateorUpdateResponse,\n MonitoredSubscriptionsUpdateOptionalParams,\n MonitoredSubscriptionsUpdateResponse,\n MonitoredSubscriptionsDeleteOptionalParams\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MonitoredSubscriptions operations. */\nexport class MonitoredSubscriptionsImpl implements MonitoredSubscriptions {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class MonitoredSubscriptions class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): PagedAsyncIterableIterator<MonitoredSubscriptionProperties> {\n const iter = this.listPagingAll(resourceGroupName, monitorName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n resourceGroupName,\n monitorName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<MonitoredSubscriptionProperties[]> {\n let result: MonitoredSubscriptionsListResponse;\n result = await this._list(resourceGroupName, monitorName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): AsyncIterableIterator<MonitoredSubscriptionProperties> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n monitorName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n monitorName: string,\n options?: MonitoredSubscriptionsListOptionalParams\n ): Promise<MonitoredSubscriptionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, monitorName, options },\n listOperationSpec\n );\n }\n\n /**\n * List the subscriptions currently being monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsGetOptionalParams\n ): Promise<MonitoredSubscriptionsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, monitorName, configurationName, options },\n getOperationSpec\n );\n }\n\n /**\n * Add the subscriptions that should be monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginCreateorUpdate(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsCreateorUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<MonitoredSubscriptionsCreateorUpdateResponse>,\n MonitoredSubscriptionsCreateorUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<MonitoredSubscriptionsCreateorUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: createorUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n MonitoredSubscriptionsCreateorUpdateResponse,\n OperationState<MonitoredSubscriptionsCreateorUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Add the subscriptions that should be monitored by the Datadog monitor resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginCreateorUpdateAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsCreateorUpdateOptionalParams\n ): Promise<MonitoredSubscriptionsCreateorUpdateResponse> {\n const poller = await this.beginCreateorUpdate(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<MonitoredSubscriptionsUpdateResponse>,\n MonitoredSubscriptionsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<MonitoredSubscriptionsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: updateOperationSpec\n });\n const poller = await createHttpPoller<\n MonitoredSubscriptionsUpdateResponse,\n OperationState<MonitoredSubscriptionsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName The configuration name. Only 'default' value is supported.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsUpdateOptionalParams\n ): Promise<MonitoredSubscriptionsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName Configuration name\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsDeleteOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, monitorName, configurationName, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates the subscriptions that are being monitored by the Datadog monitor resource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param monitorName Monitor resource name\n * @param configurationName Configuration name\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n monitorName: string,\n configurationName: string,\n options?: MonitoredSubscriptionsDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n monitorName,\n configurationName,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionPropertiesList\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.monitorName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\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.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createorUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 201: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 202: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 204: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body6,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 201: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 202: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n 204: {\n bodyMapper: Mappers.MonitoredSubscriptionProperties\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body6,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.monitorName,\n Parameters.configurationName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}