@azure/arm-datadog 3.1.0-alpha.20250619.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.api.md → arm-datadog-node.api.md} +0 -0
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing MarketplaceAgreements operations. */
15
14
  export class MarketplaceAgreementsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class MarketplaceAgreements class.
18
18
  * @param client Reference to the service client
@@ -34,52 +34,35 @@ export class MarketplaceAgreementsImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(options, settings);
41
41
  }
42
42
  };
43
43
  }
44
- listPagingPage(options, settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._list(options));
50
- let page = result.value || [];
51
- continuationToken = result.nextLink;
52
- setContinuationToken(page, continuationToken);
53
- yield yield __await(page);
54
- }
55
- while (continuationToken) {
56
- result = yield __await(this._listNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
61
- }
62
- });
44
+ async *listPagingPage(options, settings) {
45
+ let result;
46
+ let continuationToken = settings?.continuationToken;
47
+ if (!continuationToken) {
48
+ result = await this._list(options);
49
+ let page = result.value || [];
50
+ continuationToken = result.nextLink;
51
+ setContinuationToken(page, continuationToken);
52
+ yield page;
53
+ }
54
+ while (continuationToken) {
55
+ result = await this._listNext(continuationToken, options);
56
+ continuationToken = result.nextLink;
57
+ let page = result.value || [];
58
+ setContinuationToken(page, continuationToken);
59
+ yield page;
60
+ }
63
61
  }
64
- listPagingAll(options) {
65
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
68
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
69
- _c = _f.value;
70
- _d = false;
71
- const page = _c;
72
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
- }
74
- }
75
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
76
- finally {
77
- try {
78
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
79
- }
80
- finally { if (e_1) throw e_1.error; }
81
- }
82
- });
62
+ async *listPagingAll(options) {
63
+ for await (const page of this.listPagingPage(options)) {
64
+ yield* page;
65
+ }
83
66
  }
84
67
  /**
85
68
  * List Datadog marketplace agreements in the subscription.
@@ -1 +1 @@
1
- {"version":3,"file":"marketplaceAgreements.js","sourceRoot":"","sources":["../../../src/operations/marketplaceAgreements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM,OAAO,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,aAAR,QAAQ,uBAAR,QAAQ,CAAE,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;IAEc,cAAc,CAC3B,OAAiD,EACjD,QAAuB;;YAEvB,IAAI,MAAyC,CAAC;YAC9C,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,cAAM,IAAI,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,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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IACnB,MAAM,CAAyB;IAEhD;;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AgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EACF,gFAAgF;IAClF,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,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"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
@@ -14,6 +13,7 @@ import { createLroSpec } from "../lroImpl.js";
14
13
  /// <reference lib="esnext.asynciterable" />
15
14
  /** Class containing MonitoredSubscriptions operations. */
