@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,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  export function createLroSpec(inputs) {
3
2
  const { args, spec, sendOperationFn } = inputs;
4
3
  return {
@@ -6,8 +5,13 @@ export function createLroSpec(inputs) {
6
5
  requestPath: spec.path,
7
6
  sendInitialRequest: () => sendOperationFn(args, spec),
8
7
  sendPollRequest: (path, options) => {
9
- const { requestBody } = spec, restSpec = __rest(spec, ["requestBody"]);
10
- return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
8
+ const { requestBody, ...restSpec } = spec;
9
+ return sendOperationFn(args, {
10
+ ...restSpec,
11
+ httpMethod: "GET",
12
+ path,
13
+ abortSignal: options?.abortSignal
14
+ });
11
15
  }
12
16
  };
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,KAAkB,IAAI,EAAjB,QAAQ,UAAK,IAAI,EAAnC,eAA4B,CAAO,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,kCACtB,QAAQ,KACX,UAAU,EAAE,KAAK,EACjB,IAAI,EACJ,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,IACjC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike }\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal\n });\n }\n };\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike }\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal\n });\n }\n };\n}\n"]}
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { MarketplaceAgreementsImpl, CreationSupportedImpl, MonitorsImpl, OperationsImpl, TagRulesImpl, SingleSignOnConfigurationsImpl, MonitoredSubscriptionsImpl } from "./operations/index.js";
11
11
  export class MicrosoftDatadogClient extends coreClient.ServiceClient {
12
+ $host;
13
+ subscriptionId;
14
+ apiVersion;
12
15
  /**
13
16
  * Initializes a new instance of the MicrosoftDatadogClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -16,7 +19,6 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
16
19
  * @param options The parameter options
17
20
  */
18
21
  constructor(credentials, subscriptionId, options) {
19
- var _a, _b, _c;
20
22
  if (credentials === undefined) {
21
23
  throw new Error("'credentials' cannot be null");
22
24
  }
@@ -35,12 +37,17 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
35
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
39
  : `${packageDetails}`;
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
40
+ const optionsWithDefaults = {
41
+ ...defaults,
42
+ ...options,
43
+ userAgentOptions: {
39
44
  userAgentPrefix
40
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
45
+ },
46
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
47
+ };
41
48
  super(optionsWithDefaults);
42
49
  let bearerTokenAuthenticationPolicyFound = false;
43
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
50
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
44
51
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
45
52
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
46
53
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -54,7 +61,8 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
54
61
  });
55
62
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
56
63
  credential: credentials,
57
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
64
+ scopes: optionsWithDefaults.credentialScopes ??
65
+ `${optionsWithDefaults.endpoint}/.default`,
58
66
  challengeCallbacks: {
59
67
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
60
68
  }
@@ -99,5 +107,12 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
99
107
  };
100
108
  this.pipeline.addPolicy(apiVersionPolicy);
101
109
  }
110
+ marketplaceAgreements;
111
+ creationSupported;
112
+ monitors;
113
+ operations;
114
+ tagRules;
115
+ singleSignOnConfigurations;
116
+ monitoredSubscriptions;
102
117
  }
103
118
  //# sourceMappingURL=microsoftDatadogClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftDatadogClient.js","sourceRoot":"","sources":["../../src/microsoftDatadogClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AAY/B,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAKlE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA8C;;QAE9C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YA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ACnE,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CASF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n MarketplaceAgreementsImpl,\n CreationSupportedImpl,\n MonitorsImpl,\n OperationsImpl,\n TagRulesImpl,\n SingleSignOnConfigurationsImpl,\n MonitoredSubscriptionsImpl\n} from \"./operations/index.js\";\nimport {\n MarketplaceAgreements,\n CreationSupported,\n Monitors,\n Operations,\n TagRules,\n SingleSignOnConfigurations,\n MonitoredSubscriptions\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftDatadogClientOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftDatadogClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the MicrosoftDatadogClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftDatadogClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftDatadogClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-datadog/3.1.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2023-01-01\";\n this.marketplaceAgreements = new MarketplaceAgreementsImpl(this);\n this.creationSupported = new CreationSupportedImpl(this);\n this.monitors = new MonitorsImpl(this);\n this.operations = new OperationsImpl(this);\n this.tagRules = new TagRulesImpl(this);\n this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);\n this.monitoredSubscriptions = new MonitoredSubscriptionsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n marketplaceAgreements: MarketplaceAgreements;\n creationSupported: CreationSupported;\n monitors: Monitors;\n operations: Operations;\n tagRules: TagRules;\n singleSignOnConfigurations: SingleSignOnConfigurations;\n monitoredSubscriptions: MonitoredSubscriptions;\n}\n"]}