16
15
  export class MonitoredSubscriptionsImpl {
16
+ client;
17
17
  /**
18
18
  * Initialize a new instance of the class MonitoredSubscriptions class.
19
19
  * @param client Reference to the service client
@@ -37,39 +37,22 @@ export class MonitoredSubscriptionsImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listPagingPage(resourceGroupName, monitorName, options, settings);
44
44
  }
45
45
  };
46
46
  }
47
- listPagingPage(resourceGroupName, monitorName, options, _settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- result = yield __await(this._list(resourceGroupName, monitorName, options));
51
- yield yield __await(result.value || []);
52
- });
47
+ async *listPagingPage(resourceGroupName, monitorName, options, _settings) {
48
+ let result;
49
+ result = await this._list(resourceGroupName, monitorName, options);
50
+ yield result.value || [];
53
51
  }
54
- listPagingAll(resourceGroupName, monitorName, options) {
55
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
56
- var _a, e_1, _b, _c;
57
- try {
58
- for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
59
- _c = _f.value;
60
- _d = false;
61
- const page = _c;
62
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
63
- }
64
- }
65
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
66
- finally {
67
- try {
68
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
69
- }
70
- finally { if (e_1) throw e_1.error; }
71
- }
72
- });
52
+ async *listPagingAll(resourceGroupName, monitorName, options) {
53
+ for await (const page of this.listPagingPage(resourceGroupName, monitorName, options)) {
54
+ yield* page;
55
+ }
73
56
  }
74
57
  /**
75
58
  * List the subscriptions currently being monitored by the Datadog monitor resource.
@@ -102,14 +85,19 @@ export class MonitoredSubscriptionsImpl {
102
85
  return this.client.sendOperationRequest(args, spec);
103
86
  };
104
87
  const sendOperationFn = async (args, spec) => {
105
- var _a;
106
88
  let currentRawResponse = undefined;
107
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
89
+ const providedCallback = args.options?.onResponse;
108
90
  const callback = (rawResponse, flatResponse) => {
109
91
  currentRawResponse = rawResponse;
110
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
92
+ providedCallback?.(rawResponse, flatResponse);
93
+ };
94
+ const updatedArgs = {
95
+ ...args,
96
+ options: {
97
+ ...args.options,
98
+ onResponse: callback
99
+ }
111
100
  };
112
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
113
101
  const flatResponse = await directSendOperation(updatedArgs, spec);
114
102
  return {
115
103
  flatResponse,
@@ -126,8 +114,8 @@ export class MonitoredSubscriptionsImpl {
126
114
  spec: createorUpdateOperationSpec
127
115
  });
128
116
  const poller = await createHttpPoller(lro, {
129
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
130
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
117
+ restoreFrom: options?.resumeFrom,
118
+ intervalInMs: options?.updateIntervalInMs
131
119
  });
132
120
  await poller.poll();
133
121
  return poller;
@@ -155,14 +143,19 @@ export class MonitoredSubscriptionsImpl {
155
143
  return this.client.sendOperationRequest(args, spec);
156
144
  };
157
145
  const sendOperationFn = async (args, spec) => {
158
- var _a;
159
146
  let currentRawResponse = undefined;
160
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
147
+ const providedCallback = args.options?.onResponse;
161
148
  const callback = (rawResponse, flatResponse) => {
162
149
  currentRawResponse = rawResponse;
163
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
150
+ providedCallback?.(rawResponse, flatResponse);
151
+ };
152
+ const updatedArgs = {
153
+ ...args,
154
+ options: {
155
+ ...args.options,
156
+ onResponse: callback
157
+ }
164
158
  };
165
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
166
159
  const flatResponse = await directSendOperation(updatedArgs, spec);
167
160
  return {
168
161
  flatResponse,
@@ -179,8 +172,8 @@ export class MonitoredSubscriptionsImpl {
179
172
  spec: updateOperationSpec
180
173
  });
181
174
  const poller = await createHttpPoller(lro, {
182
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
183
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
175
+ restoreFrom: options?.resumeFrom,
176
+ intervalInMs: options?.updateIntervalInMs
184
177
  });
185
178
  await poller.poll();
186
179
  return poller;
@@ -208,14 +201,19 @@ export class MonitoredSubscriptionsImpl {
208
201
  return this.client.sendOperationRequest(args, spec);
209
202
  };
210
203
  const sendOperationFn = async (args, spec) => {
211
- var _a;
212
204
  let currentRawResponse = undefined;
213
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
205
+ const providedCallback = args.options?.onResponse;
214
206
  const callback = (rawResponse, flatResponse) => {
215
207
  currentRawResponse = rawResponse;
216
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
208
+ providedCallback?.(rawResponse, flatResponse);
209
+ };
210
+ const updatedArgs = {
211
+ ...args,
212
+ options: {
213
+ ...args.options,
214
+ onResponse: callback
215
+ }
217
216
  };
218
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
219
217
  const flatResponse = await directSendOperation(updatedArgs, spec);
220
218
  return {
221
219
  flatResponse,
@@ -232,8 +230,8 @@ export class MonitoredSubscriptionsImpl {
232
230
  spec: deleteOperationSpec
233
231
  });
234
232
  const poller = await createHttpPoller(lro, {
235
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
236
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
233
+ restoreFrom: options?.resumeFrom,
234
+ intervalInMs: options?.updateIntervalInMs
237
235
  });
238
236
  await poller.poll();
239
237
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"monitoredSubscriptions.js","sourceRoot":"","sources":["../../../src/operations/monitoredSubscriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG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iB;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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,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,IA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C;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"]}