1
+ {"version":3,"file":"microsoftDatadogClient.js","sourceRoot":"","sources":["../../src/microsoftDatadogClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AAY/B,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAClE,KAAK,CAAS;IACd,cAAc,CAAS;IACvB,UAAU,CAAS;IAEnB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA8C;QAE9C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAyC;YACrD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,4BAA4B,CAAC;QACpD,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAA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AAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,qBAAqB,CAAwB;IAC7C,iBAAiB,CAAoB;IACrC,QAAQ,CAAW;IACnB,UAAU,CAAa;IACvB,QAAQ,CAAW;IACnB,0BAA0B,CAA6B;IACvD,sBAAsB,CAAyB;CAChD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n MarketplaceAgreementsImpl,\n CreationSupportedImpl,\n MonitorsImpl,\n OperationsImpl,\n TagRulesImpl,\n SingleSignOnConfigurationsImpl,\n MonitoredSubscriptionsImpl\n} from \"./operations/index.js\";\nimport {\n MarketplaceAgreements,\n CreationSupported,\n Monitors,\n Operations,\n TagRules,\n SingleSignOnConfigurations,\n MonitoredSubscriptions\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftDatadogClientOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftDatadogClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the MicrosoftDatadogClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftDatadogClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftDatadogClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-datadog/3.1.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2023-01-01\";\n this.marketplaceAgreements = new MarketplaceAgreementsImpl(this);\n this.creationSupported = new CreationSupportedImpl(this);\n this.monitors = new MonitorsImpl(this);\n this.operations = new OperationsImpl(this);\n this.tagRules = new TagRulesImpl(this);\n this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);\n this.monitoredSubscriptions = new MonitoredSubscriptionsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n marketplaceAgreements: MarketplaceAgreements;\n creationSupported: CreationSupported;\n monitors: Monitors;\n operations: Operations;\n tagRules: TagRules;\n singleSignOnConfigurations: SingleSignOnConfigurations;\n monitoredSubscriptions: MonitoredSubscriptions;\n}\n"]}
@@ -5,13 +5,13 @@
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";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing CreationSupported operations. */
14
13
  export class CreationSupportedImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class CreationSupported class.
17
17
  * @param client Reference to the service client
@@ -34,39 +34,22 @@ export class CreationSupportedImpl {
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(datadogOrganizationId, options, settings);
41
41
  }
42
42
  };
43
43
  }
44
- listPagingPage(datadogOrganizationId, options, _settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- result = yield __await(this._list(datadogOrganizationId, options));
48
- yield yield __await(result.value || []);
49
- });
44
+ async *listPagingPage(datadogOrganizationId, options, _settings) {
45
+ let result;
46
+ result = await this._list(datadogOrganizationId, options);
47
+ yield result.value || [];
50
48
  }
51
- listPagingAll(datadogOrganizationId, options) {
52
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
53
- var _a, e_1, _b, _c;
54
- try {
55
- for (var _d = true, _e = __asyncValues(this.listPagingPage(datadogOrganizationId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
56
- _c = _f.value;
57
- _d = false;
58
- const page = _c;
59
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
60
- }
61
- }
62
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
63
- finally {
64
- try {
65
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
66
- }
67
- finally { if (e_1) throw e_1.error; }
68
- }
69
- });
49
+ async *listPagingAll(datadogOrganizationId, options) {
50
+ for await (const page of this.listPagingPage(datadogOrganizationId, options)) {
51
+ yield* page;
52
+ }
70
53
  }
71
54
  /**
72
55
  * Informs if the current subscription is being already monitored for selected Datadog organization.
@@ -1 +1 @@
1
- {"version":3,"file":"creationSupported.js","sourceRoot":"","sources":["../../../src/operations/creationSupported.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;AAUtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,qBAA6B,EAC7B,OAA6C;QAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAChE,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,qBAAqB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACvE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,qBAA6B,EAC7B,OAA6C,EAC7C,SAAwB;;YAExB,IAAI,MAAqC,CAAC;YAC1C,MAAM,GAAG,cAAM,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAA,CAAC;YAC1D,oBAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;QAC3B,CAAC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ACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0FAA0F;IAC5F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAC1E,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { CreationSupported } 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 CreateResourceSupportedResponse,\n CreationSupportedListOptionalParams,\n CreationSupportedListResponse,\n CreationSupportedGetOptionalParams,\n CreationSupportedGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing CreationSupported operations. */\nexport class CreationSupportedImpl implements CreationSupported {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class CreationSupported class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n public list(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): PagedAsyncIterableIterator<CreateResourceSupportedResponse> {\n const iter = this.listPagingAll(datadogOrganizationId, 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(datadogOrganizationId, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<CreateResourceSupportedResponse[]> {\n let result: CreationSupportedListResponse;\n result = await this._list(datadogOrganizationId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): AsyncIterableIterator<CreateResourceSupportedResponse> {\n for await (const page of this.listPagingPage(\n datadogOrganizationId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n private _list(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): Promise<CreationSupportedListResponse> {\n return this.client.sendOperationRequest(\n { datadogOrganizationId, options },\n listOperationSpec\n );\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n get(\n datadogOrganizationId: string,\n options?: CreationSupportedGetOptionalParams\n ): Promise<CreationSupportedGetResponse> {\n return this.client.sendOperationRequest(\n { datadogOrganizationId, options },\n getOperationSpec\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/subscriptionStatuses\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreateResourceSupportedResponseList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.datadogOrganizationId],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreateResourceSupportedResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.datadogOrganizationId],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"creationSupported.js","sourceRoot":"","sources":["../../../src/operations/creationSupported.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;AAUtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IACf,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,qBAA6B,EAC7B,OAA6C;QAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAChE,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,KAA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CAAmC;SACxD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAC1E,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0FAA0F;IAC5F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAC1E,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { CreationSupported } 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 CreateResourceSupportedResponse,\n CreationSupportedListOptionalParams,\n CreationSupportedListResponse,\n CreationSupportedGetOptionalParams,\n CreationSupportedGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing CreationSupported operations. */\nexport class CreationSupportedImpl implements CreationSupported {\n private readonly client: MicrosoftDatadogClient;\n\n /**\n * Initialize a new instance of the class CreationSupported class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftDatadogClient) {\n this.client = client;\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n public list(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): PagedAsyncIterableIterator<CreateResourceSupportedResponse> {\n const iter = this.listPagingAll(datadogOrganizationId, 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(datadogOrganizationId, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<CreateResourceSupportedResponse[]> {\n let result: CreationSupportedListResponse;\n result = await this._list(datadogOrganizationId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): AsyncIterableIterator<CreateResourceSupportedResponse> {\n for await (const page of this.listPagingPage(\n datadogOrganizationId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n private _list(\n datadogOrganizationId: string,\n options?: CreationSupportedListOptionalParams\n ): Promise<CreationSupportedListResponse> {\n return this.client.sendOperationRequest(\n { datadogOrganizationId, options },\n listOperationSpec\n );\n }\n\n /**\n * Informs if the current subscription is being already monitored for selected Datadog organization.\n * @param datadogOrganizationId Datadog Organization Id\n * @param options The options parameters.\n */\n get(\n datadogOrganizationId: string,\n options?: CreationSupportedGetOptionalParams\n ): Promise<CreationSupportedGetResponse> {\n return this.client.sendOperationRequest(\n { datadogOrganizationId, options },\n getOperationSpec\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/subscriptionStatuses\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreateResourceSupportedResponseList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.datadogOrganizationId],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreateResourceSupportedResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.datadogOrganizationId],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\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 { 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,QA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D,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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,O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Ae,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,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;